Package co.cask.cdap.api

Examples of co.cask.cdap.api.ResourceSpecification$Builder


    String name = jsonObj.get("name").getAsString();
    String description = jsonObj.get("description").getAsString();
    FailurePolicy policy = FailurePolicy.valueOf(jsonObj.get("failurePolicy").getAsString());
    Set<String> dataSets = deserializeSet(jsonObj.get("datasets"), context, String.class);
    Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class);
    ResourceSpecification resources = context.deserialize(jsonObj.get("resources"),
                                                          new TypeToken<ResourceSpecification>() { }.getType());

    return new DefaultFlowletSpecification(className, name, description, policy, dataSets, properties, resources);
  }
View Full Code Here


    String className = jsonObj.get("className").getAsString();
    String name = jsonObj.get("name").getAsString();
    String description = jsonObj.get("description").getAsString();
    Set<String> dataSets = deserializeSet(jsonObj.get("datasets"), context, String.class);
    Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class);
    ResourceSpecification resourceSpec = context.deserialize(jsonObj.get("resources"),
                                                             new TypeToken<ResourceSpecification>() { }.getType());

    JsonElement instanceElem = jsonObj.get("instances");
    int instances = (instanceElem == null || instanceElem.isJsonNull()) ? 1 : jsonObj.get("instances").getAsInt();
    return new DefaultProcedureSpecification(className, name, description, dataSets,
View Full Code Here

TOP

Related Classes of co.cask.cdap.api.ResourceSpecification$Builder

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.