[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-18555: -- Fix Version/s: (was: 3.0.0) > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Fix For: 1.4.0, 2.0.0-alpha-2, 2.0.0 > > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch, HBASE-18555.master.002.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell updated HBASE-18555: --- Fix Version/s: (was: 1.5.0) > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Fix For: 3.0.0, 1.4.0, 2.0.0-alpha-2 > > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch, HBASE-18555.master.002.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jerry He updated HBASE-18555: - Fix Version/s: 1.4.0 > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Fix For: 3.0.0, 1.4.0, 1.5.0, 2.0.0-alpha-2 > > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch, HBASE-18555.master.002.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jerry He updated HBASE-18555: - Resolution: Fixed Hadoop Flags: Reviewed Fix Version/s: 2.0.0-alpha-2 1.5.0 3.0.0 Status: Resolved (was: Patch Available) Committed to branch-1, branch-2 and master. Thanks for the patch. Thanks for the review. > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Fix For: 3.0.0, 1.5.0, 2.0.0-alpha-2 > > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch, HBASE-18555.master.002.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiang Li updated HBASE-18555: - Status: Patch Available (was: Open) > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch, HBASE-18555.master.002.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiang Li updated HBASE-18555: - Attachment: HBASE-18555.master.002.patch Thanks [~chia7712] and [~jerryhe] for the comments. I updated a test case (TestScannerHeartbeatMessages) in hbase-server and upload patch 002. Hadoop QA is triggered. > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch, HBASE-18555.master.002.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiang Li updated HBASE-18555: - Status: Open (was: Patch Available) > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiang Li updated HBASE-18555: - Description: In addxxx() functions of Mutation(Append, Delete, Increment and Put) and Query(Get and Scan), there are redundant Map#put() calls which could be removed to improve the performance. For example, in Put#addColumn() and addImmutable(), after getting the cell list of the given family and add the cell into the list, the code puts (key=family, value=list) into familyMap. In addColumn(), it is like {code} List list = getCellList(family); KeyValue kv = createPutKeyValue(family, qualifier, ts, value); list.add(kv); familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here return this; {code} In addImmutable(), it is like {code} List list = getCellList(family); KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); list.add(kv); familyMap.put(family, list); // <-- here return this; {code} I think those put() for Map only take effect when getCellList(family) returns a new allocated ArrayList. When the list for a family already exist, put() for Map will update the value to the reference of the list, but actually, the reference of the list is not changed. Those put() do not do any harm in terms of the correctness when they are here. But it could be removed to improve the performance. familyMap searches for key and set the new value and return the old value. Those operation take some time but actually are not needed. The put() could be moved into Mutation#getCellList(family) was: In Put#addColumn() and addImmutable(), after getting the cell list of the given family and add the cell into the list, the code puts (key=family, value=list) into familyMap. In addColumn(), it is like {code} List list = getCellList(family); KeyValue kv = createPutKeyValue(family, qualifier, ts, value); list.add(kv); familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here return this; {code} In addImmutable(), it is like {code} List list = getCellList(family); KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); list.add(kv); familyMap.put(family, list); // <-- here return this; {code} I think those put() for Map only take effect when getCellList(family) returns a new allocated ArrayList. When the list for a family already exist, put() for Map will update the value to the reference of the list, but actually, the reference of the list is not changed. Those put() do not do any harm in terms of the correctness when they are here. But it could be removed to improve the performance. familyMap searches for key and set the new value and return the old value. Those operation take some time but actually are not needed. The put() could be moved into Mutation#getCellList(family) > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch > > > In addxxx() functions of Mutation(Append, Delete, Increment and Put) and > Query(Get and Scan), there are redundant Map#put() calls which could be > removed to improve the performance. > For example, in Put#addColumn() and addImmutable(), after getting the cell > list of the given family and add the cell into the list, the code puts > (key=family, value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into
[jira] [Updated] (HBASE-18555) Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query
[ https://issues.apache.org/jira/browse/HBASE-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xiang Li updated HBASE-18555: - Summary: Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and Query (was: Remove redundant familyMap.put() from Put#addColumn() and addImmutable()) > Remove redundant familyMap.put() from addxxx() of sub-classes of Mutation and > Query > --- > > Key: HBASE-18555 > URL: https://issues.apache.org/jira/browse/HBASE-18555 > Project: HBase > Issue Type: Improvement > Components: Client >Reporter: Xiang Li >Assignee: Xiang Li >Priority: Minor > Attachments: HBASE-18555.master.000.patch, > HBASE-18555.master.001.patch > > > In Put#addColumn() and addImmutable(), after getting the cell list of the > given family and add the cell into the list, the code puts (key=family, > value=list) into familyMap. > In addColumn(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value); > list.add(kv); > familyMap.put(CellUtil.cloneFamily(kv), list); // <-- here > return this; > {code} > In addImmutable(), it is like > {code} > List list = getCellList(family); > KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); > list.add(kv); > familyMap.put(family, list); // <-- here > return this; > {code} > I think those put() for Map only take effect when getCellList(family) returns > a new allocated ArrayList. When the list for a family already exist, put() > for Map will update the value to the reference of the list, but actually, the > reference of the list is not changed. > Those put() do not do any harm in terms of the correctness when they are > here. But it could be removed to improve the performance. familyMap searches > for key and set the new value and return the old value. Those operation take > some time but actually are not needed. > The put() could be moved into Mutation#getCellList(family) -- This message was sent by Atlassian JIRA (v6.4.14#64029)