Skip to content

Commit

Permalink
Add -no_ice to hadoop launch.
Browse files Browse the repository at this point in the history
Add a log message when no_ice is given.
  • Loading branch information
tomkraljevic committed May 26, 2015
1 parent 19ed22e commit e5b3aaf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hadoop/src/main/java/water/hadoop/h2odriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class h2odriver extends Configured implements Tool {
static int chunk_bytes;
static int data_max_factor_levels;
static boolean beta = false;
static boolean noIce = false;
static boolean enableRandomUdpDrop = false;
static boolean enableExceptions = false;
static boolean enableVerboseGC = false;
Expand Down Expand Up @@ -584,6 +585,9 @@ else if (s.equals("-baseport")) {
else if (s.equals("-beta")) {
beta = true;
}
else if (s.equals("-no_ice")) {
noIce = true;
}
else if (s.equals("-random_udp_drop")) {
enableRandomUdpDrop = true;
}
Expand Down Expand Up @@ -979,6 +983,9 @@ private int run2(String[] args) throws Exception {
if (beta) {
conf.set(h2omapper.H2O_BETA_KEY, "-beta");
}
if (noIce) {
conf.set(h2omapper.H2O_NOICE_KEY, "-no_ice");
}
if (manyCols) {
conf.set(h2omapper.H2O_MANYCOLS_KEY, "-many_cols");
}
Expand Down
7 changes: 7 additions & 0 deletions hadoop/src/main/java/water/hadoop/h2omapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class h2omapper extends Mapper<Text, Text, Text, Text> {
final static public String H2O_DRIVER_PORT_KEY = "h2o.driver.port";
final static public String H2O_NETWORK_KEY = "h2o.network";
final static public String H2O_BETA_KEY = "h2o.beta";
final static public String H2O_NOICE_KEY = "h2o.no_ice";
final static public String H2O_RANDOM_UDP_DROP_KEY = "h2o.random.udp.drop";
final static public String H2O_NTHREADS_KEY = "h2o.nthreads";
final static public String H2O_MANYCOLS_KEY = "h2o.many.cols";
Expand Down Expand Up @@ -369,6 +370,7 @@ private int run2(Context context) throws IOException, InterruptedException {
String nthreadsString = conf.get(H2O_NTHREADS_KEY);
String basePortString = conf.get(H2O_BASE_PORT_KEY);
String betaString = conf.get(H2O_BETA_KEY);
String noIceString = conf.get(H2O_NOICE_KEY);
String randomUdpDropString = conf.get(H2O_RANDOM_UDP_DROP_KEY);
String licenseData = conf.get(H2O_LICENSE_DATA_KEY);
String hadoopVersion = conf.get(H2O_HADOOP_VERSION);
Expand Down Expand Up @@ -431,6 +433,11 @@ private int run2(Context context) throws IOException, InterruptedException {
argsList.add(betaString);
}
}
if (noIceString != null) {
if (noIceString.length() > 0) {
argsList.add(noIceString);
}
}
if (randomUdpDropString != null) {
if (randomUdpDropString.length() > 0) {
argsList.add(randomUdpDropString);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/water/H2O.java
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,7 @@ public static void main( String[] args ) {
if (OPT_ARGS.no_ice) {
// Cleaner callback happens in a different classloader. Do this so they can share the state info.
System.setProperty("h2o.args.no_ice", "true");
Log.info("Memory cleaner is disabled since -no_ice was specified.");
}

if (OPT_ARGS.baseport != 0) {
Expand Down

0 comments on commit e5b3aaf

Please sign in to comment.