@@ -61,6 +61,7 @@ public class h2odriver extends Configured implements Tool {
61
61
static boolean enableSuspend = false ;
62
62
static int debugPort = 5005 ; // 5005 is the default from IDEA
63
63
static String licenseFileName = null ;
64
+ static String extraJavaOpts = null ;
64
65
65
66
// State filled in as a result of handling options.
66
67
static String licenseData = null ;
@@ -392,6 +393,7 @@ static void usage() {
392
393
" [-verbose:gc]\n " +
393
394
" [-XX:+PrintGCDetails]\n " +
394
395
" [-license <license file name (local filesystem, not hdfs)>]\n " +
396
+ " [-extraJavaOpts <extra Java options (e.g., -XX:MaxDirectMemorySize=128m)>]\n " +
395
397
" -o | -output <hdfs output dir>\n " +
396
398
"\n " +
397
399
"Notes:\n " +
@@ -600,6 +602,10 @@ else if (s.equals("-license")) {
600
602
i ++; if (i >= args .length ) { usage (); }
601
603
licenseFileName = args [i ];
602
604
}
605
+ else if (s .equals ("-extraJavaOpts" )) {
606
+ i ++; if (i >= args .length ) { usage (); }
607
+ extraJavaOpts = args [i ];
608
+ }
603
609
else {
604
610
error ("Unrecognized option " + s );
605
611
}
@@ -856,6 +862,7 @@ private int run2(String[] args) throws Exception {
856
862
+ (enableExcludeMethods ? " -XX:CompileCommand=exclude,water/fvec/NewChunk.append2slowd" : "" )
857
863
+ (enableLog4jDefaultInitOverride ? " -Dlog4j.defaultInitOverride=true" : "" )
858
864
+ (enableDebug ? " -agentlib:jdwp=transport=dt_socket,server=y,suspend=" + (enableSuspend ? "y" : "n" ) + ",address=" + debugPort : "" )
865
+ + (extraJavaOpts != null ? (" " + extraJavaOpts ) : "" )
859
866
;
860
867
conf .set ("mapred.child.java.opts" , mapChildJavaOpts );
861
868
conf .set ("mapred.map.child.java.opts" , mapChildJavaOpts ); // MapR 2.x requires this.
0 commit comments