You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crail.apache.org by pe...@apache.org on 2018/06/21 07:59:04 UTC

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

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 <pe...@apache.org>


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 <pe...@apache.org>
Authored: Wed Jun 20 13:36:11 2018 +0200
Committer: Jonas Pfefferle <pe...@apache.org>
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 "$@"


[2/2] incubator-crail git commit: Scripts: add crail-env.sh

Posted by pe...@apache.org.
Scripts: add crail-env.sh

Add crail-env.sh file to allow setting parameters for
the start scripts like extra java options.

Signed-off-by: Jonas Pfefferle <pe...@apache.org>


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

Branch: refs/heads/master
Commit: f166a0807ba5551a2b6a33d5607c69aa5437fa6f
Parents: f6fd4ee
Author: Jonas Pfefferle <pe...@apache.org>
Authored: Wed Jun 20 16:52:46 2018 +0200
Committer: Jonas Pfefferle <pe...@apache.org>
Committed: Wed Jun 20 16:52:46 2018 +0200

----------------------------------------------------------------------
 bin/crail                  | 12 ++++++++++--
 conf/crail-env.sh.template |  3 +++
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/f166a080/bin/crail
----------------------------------------------------------------------
diff --git a/bin/crail b/bin/crail
index 6c973f1..8b9e97b 100755
--- a/bin/crail
+++ b/bin/crail
@@ -67,7 +67,15 @@ elif [ "$COMMAND" = "test" ] ; then
   CLASS=org.junit.runner.JUnitCore
 fi
 
-export CLASSPATH="$bin"/../jars/*:"$bin"/../conf:.
+CONF_PATH="$bin"/../conf
+export CLASSPATH="$bin"/../jars/*:${CONF_PATH}:.
 export LD_LIBRARY_PATH="$bin/../lib:$LD_LIBRARY_PATH"
 
-exec "$JAVA" -Dproc_$COMMAND -Dsun.nio.PageAlignDirectMemory=true $CLASS "$@"
+if [ -f "${CONF_PATH}/crail-env.sh" ]; then
+  # Promote all variable declarations to environment (exported) variables
+  set -a
+  . "${CONF_PATH}/crail-env.sh"
+  set +a
+fi
+
+exec "$JAVA" -Dproc_$COMMAND -Dsun.nio.PageAlignDirectMemory=true $CRAIL_EXTRA_JAVA_OPTIONS $CLASS "$@"

http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/f166a080/conf/crail-env.sh.template
----------------------------------------------------------------------
diff --git a/conf/crail-env.sh.template b/conf/crail-env.sh.template
new file mode 100644
index 0000000..1bfb348
--- /dev/null
+++ b/conf/crail-env.sh.template
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+# This env varibale allows setting additional java parameter
+#CRAIL_EXTRA_JAVA_OPTIONS="-Xmx24G -Xmn16G"