[jira] [Comment Edited] (YARN-7277) Container Launch expand environment needs to consider bracket matching

2018-11-28 Thread Wangda Tan (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16702450#comment-16702450
 ] 

Wangda Tan edited comment on YARN-7277 at 11/28/18 10:30 PM:
-

[~tangzhankun], typically what you can do is add a new line or empty space to 
one of NM java file and trigger test to run. The reason to run changed project 
only is to save time to run unit test. For example only RM tests will take more 
than 3 hours to finish. With limited Jenkins slaves, we cannot run all tests 
for changed jars and their downstream jars.

And btw, is it an incompatible change?


was (Author: leftnoteasy):
[~tangzhankun], typically what you can do is add a new line or empty space to 
one of NM java file and trigger test to run. The reason to run changed project 
only is to save time to run unit test. For example only RM tests will take more 
than 3 hours to finish. With limited Jenkins slaves, we cannot run all tests 
for changed jars and their downstream jars.

> Container Launch expand environment needs to consider bracket matching
> --
>
> Key: YARN-7277
> URL: https://issues.apache.org/jira/browse/YARN-7277
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: nodemanager
>Reporter: balloons
>Assignee: Zhankun Tang
>Priority: Critical
> Attachments: YARN-7277-trunk.001.patch, YARN-7277-trunk.002.patch, 
> YARN-7277-trunk.003.patch, YARN-7277-trunk.004.patch, 
> YARN-7277-trunk.005.patch
>
>
> The SPARK application I submitted always failed and I finally found that the 
> commands I specified to launch AM Container were changed by NM.
> *The following is part of the excerpt I submitted to RM to see the command:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}}}'*
> {code}
> *The following is an excerpt from the corresponding command used when I 
> observe the NM launch container:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}*
> {code}
> Finally, I found that NM made the following transformation in launch 
> container which led to this situation:
> {code:java}
> @VisibleForTesting
>   public static String expandEnvironment(String var,
>   Path containerLogDir) {
> var = var.replace(ApplicationConstants.LOG_DIR_EXPANSION_VAR,
>   containerLogDir.toString());
> var =  var.replace(ApplicationConstants.CLASS_PATH_SEPARATOR,
>   File.pathSeparator);
> // replace parameter expansion marker. e.g. {{VAR}} on Windows is replaced
> // as %VAR% and on Linux replaced as "$VAR"
> if (Shell.WINDOWS) {
>   var = var.replaceAll("(\\{\\{)|(\\}\\})", "%");
> } else {
>   var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_LEFT, "$");
>   *var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_RIGHT, "");*
> }
> return var;
>   }
> {code}
> I think this is a Bug that doesn't even consider the pairing of 
> "*PARAMETER_EXPANSION_LEFT*" and "*PARAMETER_EXPANSION_RIGHT*" when 
> substituting. But simply substituting for simple violence.



--
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



[jira] [Comment Edited] (YARN-7277) Container Launch expand environment needs to consider bracket matching

2018-11-01 Thread Zhankun Tang (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672547#comment-16672547
 ] 

Zhankun Tang edited comment on YARN-7277 at 11/2/18 4:06 AM:
-

[~cheersyang]. The error output is quite weird. And output is different when I 
run "mvn test -Dtest=TestContainerLaunch" in different directory.
In nodemanager dir, it will fail as Yetus. But in parent folder hadoop-yarn, it 
will succeed.
Has submitted a JIRA https://issues.apache.org/jira/browse/YETUS-711 asking for 
help. [~aw]


was (Author: tangzhankun):
[~cheersyang]. The error output is quite weird. And output is different when I 
run "mvn test -Dtest=TestContainerLaunch" in different directory.
In nodemanager dir, it will fail as Yetus. But in parent folder hadoop-yarn, it 
will succeed.
Has submitted a JIRA https://issues.apache.org/jira/browse/YETUS-711 asking for 
help. 

> Container Launch expand environment needs to consider bracket matching
> --
>
> Key: YARN-7277
> URL: https://issues.apache.org/jira/browse/YARN-7277
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: nodemanager
>Reporter: balloons
>Assignee: Zhankun Tang
>Priority: Critical
> Attachments: YARN-7277-trunk.001.patch, YARN-7277-trunk.002.patch, 
> YARN-7277-trunk.003.patch, YARN-7277-trunk.004.patch, 
> YARN-7277-trunk.005.patch
>
>
> The SPARK application I submitted always failed and I finally found that the 
> commands I specified to launch AM Container were changed by NM.
> *The following is part of the excerpt I submitted to RM to see the command:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}}}'*
> {code}
> *The following is an excerpt from the corresponding command used when I 
> observe the NM launch container:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}*
> {code}
> Finally, I found that NM made the following transformation in launch 
> container which led to this situation:
> {code:java}
> @VisibleForTesting
>   public static String expandEnvironment(String var,
>   Path containerLogDir) {
> var = var.replace(ApplicationConstants.LOG_DIR_EXPANSION_VAR,
>   containerLogDir.toString());
> var =  var.replace(ApplicationConstants.CLASS_PATH_SEPARATOR,
>   File.pathSeparator);
> // replace parameter expansion marker. e.g. {{VAR}} on Windows is replaced
> // as %VAR% and on Linux replaced as "$VAR"
> if (Shell.WINDOWS) {
>   var = var.replaceAll("(\\{\\{)|(\\}\\})", "%");
> } else {
>   var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_LEFT, "$");
>   *var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_RIGHT, "");*
> }
> return var;
>   }
> {code}
> I think this is a Bug that doesn't even consider the pairing of 
> "*PARAMETER_EXPANSION_LEFT*" and "*PARAMETER_EXPANSION_RIGHT*" when 
> substituting. But simply substituting for simple violence.



--
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



[jira] [Comment Edited] (YARN-7277) Container Launch expand environment needs to consider bracket matching

2018-11-01 Thread Zhankun Tang (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672547#comment-16672547
 ] 

Zhankun Tang edited comment on YARN-7277 at 11/2/18 4:05 AM:
-

[~cheersyang]. The error output is quite weird. And output is different when I 
run "mvn test -Dtest=TestContainerLaunch" in different directory.
In nodemanager dir, it will fail as Yetus. But in parent folder hadoop-yarn, it 
will succeed.
Has submitted a JIRA https://issues.apache.org/jira/browse/YETUS-711 asking for 
help. 


was (Author: tangzhankun):
[~cheersyang]. The error output is quit weird. And output is different when I 
run "mvn test -Dtest=TestContainerLaunch" in different directory.
In nodemanager dir, it will fail as Yetus. But in parent folder hadoop-yarn, it 
will succeed.
Has submitted a JIRA https://issues.apache.org/jira/browse/YETUS-711 asking for 
help. 

> Container Launch expand environment needs to consider bracket matching
> --
>
> Key: YARN-7277
> URL: https://issues.apache.org/jira/browse/YARN-7277
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: nodemanager
>Reporter: balloons
>Assignee: Zhankun Tang
>Priority: Critical
> Attachments: YARN-7277-trunk.001.patch, YARN-7277-trunk.002.patch, 
> YARN-7277-trunk.003.patch, YARN-7277-trunk.004.patch, 
> YARN-7277-trunk.005.patch
>
>
> The SPARK application I submitted always failed and I finally found that the 
> commands I specified to launch AM Container were changed by NM.
> *The following is part of the excerpt I submitted to RM to see the command:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}}}'*
> {code}
> *The following is an excerpt from the corresponding command used when I 
> observe the NM launch container:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}*
> {code}
> Finally, I found that NM made the following transformation in launch 
> container which led to this situation:
> {code:java}
> @VisibleForTesting
>   public static String expandEnvironment(String var,
>   Path containerLogDir) {
> var = var.replace(ApplicationConstants.LOG_DIR_EXPANSION_VAR,
>   containerLogDir.toString());
> var =  var.replace(ApplicationConstants.CLASS_PATH_SEPARATOR,
>   File.pathSeparator);
> // replace parameter expansion marker. e.g. {{VAR}} on Windows is replaced
> // as %VAR% and on Linux replaced as "$VAR"
> if (Shell.WINDOWS) {
>   var = var.replaceAll("(\\{\\{)|(\\}\\})", "%");
> } else {
>   var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_LEFT, "$");
>   *var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_RIGHT, "");*
> }
> return var;
>   }
> {code}
> I think this is a Bug that doesn't even consider the pairing of 
> "*PARAMETER_EXPANSION_LEFT*" and "*PARAMETER_EXPANSION_RIGHT*" when 
> substituting. But simply substituting for simple violence.



--
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



[jira] [Comment Edited] (YARN-7277) Container Launch expand environment needs to consider bracket matching

2018-10-21 Thread Zhankun Tang (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16657016#comment-16657016
 ] 

Zhankun Tang edited comment on YARN-7277 at 10/21/18 8:26 AM:
--

[~balloons] , Thanks for reporting this. I'd like to check it.

And it seems like you use JSON string in a command? I think we can change the 
"\{{", "}}" to "\{_{" and "}_}" to avoid replacing JSON string 


was (Author: tangzhankun):
[~balloons] , Thanks for reporting this. I'd like to check it.

And it seems like you set JSON string in an environment variable?

> Container Launch expand environment needs to consider bracket matching
> --
>
> Key: YARN-7277
> URL: https://issues.apache.org/jira/browse/YARN-7277
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: nodemanager
>Reporter: balloons
>Assignee: Zhankun Tang
>Priority: Critical
>
> The SPARK application I submitted always failed and I finally found that the 
> commands I specified to launch AM Container were changed by NM.
> *The following is part of the excerpt I submitted to RM to see the command:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}}}'*
> {code}
> *The following is an excerpt from the corresponding command used when I 
> observe the NM launch container:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}*
> {code}
> Finally, I found that NM made the following transformation in launch 
> container which led to this situation:
> {code:java}
> @VisibleForTesting
>   public static String expandEnvironment(String var,
>   Path containerLogDir) {
> var = var.replace(ApplicationConstants.LOG_DIR_EXPANSION_VAR,
>   containerLogDir.toString());
> var =  var.replace(ApplicationConstants.CLASS_PATH_SEPARATOR,
>   File.pathSeparator);
> // replace parameter expansion marker. e.g. {{VAR}} on Windows is replaced
> // as %VAR% and on Linux replaced as "$VAR"
> if (Shell.WINDOWS) {
>   var = var.replaceAll("(\\{\\{)|(\\}\\})", "%");
> } else {
>   var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_LEFT, "$");
>   *var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_RIGHT, "");*
> }
> return var;
>   }
> {code}
> I think this is a Bug that doesn't even consider the pairing of 
> "*PARAMETER_EXPANSION_LEFT*" and "*PARAMETER_EXPANSION_RIGHT*" when 
> substituting. But simply substituting for simple violence.



--
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



[jira] [Comment Edited] (YARN-7277) Container Launch expand environment needs to consider bracket matching

2018-10-19 Thread Zhankun Tang (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-7277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16657016#comment-16657016
 ] 

Zhankun Tang edited comment on YARN-7277 at 10/19/18 4:20 PM:
--

[~balloons] , Thanks for reporting this. I'd like to check it.

And it seems like you set JSON string in an environment variable?


was (Author: tangzhankun):
[~balloons] , Thanks for reporting this. I'd like to check it.

> Container Launch expand environment needs to consider bracket matching
> --
>
> Key: YARN-7277
> URL: https://issues.apache.org/jira/browse/YARN-7277
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: nodemanager
>Reporter: balloons
>Priority: Critical
>
> The SPARK application I submitted always failed and I finally found that the 
> commands I specified to launch AM Container were changed by NM.
> *The following is part of the excerpt I submitted to RM to see the command:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}}}'*
> {code}
> *The following is an excerpt from the corresponding command used when I 
> observe the NM launch container:*
> {code:java}
> *'{\"handler\":\"FILLER\",\"inputTable\":\"engine_arch.adult_train\",\"outputTable\":[\"ether_features_filler_\$experimentId_\$taskId_out0\"],\"params\":{\"age\":{\"param\":[\"0\"]}*
> {code}
> Finally, I found that NM made the following transformation in launch 
> container which led to this situation:
> {code:java}
> @VisibleForTesting
>   public static String expandEnvironment(String var,
>   Path containerLogDir) {
> var = var.replace(ApplicationConstants.LOG_DIR_EXPANSION_VAR,
>   containerLogDir.toString());
> var =  var.replace(ApplicationConstants.CLASS_PATH_SEPARATOR,
>   File.pathSeparator);
> // replace parameter expansion marker. e.g. {{VAR}} on Windows is replaced
> // as %VAR% and on Linux replaced as "$VAR"
> if (Shell.WINDOWS) {
>   var = var.replaceAll("(\\{\\{)|(\\}\\})", "%");
> } else {
>   var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_LEFT, "$");
>   *var = var.replace(ApplicationConstants.PARAMETER_EXPANSION_RIGHT, "");*
> }
> return var;
>   }
> {code}
> I think this is a Bug that doesn't even consider the pairing of 
> "*PARAMETER_EXPANSION_LEFT*" and "*PARAMETER_EXPANSION_RIGHT*" when 
> substituting. But simply substituting for simple violence.



--
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