You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by Grandl Robert <rg...@yahoo.com> on 2013/12/07 03:08:07 UTC
yarn api issues
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
Re: yarn api issues
Posted by Grandl Robert <rg...@yahoo.com>.
It works fine.
Somehow I did something which created duplicates for some entries in yarn protos, which screwed up all the stuff.
Sorry about that. I withdraw my question.
robert
On Wednesday, December 11, 2013 2:52 PM, Bobby Evans <ev...@yahoo-inc.com> wrote:
I am confused. You you saying the the values are coming out wrong?
--Bobby
On 12/6/13 8:08 PM, "Grandl Robert" <rg...@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
Re: yarn api issues
Posted by Bobby Evans <ev...@yahoo-inc.com>.
I am confused. You you saying the the values are coming out wrong?
--Bobby
On 12/6/13 8:08 PM, "Grandl Robert" <rg...@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