[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2018-03-21 Thread stack (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack updated HBASE-18251:
--
Fix Version/s: (was: 3.0.0)

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Improvement
>Affects Versions: 2.0.0-alpha-1
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
>Priority: Major
> Fix For: 1.4.0, 2.0.0-alpha-2, 2.0.0
>
> Attachments: HBASE-18251-v2.patch, HBASE-18251-v2.patch, 
> HBASE-18251.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-08-15 Thread ramkrishna.s.vasudevan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated HBASE-18251:
---
Resolution: Fixed
Status: Resolved  (was: Patch Available)

[~brfrn169] Thanks for the patch.
Pushed to master and 1.4. Thanks for the reviews too. 

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Improvement
>Affects Versions: 2.0.0-alpha-1
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Fix For: 3.0.0, 1.4.0, 2.0.0-alpha-2
>
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch, 
> HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-08-15 Thread ramkrishna.s.vasudevan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated HBASE-18251:
---
Fix Version/s: 1.4.0

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Improvement
>Affects Versions: 2.0.0-alpha-1
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Fix For: 3.0.0, 1.4.0, 2.0.0-alpha-2
>
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch, 
> HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-08-15 Thread ramkrishna.s.vasudevan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated HBASE-18251:
---
Affects Version/s: 2.0.0-alpha-1
Fix Version/s: 2.0.0-alpha-2
   3.0.0
   Issue Type: Improvement  (was: Bug)

Will push this to master as it is an improvement. Should we push this to branch 
1.1 and above also? Ping [~saint@gmail.com]?

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Improvement
>Affects Versions: 2.0.0-alpha-1
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Fix For: 3.0.0, 2.0.0-alpha-2
>
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch, 
> HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-08-14 Thread ramkrishna.s.vasudevan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated HBASE-18251:
---
Attachment: HBASE-18251-v2.patch

Resubmitting for QA before commit.

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch, 
> HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-08-14 Thread ramkrishna.s.vasudevan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated HBASE-18251:
---
Hadoop Flags: Reviewed
  Status: Patch Available  (was: Open)

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch, 
> HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-08-14 Thread ramkrishna.s.vasudevan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated HBASE-18251:
---
Status: Open  (was: Patch Available)

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-19 Thread Toshihiro Suzuki (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Toshihiro Suzuki updated HBASE-18251:
-
Attachment: HBASE-18251-v2.patch

I just attached the new patch because of the test failure.

I modified that CellFlatMap supports first/lastEntry(). Because this 
modification is that Entry class is instantiated every time we call 
first/lastEntry(), it might be memory inefficient. 

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Attachments: HBASE-18251.patch, HBASE-18251-v2.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-18 Thread Toshihiro Suzuki (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Toshihiro Suzuki updated HBASE-18251:
-
Assignee: Toshihiro Suzuki
  Status: Patch Available  (was: Open)

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Toshihiro Suzuki
> Attachments: HBASE-18251.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-18 Thread Toshihiro Suzuki (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Toshihiro Suzuki updated HBASE-18251:
-
Attachment: HBASE-18251.patch

I've just attached the patch.

The patch uses first/lastEntry().getValue() instead of first/lastKey(). 
Because ConcurrentSkipListMap.put() doesn't replace the key when the map 
previously contained a mapping for the key,  first/lastKey() will return the 
old cell instance even though we overwrite the value by using 
ConcurrentSkipListMap.put(). Therefore we should not use first/lastKey() in 
this case.


> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
> Attachments: HBASE-18251.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-12 Thread Ben Watson (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Watson updated HBASE-18251:
---
Status: Open  (was: Patch Available)

Sorry one of the integration tests failed, removing patch.

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Ben Watson
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-12 Thread Ben Watson (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Watson updated HBASE-18251:
---
Attachment: (was: HBASE-18251.master.001.patch)

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Ben Watson
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-12 Thread Ben Watson (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Watson updated HBASE-18251:
---
Status: Patch Available  (was: Open)

Patch added for master branch - seems pretty straightforward.

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Ben Watson
> Attachments: HBASE-18251.master.001.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HBASE-18251) Remove unnecessary traversing to the first and last keys in the CellSet

2017-07-12 Thread Ben Watson (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-18251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Watson updated HBASE-18251:
---
Attachment: HBASE-18251.master.001.patch

> Remove unnecessary traversing to the first and last keys in the CellSet
> ---
>
> Key: HBASE-18251
> URL: https://issues.apache.org/jira/browse/HBASE-18251
> Project: HBase
>  Issue Type: Bug
>Reporter: Anastasia Braginsky
>Assignee: Ben Watson
> Attachments: HBASE-18251.master.001.patch
>
>
> The implementation of finding the first and last keys in the CellSet is as 
> following:
> {code}
>  public Cell first() {
> return this.delegatee.get(this.delegatee.firstKey());
>   }
>   public Cell last() {
> return this.delegatee.get(this.delegatee.lastKey());
>   }
> {code}
> Recall we have Cell to Cell mapping, therefore the methods bringing the 
> first/last key, which allready return Cell. Thus no need to waist time on the 
> get() method for the same Cell.
> Fix: return just the first/lastKey(), should be at least twice more effective.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)