incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/4] git commit: More small adjusts to all hadoop 2 to start if using a local install of hadoop.
Date Fri, 10 Apr 2015 12:52:50 GMT
More small adjusts to all hadoop 2 to start if using a local install of hadoop.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/77e1f4f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/77e1f4f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/77e1f4f2

Branch: refs/heads/master
Commit: 77e1f4f2f0f73c1e7c392e4453abf0566d868b76
Parents: 5209056
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Fri Apr 10 08:51:56 2015 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Fri Apr 10 08:51:56 2015 -0400

----------------------------------------------------------------------
 distribution/src/main/scripts/bin/blur-config.sh          | 9 ++++++---
 distribution/src/main/scripts/bin/start-console-server.sh | 2 +-
 distribution/src/main/scripts/bin/start-shard-server.sh   | 2 +-
 distribution/src/main/scripts/conf/blur-env.sh            | 3 +++
 4 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77e1f4f2/distribution/src/main/scripts/bin/blur-config.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/bin/blur-config.sh b/distribution/src/main/scripts/bin/blur-config.sh
index f419812..4b7fad4 100755
--- a/distribution/src/main/scripts/bin/blur-config.sh
+++ b/distribution/src/main/scripts/bin/blur-config.sh
@@ -65,7 +65,10 @@ for f in $BLUR_HOME/lib/*.war; do
   BLUR_CLASSPATH=${BLUR_CLASSPATH}:$f;
 done
 
-if [ -z "$HADOOP_HOME" ]; then
+BLUR_CORE_FILE=`ls -d1 $BLUR_HOME/lib/blur-core-*.jar | head -1`
+
+if [ -z "$HADOOP_HOME" ] || [[ $BLUR_CORE_FILE == *"hadoop1"* ]] ; then
+
   export HADOOP_HOME=`ls -d1 $BLUR_HOME/lib/hadoop-*/ | head -1`
   BLUR_CLASSPATH=${BLUR_CLASSPATH}:$HADOOP_HOME/conf
 
@@ -82,8 +85,7 @@ if [ -z "$HADOOP_HOME" ]; then
   done
   
 else
-
-  BLUR_CLASSPATH=${BLUR_CLASSPATH}:$HADOOP_HOME/conf
+  BLUR_CLASSPATH=${BLUR_CLASSPATH}:$HADOOP_HOME/etc/hadoop
 
   for f in $HADOOP_HOME/share/hadoop/mapreduce/*.jar; do
     BLUR_CLASSPATH=${BLUR_CLASSPATH}:$f;
@@ -108,6 +110,7 @@ else
   for f in $HADOOP_HOME/share/hadoop/common/lib/*.jar; do
     BLUR_CLASSPATH=${BLUR_CLASSPATH}:$f;
   done
+
 fi
 
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77e1f4f2/distribution/src/main/scripts/bin/start-console-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/bin/start-console-server.sh b/distribution/src/main/scripts/bin/start-console-server.sh
index d94a6ee..d6085b3 100755
--- a/distribution/src/main/scripts/bin/start-console-server.sh
+++ b/distribution/src/main/scripts/bin/start-console-server.sh
@@ -30,6 +30,6 @@ if [ -f $PID_FILE ]; then
 fi
 
 PROC_NAME=console-$HOSTNAME
-nohup "$JAVA_HOME"/bin/java -Dblur.name=$PROC_NAME -Djava.library.path=$JAVA_LIBRARY_PATH
-Dblur-console $BLUR_CONSOLE_JVM_OPTIONS -Dblur.logs.dir=$BLUR_LOGS -Dblur.log.file=blur-$USER-$PROC_NAME
-cp $BLUR_CLASSPATH org.apache.blur.console.Main > "$BLUR_LOGS/blur-$USER-$PROC_NAME.out"
2>&1 < /dev/null &
+nohup "$JAVA_HOME"/bin/java -Dblur.name=$PROC_NAME -Dblur-console -Djava.library.path=$JAVA_LIBRARY_PATH
$BLUR_CONSOLE_JVM_OPTIONS -Dblur.logs.dir=$BLUR_LOGS -Dblur.log.file=blur-$USER-$PROC_NAME
-cp $BLUR_CLASSPATH org.apache.blur.console.Main > "$BLUR_LOGS/blur-$USER-$PROC_NAME.out"
2>&1 < /dev/null &
 echo $! > $PID_FILE
 echo Console starting as process `cat $PID_FILE`.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77e1f4f2/distribution/src/main/scripts/bin/start-shard-server.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/bin/start-shard-server.sh b/distribution/src/main/scripts/bin/start-shard-server.sh
index d72f842..4d33f32 100755
--- a/distribution/src/main/scripts/bin/start-shard-server.sh
+++ b/distribution/src/main/scripts/bin/start-shard-server.sh
@@ -33,7 +33,7 @@ while [  $INSTANCE -lt $BLUR_NUMBER_OF_SHARD_SERVER_INSTANCES_PER_MACHINE
]; do
   fi
 
   PROC_NAME=shard-server-$HOSTNAME-$INSTANCE
-  nohup "$JAVA_HOME"/bin/java -Dblur.name=$PROC_NAME -Djava.library.path=$JAVA_LIBRARY_PATH
-Dblur-shard-$INSTANCE $BLUR_SHARD_JVM_OPTIONS -Dblur.logs.dir=$BLUR_LOGS -Dblur.log.file=blur-$USER-$PROC_NAME
-cp $BLUR_CLASSPATH org.apache.blur.thrift.ThriftBlurShardServer -s $INSTANCE > "$BLUR_LOGS/blur-$USER-$PROC_NAME.out"
2>&1 < /dev/null &
+  nohup "$JAVA_HOME"/bin/java -Dblur.name=$PROC_NAME -Dblur-shard-$INSTANCE -Djava.library.path=$JAVA_LIBRARY_PATH
 $BLUR_SHARD_JVM_OPTIONS -Dblur.logs.dir=$BLUR_LOGS -Dblur.log.file=blur-$USER-$PROC_NAME
-cp $BLUR_CLASSPATH org.apache.blur.thrift.ThriftBlurShardServer -s $INSTANCE > "$BLUR_LOGS/blur-$USER-$PROC_NAME.out"
2>&1 < /dev/null &
   echo $! > $PID_FILE
   echo Shard [$INSTANCE] starting as process `cat $PID_FILE`.
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77e1f4f2/distribution/src/main/scripts/conf/blur-env.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/conf/blur-env.sh b/distribution/src/main/scripts/conf/blur-env.sh
index c258f78..06dbdc2 100755
--- a/distribution/src/main/scripts/conf/blur-env.sh
+++ b/distribution/src/main/scripts/conf/blur-env.sh
@@ -68,3 +68,6 @@ export BLUR_NUMBER_OF_CONTROLLER_SERVER_INSTANCES_PER_MACHINE=1
 # The directory where all the log files will be located.
 # export BLUR_LOGS=$BLUR_HOME/logs
 
+# If you would like to add Hadoop native libraries or any other native libs add them to this
variable.
+#export JAVA_LIBRARY_PATH=
+


Mime
View raw message