[ 
https://issues.apache.org/jira/browse/TEZ-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084219#comment-14084219
 ] 

Thaddeus Diamond edited comment on TEZ-1370 at 8/4/14 1:57 AM:
---------------------------------------------------------------

After changing the last two lines to:

{noformat}
PreWarmContext preWarmContext = new PreWarmContext(sleepProcDescriptor, 
resource, preWarmNumberOfContainers, vertexLocationHint);
preWarmContext.setEnvironment(new HashMap<String,String>());
tezClient.preWarm(preWarmContext);
{noformat}

I am getting an RPC exception.  It seems the protobuf is not preserving a 
{{null}} field.  It's turning the {{VertexLocationHint}} s inner list into an 
empty list:

{noformat}
Caused by: 
org.apache.hadoop.ipc.RemoteException(java.lang.IllegalArgumentException): 
Locations array length must match the parallelism set for the vertex
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
        at org.apache.tez.dag.api.Vertex.setLocationHint(Vertex.java:147)
        at 
org.apache.tez.dag.app.DAGAppMaster.startPreWarmContainers(DAGAppMaster.java:1021)
        at 
org.apache.tez.dag.api.client.DAGClientHandler.preWarmContainers(DAGClientHandler.java:141)
        at 
org.apache.tez.dag.api.client.rpc.DAGClientAMProtocolBlockingPBServerImpl.preWarm(DAGClientAMProtocolBlockingPBServerImpl.java:167)
        at 
org.apache.tez.dag.api.client.rpc.DAGClientAMProtocolRPC$DAGClientAMProtocol$2.callBlockingMethod(DAGClientAMProtocolRPC.java:8298)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1986)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1982)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1980)

        at org.apache.hadoop.ipc.Client.call(Client.java:1409)
        at org.apache.hadoop.ipc.Client.call(Client.java:1362)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        ... 15 more
{noformat}

Trying with a {{null}} {{VertexLocationHint}} instead.


was (Author: thaddeus.diamond):
After changing the last two lines to:

{noformat}
PreWarmContext preWarmContext = new PreWarmContext(sleepProcDescriptor, 
resource, preWarmNumberOfContainers, vertexLocationHint);
preWarmContext.setEnvironment(new HashMap<String,String>());
tezClient.preWarm(preWarmContext);
{noformat}

I am getting an RPC exception.  It seems the protobuf is not preserving a 
{{null}} field.  It's turning the {{VertexLocationHint}}s inner list into an 
empty list:

{noformat}
Caused by: 
org.apache.hadoop.ipc.RemoteException(java.lang.IllegalArgumentException): 
Locations array length must match the parallelism set for the vertex
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
        at org.apache.tez.dag.api.Vertex.setLocationHint(Vertex.java:147)
        at 
org.apache.tez.dag.app.DAGAppMaster.startPreWarmContainers(DAGAppMaster.java:1021)
        at 
org.apache.tez.dag.api.client.DAGClientHandler.preWarmContainers(DAGClientHandler.java:141)
        at 
org.apache.tez.dag.api.client.rpc.DAGClientAMProtocolBlockingPBServerImpl.preWarm(DAGClientAMProtocolBlockingPBServerImpl.java:167)
        at 
org.apache.tez.dag.api.client.rpc.DAGClientAMProtocolRPC$DAGClientAMProtocol$2.callBlockingMethod(DAGClientAMProtocolRPC.java:8298)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1986)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1982)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1980)

        at org.apache.hadoop.ipc.Client.call(Client.java:1409)
        at org.apache.hadoop.ipc.Client.call(Client.java:1362)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        ... 15 more
{noformat}

Trying with a {{null}} {{VertexLocationHint}} instead.

> Provide a configuration so when a session is started a set of containers are 
> started with it
> --------------------------------------------------------------------------------------------
>
>                 Key: TEZ-1370
>                 URL: https://issues.apache.org/jira/browse/TEZ-1370
>             Project: Apache Tez
>          Issue Type: Wish
>    Affects Versions: 0.5.0
>         Environment: branch -> master
> hadoop -> HDP 2.1/CDH 5.0
>            Reporter: Thaddeus Diamond
>
> This could use the existing 
> {{TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS}} configuration or a 
> new one.
> The API would be as follows:
> {noformat}
> TezConfiguration tezConfiguration = new TezConfiguration(hadoopConfiguration);
> tezConfiguration.setBoolean(TEZ_AM_SESSION_MODE, true)
> tezConfiguration.setInt(TEZ_AM_SESSION_STARTUP_CONTAINERS, 3)
> TezClient tezClient = new TezClient("foobar", tezConfiguration);
> // The following should start 3 containers
> tezClient.start();
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to