use of io.cdap.cdap.internal.specification.PropertyFieldExtractor in project cdap by caskdata.
the class DefaultConditionConfigurer method createSpecification.
private DefaultConditionSpecification createSpecification() {
Set<String> datasets = new HashSet<>();
Reflections.visit(condition, condition.getClass(), new PropertyFieldExtractor(properties), new DataSetFieldExtractor(datasets));
return new DefaultConditionSpecification(condition.getClass().getName(), name, description, properties, datasets);
}
use of io.cdap.cdap.internal.specification.PropertyFieldExtractor in project cdap by caskdata.
the class DefaultMapReduceConfigurer method createSpecification.
public MapReduceSpecification createSpecification() {
Set<String> datasets = new HashSet<>();
Reflections.visit(mapReduce, mapReduce.getClass(), new PropertyFieldExtractor(properties), new DataSetFieldExtractor(datasets));
return new MapReduceSpecification(mapReduce.getClass().getName(), name, description, inputDataset, outputDataset, datasets, properties, driverResources, mapperResources, reducerResources, getPlugins());
}
use of io.cdap.cdap.internal.specification.PropertyFieldExtractor in project cdap by caskdata.
the class DefaultCustomActionConfigurer method createSpecification.
private DefaultCustomActionSpecification createSpecification() {
Set<String> datasets = new HashSet<>();
Reflections.visit(customAction, customAction.getClass(), new PropertyFieldExtractor(properties), new DataSetFieldExtractor(datasets));
return new DefaultCustomActionSpecification(customAction.getClass().getName(), name, description, properties, datasets);
}
use of io.cdap.cdap.internal.specification.PropertyFieldExtractor in project cdap by caskdata.
the class DefaultHttpServiceHandlerConfigurer method createSpecification.
/**
* Creates a {@link HttpServiceHandlerSpecification} from the parameters stored in this class.
*
* @return a new specification from the parameters stored in this instance
*/
public HttpServiceHandlerSpecification createSpecification() {
List<ServiceHttpEndpoint> endpoints = new ArrayList<>();
// Inspect the handler to grab all @UseDataset, @Property and endpoints.
Reflections.visit(handler, handler.getClass(), new DataSetFieldExtractor(datasets), new PropertyFieldExtractor(properties), new ServiceEndpointExtractor(endpoints));
return new HttpServiceHandlerSpecification(handler.getClass().getName(), name, "", properties, datasets, endpoints);
}
use of io.cdap.cdap.internal.specification.PropertyFieldExtractor in project cdap by caskdata.
the class DefaultSparkConfigurer method createSpecification.
public SparkSpecification createSpecification() {
Set<String> datasets = new HashSet<>();
// Grab all @Property and @Dataset fields
Reflections.visit(spark, spark.getClass(), new PropertyFieldExtractor(properties), new DataSetFieldExtractor(datasets));
return new SparkSpecification(spark.getClass().getName(), name, description, mainClassName, datasets, properties, clientResources, driverResources, executorResources, getHandlers(), getPlugins());
}
Aggregations