Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> question about how to add a new field in matching in ClusterStatusProtos:ServerLoad


Copy link to this message
-
Re: question about how to add a new field in matching in ClusterStatusProtos:ServerLoad
after made and installed protoc 2.5, everything works fine now. Many thanks
for the help

Demai
On Mon, Dec 16, 2013 at 7:13 PM, Demai Ni <[EMAIL PROTECTED]> wrote:

> Sergey,
>
> thanks a lot. This is the first time I am playing with proto buffer. You
> saved me a lot of time.
>
> I used yum to install a protoc on my redhat, which is 2.3.0($protoc
> --version: libprotoc 2.3.0). Do I have to use the latest 2.5.0? Because
> the command encounters a lot of errors like when run under hbase/hbase-protocol
> folder
>
> Cell.proto:23:8: Option "java_generate_equals_and_hash" unknown.
> HBase.proto: Import "Cell.proto" was not found or had errors.
> AccessControl.proto: Import "HBase.proto" was not found or had errors.
> AccessControl.proto:47:14: "TableName" is not defined.
> AccessControl.proto:95:12: "TableName" is not defined.
> Cell.proto:23:8: Option "java_generate_equals_and_hash" unknown.
> ....
>
>
> I copy/paste the whole bash output here: http://pastebin.com/KwwwPYLz
>
> thanks
>
> Demai
>
>
>
>
>
> On Mon, Dec 16, 2013 at 6:25 PM, Sergey Shelukhin <[EMAIL PROTECTED]>wrote:
>
>> This is generated protobuf code.
>> You just need to edit .proto file and generate code; see
>> ./hbase-protocol/README.txt
>>
>>
>> On Mon, Dec 16, 2013 at 6:13 PM, Demai Ni <[EMAIL PROTECTED]> wrote:
>>
>> > hi, folks,
>> >
>> > I am reading the code inside ClusterStatusProtos:ServerLoad, and
>> couldn't
>> > figure out some simple logic when trying to add a new field. Can someone
>> > enlighten me please?
>> >
>> > -----------------------------------------------
>> > I use the trunk version for @line
>> > @4517~4580, is there a relationship between the tag value and the
>> bitField
>> > value?
>> >   switch (tag) {
>> > ...
>> > .           case *64*: {
>> >               bitField0_ |=* 0x00000020*;
>> >               reportEndTime_ = input.readUInt64();
>> >               break;
>> >             }
>> > ....
>> >             case *72*: {
>> >               bitField0_ |= *0x00000040*;
>> >               infoServerPort_ = input.readUInt32();
>> >               break;
>> >             }
>> > @4993: at the write, the tag is *9*, but from the read above it is *72*?
>> > if (((bitField0_ & 0x00000040) == 0x00000040)) {
>> >         output.writeUInt32(*9*, infoServerPort_);
>> > --------------------------------------------------
>> >
>> > so if I'd like to add a new field(say a String), what kind of tag value
>> I
>> > should use? many thanks
>> >
>> > Demai
>> >
>>
>> --
>> CONFIDENTIALITY NOTICE
>> NOTICE: This message is intended for the use of the individual or entity
>> to
>> which it is addressed and may contain information that is confidential,
>> privileged and exempt from disclosure under applicable law. If the reader
>> of this message is not the intended recipient, you are hereby notified
>> that
>> any printing, copying, dissemination, distribution, disclosure or
>> forwarding of this communication is strictly prohibited. If you have
>> received this communication in error, please contact the sender
>> immediately
>> and delete it from your system. Thank You.
>>
>
>