hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Min Zhou (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-4291) RpcServerFactoryPBImpl force yarn users to define a protocol in a entailed namespace
Date Tue, 29 May 2012 08:27:24 GMT
Min Zhou created MAPREDUCE-4291:
-----------------------------------

             Summary: RpcServerFactoryPBImpl force yarn users to define a protocol in a entailed
namespace
                 Key: MAPREDUCE-4291
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4291
             Project: Hadoop Map/Reduce
          Issue Type: Bug
          Components: mrv2
    Affects Versions: 0.23.1, 0.24.0
            Reporter: Min Zhou


We defined a wire protocol use protobuf with its java package name "org.apache.hadoop.realtime.proto"
{code:protobuf} 
option java_package = "org.apache.hadoop.realtime.proto";
{code} 
Such definition would cause a ClassNotFoundException when starting our customed application
master.
{noformat}
12/05/29 14:45:33 ERROR app.DragonAppMaster: Error starting DragonAppMaster
org.apache.hadoop.yarn.YarnException: Failed to Start org.apache.hadoop.realtime.client.app.DragonAppMaster
    at org.apache.hadoop.yarn.service.CompositeService.start(CompositeService.java:78)
    at org.apache.hadoop.realtime.client.app.DragonAppMaster.start(DragonAppMaster.java:155)
    at org.apache.hadoop.realtime.client.app.DragonAppMaster$1.run(DragonAppMaster.java:218)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1177)
    at org.apache.hadoop.realtime.client.app.DragonAppMaster.initAndStartAppMaster(DragonAppMaster.java:214)
    at org.apache.hadoop.realtime.client.app.DragonAppMaster.main(DragonAppMaster.java:200)
Caused by: org.apache.hadoop.yarn.YarnException: Failed to load class: [org.apache.hadoop.yarn.proto.DragonClientProtocol$DragonClientProtocolService]
    at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.getServer(RpcServerFactoryPBImpl.java:105)
    at org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC.getServer(HadoopYarnProtoRPC.java:63)
    at org.apache.hadoop.realtime.client.DragonClientService.start(DragonClientService.java:134)
    at org.apache.hadoop.yarn.service.CompositeService.start(CompositeService.java:68)
    ... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.proto.DragonClientProtocol$DragonClientProtocolService
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1162)
    at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.getServer(RpcServerFactoryPBImpl.java:103)
    ... 10 more
{noformat}
RpcServerFactoryPBImpl hard coded namespace suffix and class suffix of every protocol we defined.
It force yarn users to define a protocol in a entailed namespace, below is some lines of RpcServerFactoryPBImpl.java
that issues in the bug.
{code:java}
  private static final String PROTO_GEN_PACKAGE_NAME = "org.apache.hadoop.yarn.proto";
  private static final String PROTO_GEN_CLASS_SUFFIX = "Service";
  private static final String PB_IMPL_PACKAGE_SUFFIX = "impl.pb.service";
  private static final String PB_IMPL_CLASS_SUFFIX = "PBServiceImpl";

//...

  private String getProtoClassName(Class<?> clazz) {
    String srcClassName = getClassName(clazz);
    return PROTO_GEN_PACKAGE_NAME + "." + srcClassName + "$" + srcClassName + PROTO_GEN_CLASS_SUFFIX;
 
  } 
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message