Package org.apache.twill.internal

Examples of org.apache.twill.internal.DefaultRuntimeSpecification


    // Rewrite LocalFiles inside twillSpec
    Map<String, RuntimeSpecification> runtimeSpec = Maps.transformEntries(
      spec.getRunnables(), new Maps.EntryTransformer<String, RuntimeSpecification, RuntimeSpecification>() {
      @Override
      public RuntimeSpecification transformEntry(String key, RuntimeSpecification value) {
        return new DefaultRuntimeSpecification(value.getName(), value.getRunnableSpecification(),
                                               value.getResourceSpecification(), runnableLocalFiles.get(key));
      }
    });

    // Serialize into a local temp file.
View Full Code Here


        final TwillRunnableSpecification spec = new DefaultTwillRunnableSpecification(
                                            runnable.getClass().getName(), name, runnable.configure().getConfigs());
        return new RuntimeSpecificationAdder(new Function<Collection<LocalFile>, RunnableSetter>() {
          @Override
          public RunnableSetter apply(Collection<LocalFile> files) {
            runnables.put(spec.getName(), new DefaultRuntimeSpecification(spec.getName(), spec, resourceSpec, files));
            return RunnableSetter.this;
          }
        });
      }
View Full Code Here

    ResourceSpecification resources = context.deserialize(jsonObj.get("resources"),
                                                          ResourceSpecification.class);
    Collection<LocalFile> files = context.deserialize(jsonObj.get("files"),
                                                      new TypeToken<Collection<LocalFile>>() { }.getType());

    return new DefaultRuntimeSpecification(name, runnable, resources, files);
  }
View Full Code Here

    // Rewrite LocalFiles inside twillSpec
    Map<String, RuntimeSpecification> runtimeSpec = Maps.transformEntries(
      spec.getRunnables(), new Maps.EntryTransformer<String, RuntimeSpecification, RuntimeSpecification>() {
      @Override
      public RuntimeSpecification transformEntry(String key, RuntimeSpecification value) {
        return new DefaultRuntimeSpecification(value.getName(), value.getRunnableSpecification(),
                                               value.getResourceSpecification(), runnableLocalFiles.get(key));
      }
    });

    // Serialize into a local temp file.
View Full Code Here

TOP

Related Classes of org.apache.twill.internal.DefaultRuntimeSpecification

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.