Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 40630200D2A for ; Sat, 28 Oct 2017 19:04:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3F0B4160BE1; Sat, 28 Oct 2017 17:04:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 83C6A160BDC for ; Sat, 28 Oct 2017 19:04:09 +0200 (CEST) Received: (qmail 76266 invoked by uid 500); 28 Oct 2017 17:04:08 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 76254 invoked by uid 99); 28 Oct 2017 17:04:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2017 17:04:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AB088C87D9 for ; Sat, 28 Oct 2017 17:04:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id naig6gMGDC3Y for ; Sat, 28 Oct 2017 17:04:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5A40E60D08 for ; Sat, 28 Oct 2017 17:04:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 27430E0FC2 for ; Sat, 28 Oct 2017 17:04:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E97D4212FE for ; Sat, 28 Oct 2017 17:04:00 +0000 (UTC) Date: Sat, 28 Oct 2017 17:04:00 +0000 (UTC) From: "Mike Drob (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18722) Replace copied guava code w/ pointer to the (shaded) lib MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 28 Oct 2017 17:04:10 -0000 [ 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)