Examples of LuaWrapper


Examples of com.cloudera.kitten.lua.LuaWrapper

 
  public LuaApplicationMasterParameters(String script, String jobName,
      Configuration conf,
      Map<String, Object> extras,
      Map<String, URI> localToUris) {
    this.env = new LuaWrapper(script, loadExtras(extras)).getTable(jobName);
    this.conf = conf;
    this.localToUris = localToUris;
    this.hostname = NetUtils.getHostname();
  }
View Full Code Here

Examples of com.cloudera.kitten.lua.LuaWrapper

    this(script, jobName, conf, extraLuaValues, ImmutableMap.<String, String>of());
  }
 
  public LuaYarnClientParameters(String script, String jobName, Configuration conf,
      Map<String, Object> extraLuaValues, Map<String, String> resources) {
    this.env = new LuaWrapper(script, extraLuaValues).getTable(jobName);
    this.conf = initConf(env, conf);
    this.extras = new Extras();
    this.extras.putEnv(LuaFields.KITTEN_JOB_NAME, jobName);
    this.extras.putResource(LuaFields.KITTEN_LUA_CONFIG_FILE, script);
    this.extras.putAllResources(resources);
View Full Code Here

Examples of com.cloudera.kitten.lua.LuaWrapper

   
    // Map all of the files that the containers will need.  
    if (!env.isNil(LuaFields.CONTAINERS)) {
      Iterator<LuaPair> iter = env.getTable(LuaFields.CONTAINERS).arrayIterator();
      while (iter.hasNext()) {
        mapLocalFiles(new LuaWrapper(iter.next().value.checktable()), lfh);
      }
    } else if (!env.isNil(LuaFields.CONTAINER)) {
      mapLocalFiles(env.getTable(LuaFields.CONTAINER), lfh);
    }
    return lfh.getFileMapping();
View Full Code Here

Examples of com.cloudera.kitten.lua.LuaWrapper

    return lfh.getFileMapping();
  }
 
  private void mapLocalFiles(LuaWrapper entity, LocalDataHelper localFileHelper) {
    if (!entity.isNil(LuaFields.RESOURCES)) {
      LuaWrapper lrsrcs = entity.getTable(LuaFields.RESOURCES);
      for (LuaPair lp : lrsrcs) {
        LuaWrapper rsrc = new LuaWrapper(lp.value.checktable());
        if (!rsrc.isNil(LuaFields.LOCAL_RESOURCE_LOCAL_FILE)) {
          String localFileName = rsrc.getString(LuaFields.LOCAL_RESOURCE_LOCAL_FILE);
          try {
            localFileHelper.copyToHdfs(localFileName);
          } catch (IOException e) {
            LOG.error("Error copying local file " + localFileName + " to hdfs", e);
          }
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.