Package co.cask.cdap.common.conf

Examples of co.cask.cdap.common.conf.CConfiguration.addResource()


    }

    ByteArrayInputStream bin = new ByteArrayInputStream(data);
    CConfiguration cConfiguration = CConfiguration.create();
    cConfiguration.clear();
    cConfiguration.addResource(bin);
    return cConfiguration;
  }
}
View Full Code Here


    hConf.set(HCONF_ATTR_PROGRAM_JAR_NAME, programJarName);
  }

  public CConfiguration getConf() {
    CConfiguration conf = CConfiguration.create();
    conf.addResource(new ByteArrayInputStream(hConf.get(HCONF_ATTR_CCONF).getBytes()));
    return conf;
  }

  private static void setTx(Transaction tx) {
    hConf.set(HCONF_ATTR_NEW_TX, GSON.toJson(tx));
View Full Code Here

    jobContext.getConfiguration().set(HCONF_ATTR_CCONF, stringWriter.toString());
  }

  public CConfiguration getConf() {
    CConfiguration conf = CConfiguration.create();
    conf.addResource(new ByteArrayInputStream(jobContext.getConfiguration().get(HCONF_ATTR_CCONF).getBytes()));
    return conf;
  }

  private void setTx(Transaction tx) {
    jobContext.getConfiguration().set(HCONF_ATTR_NEW_TX, GSON.toJson(tx));
View Full Code Here

      UserGroupInformation.setConfiguration(hConf);

      CConfiguration cConf = CConfiguration.create();
      cConf.clear();
      cConf.addResource(new File(configs.get("cConf")).toURI().toURL());
      cConf.set(Constants.LogSaver.ADDRESS, context.getHost().getCanonicalHostName());

      // Initialize ZK client
      String zookeeper = cConf.get(Constants.Zookeeper.QUORUM);
      if (zookeeper == null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.