Search in sources :

Example 1 with LuaContainerLaunchParameters

use of com.cloudera.kitten.lua.LuaContainerLaunchParameters in project kitten by cloudera.

the class LuaApplicationMasterParameters method getContainerLaunchParameters.

@Override
public List<ContainerLaunchParameters> getContainerLaunchParameters() {
    if (!env.isNil(LuaFields.CONTAINERS)) {
        List<ContainerLaunchParameters> clp = Lists.newArrayList();
        Iterator<LuaPair> iter = env.getTable(LuaFields.CONTAINERS).arrayIterator();
        while (iter.hasNext()) {
            clp.add(new LuaContainerLaunchParameters(iter.next().value, conf, localToUris));
        }
        return clp;
    } else if (!env.isNil(LuaFields.CONTAINER)) {
        return ImmutableList.<ContainerLaunchParameters>of(new LuaContainerLaunchParameters(env.getTable(LuaFields.CONTAINER), conf, localToUris));
    }
    return ImmutableList.of();
}
Also used : LuaContainerLaunchParameters(com.cloudera.kitten.lua.LuaContainerLaunchParameters) ContainerLaunchParameters(com.cloudera.kitten.ContainerLaunchParameters) LuaContainerLaunchParameters(com.cloudera.kitten.lua.LuaContainerLaunchParameters) LuaPair(com.cloudera.kitten.lua.LuaPair)

Aggregations

ContainerLaunchParameters (com.cloudera.kitten.ContainerLaunchParameters)1 LuaContainerLaunchParameters (com.cloudera.kitten.lua.LuaContainerLaunchParameters)1 LuaPair (com.cloudera.kitten.lua.LuaPair)1