@Retention(value=RUNTIME) @Target(value=TYPE) public @interface Requirements
Annotates the requirements needed by a plugin to run successfully.
Requirements are case insensitive.
If a plugin is not annotated with Requirements
or the annotation datasetTypes()
is empty, then it is assumed that the plugin does not have any specific
requirements and can run everywhere.
Usage Examples:
Requirements
annotation. In this case the plugin will considered to be capable or run everywhere.
@Plugin(type = BatchSource.PLUGIN_TYPE)
@Name("CSVParser")
public class CSVParser extends BatchSource<byte[], Row, StructuredRecord>
{
...
...
}
@Plugin(type = BatchSource.PLUGIN_TYPE)
@Name("Table")
@Requirements(datasetTypes = {"table"})
public class Table extends BatchSource<byte[], Row, StructuredRecord>
{
...
...
}
@Plugin(type = BatchSource.PLUGIN_TYPE)
@Name("MultiTable")
@Requirements(datasetTypes = {"table", "keyValueTable"})
public class MultiTableSource extends BatchSource<byte[], Row, StructuredRecord>
{
...
...
}
Modifier and Type | Optional Element and Description |
---|---|
String[] |
capabilities
Names of associated add-ons or capabilities
|
String[] |
datasetTypes |
Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.