Wangda Tan created YARN-8506:
--------------------------------

             Summary: Make GetApplicationsRequestPBImpl thread safe
                 Key: YARN-8506
                 URL: https://issues.apache.org/jira/browse/YARN-8506
             Project: Hadoop YARN
          Issue Type: Task
            Reporter: Wangda Tan
            Assignee: Wangda Tan


When GetApplicationRequestPBImpl is used in multi-thread environment, 
exceptions like below will occur because we don't protect write ops.

{code}
java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at java.util.ArrayList.addAll(ArrayList.java:613)
        at 
com.google.protobuf.LazyStringArrayList.addAll(LazyStringArrayList.java:132)
        at 
com.google.protobuf.LazyStringArrayList.addAll(LazyStringArrayList.java:123)
        at 
com.google.protobuf.AbstractMessageLite$Builder.addAll(AbstractMessageLite.java:327)
        at 
org.apache.hadoop.yarn.proto.YarnServiceProtos$GetApplicationsRequestProto$Builder.addAllApplicationTags(YarnServiceProtos.java:24450)
        at 
org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationsRequestPBImpl.mergeLocalToBuilder(GetApplicationsRequestPBImpl.java:100)
        at 
org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationsRequestPBImpl.mergeLocalToProto(GetApplicationsRequestPBImpl.java:78)
        at 
org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationsRequestPBImpl.getProto(GetApplicationsRequestPBImpl.java:69)
{code}

We need to make GetApplicationRequestPBImpl thread safe. We saw the issue 
happens frequently when RequestHedgingRMFailoverProxyProvider is being used.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to