Search in sources :

Example 71 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockSink method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", true, true));
    return PluginClass.builder().setName("Mock").setType(SparkSink.PLUGIN_TYPE).setDescription("").setClassName(MockSink.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 72 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class DropNullTransform method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("field", new PluginPropertyField("field", "", "string", true, false));
    return PluginClass.builder().setName("DropField").setType(Transform.PLUGIN_TYPE).setDescription("").setClassName(DropNullTransform.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 73 with PluginPropertyField

use of io.cdap.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 PluginClass.builder().setName("FilterTransform").setType(Transform.PLUGIN_TYPE).setDescription("").setClassName(FilterTransform.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 74 with PluginPropertyField

use of io.cdap.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));
    properties.put("name2", new PluginPropertyField("name2", "", "string", false, false));
    properties.put("alias2", new PluginPropertyField("alias2", "", "string", false, false));
    properties.put("dirName2", new PluginPropertyField("dirName2", "", "string", false, false));
    return PluginClass.builder().setName(PLUGIN_NAME).setType(BatchSink.PLUGIN_TYPE).setDescription("").setClassName(MockExternalSink.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 75 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class GroupFilterAggregator method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("field", new PluginPropertyField("field", "", "string", true, false));
    properties.put("value", new PluginPropertyField("value", "", "string", true, false));
    return PluginClass.builder().setName("GroupFilter").setType(BatchAggregator.PLUGIN_TYPE).setDescription("").setClassName(GroupFilterAggregator.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Aggregations

PluginPropertyField (io.cdap.cdap.api.plugin.PluginPropertyField)115 HashMap (java.util.HashMap)93 PluginClass (io.cdap.cdap.api.plugin.PluginClass)29 Test (org.junit.Test)16 ArtifactRange (io.cdap.cdap.api.artifact.ArtifactRange)12 ArtifactVersion (io.cdap.cdap.api.artifact.ArtifactVersion)12 Id (io.cdap.cdap.common.id.Id)12 File (java.io.File)10 ArtifactClasses (io.cdap.cdap.api.artifact.ArtifactClasses)8 ArtifactId (io.cdap.cdap.proto.id.ArtifactId)8 NamespaceId (io.cdap.cdap.proto.id.NamespaceId)8 Location (org.apache.twill.filesystem.Location)8 ImmutableMap (com.google.common.collect.ImmutableMap)6 ImmutableSet (com.google.common.collect.ImmutableSet)6 ApplicationClass (io.cdap.cdap.api.artifact.ApplicationClass)6 ArtifactId (io.cdap.cdap.api.artifact.ArtifactId)6 Requirements (io.cdap.cdap.api.plugin.Requirements)6 ArtifactNotFoundException (io.cdap.cdap.common.ArtifactNotFoundException)6 ArrayList (java.util.ArrayList)6 Map (java.util.Map)6