hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib
Date Sat, 28 Oct 2017 17:04:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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)

Mime
View raw message