Search in sources :

Example 11 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockSource method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", true, false));
    properties.put("schema", new PluginPropertyField("schema", "", "string", false, false));
    return new PluginClass(BatchSource.PLUGIN_TYPE, "Mock", "", MockSource.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 12 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class FieldCountAggregator method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("fieldName", new PluginPropertyField("fieldName", "", "string", true, true));
    properties.put("fieldType", new PluginPropertyField("fieldType", "", "string", true, true));
    return new PluginClass(BatchAggregator.PLUGIN_TYPE, "FieldCount", "", FieldCountAggregator.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 13 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class FilterTransform method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("name", new PluginPropertyField("name", "", "string", true, false));
    return new PluginClass(Transform.PLUGIN_TYPE, "FilterTransform", "", FilterTransform.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 14 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockExternalSink method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("name", new PluginPropertyField("name", "", "string", false, false));
    properties.put("alias", new PluginPropertyField("alias", "", "string", true, false));
    properties.put("dirName", new PluginPropertyField("dirName", "", "string", true, false));
    return new PluginClass(BatchSink.PLUGIN_TYPE, PLUGIN_NAME, "", MockExternalSink.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 15 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockRuntimeDatasetSink method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", true, true));
    properties.put("runtimeDatasetName", new PluginPropertyField("runtimeDatasetName", "", "string", true, true));
    return new PluginClass(BatchSink.PLUGIN_TYPE, "MockRuntime", "", MockRuntimeDatasetSink.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Aggregations

PluginPropertyField (co.cask.cdap.api.plugin.PluginPropertyField)53 PluginClass (co.cask.cdap.api.plugin.PluginClass)45 HashMap (java.util.HashMap)32 Test (org.junit.Test)14 ArtifactRange (co.cask.cdap.api.artifact.ArtifactRange)12 ArtifactVersion (co.cask.cdap.api.artifact.ArtifactVersion)12 ArtifactId (co.cask.cdap.proto.id.ArtifactId)11 Id (co.cask.cdap.common.id.Id)10 NamespaceId (co.cask.cdap.proto.id.NamespaceId)10 ImmutableSet (com.google.common.collect.ImmutableSet)5 Set (java.util.Set)5 Manifest (java.util.jar.Manifest)5 ApplicationClass (co.cask.cdap.api.artifact.ApplicationClass)4 ArtifactNotFoundException (co.cask.cdap.common.ArtifactNotFoundException)4 ReflectionSchemaGenerator (co.cask.cdap.internal.io.ReflectionSchemaGenerator)4 IOException (java.io.IOException)4 ArtifactClasses (co.cask.cdap.api.artifact.ArtifactClasses)3 ArtifactId (co.cask.cdap.api.artifact.ArtifactId)3 ArtifactSummary (co.cask.cdap.api.artifact.ArtifactSummary)3 HashSet (java.util.HashSet)3