Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.1.0
-
None
Description
Steps:
1) Launch sleeper app
RUNNING: /usr/hdp/current/hadoop-yarn-client/bin/yarn app -launch sleeper2-duplicate-app-stopped /usr/hdp/3.0.0.0-xxx/hadoop-yarn/yarn-service-examples/sleeper/sleeper.json WARNING: YARN_LOG_DIR has been replaced by HADOOP_LOG_DIR. Using value of YARN_LOG_DIR. WARNING: YARN_LOGFILE has been replaced by HADOOP_LOGFILE. Using value of YARN_LOGFILE. WARNING: YARN_PID_DIR has been replaced by HADOOP_PID_DIR. Using value of YARN_PID_DIR. WARNING: YARN_OPTS has been replaced by HADOOP_OPTS. Using value of YARN_OPTS. 18/04/10 21:31:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 18/04/10 21:31:01 INFO client.AHSProxy: Connecting to Application History server at xxxxxx:10200 18/04/10 21:31:01 INFO client.AHSProxy: Connecting to Application History server at xxxxxx:10200 18/04/10 21:31:01 INFO client.ApiServiceClient: Loading service definition from local FS: /usr/hdp/3.0.0.0-xxx/hadoop-yarn/yarn-service-examples/sleeper/sleeper.json 18/04/10 21:31:03 INFO util.log: Logging initialized @2818ms 18/04/10 21:31:10 INFO client.ApiServiceClient: Application ID: application_1523387473707_0007 Exit Code: 0
2) Stop the application
RUNNING: /usr/hdp/current/hadoop-yarn-client/bin/yarn app -stop sleeper2-duplicate-app-stopped WARNING: YARN_LOG_DIR has been replaced by HADOOP_LOG_DIR. Using value of YARN_LOG_DIR. WARNING: YARN_LOGFILE has been replaced by HADOOP_LOGFILE. Using value of YARN_LOGFILE. WARNING: YARN_PID_DIR has been replaced by HADOOP_PID_DIR. Using value of YARN_PID_DIR. WARNING: YARN_OPTS has been replaced by HADOOP_OPTS. Using value of YARN_OPTS. 18/04/10 21:31:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 18/04/10 21:31:15 INFO client.AHSProxy: Connecting to Application History server at xxxxxx:10200 18/04/10 21:31:15 INFO client.AHSProxy: Connecting to Application History server at xxxxxx:10200 18/04/10 21:31:16 INFO util.log: Logging initialized @3034ms 18/04/10 21:31:17 INFO client.ApiServiceClient: Successfully stopped service sleeper2-duplicate-app-stopped Exit Code: 0
3) Launch the application with same name
RUNNING: /usr/hdp/current/hadoop-yarn-client/bin/yarn app -launch sleeper2-duplicate-app-stopped /usr/hdp/3.0.0.0-xxx/hadoop-yarn/yarn-service-examples/sleeper/sleeper.json WARNING: YARN_LOG_DIR has been replaced by HADOOP_LOG_DIR. Using value of YARN_LOG_DIR. WARNING: YARN_LOGFILE has been replaced by HADOOP_LOGFILE. Using value of YARN_LOGFILE. WARNING: YARN_PID_DIR has been replaced by HADOOP_PID_DIR. Using value of YARN_PID_DIR. WARNING: YARN_OPTS has been replaced by HADOOP_OPTS. Using value of YARN_OPTS. 18/04/10 21:31:19 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 18/04/10 21:31:19 INFO client.AHSProxy: Connecting to Application History server at xxxxxx:10200 18/04/10 21:31:19 INFO client.AHSProxy: Connecting to Application History server at xxxxxx:10200 18/04/10 21:31:19 INFO client.ApiServiceClient: Loading service definition from local FS: /usr/hdp/3.0.0.0-xxx/hadoop-yarn/yarn-service-examples/sleeper/sleeper.json 18/04/10 21:31:22 INFO util.log: Logging initialized @4456ms 18/04/10 21:31:22 ERROR client.ApiServiceClient: Service Instance dir already exists: hdfs://mycluster/user/hrt_qa/.yarn/services/sleeper2-duplicate-app-stopped/sleeper2-duplicate-app-stopped.json Exit Code: 56
Here, launch cmd fails with "Service Instance dir already exists: hdfs://mycluster/user/hrt_qa/.yarn/services/sleeper2-duplicate-app-stopped/sleeper2-duplicate-app-stopped.json".
The log message should be more meaningful. It should return that "sleeper2-duplicate-app-stopped is in stopped state".