[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-22 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14179736#comment-14179736
 ] 

Marcus Eriksson commented on CASSANDRA-8109:


[~thobbs] we should probably do this in 2.1 as well

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0

 Attachments: cassandra-trunk-8109.txt


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-22 Thread Rajanarayanan Thottuvaikkatumana (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14179737#comment-14179737
 ] 

Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8109:
-

I will generate patch for 2.1 as well and upload it. 

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0

 Attachments: cassandra-trunk-8109.txt


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-16 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14173466#comment-14173466
 ] 

Sylvain Lebresne commented on CASSANDRA-8109:
-

bq. Are you suggesting that these two classes should not be generics at all?

Yes, that's what I'm suggesting.

bq. in MaxTracker/MinTracker get method, specifying whether to return int or 
long will be tricky depending on the situation

Honestly, those classes are small enough that  I don't think it would be a big 
deal to just create 4 classes: MaxIntTracker, MinIntTrack, MaxLongTracker and 
MinLongTracker. 

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-16 Thread Rajanarayanan Thottuvaikkatumana (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14173470#comment-14173470
 ] 

Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8109:
-

Great. Thanks for the clarification. I will make the necessary changes. Thanks 
Raj

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-16 Thread Rajanarayanan Thottuvaikkatumana (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14173518#comment-14173518
 ] 

Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8109:
-

I have made the code changes in the trunk, did a clean compile and it is going 
through fine. What are the specific tests I need to run to make sure that the 
changes are working? When I ran the complete test suite ant test, I am seeing 
many failures (even before these changes it was like that). How do I proceed, 
please advice. Thanks Raj

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-16 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14174235#comment-14174235
 ] 

Tyler Hobbs commented on CASSANDRA-8109:


[~rnamboodiri] trunk isn't completely stable yet, so some test failures are 
expected.  In the case of this ticket, the compiler should be able to guarantee 
the safety of the changes, so go ahead and attach your patch.

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-15 Thread Rajanarayanan Thottuvaikkatumana (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172209#comment-14172209
 ] 

Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8109:
-

Sylvain,
Currently these two classes are generics. When I searched the code base, these 
are instantiated with Long and Integer classes. I understood the boxing issue 
that is described in the ticket. Out of the below cases, can you please 
identify which change you want to implement?

1) Are you suggesting that these two classes should not be generics at all? If 
that is the case, did you mean to change these two classes to have the 
properties defaultValue and value to be declared as long? If that is the 
case, in MaxTracker/MinTracker get method, specifying whether to return int 
or long will be tricky depending on the situation and client code will be 
affected.

2) Keep the current design as the generic classes as it is. Change the 
properties defaultValue and value to long. In this approach also, the get 
method will have issue to return the correct data type value. Even in this case 
the client code will get affected

OR did you mean something else. Please clarify. 

Thanks
-Raj

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-14 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14171025#comment-14171025
 ] 

Tyler Hobbs commented on CASSANDRA-8109:


[~rnamboodiri] I've assigned the ticket to you, but in general, yes, you can 
assign yourself a ticket and leave a comment stating that you intend to handle 
the ticket.

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker

2014-10-14 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14171099#comment-14171099
 ] 

Brandon Williams commented on CASSANDRA-8109:
-

Actually to be an assignee that means you have to be a contributor, so if we 
add someone who hasn't contributed before just to assign, then they never post 
a patch, we have go undo the addition which is painful.  Much better to just 
leave a comment, post a patch, then we'll assign on commit.

 Avoid constant boxing in ColumnStats.{Min/Max}Tracker
 -

 Key: CASSANDRA-8109
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8109
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0


 We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track 
 timestamps and deletion times in sstable. Those classes are generics but we 
 really ever use them for longs and integers. The consequence is that every 
 call to their {{update}} method (called for every cell during sstable write) 
 box it's argument (since we don't store the cell timestamps and deletion time 
 boxed). That feels like a waste that is easy to fix: we could just make those 
 work on longs only for instance and convert back to int at the end when 
 that's what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)