Search in sources :

Example 51 with PluginPropertyField

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

the class MockSQLEngineWithCapabilities method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("name", new PluginPropertyField("name", "", "string", true, false));
    properties.put("outputDirName", new PluginPropertyField("outputDirName", "", "string", true, false));
    properties.put("outputSchema", new PluginPropertyField("outputSchema", "", "string", true, false));
    properties.put("expected", new PluginPropertyField("expected", "", "string", true, false));
    return new PluginClass(BatchSQLEngine.PLUGIN_TYPE, NAME, "", MockSQLEngineWithCapabilities.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(io.cdap.cdap.api.plugin.PluginClass) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 52 with PluginPropertyField

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

the class FindPluginHelper method getPlugin.

/**
 * Get the Plugin information from the specified information.
 *
 * @param parents plugin parents of the plugin. Each item in the iterable must be the parent of the item before it,
 *                with the first item as the direct parent of the plugin
 * @param pluginEntry artifact and class information for the plugin
 * @param properties plugin properties
 * @param pluginInstantiator instantiator to add the plugin artifact to
 * @return plugin information
 */
public static Plugin getPlugin(Iterable<ArtifactId> parents, Map.Entry<ArtifactDescriptor, PluginClass> pluginEntry, PluginProperties properties, PluginInstantiator pluginInstantiator) {
    CollectMacroEvaluator collectMacroEvaluator = new CollectMacroEvaluator();
    for (PluginPropertyField field : pluginEntry.getValue().getProperties().values()) {
        if (field.isMacroSupported() && properties.getProperties().containsKey(field.getName())) {
            MacroParser parser = new MacroParser(collectMacroEvaluator, MacroParserOptions.builder().setEscaping(field.isMacroEscapingEnabled()).build());
            parser.parse(properties.getProperties().get(field.getName()));
        }
    }
    ArtifactId artifact = pluginEntry.getKey().getArtifactId();
    try {
        pluginInstantiator.addArtifact(pluginEntry.getKey().getLocation(), artifact);
    } catch (IOException e) {
        throw Throwables.propagate(e);
    }
    return new Plugin(parents, artifact, pluginEntry.getValue(), properties.setMacros(collectMacroEvaluator.getMacros()));
}
Also used : ArtifactId(io.cdap.cdap.api.artifact.ArtifactId) IOException(java.io.IOException) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField) Plugin(io.cdap.cdap.api.plugin.Plugin)

Example 53 with PluginPropertyField

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

the class PluginInstantiator method substituteMacros.

public PluginProperties substituteMacros(Plugin plugin, @Nullable MacroEvaluator macroEvaluator, @Nullable MacroParserOptions options) {
    Map<String, String> properties = new HashMap<>();
    Map<String, PluginPropertyField> pluginPropertyFieldMap = plugin.getPluginClass().getProperties();
    // create macro evaluator and parser based on if it is config or runtime
    boolean configTime = (macroEvaluator == null);
    TrackingMacroEvaluator trackingMacroEvaluator = new TrackingMacroEvaluator();
    for (Map.Entry<String, String> property : plugin.getProperties().getProperties().entrySet()) {
        PluginPropertyField field = pluginPropertyFieldMap.get(property.getKey());
        String propertyValue = property.getValue();
        if (field != null && field.isMacroSupported()) {
            // TODO: cleanup after endpoint to get plugin details is merged (#6089)
            if (configTime) {
                // parse for syntax check and check if trackingMacroEvaluator finds macro syntax present
                MacroParser macroParser = new MacroParser(trackingMacroEvaluator, MacroParserOptions.builder().setEscaping(field.isMacroEscapingEnabled()).build());
                macroParser.parse(propertyValue);
                propertyValue = getOriginalOrDefaultValue(propertyValue, property.getKey(), field.getType(), trackingMacroEvaluator);
            } else {
                MacroParserOptions parserOptions = options == null ? MacroParserOptions.builder().setEscaping(field.isMacroEscapingEnabled()).build() : options;
                MacroParser macroParser = new MacroParser(macroEvaluator, parserOptions);
                propertyValue = macroParser.parse(propertyValue);
            }
        }
        properties.put(property.getKey(), propertyValue);
    }
    return PluginProperties.builder().addAll(properties).build();
}
Also used : MacroParserOptions(io.cdap.cdap.api.macro.MacroParserOptions) HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) HashMap(java.util.HashMap)

Example 54 with PluginPropertyField

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

the class DefaultArtifactInspector method inspectPlugins.

/**
 * Inspects the plugin file and extracts plugin classes information.
 */
private void inspectPlugins(ArtifactClasses.Builder builder, File artifactFile, io.cdap.cdap.proto.id.ArtifactId artifactId, PluginInstantiator pluginInstantiator, Set<PluginClass> additionalPlugins, List<MetadataMutation> mutations) throws IOException, InvalidArtifactException {
    ArtifactId artifact = artifactId.toApiArtifactId();
    PluginClassLoader pluginClassLoader = pluginInstantiator.getArtifactClassLoader(artifact);
    inspectAdditionalPlugins(artifact, additionalPlugins, pluginClassLoader);
    // See if there are export packages. Plugins should be in those packages
    Set<String> exportPackages = getExportPackages(artifactFile);
    if (exportPackages.isEmpty()) {
        return;
    }
    try {
        for (Class<?> cls : getPluginClasses(exportPackages, pluginClassLoader)) {
            Plugin pluginAnnotation = cls.getAnnotation(Plugin.class);
            if (pluginAnnotation == null) {
                continue;
            }
            Map<String, PluginPropertyField> pluginProperties = Maps.newHashMap();
            try {
                String configField = getProperties(TypeToken.of(cls), pluginProperties);
                String pluginName = getPluginName(cls);
                PluginId pluginId = new PluginId(artifactId.getNamespace(), artifactId.getArtifact(), artifactId.getVersion(), pluginName, pluginAnnotation.type());
                MetadataMutation mutation = getMetadataMutation(pluginId, cls);
                if (mutation != null) {
                    mutations.add(mutation);
                }
                PluginClass pluginClass = PluginClass.builder().setName(pluginName).setType(pluginAnnotation.type()).setCategory(getPluginCategory(cls)).setClassName(cls.getName()).setConfigFieldName(configField).setProperties(pluginProperties).setRequirements(getArtifactRequirements(cls)).setDescription(getPluginDescription(cls)).build();
                builder.addPlugin(pluginClass);
            } catch (UnsupportedTypeException e) {
                LOG.warn("Plugin configuration type not supported. Plugin ignored. {}", cls, e);
            }
        }
    } catch (Throwable t) {
        throw new InvalidArtifactException(String.format("Class could not be found while inspecting artifact for plugins. " + "Please check dependencies are available, and that the correct parent artifact was specified. " + "Error class: %s, message: %s.", t.getClass(), t.getMessage()), t);
    }
}
Also used : ArtifactId(io.cdap.cdap.api.artifact.ArtifactId) PluginId(io.cdap.cdap.proto.id.PluginId) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField) MetadataMutation(io.cdap.cdap.spi.metadata.MetadataMutation) UnsupportedTypeException(io.cdap.cdap.api.data.schema.UnsupportedTypeException) PluginClass(io.cdap.cdap.api.plugin.PluginClass) InvalidArtifactException(io.cdap.cdap.common.InvalidArtifactException) PluginClassLoader(io.cdap.cdap.internal.app.runtime.plugin.PluginClassLoader) Plugin(io.cdap.cdap.api.annotation.Plugin)

Example 55 with PluginPropertyField

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

the class ArtifactStoreTest method testGetPlugins.

@Test
public void testGetPlugins() throws Exception {
    ArtifactRange parentArtifacts = new ArtifactRange(NamespaceId.DEFAULT.getNamespace(), "parent", new ArtifactVersion("1.0.0"), new ArtifactVersion("2.0.0"));
    // we have 2 plugins of type A and 2 plugins of type B
    PluginClass pluginA1 = PluginClass.builder().setName("p1").setType("A").setDescription("desc").setClassName("c.p1").setConfigFieldName("cfg").setProperties(ImmutableMap.of("threshold", new PluginPropertyField("thresh", "description", "double", true, false), "retry", new PluginPropertyField("retries", "description", "int", false, false))).build();
    PluginClass pluginA2 = PluginClass.builder().setName("p2").setType("A").setDescription("desc").setClassName("c.p2").setConfigFieldName("conf").setProperties(ImmutableMap.of("stream", new PluginPropertyField("stream", "description", "string", true, false))).build();
    PluginClass pluginB1 = PluginClass.builder().setName("p1").setType("B").setDescription("desc").setClassName("c.p1").setConfigFieldName("cfg").setProperties(ImmutableMap.of("createIfNotExist", new PluginPropertyField("createIfNotExist", "desc", "boolean", false, false))).build();
    PluginClass pluginB2 = PluginClass.builder().setName("p2").setType("B").setDescription("desc").setClassName("c.p2").setConfigFieldName("stuff").setProperties(ImmutableMap.of("numer", new PluginPropertyField("numerator", "description", "double", true, false), "denom", new PluginPropertyField("denominator", "description", "double", true, false))).build();
    // add artifacts
    // not interested in artifact contents for this test, using some dummy value
    String contents = "0";
    // write parent
    Id.Artifact parentArtifactId = Id.Artifact.from(Id.Namespace.DEFAULT, "parent", "1.0.0");
    ArtifactMeta parentMeta = new ArtifactMeta(ArtifactClasses.builder().build());
    writeArtifact(parentArtifactId, parentMeta, contents);
    // artifact artifactX-1.0.0 contains plugin A1
    Id.Artifact artifactXv100 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactX", "1.0.0");
    ArtifactMeta metaXv100 = new ArtifactMeta(ArtifactClasses.builder().addPlugin(pluginA1).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactXv100, metaXv100, contents);
    ArtifactDescriptor artifactXv100Info = artifactStore.getArtifact(artifactXv100).getDescriptor();
    // artifact artifactX-1.1.0 contains plugin A1
    Id.Artifact artifactXv110 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactX", "1.1.0");
    ArtifactMeta metaXv110 = new ArtifactMeta(ArtifactClasses.builder().addPlugin(pluginA1).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactXv110, metaXv110, contents);
    ArtifactDescriptor artifactXv110Info = artifactStore.getArtifact(artifactXv110).getDescriptor();
    // artifact artifactX-2.0.0 contains plugins A1 and A2
    Id.Artifact artifactXv200 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactX", "2.0.0");
    ArtifactMeta metaXv200 = new ArtifactMeta(ArtifactClasses.builder().addPlugins(pluginA1, pluginA2).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactXv200, metaXv200, contents);
    ArtifactDescriptor artifactXv200Info = artifactStore.getArtifact(artifactXv200).getDescriptor();
    // artifact artifactY-1.0.0 contains plugin B1
    Id.Artifact artifactYv100 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactY", "1.0.0");
    ArtifactMeta metaYv100 = new ArtifactMeta(ArtifactClasses.builder().addPlugin(pluginB1).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactYv100, metaYv100, contents);
    ArtifactDescriptor artifactYv100Info = artifactStore.getArtifact(artifactYv100).getDescriptor();
    // artifact artifactY-2.0.0 contains plugin B2
    Id.Artifact artifactYv200 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactY", "2.0.0");
    ArtifactMeta metaYv200 = new ArtifactMeta(ArtifactClasses.builder().addPlugin(pluginB2).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactYv200, metaYv200, contents);
    ArtifactDescriptor artifactYv200Info = artifactStore.getArtifact(artifactYv200).getDescriptor();
    // artifact artifactZ-1.0.0 contains plugins A1 and B1
    Id.Artifact artifactZv100 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactZ", "1.0.0");
    ArtifactMeta metaZv100 = new ArtifactMeta(ArtifactClasses.builder().addPlugins(pluginA1, pluginB1).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactZv100, metaZv100, contents);
    ArtifactDescriptor artifactZv100Info = artifactStore.getArtifact(artifactZv100).getDescriptor();
    // artifact artifactZ-2.0.0 contains plugins A1, A2, B1, and B2
    Id.Artifact artifactZv200 = Id.Artifact.from(Id.Namespace.DEFAULT, "artifactZ", "2.0.0");
    ArtifactMeta metaZv200 = new ArtifactMeta(ArtifactClasses.builder().addPlugins(pluginA1, pluginA2, pluginB1, pluginB2).build(), ImmutableSet.of(parentArtifacts));
    writeArtifact(artifactZv200, metaZv200, contents);
    ArtifactDescriptor artifactZv200Info = artifactStore.getArtifact(artifactZv200).getDescriptor();
    // test getting all plugins in the namespace
    Map<ArtifactDescriptor, Set<PluginClass>> expected = Maps.newHashMap();
    expected.put(artifactXv100Info, ImmutableSet.of(pluginA1));
    expected.put(artifactXv110Info, ImmutableSet.of(pluginA1));
    expected.put(artifactXv200Info, ImmutableSet.of(pluginA1, pluginA2));
    expected.put(artifactYv100Info, ImmutableSet.of(pluginB1));
    expected.put(artifactYv200Info, ImmutableSet.of(pluginB2));
    expected.put(artifactZv100Info, ImmutableSet.of(pluginA1, pluginB1));
    expected.put(artifactZv200Info, ImmutableSet.of(pluginA1, pluginA2, pluginB1, pluginB2));
    Map<ArtifactDescriptor, Set<PluginClass>> actual = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId);
    Assert.assertEquals(expected, actual);
    // test getting all plugins by namespace and type
    // get all of type A
    expected = Maps.newHashMap();
    expected.put(artifactXv100Info, ImmutableSet.of(pluginA1));
    expected.put(artifactXv110Info, ImmutableSet.of(pluginA1));
    expected.put(artifactXv200Info, ImmutableSet.of(pluginA1, pluginA2));
    expected.put(artifactZv100Info, ImmutableSet.of(pluginA1));
    expected.put(artifactZv200Info, ImmutableSet.of(pluginA1, pluginA2));
    actual = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A");
    Assert.assertEquals(expected, actual);
    // get all of type B
    expected = Maps.newHashMap();
    expected.put(artifactYv100Info, ImmutableSet.of(pluginB1));
    expected.put(artifactYv200Info, ImmutableSet.of(pluginB2));
    expected.put(artifactZv100Info, ImmutableSet.of(pluginB1));
    expected.put(artifactZv200Info, ImmutableSet.of(pluginB1, pluginB2));
    actual = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "B");
    Assert.assertEquals(expected, actual);
    // test getting plugins by namespace, type, and name
    // get all of type A and name p1
    Map<ArtifactDescriptor, PluginClass> expectedMap = Maps.newHashMap();
    expectedMap.put(artifactXv100Info, pluginA1);
    expectedMap.put(artifactXv110Info, pluginA1);
    expectedMap.put(artifactXv200Info, pluginA1);
    expectedMap.put(artifactZv100Info, pluginA1);
    expectedMap.put(artifactZv200Info, pluginA1);
    Map<ArtifactDescriptor, PluginClass> actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p1", null, Integer.MAX_VALUE, ArtifactSortOrder.UNORDERED);
    Assert.assertEquals(expectedMap, actualMap);
    // test get limited number
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p1", null, 1, ArtifactSortOrder.UNORDERED);
    Assert.assertEquals(ImmutableMap.of(artifactXv100Info, pluginA1), actualMap);
    // test get DESC order
    actualMap = new TreeMap<>(artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p1", null, Integer.MAX_VALUE, ArtifactSortOrder.DESC));
    Assert.assertEquals(expectedMap, new TreeMap<>(actualMap).descendingMap());
    // test Predicate
    Predicate<ArtifactId> predicate = input -> {
        try {
            return input.getParent().equals(NamespaceId.DEFAULT) && input.getArtifact().equals("artifactX") && ArtifactVersionRange.parse("[1.0.0, 1.1.0)").versionIsInRange(new ArtifactVersion(input.getVersion()));
        } catch (InvalidArtifactRangeException e) {
            return false;
        }
    };
    expectedMap = Maps.newHashMap();
    expectedMap.put(artifactXv100Info, pluginA1);
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p1", predicate, Integer.MAX_VALUE, ArtifactSortOrder.UNORDERED);
    Assert.assertEquals(expectedMap, actualMap);
    // test limit and order combined
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p1", null, 1, ArtifactSortOrder.DESC);
    Assert.assertEquals(ImmutableMap.of(artifactZv200Info, pluginA1), actualMap);
    // test limit, order, predicate combined
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p1", predicate, 1, ArtifactSortOrder.DESC);
    Assert.assertEquals(ImmutableMap.of(artifactXv100Info, pluginA1), actualMap);
    // get all of type A and name p2
    expectedMap = Maps.newHashMap();
    expectedMap.put(artifactXv200Info, pluginA2);
    expectedMap.put(artifactZv200Info, pluginA2);
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "A", "p2", null, Integer.MAX_VALUE, ArtifactSortOrder.UNORDERED);
    Assert.assertEquals(expectedMap, actualMap);
    // get all of type B and name p1
    expectedMap = Maps.newHashMap();
    expectedMap.put(artifactYv100Info, pluginB1);
    expectedMap.put(artifactZv100Info, pluginB1);
    expectedMap.put(artifactZv200Info, pluginB1);
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "B", "p1", null, Integer.MAX_VALUE, ArtifactSortOrder.UNORDERED);
    Assert.assertEquals(expectedMap, actualMap);
    // get all of type B and name p2
    expectedMap = Maps.newHashMap();
    expectedMap.put(artifactYv200Info, pluginB2);
    expectedMap.put(artifactZv200Info, pluginB2);
    actualMap = artifactStore.getPluginClasses(NamespaceId.DEFAULT, parentArtifactId, "B", "p2", null, Integer.MAX_VALUE, ArtifactSortOrder.UNORDERED);
    Assert.assertEquals(expectedMap, actualMap);
}
Also used : Arrays(java.util.Arrays) NamespaceId(io.cdap.cdap.proto.id.NamespaceId) ArtifactClasses(io.cdap.cdap.api.artifact.ArtifactClasses) Bytes(io.cdap.cdap.api.common.Bytes) Ids(io.cdap.cdap.proto.id.Ids) Future(java.util.concurrent.Future) CharStreams(com.google.common.io.CharStreams) ArtifactSortOrder(io.cdap.cdap.proto.artifact.ArtifactSortOrder) After(org.junit.After) Map(java.util.Map) ClassRule(org.junit.ClassRule) CyclicBarrier(java.util.concurrent.CyclicBarrier) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) Table(io.cdap.cdap.api.dataset.table.Table) Set(java.util.Set) ApplicationClass(io.cdap.cdap.api.artifact.ApplicationClass) Category(org.junit.experimental.categories.Category) Collectors(java.util.stream.Collectors) PluginClass(io.cdap.cdap.api.plugin.PluginClass) Executors(java.util.concurrent.Executors) Id(io.cdap.cdap.common.id.Id) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) ArtifactScope(io.cdap.cdap.api.artifact.ArtifactScope) ArtifactAlreadyExistsException(io.cdap.cdap.common.ArtifactAlreadyExistsException) SortedMap(java.util.SortedMap) Location(org.apache.twill.filesystem.Location) ArtifactRange(io.cdap.cdap.api.artifact.ArtifactRange) InvalidArtifactRangeException(io.cdap.cdap.api.artifact.InvalidArtifactRangeException) InspectionApp(io.cdap.cdap.internal.app.runtime.artifact.app.inspection.InspectionApp) DefaultImpersonator(io.cdap.cdap.security.impersonation.DefaultImpersonator) ArrayList(java.util.ArrayList) PluginNotExistsException(io.cdap.cdap.internal.app.runtime.plugin.PluginNotExistsException) SlowTests(io.cdap.cdap.test.SlowTests) SQLException(java.sql.SQLException) Lists(com.google.common.collect.Lists) ArtifactVersionRange(io.cdap.cdap.api.artifact.ArtifactVersionRange) ImmutableList(com.google.common.collect.ImmutableList) ReflectionSchemaGenerator(io.cdap.cdap.internal.io.ReflectionSchemaGenerator) ArtifactId(io.cdap.cdap.proto.id.ArtifactId) ExecutorService(java.util.concurrent.ExecutorService) KeyValueTable(io.cdap.cdap.api.dataset.lib.KeyValueTable) Charsets(com.google.common.base.Charsets) Cube(io.cdap.cdap.api.dataset.lib.cube.Cube) Files(java.nio.file.Files) Test(org.junit.Test) IOException(java.io.IOException) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) Maps(com.google.common.collect.Maps) InputStreamReader(java.io.InputStreamReader) File(java.io.File) EntityImpersonator(io.cdap.cdap.security.impersonation.EntityImpersonator) Requirements(io.cdap.cdap.api.plugin.Requirements) ArtifactNotFoundException(io.cdap.cdap.common.ArtifactNotFoundException) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) TreeMap(java.util.TreeMap) ArtifactVersion(io.cdap.cdap.api.artifact.ArtifactVersion) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField) AllProgramsApp(io.cdap.cdap.AllProgramsApp) Assert(org.junit.Assert) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) ArtifactId(io.cdap.cdap.proto.id.ArtifactId) ArtifactRange(io.cdap.cdap.api.artifact.ArtifactRange) InvalidArtifactRangeException(io.cdap.cdap.api.artifact.InvalidArtifactRangeException) TreeMap(java.util.TreeMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField) ArtifactVersion(io.cdap.cdap.api.artifact.ArtifactVersion) NamespaceId(io.cdap.cdap.proto.id.NamespaceId) Id(io.cdap.cdap.common.id.Id) ArtifactId(io.cdap.cdap.proto.id.ArtifactId) PluginClass(io.cdap.cdap.api.plugin.PluginClass) Test(org.junit.Test)

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