public boolean hasBooleanParam(String key) {
   if (this.hasParam(key)) {
     Boolean val = Boolean.valueOf(this.params.get(key));
     if (val != null) return (true);
   }
   return (false);
 }
Exemple #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);
  }
 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);
 }