hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Abdelnur <t...@cloudera.com>
Subject Re: ProtoBuf generation?
Date Sun, 13 Jan 2013 20:10:37 GMT
in Hadoop proto files are compiled on every build, thus we require protoc
install. currently we use the exec plugin to run protoc, but we may be
switching soon to a maven plugin for protoc (still requires protoc
installed). More info at https://issues.apache.org/jira/browse/HADOOP-9117

Thx


On Sun, Jan 13, 2013 at 8:43 AM, Jonathan Hsieh <jon@cloudera.com> wrote:

> A week or so I added dev-support/build-proto.sh, a little script to
> build protobuf stuff.
>
> https://issues.apache.org/jira/browse/HBASE-7490
>
> I've been modifying protobuf a bit recently -- when you update run the
> script, protoc seems to generate exactly the same content unless you
> change proto source files.
>
> I think the argument for not having this run by default in the build
> is having it would require protoc installed on your machine to even
> build HBase.  This also assumes all versions of protoc continues to
> generate the same code from different version (thrift's compiler was
> really annoying because every version generated code with a different
> api in every version).
>
> Jon.
>
> On Sat, Jan 12, 2013 at 3:38 PM, lars hofhansl <larsh@apache.org> wrote:
> > I see. Is there a way to only regenerate when they changed (ala make or
> ant)?
> > We do that sort of thing at Salesforce (not for protobufs, but other
> similar problems), that way you see what generated files your change
> affected and you can still check them in.
> >
> > -- Lars
> >
> >
> >
> > ________________________________
> >  From: Matteo Bertozzi <theo.bertozzi@gmail.com>
> > To: dev@hbase.apache.org; lars hofhansl <larsh@apache.org>
> > Sent: Saturday, January 12, 2013 3:33 PM
> > Subject: Re: ProtoBuf generation?
> >
> >
> > I think that the idea was,  the .proto files are not changing much
> overtime
> > so, we can commit the generated code, and avoid having the protobuf
> compiler installed.
> > if we regenerated the protos everytime (mvn ...) we require protoc to be
> installed.
> >
> >
> > Matteo
> >
> > On Sat, Jan 12, 2013 at 3:27 PM, lars hofhansl <larsh@apache.org> wrote:
> >
> > Is there a reason why this in not integrated in the maven build?
> >>If any of the .proto files changed shouldn't it automatically rebuild
> the generated classes?
> >>
> >>
> >>-- Lars
> >>
> >>
> >>
> >>________________________________
> >> From: Matteo Bertozzi <theo.bertozzi@gmail.com>
> >>To: dev@hbase.apache.org
> >>Sent: Saturday, January 12, 2013 3:14 PM
> >>Subject: Re: ProtoBuf generation?
> >>
> >>
> >>There's a README inside the hbase-protocol/src/main/protobuf directory
> >>
> https://github.com/apache/hbase/blob/trunk/hbase-protocol/src/main/protobuf/README.txt
> >>
> >>On Sat, Jan 12, 2013 at 3:12 PM, Jean-Marc Spaggiari <
> >>jean-marc@spaggiari.org> wrote:
> >>
> >>> Thanks for the prompt reply.
> >>>
> >>> Should we add that into the HBase book where we explain how to build?
> >>> Might be helpful?
> >>>
> >>> JM
> >>>
> >>> 2013/1/12, Ted Yu <yuzhihong@gmail.com>:
> >>> > Under hbase-protocol module, run:
> >>> >
> >>> > protoc -Isrc/main/protobuf --java_out=src/main/java
> >>> > <path-to-dor-proto-file>
> >>> >
> >>> > Cheers
> >>> >
> >>> > On Sat, Jan 12, 2013 at 2:28 PM, Jean-Marc Spaggiari <
> >>> > jean-marc@spaggiari.org> wrote:
> >>> >
> >>> >> Hi,
> >>> >>
> >>> >> I have update the Client.Proto file and would like to re-generate
> the
> >>> >> classes.
> >>> >>
> >>> >> I tried mvn clean package -DskipTests and mvn clean install
> >>> >> -DskipTests but the file is still not generated.
> >>> >>
> >>> >> Which command should I run to re-generate it?
> >>> >>
> >>> >> Thanks,
> >>> >>
> >>> >> JM
> >>> >>
> >>> >
> >>>
>
>
>
> --
> // Jonathan Hsieh (shay)
> // Software Engineer, Cloudera
> // jon@cloudera.com
>



-- 
Alejandro

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message