You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/06/18 04:06:25 UTC

[GitHub] [hadoop] aajisaka commented on a change in pull request #2077: MAPREDUCE-7281. Fix NoClassDefFoundError on 'mapred minicluster'.

aajisaka commented on a change in pull request #2077:
URL: https://github.com/apache/hadoop/pull/2077#discussion_r441956663



##########
File path: hadoop-mapreduce-project/bin/mapred
##########
@@ -105,6 +105,8 @@ function mapredcmd_case
     minicluster)
       hadoop_add_classpath "${HADOOP_YARN_HOME}/${YARN_DIR}/timelineservice"'/*'
       hadoop_add_classpath "${HADOOP_YARN_HOME}/${YARN_DIR}/test"'/*'
+      junitjar=$(echo "${HADOOP_TOOLS_LIB_JARS_DIR}"/junit-[0-9]*.jar)

Review comment:
       I think echo is not required and the following is sufficient:
   ```
   junitjar="${HADOOP_TOOLS_LIB_JARS_DIR}/junit-[0-9]*.jar"
   ```
   
   testing:
   ```
   bash-5.0$ arg1="foo bar"
   bash-5.0$ echo "$arg1"
   foo bar
   bash-5.0$ arg2="${arg1}/junit-[0-9]*.jar"
   bash-5.0$ echo "$arg2"
   foo bar/junit-[0-9]*.jar
   ```
   
   `${junitjar}` must be double-quoted.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org