keith-turner commented on a change in pull request #200: Updates for Hadoop 3
URL: https://github.com/apache/fluo-uno/pull/200#discussion_r222700180
 
 

 ##########
 File path: bin/impl/setup-hadoop.sh
 ##########
 @@ -36,23 +36,36 @@ print_to_console "    * ResourceManager status: 
http://localhost:8088/";
 print_to_console "    * view logs at $HADOOP_LOG_DIR"
 
 rm -rf "$INSTALL"/hadoop-*
-rm -f "$HADOOP_LOG_DIR"/*
-rm -rf "$HADOOP_LOG_DIR"/application_*
+rm -rf "$HADOOP_LOG_DIR"/*
 rm -rf "$DATA_DIR"/hadoop
 mkdir -p "$HADOOP_LOG_DIR"
 
 tar xzf "$DOWNLOADS/$HADOOP_TARBALL" -C "$INSTALL"
 
 hadoop_conf="$HADOOP_HOME"/etc/hadoop
-cp "$UNO_HOME"/conf/hadoop/* "$hadoop_conf/"
+cp "$UNO_HOME"/conf/hadoop/core-site.xml "$hadoop_conf/"
 
 Review comment:
   Could have `conf/hadoop-common`, `conf/hadoop2`, and `conf/hadoop3` dirs.  
Then the script could do something like the following.
   
   ```bash
   cp "$UNO_HOME"/conf/hadoop-common/* "$hadoop_conf/"
   if [[ $HADOOP_VERSION =~ ^2\..*$ ]]; then
     cp "$UNO_HOME"/conf/hadoop2/* "$hadoop_conf/"
    else
     cp "$UNO_HOME"/conf/hadoop3/* "$hadoop_conf/"
    fi
   ```
   
   This avoids hard coding the files in the script, which could allow the user 
to drop additional files in the dirs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to