accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] mikewalch closed pull request #630: Switched to using HADOOP_HOME for Hadoop 3.x
Date Wed, 05 Sep 2018 18:40:14 GMT
mikewalch closed pull request #630: Switched to using HADOOP_HOME for Hadoop 3.x
URL: https://github.com/apache/accumulo/pull/630
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/INSTALL.md b/INSTALL.md
index 7863659785..963f5a1f8e 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -62,7 +62,7 @@ monitor, etc). Follow these steps to set it up:
 
 The `accumulo-env.sh` file sets up environment variables needed by Accumulo:
 
-1. Set `HADOOP_PREFIX` and `ZOOKEEPER_HOME` to the location of your Hadoop and Zookeeper
+1. Set `HADOOP_HOME` and `ZOOKEEPER_HOME` to the location of your Hadoop and Zookeeper
    installations. Accumulo will use these locations to find Hadoop and Zookeeper jars and
add
    them to your `CLASSPATH` variable. If you you are running a vendor-specific release of
    Hadoop or Zookeeper, you may need to modify how the `CLASSPATH` variable is built in
diff --git a/assemble/bin/accumulo-util b/assemble/bin/accumulo-util
index 1a3fb7ca71..c19aa2dfa6 100755
--- a/assemble/bin/accumulo-util
+++ b/assemble/bin/accumulo-util
@@ -124,13 +124,13 @@ function gen_monitor_cert() {
 
 function load_jars_hdfs() {
 
-  if [ -x "$HADOOP_PREFIX/bin/hadoop" ]; then
-    HADOOP="$HADOOP_PREFIX/bin/hadoop"
+  if [ -x "$HADOOP_HOME/bin/hadoop" ]; then
+    HADOOP="$HADOOP_HOME/bin/hadoop"
   else
     HADOOP=$(which hadoop)
   fi
   if [ ! -x "$HADOOP" ]; then
-    echo "Could not find 'hadoop' command. Please set hadoop on your PATH or set HADOOP_PREFIX"
+    echo "Could not find 'hadoop' command. Please set hadoop on your PATH or set HADOOP_HOME"
     exit 1
   fi
 
@@ -180,13 +180,13 @@ function load_jars_hdfs() {
 }
 
 function hadoop_jar() {
-  if [ -x "$HADOOP_PREFIX/bin/hadoop" ]; then
-    HADOOP="$HADOOP_PREFIX/bin/hadoop"
+  if [ -x "$HADOOP_HOME/bin/hadoop" ]; then
+    HADOOP="$HADOOP_HOME/bin/hadoop"
   else
     HADOOP=$(which hadoop)
   fi
   if [ ! -x "$HADOOP" ]; then
-    echo "Could not find 'hadoop' command. Please set hadoop on your PATH or set HADOOP_PREFIX"
+    echo "Could not find 'hadoop' command. Please set hadoop on your PATH or set HADOOP_HOME"
     exit 1
   fi
   if [ -z "$ZOOKEEPER_HOME" ]; then
diff --git a/assemble/conf/accumulo-env.sh b/assemble/conf/accumulo-env.sh
index 73b2ce6099..8a2c851ce4 100644
--- a/assemble/conf/accumulo-env.sh
+++ b/assemble/conf/accumulo-env.sh
@@ -30,9 +30,9 @@
 ## Accumulo logs directory. Referenced by logger config.
 export ACCUMULO_LOG_DIR="${ACCUMULO_LOG_DIR:-${basedir}/logs}"
 ## Hadoop installation
-export HADOOP_PREFIX="${HADOOP_PREFIX:-/path/to/hadoop}"
+export HADOOP_HOME="${HADOOP_HOME:-/path/to/hadoop}"
 ## Hadoop configuration
-export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-${HADOOP_PREFIX}/etc/hadoop}"
+export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-${HADOOP_HOME}/etc/hadoop}"
 ## Zookeeper installation
 export ZOOKEEPER_HOME="${ZOOKEEPER_HOME:-/path/to/zookeeper}"
 
@@ -45,13 +45,13 @@ if [ ! -d "$ZOOKEEPER_HOME" ]; then
   echo "ZOOKEEPER_HOME=$ZOOKEEPER_HOME is not set to a valid directory in accumulo-env.sh"
   exit 1
 fi
-if [ ! -d "$HADOOP_PREFIX" ]; then
-  echo "HADOOP_PREFIX=$HADOOP_PREFIX is not set to a valid directory in accumulo-env.sh"
+if [ ! -d "$HADOOP_HOME" ]; then
+  echo "HADOOP_HOME=$HADOOP_HOME is not set to a valid directory in accumulo-env.sh"
   exit 1
 fi
 
 ## Add external Hadoop & Zookeeper dependencies to CLASSPATH.
-CLASSPATH="${conf}:${lib}/*:${HADOOP_CONF_DIR}:${ZOOKEEPER_HOME}/*:${HADOOP_PREFIX}/share/hadoop/client/*"
+CLASSPATH="${conf}:${lib}/*:${HADOOP_CONF_DIR}:${ZOOKEEPER_HOME}/*:${HADOOP_HOME}/share/hadoop/client/*"
 export CLASSPATH
 
 ##################################################################
@@ -107,8 +107,8 @@ export JAVA_OPTS
 export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-1}
 ## Add Hadoop native libraries to shared library paths given operating system
 case "$(uname)" in
-  Darwin) export DYLD_LIBRARY_PATH="${HADOOP_PREFIX}/lib/native:${DYLD_LIBRARY_PATH}" ;;
-  *)      export LD_LIBRARY_PATH="${HADOOP_PREFIX}/lib/native:${LD_LIBRARY_PATH}" ;;
+  Darwin) export DYLD_LIBRARY_PATH="${HADOOP_HOME}/lib/native:${DYLD_LIBRARY_PATH}" ;;
+  *)      export LD_LIBRARY_PATH="${HADOOP_HOME}/lib/native:${LD_LIBRARY_PATH}" ;;
 esac
 
 ###############################################
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index ea1280904c..a25c53397d 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -313,15 +313,13 @@ private Process _exec(Class<?> clazz, List<String> extraJvmOpts,
String... args)
     builder.environment().put("DYLD_LIBRARY_PATH", ldLibraryPath);
 
     // if we're running under accumulo.start, we forward these env vars
-    String env = System.getenv("HADOOP_PREFIX");
+    String env = System.getenv("HADOOP_HOME");
     if (env != null)
-      builder.environment().put("HADOOP_PREFIX", env);
+      builder.environment().put("HADOOP_HOME", env);
     env = System.getenv("ZOOKEEPER_HOME");
     if (env != null)
       builder.environment().put("ZOOKEEPER_HOME", env);
     builder.environment().put("ACCUMULO_CONF_DIR", config.getConfDir().getAbsolutePath());
-    // hadoop-2.2 puts error messages in the logs if this is not set
-    builder.environment().put("HADOOP_HOME", config.getDir().getAbsolutePath());
     if (config.getHadoopConfDir() != null)
       builder.environment().put("HADOOP_CONF_DIR", config.getHadoopConfDir().getAbsolutePath());
 


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message