ACCUMULO-2787 Tune max open file recommendation

Make the max files recommendation configurable to account for various
cluster sizes. Reduce the default from 64k to 32k because we shouldn't
need to compensate for running datanodes as the same user.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0356387b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0356387b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0356387b

Branch: refs/heads/ACCUMULO-378
Commit: 0356387baba93b5b372b2733ce24ca52938260e4
Parents: 1a33f6d
Author: Mike Drob <md...@cloudera.com>
Authored: Mon Jun 9 18:34:31 2014 -0400
Committer: Mike Drob <md...@cloudera.com>
Committed: Tue Jun 10 11:30:55 2014 -0400

----------------------------------------------------------------------
 bin/start-server.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0356387b/bin/start-server.sh
----------------------------------------------------------------------
diff --git a/bin/start-server.sh b/bin/start-server.sh
index 08c5126..62ad91d 100755
--- a/bin/start-server.sh
+++ b/bin/start-server.sh
@@ -76,8 +76,10 @@ if [ -z "$PID" ]; then
    fi
 
    if [ -n "$MAX_FILES_OPEN" ] && [ -n "$SLAVES" ] ; then
-      if [ "$SLAVES" -gt 10 ] && [ "$MAX_FILES_OPEN" -lt 65536 ]; then
-         echo "WARN : Max files open on $HOST is $MAX_FILES_OPEN, recommend 
65536"
+      MAX_FILES_RECOMMENDED=${MAX_FILES_RECOMMENDED:-32768}
+      if (( SLAVES > 10 )) && (( MAX_FILES_OPEN < MAX_FILES_RECOMMENDED ))
+      then
+         echo "WARN : Max open files on $HOST is $MAX_FILES_OPEN, recommend 
$MAX_FILES_RECOMMENDED" >&2
       fi
    fi
 else

Reply via email to