hadoop-yarn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bobby Evans <ev...@yahoo-inc.com>
Subject Re: yarn api issues
Date Wed, 11 Dec 2013 22:22:32 GMT
I am confused.  You you saying the the values are coming out wrong?

--Bobby

On 12/6/13 8:08 PM, "Grandl Robert" <rgrandl@yahoo.com> wrote:

>Hi guys,
>
>I have tried to modify the request capability to include other options
>rather than CPU/Memory. So what I did was to change yarn_protos.proto and
>add as following:
>
>message ResourceProto {
>  optional int32 memory = 1;
>  optional int32 virtual_cores = 2;
>  optional int32 option1  = 3;
>  optional int32 option2   = 4;
>  optional int32 option3  = 5;
>  optional int32 option4   = 6;
>}
>
>
>Then change Resources.java, Resource.java and ResourcePBImpl.java to add
>corresponding setters and getters. So I do smthg like that:
>
>add option1_val=20
>add option2_val=40
>add option3_val=50
>add option4_val=60
>
>I can see in ResourcePBImpl.java, like the setters put the correct
>values, namely:
>public void setOption1(int option1_val) {
>   LOG.info("option1_val="+option1_val); // returns 20
>
>    maybeInitBuilder();
>   builder.setInNetwork(inNetwork);
>
>}
>
>and accordingly the other values.
>
>
>BUT, when I do getters to see the returned values, I got the followings:
>option1_val=20
>option2_val=40
>option3_val=60
>option4_val=0
>
>All of these are integer values. I tried float, doubles, is the same
>issue. 
>
>
>It seems this code goes to YarnProtos.java which is automatically
>generated, with protobuf stuff.
>
>Do you guys have an idea what I am missing here ? I mentioned earlier a
>similar problem with blacklisting which does not work and goes through
>the same code. Is something fishy there, or I miss something ?
>
>Please let me know about your opinion with this,
>robert


Mime
View raw message