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 87907200C62 for ; Wed, 12 Apr 2017 06:43:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 86150160B9E; Wed, 12 Apr 2017 04:43:01 +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 A4A5E160B9B for ; Wed, 12 Apr 2017 06:43:00 +0200 (CEST) Received: (qmail 42511 invoked by uid 500); 12 Apr 2017 04:42:59 -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 42499 invoked by uid 99); 12 Apr 2017 04:42:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2017 04:42:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CAE40C0D33 for ; Wed, 12 Apr 2017 04:42:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id b3A4uZFr6p1q for ; Wed, 12 Apr 2017 04:42:55 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id EC0735F5CA for ; Wed, 12 Apr 2017 04:42:54 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id u2so14572358wmu.0 for ; Tue, 11 Apr 2017 21:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=pgAicJZKhdmUODDv2XSjnWwFboIWP2IlIfcULOIJpGw=; b=BKUFAjaRjQY2wP2h34pRlHJho1vRoiRxYj13y+QXiNMBj4raIofpLYqa/OdrytkRfy e2oVXihKNx+dwgj9lWuKZOSHNwiQcJpfWHJ6/XGNuPfMVxhyhCtDcBxd/zGB38L9ZRWW cFbO69DlfnVQbFXKlB86jWDOKZC1xR3lt8XMqLqcTiwcyj1LhkvIXLxgbWahbI4iiG8N hzbG/E7wvvfMAz06MyPyt/wm6zhS69mQ95qmub3VdT75z2BYjlit68Ys3nF5W9hUFG4U qtluUxAPZQ1jaxyKZuwCAJRuzYypYAb/S08I8lv4NSWxJP5IVsAQl85XZf0YrNfQCywW hzyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=pgAicJZKhdmUODDv2XSjnWwFboIWP2IlIfcULOIJpGw=; b=TwPVgwrEAb1ppoSvx5YEzLNWl7v3S1z73cO5MdUOk60x6uzT+B72gYh+JE/26zHEt2 sMafeblLZ5bJMCclQ5erZeSPIDZuk2X5395ZUGvER8AZLiSvwnxT6y/U4wEBWpgcv/ZF AehUEQ6lmyCu00gxqWoCl4ddhNEay7YyG8fnw9aVC8KW4SvyuACWK8IeHl2GPh9rKmsQ x4E9aeSwAAntOPD6M3/qUAAWfyEPVssAVtuGRMJv43hPFkJaGCiTErq61Yi1jxJlglF9 uDjorpoMNP7XWSU2JxA3yPWXsTRfNLYmM7nvuDAqvi9DFiyQbjpt85BCYodb+FcBoTLu thtQ== X-Gm-Message-State: AN3rC/4Qx6K619tVeSvknmUno8SBZfZVsqLvuROHZcWlt+BUeBucV5rF U1tvgVtG1HMGK2fWssvSzq2hd8t1Hju8xs4= X-Received: by 10.28.175.209 with SMTP id y200mr10794155wme.81.1491972174355; Tue, 11 Apr 2017 21:42:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.164.147 with HTTP; Tue, 11 Apr 2017 21:42:33 -0700 (PDT) In-Reply-To: References: <35A15B2D-07EF-445A-9CA8-11BF47C72871@gmail.com> <7AE04EB4-7599-4181-B71D-B261773BF636@amazon.com> From: Nick Dimiduk Date: Tue, 11 Apr 2017 21:42:33 -0700 Message-ID: Subject: Re: [DISCUSS] More Shading To: hbase-dev Content-Type: multipart/alternative; boundary=001a1144482077a337054cf0d751 archived-at: Wed, 12 Apr 2017 04:43:01 -0000 --001a1144482077a337054cf0d751 Content-Type: text/plain; charset=UTF-8 > This effort is about our internals. We have a mess of other components all > up inside us such as HDFS, etc., each with their own sets of dependencies > many of which we have in common. This project t is about making it so we > can upgrade at a rate independent of when our upstreamers choose to change. Pardon as I try to get a handle on the intention behind this thread. If the above quote is true, then I think what we want is a set of shaded Hadoop client libs that we can depend on so as to not get all the transitive deps. Hadoop doesn't provide it, but we could do so ourselves with (yet another) module in our project. Assuming, that is, the upstream client interfaces are well defined and don't leak stuff we care about. It also creates a terrible nightmare for anyone downstream of us who repackages HBase. The whole thing is extremely error-prone, because there's not very good tooling for this. Realistically, we end up with a combination of the enforcer plugin and maybe our own custom plugin to ensure clean transitive dependencies... I guess the suggestion of the external repo containing our shaded fork of everything we depend on allows us to continue to compile, run on Hadoop's transitive dependency list w.o actually using any of it, I have that right? How would we version this thing? Between these two choices, I prefer the former as a "more correct" solution, but it depends entirely on how clean of a shaded hadoop we can reliably produce inline our build. On Tue, Apr 11, 2017 at 1:03 PM, Stack wrote: > On Tue, Apr 11, 2017 at 10:23 AM, York, Zach wrote: > > > Should we allow dependent projects (such as Phoenix) to weigh in on this > > issue since they are likely going to be the ones that benefit/are > effected? > > > > I dumped a pointer to here into dev@phoenix. > St.Ack > > > > > On 4/11/17, 10:17 AM, "York, Zach" wrote: > > > > +1 (non-binding) > > > > This sounds like a good idea to me! > > > > Zach > > > > On 4/11/17, 9:48 AM, "saint.ack@gmail.com on behalf of Stack" < > > saint.ack@gmail.com on behalf of stack@duboce.net> wrote: > > > > Let me revive this thread. > > > > Recall, we are stuck on old or particular versions of critical > > libs. We are > > unable to update because our versions will clash w/ versions from > > upstreamer hadoop2.7/2.8/3.0/spark, etc. We have a shaded client. > > We need > > to message downstreamers that they should use it going forward. > > This will > > help going forward but it will not inoculate our internals nor an > > existing > > context where we'd like to be a compatible drop-in. > > > > We could try hackery filtering transitive includes up in poms for > > each > > version of hadoop/spark that we support but in the end, its a > > bunch of > > effort, hard to test, and we are unable to dictate the CLASSPATH > > order in > > all situations. > > > > We could try some shading voodoo inline w/ build. Because shading > > is a > > post-package step and because we are modularized and shading > > includes the > > shaded classes in the artifact produced, we'd end up w/ multiple > > copies of > > guava/netty/etc. classes, an instance per module that makes a > > reference. > > > > Lets do Sean's idea of a pre-build step where we package and > > relocate > > ('shade') critical dependencies (Going by the thread above, Ram, > > Anoop, and > > Andy seems good w/ general idea). > > > > In implementation, we (The HBase PMC) would ask for a new repo > > [1]. In here > > we'd create a new mvn project. This project would produce a > single > > artifact > > (jar) called hbase-dependencies or hbase-3rdparty or > > hbase-shaded-3rdparty > > libs. In it would be relocated core libs such as guava and netty > > (and maybe > > protobuf). We'd publish this artifact and then have hbase depend > > on it > > changing all references to point at the relocation: e.g. rather > > than import > > com.google.common.collect.Maps, we'd import > > org.apache.hadoop.hbase.com.google.common.collect.Maps. > > > > We (The HBase PMC) will have to make releases of this new > artifact > > and vote > > on them. I think it will be a relatively rare event. > > > > I'd be up for doing the first cut if folks are game. > > > > St.Ack > > > > > > 1. URL via Sean but for committers to view only: > > https://reporeq.apache.org/ > > > > On Sun, Oct 2, 2016 at 10:29 PM, ramkrishna vasudevan < > > ramkrishna.s.vasudevan@gmail.com> wrote: > > > > > +1 for Sean's ideas. Bundling all the dependent libraries and > > shading them > > > into one jar and HBase referring to it makes sense and should > > avoid some of > > > the pain in terms of IDE usage. Stack's doc clearly talks about > > the IDE > > > issues that we may get after this protobuf shading goes in. It > > may be > > > difficult for new comers and those who don't know this > > background of why it > > > has to be like that. > > > > > > Regards > > > Ram > > > > > > On Sun, Oct 2, 2016 at 10:51 AM, Stack > wrote: > > > > > > > On Sat, Oct 1, 2016 at 6:32 PM, Jerry He > > > wrote: > > > > > > > > > How is the proposed going to impact the existing > > shaded-client and > > > > > shaded-server modules, making them unnecessary and go away? > > > > > > > > > > > > > No. We still need the blanket shading of hbase client and > > server. > > > > > > > > This effort is about our internals. We have a mess of other > > components > > > all > > > > up inside us such as HDFS, etc., each with their own sets of > > dependencies > > > > many of which we have in common. This project t is about > > making it so we > > > > can upgrade at a rate independent of when our upstreamers > > choose to > > > change. > > > > > > > > > > > > > It doesn't seem so. These modules are supposed to shade > > HBase and > > > > upstream > > > > > from downstream users. > > > > > > > > > > > > > Agree. > > > > > > > > Thanks for drawing out the difference between these two > > shading efforts, > > > > > > > > St.Ack > > > > > > > > > > > > > > > > > Thanks. > > > > > > > > > > Jerry > > > > > > > > > > On Sat, Oct 1, 2016 at 2:33 PM, Andrew Purtell < > > > andrew.purtell@gmail.com > > > > > > > > > > wrote: > > > > > > > > > > > > Sean has suggested a pre-build step where in another > > repo we'd make > > > > > hbase > > > > > > > shaded versions of critical libs, 'release' them > (votes, > > etc.) and > > > > then > > > > > > > have core depend on these. It be a bunch of work but > > would make the > > > > > dev's > > > > > > > life easier. > > > > > > > > > > > > So when we make changes that require updates to and > > rebuild of the > > > > > > supporting libraries, as a developer I would make local > > changes, > > > > install > > > > > a > > > > > > snapshot of that into the local maven cache, then point > > the HBase > > > build > > > > > at > > > > > > the snapshot, then do the other half of the work, then > > push up to > > > both? > > > > > > > > > > > > I think this could work. > > > > > > > > > > > > > > > > > > > > > > > --001a1144482077a337054cf0d751--