Why spark on yarn applicationmaster cannot get a proper resourcemanager address from yarnconfiguration?

2014-09-03 Thread 남윤민
Hello, I tried to submit a spark job to yarn cluster, there is an error occured 
with those messages:  [root@saturn00 bin]# ./spark-submit --class SparkHiveJoin 
--master yarn-cluster --num-executors 10 --executor-memory 12g --executor-cores 
1 spark.jarSpark assembly has been built with Hive, including Datanucleus jars 
on classpathWarning: Ignoring non-spark config property: 
yarn.resourcemanager.address=10.150.20.22:8032Warning: Ignoring non-spark 
config property: yarn.resourcemanager.address=10.150.20.22:803214/09/04 
11:01:27 INFO client.RMProxy: Connecting to ResourceManager at 
/10.150.20.22:803214/09/04 11:01:27 INFO yarn.Client: Got Cluster metric info 
from ApplicationsManager (ASM), number of NodeManagers: 1014/09/04 11:01:27 
INFO yarn.Client: Queue info ... queueName: default, queueCurrentCapacity: 0.0, 
queueMaxCapacity: 1.0,  queueApplicationCount = 0, queueChildQueueCount = 
014/09/04 11:01:27 INFO yarn.Client: Max mem capabililty of a single resource 
in this cluster 1228814
 /09/04 11:01:27 INFO yarn.Client: Preparing Local resources14/09/04 11:01:27 
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your 
platform... using builtin-java classes where applicable14/09/04 11:01:27 INFO 
yarn.Client: Uploading file:/opt/spark-1.0.2-bin-hadoop2/bin/spark.jar to 
hdfs://10.150.20.22:8020/user/root/.sparkStaging/application_1409759471992_0007/spark.jar14/09/04
 11:01:28 INFO yarn.Client: Uploading 
file:/opt/spark-1.0.2-bin-hadoop2/lib/spark-assembly-1.0.2-hadoop2.4.0.jar to 
hdfs://10.150.20.22:8020/user/root/.sparkStaging/application_1409759471992_0007/spark-assembly-1.0.2-hadoop2.4.0.jar14/09/04
 11:01:30 INFO yarn.Client: Setting up the launch environment14/09/04 11:01:30 
INFO yarn.Client: Setting up container launch context, , /stderr)14/09/04 
11:01:30 INFO yarn.Client: Submitting application to ASM14/09/04 11:01:30 INFO 
impl.YarnClientImpl: Submitted application 
application_1409759471992_000714/09/04 11:01:31 INFO yarn.Client: Application 
repo
 rt from ASM:application identifier: application_1409759471992_0007  appId: 
7clientToAMToken: null   appDiagnostics: appMasterHost: N/A 
 appQueue: default   appMasterRpcPort: -1appStartTime: 1409796090132
 yarnAppState: ACCEPTED  distributedFinalState: UNDEFINED
appTrackingUrl: http://saturn00:8088/proxy/application_1409759471992_0007/  
appUser: root14/09/04 11:01:32 INFO yarn.Client: Application report from ASM:   
application identifier: application_1409759471992_0007  appId: 7
clientToAMToken: null   appDiagnostics: appMasterHost: N/A  
appQueue: default   appMasterRpcPort: -1appStartTime: 1409796090132 
yarnAppState: ACCEPTED  distributedFinalState: UNDEFINEDappTrackingUrl: 
http://saturn00:8088/proxy/application_1409759471992_0007/  appUser: root   
So, I found the log of applicationmaster of spark on yarn job, here is the 
logs:  14/09/04 11:01:33 INFO ApplicationMaster: ApplicationAttemptId: 
appattempt_1409759471992_0007_01
14/09/04 11:01:33 INFO RMProxy: Connecting to ResourceManager at /0.0.0.0:8030
14/09/04 11:01:33 INFO SecurityManager: Changing view acls to: root
14/09/04 11:01:33 INFO SecurityManager: SecurityManager: authentication 
disabled; ui acls disabled; users with view permissions: Set(root)
14/09/04 11:01:33 INFO ApplicationMaster: Starting the user JAR in a separate 
Thread
14/09/04 11:01:33 INFO ApplicationMaster: Waiting for Spark context 
initialization
14/09/04 11:01:33 INFO ApplicationMaster: Waiting for Spark context 
initialization ... 0
14/09/04 11:01:33 WARN SparkConf: In Spark 1.0 and later spark.local.dir will 
be overridden by the value set by the cluster manager (via SPARK_LOCAL_DIRS in 
mesos/standalone and LOCAL_DIRS in YARN).
14/09/04 11:01:33 INFO SecurityManager: Changing view acls to: root
14/09/04 11:01:33 INFO SecurityManager: SecurityManager: authentication 
disabled; ui acls disabled; users with view permissions: Set(root)
14/09/04 11:01:33 INFO Slf4jLogger: Slf4jLogger started
14/09/04 11:01:33 INFO Remoting: Starting remoting
14/09/04 11:01:33 INFO Remoting: Remoting started; listening on addresses 
:[akka.tcp://spark@saturn02:58444]
14/09/04 11:01:33 INFO Remoting: Remoting now listens on addresses: 
[akka.tcp://spark@saturn02:58444]
14/09/04 11:01:33 INFO SparkEnv: Registering MapOutputTracker
14/09/04 11:01:33 INFO SparkEnv: Registering BlockManagerMaster
14/09/04 11:01:33 INFO DiskBlockManager: Created local directory at 
/home/hadoop/logs/hadoop_tmp/usercache/root/appcache/application_1409759471992_0007/spark-local-20140904110133-a55e
14/09/04 11:01:33 INFO MemoryStore: MemoryStore started with capacity 273.1 MB.
14/09/04 11:01:33 INFO ConnectionManager: Bound socket to port 43903 with id = 
ConnectionManagerId(saturn02,43903)
14/09/04 11:01:33 INFO BlockManagerMaster: Trying to register BlockManager
14/09/04 11:01:33 INFO BlockManagerInfo: Registering block manager 

Re: Why spark on yarn applicationmaster cannot get a proper resourcemanager address from yarnconfiguration?

2014-09-03 Thread Guodong Wang
Did you follow the exact step in this page
https://spark.apache.org/docs/1.0.2/running-on-yarn.html ?
Please be sure that HADOOP_CONF_DIR or YARN_CONF_DIR points to the
directory which contains the (client side) configuration files for the
Hadoop cluster.


Guodong


On Thu, Sep 4, 2014 at 10:15 AM, 남윤민 rony...@dgist.ac.kr wrote:

 Hello, I tried to submit a spark job to yarn cluster, there is an error
 occured with those messages:




 [root@saturn00 bin]# ./spark-submit --class SparkHiveJoin --master
 yarn-cluster --num-executors 10 --executor-memory 12g --executor-cores 1
 spark.jar
 Spark assembly has been built with Hive, including Datanucleus jars on
 classpath
 Warning: Ignoring non-spark config property: yarn.resourcemanager.address=
 10.150.20.22:8032
 Warning: Ignoring non-spark config property: yarn.resourcemanager.address=
 10.150.20.22:8032
 14/09/04 11:01:27 INFO client.RMProxy: Connecting to ResourceManager at /
 10.150.20.22:8032
 14/09/04 11:01:27 INFO yarn.Client: Got Cluster metric info from
 ApplicationsManager (ASM), number of NodeManagers: 10
 14/09/04 11:01:27 INFO yarn.Client: Queue info ... queueName: default,
 queueCurrentCapacity: 0.0, queueMaxCapacity: 1.0,
   queueApplicationCount = 0, queueChildQueueCount = 0
 14/09/04 11:01:27 INFO yarn.Client: Max mem capabililty of a single
 resource in this cluster 12288
 14/09/04 11:01:27 INFO yarn.Client: Preparing Local resources
 14/09/04 11:01:27 WARN util.NativeCodeLoader: Unable to load native-hadoop
 library for your platform... using builtin-java classes where applicable
 14/09/04 11:01:27 INFO yarn.Client: Uploading
 file:/opt/spark-1.0.2-bin-hadoop2/bin/spark.jar to hdfs://
 10.150.20.22:8020/user/root/.sparkStaging/application_1409759471992_0007/spark.jar
 14/09/04 11:01:28 INFO yarn.Client: Uploading
 file:/opt/spark-1.0.2-bin-hadoop2/lib/spark-assembly-1.0.2-hadoop2.4.0.jar
 to hdfs://
 10.150.20.22:8020/user/root/.sparkStaging/application_1409759471992_000
 7/spark-assembly-1.0.2-hadoop2.4.0.jar
 14/09/04 11:01:30 INFO yarn.Client: Setting up the launch environment
 14/09/04 11:01:30 INFO yarn.Client: Setting up container launch context
 14/09/04 11:01:30 INFO yarn.Client: Command for starting the Spark
 ApplicationMaster: List($JAVA_HOME/bin/java, -server, -Xmx512m,
 -Djava.io.tmpdir=$PWD/tmp, -Dspark.local.dir=\/hadoop/spark\,
 -Dspark.shuffle.consolidateFiles=\true\, -Dspark.executor.memory=\12g\,
 -Dspark.master=\spark://10.150.20.22:8081\, 
 -Dspark.app.name=\SparkHiveJoin\,
 -Dspark.eventLog.enabled=\true\, -Dspark.spill=\true\,
 -Dspark.serializer=\org.apache.spark.serializer.KryoSerializer\,
 -Dspark.eventLog.dir=\hdfs://10.150.20.22:8020/sparkLog\
 http://10.150.20.22:8020/sparkLog%5C,
  -Dlog4j.configuration=log4j-spark-container.properties,
 org.apache.spark.deploy.yarn.ApplicationMaster, --class, SparkHiveJoin,
 --jar , file:/opt/spark-1.0.2-bin-hadoop2/bin/spark.jar, ,
 --executor-memory, 12288, --executor-cores, 1, --num-e xecutors , 10, 1,
 LOG_DIR/stdout, 2, LOG_DIR/stderr)
 14/09/04 11:01:30 INFO yarn.Client: Submitting application to ASM
 14/09/04 11:01:30 INFO impl.YarnClientImpl: Submitted application
 application_1409759471992_0007
 14/09/04 11:01:31 INFO yarn.Client: Application report from ASM:
  application identifier: application_1409759471992_0007
  appId: 7
  clientToAMToken: null
  appDiagnostics:
  appMasterHost: N/A
  appQueue: default
  appMast erRpcPort: -1
  appStartTime: 1409796090132
  yarnAppState: ACCEPTED
  distributedFinalState: UNDEFINED
  appTrackingUrl:
 http://saturn00:8088/proxy/application_1409759471992_0007/
  appUser: root
 14/09/04 11:01:32 INFO yarn.Client: Application report from ASM:
  application identifier: application_1409759471992_0007
  appId: 7
  clientToAMToken: null
  appDiagnostics:
  appMasterHost: N/A
  appQueue: default
  appMasterRpcPort: -1
  appStartTime: 1409796090132
  yarnAppState: ACCEPTED
  distributedFinalState: UNDEFINED
  appTrackingUrl:
 http://saturn00:8088/proxy/application_1409759471992_0007/
  appUser: root







 So, I found the log of applicationmaster of spark on yarn job, here is the
 logs:






 14/09/04 11:01:33 INFO ApplicationMaster: ApplicationAttemptId: 
 appattempt_1409759471992_0007_01
 14/09/04 11:01:33 INFO RMProxy: Connecting to ResourceManager at /0.0.0.0:8030
 14/09/04 11:01:33 INFO SecurityManager: Changing view acls to: root
 14/09/04 11:01:33 INFO SecurityManager: SecurityManager: authentication 
 disabled; ui acls disabled; users with view permissions: Set(root)
 14/09/04 11:01:33 INFO ApplicationMaster: Starting the user JAR in a separate 
 Thread
 14/09/04 11:01:33 INFO ApplicationMaster: Waiting for Spark context 
 initialization
 14/09/04 11:01:33 INFO ApplicationMaster: Waiting for Spark context 
 initialization ... 0
 14/09/04 11:01:33 WARN SparkConf: In Spark 1.0 and later spark.local.dir will 
 be overridden by the value set by the cluster manager (via SPARK_LOCAL_DIRS 
 in mesos/standalone and LOCAL_DIRS in