Package co.cask.cdap.internal.batch

Examples of co.cask.cdap.internal.batch.DefaultMapReduceSpecification


  }

  @Override
  public void addMapReduce(MapReduce mapReduce) {
    Preconditions.checkArgument(mapReduce != null, "MapReduce cannot be null.");
    MapReduceSpecification spec = new DefaultMapReduceSpecification(mapReduce);
    mapReduces.put(spec.getName(), spec);
  }
View Full Code Here


      /**
       * @return build a {@link MapReduceSpecification}
       */
      public MapReduceSpecification build() {
        return new DefaultMapReduceSpecification(name, description, inputDataSet, outputDataSet,
                                                 dataSets.build(), arguments, mapperMemoryMB, reducerMemoryMB);
      }
View Full Code Here

     * Adds a {@link MapReduce} job to this workflow.
     * @param mapReduce The map reduce job to add.
     * @return A {@link MapReduceSpecification} used for the given MapReduce job.
     */
    private MapReduceSpecification addWorkflowMapReduce(MapReduce mapReduce) {
      MapReduceSpecification mapReduceSpec = new DefaultMapReduceSpecification(mapReduce);

      // Rename the MapReduce job based on the step in the workflow.
      final String mapReduceName = String.format("%s_%s", name, mapReduceSpec.getName());
      mapReduceSpec = new ForwardingMapReduceSpecification(mapReduceSpec) {
        @Override
        public String getName() {
          return mapReduceName;
        }
View Full Code Here

    String outputDataSet = outputDataSetElem == null ? null : outputDataSetElem.getAsString();

    Set<String> dataSets = deserializeSet(jsonObj.get("datasets"), context, String.class);
    Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class);

    return new DefaultMapReduceSpecification(className, name, description, inputDataSet, outputDataSet,
                                             dataSets, properties, mapperMemoryMB, reducerMemoryMB);
  }
View Full Code Here

TOP

Related Classes of co.cask.cdap.internal.batch.DefaultMapReduceSpecification

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.