@Tags(value={"record","writer","script","invoke","groovy","python","jython","jruby","ruby","javascript","js","lua","luaj"}) @CapabilityDescription(value="Allows the user to provide a scripted RecordSetWriterFactory instance in order to write records to an outgoing flow file.") @Restricted(restrictions=@Restriction(requiredPermission=EXECUTE_CODE,explanation="Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has.")) public class ScriptedRecordSetWriter extends AbstractScriptedRecordFactory<RecordSetWriterFactory> implements RecordSetWriterFactory
recordFactoryconfigurationContext, scriptEngine, scriptingComponentHelper, scriptNeedsReload, validationResults| Constructor and Description |
|---|
ScriptedRecordSetWriter() |
| Modifier and Type | Method and Description |
|---|---|
RecordSetWriter |
createWriter(ComponentLog logger,
RecordSchema schema,
OutputStream out,
Map<String,String> variables) |
RecordSchema |
getSchema(Map<String,String> variables,
RecordSchema readSchema) |
void |
onEnabled(ConfigurationContext context) |
protected boolean |
reloadScript(String scriptBody)
Reloads the script RecordSetWriterFactory.
|
setupcustomValidate, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, onPropertyModified, reloadScriptBody, reloadScriptFileabstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateWriter, createWriterinitializegetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate@OnEnabled public void onEnabled(ConfigurationContext context)
onEnabled in class AbstractScriptedControllerServicepublic RecordSetWriter createWriter(ComponentLog logger, RecordSchema schema, OutputStream out, Map<String,String> variables) throws SchemaNotFoundException, IOException
createWriter in interface RecordSetWriterFactorySchemaNotFoundExceptionIOExceptionprotected boolean reloadScript(String scriptBody)
reloadScript in class AbstractScriptedControllerServicescriptBody - An input stream associated with the script contentpublic RecordSchema getSchema(Map<String,String> variables, RecordSchema readSchema) throws SchemaNotFoundException, IOException
getSchema in interface RecordSetWriterFactorySchemaNotFoundExceptionIOExceptionCopyright © 2021 Apache NiFi Project. All rights reserved.