Example #1
0
 public boolean hasBooleanParam(String key) {
   if (this.hasParam(key)) {
     Boolean val = Boolean.valueOf(this.params.get(key));
     if (val != null) return (true);
   }
   return (false);
 }
Example #2
0
  static {
    // log4j Hack
    LoggerUtil.setupLogging();

    // Jar Caching!
    boolean reuse = false;
    if (System.getenv("ENABLE_JAR_REUSE") != null) {
      reuse = Boolean.valueOf(System.getenv("ENABLE_JAR_REUSE"));
      if (reuse) LOG.debug("ENABLE_JAR_REUSE = " + reuse);
    }
    ENABLE_JAR_REUSE = reuse;

    // HStoreConf Hack
    HStoreConf.init(null, null);
    HStoreConf.singleton().site.cpu_affinity = false;

    // Force everything to be single-threaded
    ThreadUtil.setMaxGlobalThreads(2);
  }
Example #3
0
 public Boolean getBooleanParam(String key, Boolean defaultValue) {
   String val = this.params.get(key);
   Boolean ret = defaultValue;
   if (val != null) ret = Boolean.valueOf(val);
   return (ret);
 }