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 92492200B93 for ; Sat, 1 Oct 2016 22:10:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 90AB1160AD7; Sat, 1 Oct 2016 20:10: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 CF9A2160AD5 for ; Sat, 1 Oct 2016 22:10:14 +0200 (CEST) Received: (qmail 74410 invoked by uid 500); 1 Oct 2016 20:10: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 74398 invoked by uid 99); 1 Oct 2016 20:10: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; Sat, 01 Oct 2016 20:10: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 1873D180510 for ; Sat, 1 Oct 2016 20:10:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.78 X-Spam-Level: * X-Spam-Status: No, score=1.78 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, 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 vmBBXwGgSSjZ for ; Sat, 1 Oct 2016 20:10:11 +0000 (UTC) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BD47A5FBCE for ; Sat, 1 Oct 2016 20:10:10 +0000 (UTC) Received: by mail-it0-f45.google.com with SMTP id j69so87492504itb.0 for ; Sat, 01 Oct 2016 13:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=+RUQ+CiyoKZhTx3jvtIZC2eymUNwF+SaF0JsBt9uM7M=; b=EoOXKNU+UD34cmIubikohH2k4amJNFPEz2K3QAjY+rqmMgYH03IrQG0lzSsnT1kqai sZyXip+YY/L+9fRut6tkAx/gQ6ca3IcptMOqPoxMVJKH5X6yQ42n+HWAbezbeApSH00S 1CKslsUPSbSdhsXiiRwv096ETqpPyw7EIzMq0LeqYRza7SH4+F6xnyTmeykd1hFDjKpH QYaP0ggLqAUJeO8h0YJ2ylE3sKd5rMQBhF+UHqENHpAJxnDO3JEHtov/Xyv91klb/jhp W9+eRKeAq8vaTAEWvm4hr5kS9lYS1tR6dibHaiBooGJ1BRdDDwspCm1eekIWkWijl93K 0V7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=+RUQ+CiyoKZhTx3jvtIZC2eymUNwF+SaF0JsBt9uM7M=; b=GOMKvG6Lp8u2GVvX2BkSYHAh3vQ5BMa5yesEp6oWfTL84SR+kk5/6z9F4dp95k/OxI K5xd5OrG1pjTDcxCD/DUuNONAPY09FQXM1vo2LilKEAKyaqI9IgKggqSViCsvjhaTiGC +eVw0iy77AFQ2PvqeERGuKK1oe2BeLcXQSXb5fDFRLmxPbHvK3w8JZV60YhNDQzVdPJJ bLR/T49w9IA9PVoZUFN3vD8pQ9W70FuG4OKBhuz4bB3j79IL2mZi5W2Q+pJwLUgW8FmD 3xVoF42y6Np1tbTayttKYMeEaSD/8UuGevAiSc0zJJK3B2ZVyghsG9l8JVO8if/V8KK2 iBug== X-Gm-Message-State: AA6/9RlIF+IMGJbvd3EVI9krfFDIjmtMfPO3/rEeH2eaBUj1busJi3/hrjx6ptxtQ7aY6EOo8kULea5N/atOXw== X-Received: by 10.36.54.67 with SMTP id l64mr11247980itl.69.1475352609905; Sat, 01 Oct 2016 13:10:09 -0700 (PDT) MIME-Version: 1.0 Sender: saint.ack@gmail.com Received: by 10.36.213.66 with HTTP; Sat, 1 Oct 2016 13:10:09 -0700 (PDT) From: Stack Date: Sat, 1 Oct 2016 13:10:09 -0700 X-Google-Sender-Auth: i4g8KkBDDVnyZ-dpCxvw5bKM62k Message-ID: Subject: [DISCUSS] More Shading To: HBase Dev List Content-Type: multipart/alternative; boundary=001a1143d2f03b6399053dd34c39 archived-at: Sat, 01 Oct 2016 20:10:15 -0000 --001a1143d2f03b6399053dd34c39 Content-Type: text/plain; charset=UTF-8 HBASE-15638 is about shading protobufs. Lets shade other critical libs too so we can run with versions of the libraries we favor rather than versions dictated by dependencies. For example, our guava is from the stone ages. Guava is a quality library that we should be making use of throughout our code base. We are afraid to update it because it will break when we share our CLASSPATH with another component or a dependency of ours transitively includes a conflicting version. Worse, there have been incidents where we undo Guava usage because of CLASSPATH clashes (Running a recent HBase with a recent version of Drill broke on Guava StopWatch import...). That we should shade critical, popular, core libs seems self-evident (though I would be interested if folks have other opinions). What I want to discuss though is how we go about it. The HBASE-15638 (protobuf shading) approach has us reference the relocated artifact explicitly. This makes for an ugly ripple across the codebase as we declare which protobuf Message is intended; either com.google.protobuf.Message or org.apache.hadoop.hbase.shaded.com.google.protobuf.Message. It is a pain making all the changes but the intent is clear. I was thinking we'd do similar for guava and whatever else we think fits this category. I'd make a hbase-3rdparty-shaded or some such module and do all hackery therein. Where it gets awkward is whether or not we check in the shaded artifact source code (Over in HBASE-15638, we have checked in the relocated protobuf3 source code because we are going to patch it, for a while at least). For the build and runtime to work, we do not need the relocated source code to be present but not having source code present is a hurdle for devs who use IDEs (Everyone but Sean and Matteo). Their code will be flagged w/ red flags saying the relocated artifact is missing/unresolvable. To 'fix', they need build the shaded module and then in their IDE, drop the shaded module and add the built shaded module jar to the IDE's build-time CLASSPATH. This is awkward. Is this too much to ask of devs, especially those getting going for the first time? I could do up doc and IDE configs to help but this would be an added hurdle getting setup. 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. Interested in any thoughts you lot might have. Thanks, St.Ack --001a1143d2f03b6399053dd34c39--