[jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
[ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16241446#comment-16241446 ] Asim Zafir commented on HBASE-18722: I am in process of finalizing this. I will take care of it. > Replace copied guava code w/ pointer to the (shaded) lib > > > Key: HBASE-18722 > URL: https://issues.apache.org/jira/browse/HBASE-18722 > Project: HBase > Issue Type: Bug >Reporter: stack >Priority: Minor > Labels: beginner > > I found a few bits of code copied from guava src: > {code} > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * Copied > from guava source code v15 (LimitedInputStream) > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * allows to > be compatible with guava 11 to 15+. > ./src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java: * > from guava v21 > ./src/main/java/org/apache/hadoop/hbase/util/Bytes.java: * > comparator from guava v21 > {code} > We can instead point back at guava implementations now we use shaded guava > internally. No point having it in our code base when latest guava is on > latest CLASSPATH (This wasn't always the case; this is why the code was > copied into hbase). > Also, there are other copies other than the above. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
[ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16241444#comment-16241444 ] Sahil Aggarwal commented on HBASE-18722: [~azafir] You working on it or shall i take it up? > Replace copied guava code w/ pointer to the (shaded) lib > > > Key: HBASE-18722 > URL: https://issues.apache.org/jira/browse/HBASE-18722 > Project: HBase > Issue Type: Bug >Reporter: stack >Priority: Minor > Labels: beginner > > I found a few bits of code copied from guava src: > {code} > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * Copied > from guava source code v15 (LimitedInputStream) > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * allows to > be compatible with guava 11 to 15+. > ./src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java: * > from guava v21 > ./src/main/java/org/apache/hadoop/hbase/util/Bytes.java: * > comparator from guava v21 > {code} > We can instead point back at guava implementations now we use shaded guava > internally. No point having it in our code base when latest guava is on > latest CLASSPATH (This wasn't always the case; this is why the code was > copied into hbase). > Also, there are other copies other than the above. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
[ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223656#comment-16223656 ] Mike Drob commented on HBASE-18722: --- For (1) we don't have to do it all at once. Stack identified three copied files above, we can work against those now and as we find more then we can remove them as well. Actually looking at the code described above... the notes from ByteBufferUtils and Bytes are only partial copies where we reference that we copied the logic. Not sure if there's really anything to migrate. Getting rid of our copy of LimitInputStream would be nice though. It looks like we had a copy so that we can use newer Guava versions, when we should have switched usages to https://google.github.io/guava/releases/22.0/api/docs/com/google/common/io/ByteStreams.html#limit-java.io.InputStream-long- > Replace copied guava code w/ pointer to the (shaded) lib > > > Key: HBASE-18722 > URL: https://issues.apache.org/jira/browse/HBASE-18722 > Project: HBase > Issue Type: Bug >Reporter: stack >Priority: Minor > Labels: beginner > > I found a few bits of code copied from guava src: > {code} > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * Copied > from guava source code v15 (LimitedInputStream) > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * allows to > be compatible with guava 11 to 15+. > ./src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java: * > from guava v21 > ./src/main/java/org/apache/hadoop/hbase/util/Bytes.java: * > comparator from guava v21 > {code} > We can instead point back at guava implementations now we use shaded guava > internally. No point having it in our code base when latest guava is on > latest CLASSPATH (This wasn't always the case; this is why the code was > copied into hbase). > Also, there are other copies other than the above. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
[ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223209#comment-16223209 ] Asim Zafir commented on HBASE-18722: This is my first ticket to hbase so perhaps some dummy questions.. but I folllow the strategy: 1) identify code copies from guauva sources - question is how? (perhaps to get the get the guava source and compare the list of the file that are included and then get rid of them from the repo hiearchy? 2) where the import statement should then go to include org.apache.hadoop.hbase.shaded.com.google.guava I am ready for all kind of work to support you guys - QA/Test/ Bug fixes, pretty much anything. Asim > Replace copied guava code w/ pointer to the (shaded) lib > > > Key: HBASE-18722 > URL: https://issues.apache.org/jira/browse/HBASE-18722 > Project: HBase > Issue Type: Bug >Reporter: stack >Priority: Minor > Labels: beginner > > I found a few bits of code copied from guava src: > {code} > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * Copied > from guava source code v15 (LimitedInputStream) > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * allows to > be compatible with guava 11 to 15+. > ./src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java: * > from guava v21 > ./src/main/java/org/apache/hadoop/hbase/util/Bytes.java: * > comparator from guava v21 > {code} > We can instead point back at guava implementations now we use shaded guava > internally. No point having it in our code base when latest guava is on > latest CLASSPATH (This wasn't always the case; this is why the code was > copied into hbase). > Also, there are other copies other than the above. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
[ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223195#comment-16223195 ] Mike Drob commented on HBASE-18722: --- [~azafir] - Thanks for your interest in helping out here. If you are familiar with git, you can make your changed locally and attach a patch file to this JIRA. Then our automated QA system will review it and one of the committers should be by to look at it shortly. As far as the actual changes in the patch... we would probably want to delete the code that is copied from guava sources, and then update any other references that were using that code to the guava available at org.apache.hadoop.hbase.shaded.com.google.guava package imports. Let me know if this is unclear or you think you need more guidance. > Replace copied guava code w/ pointer to the (shaded) lib > > > Key: HBASE-18722 > URL: https://issues.apache.org/jira/browse/HBASE-18722 > Project: HBase > Issue Type: Bug >Reporter: stack >Priority: Minor > Labels: beginner > > I found a few bits of code copied from guava src: > {code} > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * Copied > from guava source code v15 (LimitedInputStream) > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * allows to > be compatible with guava 11 to 15+. > ./src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java: * > from guava v21 > ./src/main/java/org/apache/hadoop/hbase/util/Bytes.java: * > comparator from guava v21 > {code} > We can instead point back at guava implementations now we use shaded guava > internally. No point having it in our code base when latest guava is on > latest CLASSPATH (This wasn't always the case; this is why the code was > copied into hbase). > Also, there are other copies other than the above. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
[ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16223190#comment-16223190 ] Asim Zafir commented on HBASE-18722: so i guess we need to do a code clean up and get rid of entire guava snippet of code that is in hbase code base? how do I go about carrying this out? > Replace copied guava code w/ pointer to the (shaded) lib > > > Key: HBASE-18722 > URL: https://issues.apache.org/jira/browse/HBASE-18722 > Project: HBase > Issue Type: Bug >Reporter: stack >Priority: Minor > Labels: beginner > > I found a few bits of code copied from guava src: > {code} > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * Copied > from guava source code v15 (LimitedInputStream) > ./src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java: * allows to > be compatible with guava 11 to 15+. > ./src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java: * > from guava v21 > ./src/main/java/org/apache/hadoop/hbase/util/Bytes.java: * > comparator from guava v21 > {code} > We can instead point back at guava implementations now we use shaded guava > internally. No point having it in our code base when latest guava is on > latest CLASSPATH (This wasn't always the case; this is why the code was > copied into hbase). > Also, there are other copies other than the above. -- This message was sent by Atlassian JIRA (v6.4.14#64029)