Exemplo n.º 1
0
 public ZeppelinConfiguration() {
   ConfVars[] vars = ConfVars.values();
   for (ConfVars v : vars) {
     if (v.getType() == ConfVars.VarType.BOOLEAN) {
       this.setProperty(v.getVarName(), v.getBooleanValue());
     } else if (v.getType() == ConfVars.VarType.LONG) {
       this.setProperty(v.getVarName(), v.getLongValue());
     } else if (v.getType() == ConfVars.VarType.INT) {
       this.setProperty(v.getVarName(), v.getIntValue());
     } else if (v.getType() == ConfVars.VarType.FLOAT) {
       this.setProperty(v.getVarName(), v.getFloatValue());
     } else if (v.getType() == ConfVars.VarType.STRING) {
       this.setProperty(v.getVarName(), v.getStringValue());
     } else {
       throw new RuntimeException("Unsupported VarType");
     }
   }
 }
Exemplo n.º 2
0
 public long getLong(ConfVars c) {
   return getLong(c.name(), c.getVarName(), c.getLongValue());
 }