Package org.apache.twill.api

Examples of org.apache.twill.api.TwillRunnableSpecification$Builder$AfterConfigs


    this.resourceSpec = resourceSpec;
  }

  @Override
  public TwillSpecification configure() {
    TwillRunnableSpecification runnableSpec = runnable.configure();
    return TwillSpecification.Builder.with()
      .setName(runnableSpec.getName())
      .withRunnable().add(runnableSpec.getName(), runnable, resourceSpec)
      .noLocalFiles()
      .anyOrder()
      .build();
  }
View Full Code Here


    this.resourceSpec = resourceSpec;
  }

  @Override
  public TwillSpecification configure() {
    TwillRunnableSpecification runnableSpec = runnable.configure();
    return TwillSpecification.Builder.with()
      .setName(runnableSpec.getName())
      .withRunnable().add(runnableSpec.getName(), runnable, resourceSpec)
      .noLocalFiles()
      .anyOrder()
      .build();
  }
View Full Code Here

  public RuntimeSpecification deserialize(JsonElement json, Type typeOfT,
                                          JsonDeserializationContext context) throws JsonParseException {
    JsonObject jsonObj = json.getAsJsonObject();

    String name = jsonObj.get("name").getAsString();
    TwillRunnableSpecification runnable = context.deserialize(jsonObj.get("runnable"),
                                                               TwillRunnableSpecification.class);
    ResourceSpecification resources = context.deserialize(jsonObj.get("resources"),
                                                          ResourceSpecification.class);
    Collection<LocalFile> files = context.deserialize(jsonObj.get("files"),
                                                      new TypeToken<Collection<LocalFile>>() { }.getType());
View Full Code Here

    ZKDiscoveryService discoveryService = new ZKDiscoveryService(zkClientService);

    TwillSpecification twillSpec = loadTwillSpec(twillSpecFile);
    renameLocalFiles(twillSpec.getRunnables().get(runnableName));
   
    TwillRunnableSpecification runnableSpec = twillSpec.getRunnables().get(runnableName).getRunnableSpecification();
    ContainerInfo containerInfo = new EnvContainerInfo();
    Arguments arguments = decodeArgs();
    BasicTwillContext context = new BasicTwillContext(
      runId, appRunId, containerInfo.getHost(),
      arguments.getRunnableArguments().get(runnableName).toArray(new String[0]),
View Full Code Here

    DiscoveryService discoveryService = new ZKDiscoveryService(zkClientService);

    TwillSpecification twillSpec = loadTwillSpec(twillSpecFile);
    renameLocalFiles(twillSpec.getRunnables().get(runnableName));
   
    TwillRunnableSpecification runnableSpec = twillSpec.getRunnables().get(runnableName).getRunnableSpecification();
    ContainerInfo containerInfo = new EnvContainerInfo();
    Arguments arguments = decodeArgs();
    BasicTwillContext context = new BasicTwillContext(
      runId, appRunId, containerInfo.getHost(),
      arguments.getRunnableArguments().get(runnableName).toArray(new String[0]),
View Full Code Here

TOP

Related Classes of org.apache.twill.api.TwillRunnableSpecification$Builder$AfterConfigs

Copyright © 2018 www.massapicom. 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.