From common-issues-return-193252-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Dec 18 19:01:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 206DC18065B for ; Wed, 18 Dec 2019 20:01:05 +0100 (CET) Received: (qmail 78608 invoked by uid 500); 18 Dec 2019 19:01:02 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 78491 invoked by uid 99); 18 Dec 2019 19:01:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2019 19:01:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7A40DE12F2 for ; Wed, 18 Dec 2019 19:01:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 5198B7808B5 for ; Wed, 18 Dec 2019 19:01:00 +0000 (UTC) Date: Wed, 18 Dec 2019 19:01:00 +0000 (UTC) From: "Vinayakumar B (Jira)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-16621) [pb-upgrade] spark-hive doesn't compile against hadoop trunk because of Token's marshalling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-16621?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 999436#comment-16999436 ]=20 Vinayakumar B commented on HADOOP-16621: ---------------------------------------- Sorry for being late. Following public APIs were introduced by HADOOP-12563 back in 2016 in Hadoo= p 3.0.0 version. {code:java} public Token(TokenProto tokenPB); public TokenProto toTokenProto(); {code} Ideally there should not be any public API with @Public interface with prot= obuf in signature. Right now, this is breaking the binary compatibility of downstream due to = protobuf version upgrade. Because generated proto classes' super class name= is changed to {{GeneratedMessage3}} from {{GeneratedMessage}} in 2.5.0 pro= tobuf. So possible options to proceed will be only # Remove all public methods with protobuf signature replace with helper cl= asses to do the same job. as being done in HDFS' {{PBHelperClient.java}}. T= his will break the compatibility if by any chance these methods are being u= sed outside hadoop-common module (also Hadoop project overall, as upgrade h= appens all Hadoop components together). # Mark methods deprecated, Keep the old 'TokenProto' class with 2.5.0 gene= rated protobuf committed to repo. And rename current {{TokenProto}}=C2=A0to= {{TokenProto3}} and all their occurances throughout project (Hopefully Tok= enProto is not used outside Hadoop project). And skip shading of 2.5.0 Toke= nProto. Can remove methods and committed TokenProto class. =C2=A0 Approach #1 is would be easy and direct change, but again compatibility iss= ue if these methods used by other projects which is most unlikely. [~stevel@apache.org] / [~vinodkv]=C2=A0/ [~raviprak] is it okay to remove a= bove mentioned methods ? and replace with something similar to {{PBHelperCl= ient#convert(Token tok)}} and {{PBHelperClient#convert(TokenProto tok)}} =C2=A0 Approach #2 is a workaround still keeping the Compatibility but unnecessary= (most possibly unused ) code will be present in repo. This change is very much mandatory to allow spark(and others, which just i= mports Token classes) to compile/run successfully without need to explicitl= y set the protobuf version same as Hadoop. =C2=A0 Please let me know your opinions. > [pb-upgrade] spark-hive doesn't compile against hadoop trunk because of T= oken's marshalling > -------------------------------------------------------------------------= ------------------ > > Key: HADOOP-16621 > URL: https://issues.apache.org/jira/browse/HADOOP-16621 > Project: Hadoop Common > Issue Type: Sub-task > Components: common > Affects Versions: 3.3.0 > Reporter: Steve Loughran > Priority: Major > > the move to protobuf 3.x stops spark building because Token has a method = which returns a protobuf, and now its returning some v3 types. > if we want to isolate downstream code from protobuf changes, we need to m= ove that marshalling method from token and put in a helper class. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org