incubator-crail git commit: Scripts: fix log/pid file for multiple datanodes

2018-06-21 Thread pepperjo
Repository: incubator-crail
Updated Branches:
  refs/heads/master f166a0807 -> c6ccda5f4


Scripts: fix log/pid file for multiple datanodes

Fix using the same filename when starting multiple storage
tiers on the same node. Append arguments from slave file
to make path unique.

https://issues.apache.org/jira/projects/CRAIL/issues/CRAIL-29

Signed-off-by: Jonas Pfefferle 


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

Branch: refs/heads/master
Commit: c6ccda5f442b8d65ee7f15bd56fb8e0b8388d31d
Parents: f166a08
Author: Jonas Pfefferle 
Authored: Wed Jun 20 15:45:47 2018 +0200
Committer: Jonas Pfefferle 
Committed: Thu Jun 21 11:30:07 2018 +0200

--
 libexec/crail-daemon.sh | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/c6ccda5f/libexec/crail-daemon.sh
--
diff --git a/libexec/crail-daemon.sh b/libexec/crail-daemon.sh
index 16bea7f..9fea6cb 100755
--- a/libexec/crail-daemon.sh
+++ b/libexec/crail-daemon.sh
@@ -15,6 +15,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+function trim() {
+   s="$@"
+   echo ${s//[[:blank:]]/}
+}
 
 usage="Usage: crail-daemon.sh [--config ] [--hosts hostlistfile] 
[--script script] (start|stop)  "
 
@@ -92,13 +96,14 @@ if [ "$HADOOP_PID_DIR" = "" ]; then
   HADOOP_PID_DIR=/tmp
 fi
 
+ARGS=$(trim "$@")
 # some variables
-export HADOOP_LOGFILE=crail-$HADOOP_IDENT_STRING-$command-$HOSTNAME.log
+export HADOOP_LOGFILE=crail-$HADOOP_IDENT_STRING-$command-$ARGS-$HOSTNAME.log
 export HADOOP_ROOT_LOGGER=${HADOOP_ROOT_LOGGER:-"INFO,RFA"}
 export HADOOP_SECURITY_LOGGER=${HADOOP_SECURITY_LOGGER:-"INFO,RFAS"}
 export HDFS_AUDIT_LOGGER=${HDFS_AUDIT_LOGGER:-"INFO,NullAppender"}
-log=$HADOOP_LOG_DIR/crail-$HADOOP_IDENT_STRING-$command-$HOSTNAME.out
-pid=$HADOOP_PID_DIR/crail-$HADOOP_IDENT_STRING-$command.pid
+log=$HADOOP_LOG_DIR/crail-$HADOOP_IDENT_STRING-$command-$ARGS-$HOSTNAME.out
+pid=$HADOOP_PID_DIR/crail-$HADOOP_IDENT_STRING-$command-$ARGS.pid
 HADOOP_STOP_TIMEOUT=${HADOOP_STOP_TIMEOUT:-5}
 
 # Set default scheduling priority



[1/2] incubator-crail git commit: Start script: remove heap size argument

2018-06-21 Thread pepperjo
Repository: incubator-crail
Updated Branches:
  refs/heads/master 46925ad19 -> f166a0807


Start script: remove heap size argument

Remove Xmx and MaxDirectMemorySize argument from start script
since it does not allow to run Crail on machines with less
than 64G.

https://issues.apache.org/jira/browse/CRAIL-40

Signed-off-by: Jonas Pfefferle 


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

Branch: refs/heads/master
Commit: f6fd4ee4fc7f9c30265039115bee4302bae99c17
Parents: 46925ad
Author: Jonas Pfefferle 
Authored: Wed Jun 20 13:36:11 2018 +0200
Committer: Jonas Pfefferle 
Committed: Wed Jun 20 16:39:42 2018 +0200

--
 bin/crail | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/f6fd4ee4/bin/crail
--
diff --git a/bin/crail b/bin/crail
index cdf7c0b..6c973f1 100755
--- a/bin/crail
+++ b/bin/crail
@@ -50,11 +50,11 @@ case $COMMAND in
 esac
 
 if [ "$COMMAND" = "namenode" ] ; then
-  CLASS='org.apache.crail.namenode.NameNode'
+  CLASS=org.apache.crail.namenode.NameNode
 elif [ "$COMMAND" = "datanode" ] ; then
-  CLASS='org.apache.crail.storage.StorageServer'
+  CLASS=org.apache.crail.storage.StorageServer
 elif [ "$COMMAND" = "fsck" ] ; then
-  CLASS='org.apache.crail.tools.CrailFsck'
+  CLASS=org.apache.crail.tools.CrailFsck
 elif [ "$COMMAND" = "fs" ] ; then
   CLASS=org.apache.hadoop.fs.FsShell
 elif [ "$COMMAND" = "getconf" ] ; then
@@ -70,4 +70,4 @@ fi
 export CLASSPATH="$bin"/../jars/*:"$bin"/../conf:.
 export LD_LIBRARY_PATH="$bin/../lib:$LD_LIBRARY_PATH"
 
-exec "$JAVA" -Dproc_$COMMAND -XX:MaxDirectMemorySize=64G 
-Dsun.nio.PageAlignDirectMemory=true -Xmn16G $CLASS "$@"
+exec "$JAVA" -Dproc_$COMMAND -Dsun.nio.PageAlignDirectMemory=true $CLASS "$@"