Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 62C63CA13 for ; Tue, 29 May 2012 08:27:25 +0000 (UTC) Received: (qmail 48655 invoked by uid 500); 29 May 2012 08:27:25 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 48528 invoked by uid 500); 29 May 2012 08:27:24 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 48508 invoked by uid 99); 29 May 2012 08:27:24 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 May 2012 08:27:24 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 18D23142837 for ; Tue, 29 May 2012 08:27:24 +0000 (UTC) Date: Tue, 29 May 2012 08:27:24 +0000 (UTC) From: "Min Zhou (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: <109759726.10200.1338280044104.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (MAPREDUCE-4291) RpcServerFactoryPBImpl force yarn users to define a protocol in a entailed namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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