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 7F2B7200C23 for ; Wed, 8 Feb 2017 03:51:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7DC2F160B68; Wed, 8 Feb 2017 02:51:15 +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 A1BCC160B3E for ; Wed, 8 Feb 2017 03:51:14 +0100 (CET) Received: (qmail 99568 invoked by uid 500); 8 Feb 2017 02:51:13 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 99555 invoked by uid 99); 8 Feb 2017 02:51:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2017 02:51:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E5D6C18C458 for ; Wed, 8 Feb 2017 02:51:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.898 X-Spam-Level: * X-Spam-Status: No, score=1.898 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id kzTSPAhYZ8UI for ; Wed, 8 Feb 2017 02:51:11 +0000 (UTC) Received: from mail-wj0-f176.google.com (mail-wj0-f176.google.com [209.85.210.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7BAED5F201 for ; Wed, 8 Feb 2017 02:51:10 +0000 (UTC) Received: by mail-wj0-f176.google.com with SMTP id b20so7192773wjs.2 for ; Tue, 07 Feb 2017 18:51:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=c1EJ5Wn2ZFGPWbKfSKH1DhC7TGxFkcJXM4TcrFFnfuI=; b=crqoIgZU/f/o6VSK+3u3RxUCif5fLfYfdPcQJ/nvvY/p1SmIajR0maYxM/viSqOEj8 sQeobWdLjjAos6Jtp98W5N7Nc/Ic1SkPo5P34fImiJmQpU9o9gIyPquS3o3HjW4ENM9J DM+VX9MXDd0OJ7GXMOAv+mO8ooPODegpcWA0Sxc/LWf/xiyM6fHUiSoIQuSvTDZLEedm thzMClIhvXXslVINn1arC3DUge7PEWZJrl4/eehf2Ov8cZwzK+JTItAR+Yk1bIPco51e 6yozJWqztnWgZME9ZDE1tRpzQ+58GUPxG1Ab3dxA9k/Qu+wY6O1I5Y1h7wnw/MPCkRcL d75Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=c1EJ5Wn2ZFGPWbKfSKH1DhC7TGxFkcJXM4TcrFFnfuI=; b=pedFV8cxj4F/E+5VAMmItLE/dP5ZUxC87jIQWBkGlVO/5hDqTyQKnjC0jMLrLoFEQp q5cqKXQToDflZfYAFEKOFg0XcHDfgCSDOubEJsjcRYAIfBam3eeJ1PoBO9HMrDwQRhae ZpKBi1XBVEiH0oIcgZulJZCyvlH+iz5fywDcCW6DvEUMDcS+b5cV4eX5tJrbjfGr4cCl QKHOiaq8CYLNYuY4nE2ZCuNyWxtT/pV2GRK3l5peI0ees4mPMkXvsrTkq+QmEZshe38y kzR/VvSWPB7j55Dt/S4GSNGQ4vgfaSRPbsfprfYs7ytG2fLOYfq94iCBhCFTdZEcpO1k GR0g== X-Gm-Message-State: AMke39lbVV48wxhcPZ4fzFjKRAGHqTARqczWpJJMlJ1oJ82enMVWeI+ff3NRmdQwRIeBj3zVNCBiTbtp9JWSHw== X-Received: by 10.28.128.205 with SMTP id b196mr14980115wmd.21.1486522266894; Tue, 07 Feb 2017 18:51:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Nick Dimiduk Date: Wed, 08 Feb 2017 02:50:55 +0000 Message-ID: Subject: Re: [DISCUSSION] Upgrading core dependencies To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=001a1141e664ab49160547fbef0e archived-at: Wed, 08 Feb 2017 02:51:15 -0000 --001a1141e664ab49160547fbef0e Content-Type: text/plain; charset=UTF-8 For the client: I'm a fan of shaded client modules by default and minimizing the exposure of that surface area of 3rd party libs (none, if possible). For example, Elastic Search has a similar set of challenges, the solve it by advocating users shade from step 1. It's addressed first thing in the docs for their client libs. We could take it a step further by making the shaded client the default client (o.a.hbase:hbase-client) artifact and internally consume an hbase-client-unshaded. Turns the whole thing on it's head in a way that's better for the naive user. For MR/Spark/etc connectors: We're probably stuck as it is until necessary classes can be extracted from hbase-server. I haven't looked into this lately, so I hesitate to give a prescription. For coprocessors: They forfeit their right to 3rd party library dependency stability by entering our process space. Maybe in 3.0 or 4.0 we can rebuild on jigsaw or OSGi, but for today I think the best we should do is provide relatively stable internal APIs. I also find it unlikely that we'd want to spend loads of cycles optimizing for this usecase. There's other, bigger fish, IMHO. For size/compile time: I think these ultimately matter less than user experience. Let's find a solution that sucks less for downstreamers and work backward on reducing bloat. On the point of leaning heavily on Guava: their pace is traditionally too fast for us to expose in any public API. Maybe that's changing, in which case we could reconsider for 3.0. Better to start using the new API's available in Java 8... Thanks for taking this up, Stack. -n On Tue, Feb 7, 2017 at 12:22 PM Stack wrote: > Here's an old thorny issue that won't go away. I'd like to hear what folks > are thinking these times. > > My immediate need is that I want to upgrade Guava [1]. I want to move us to > guava 21.0, the latest release [2]. We currently depend on guava 12.0. > Hadoop's guava -- 11.0 -- is also on our CLASSPATH (three times). We could > just do it in an hbase-2.0.0, a major version release, but then > downstreamers and coprocessors that may have been a little lazy and that > have transitively come to depend on our versions of libs will break [3]. > Then there is the murky area around the running of YARN/MR/Spark jobs where > the ordering of libs on the CLASSPATH gets interesting where fat-jaring or > command-line antics can get you over (most) problems if you persevere. > > Multiply the above by netty, jackson, and a few other favorites. > > Our proffered solution to the above is the shaded hbase artifact project; > have applications and tasks refer to the shaded hbase client instead. > Because we've not done the work to narrow the surface area we expose to > downstreamers, most consumers of our API -- certainly in a spark/MR context > since our MR utility is buried in hbase-server module still -- need both > the shaded hbase client and server on their CLASSPATH (i.e. near all of > hbase). > > Leaving aside for the moment that our shaded client and server need > untangling, getting folks up on the shaded artifacts takes effort > evangelizing. We also need to be doing work to make sure our shading > doesn't leak dependencies, that it works for all deploy scenarios, and that > this route forward is well doc'd, and so on. > > I don't see much evidence of our pushing the shaded artifacts route nor of > their being used. What is the perception of others? > > I played with adding a new module to host shaded 3rd party libs[4]. The > downsides are a couple; would have to internally, refer to the offset > version of the lib and we bulk up our tarball by a bunch of megs (Build > gets a few seconds longer, not much). Upside is that we can float over a > variety of hadoop/spark versions using whatever guava or netty we want; > downstreamers and general users should have an easier time of it too > because they'll be less likely to run into library clashes. is this project > worth finishing? > > WDYT? > St.Ack > > 1. I wanted to make use of the protobuf to-json tool. It is in the > extra-jar, protobuf-util. It requires a guava 16.0. > 2. Guava is a quality lib that should be at the core of all our dev but we > are gun shy around using it because it semver's with gusto at a rate that > is orders of magnitude in advance of the Hadoop/HBase cadence. > 3. We are trying to minimize breakage when we go to hbase-2.0.0. > 4. HBASE-15749 suggested this but was shutdown because it made no case for > why we'd want to do it. > --001a1141e664ab49160547fbef0e--