@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor port = new PropertyDescriptor.Builder().fromPropertyDescriptor(UNDEFAULTED_PORT).defaultValue("21").build(); final List<PropertyDescriptor> properties = new ArrayList<>(); properties.add(HOSTNAME); properties.add(port); properties.add(USERNAME); properties.add(FTPTransfer.PASSWORD); properties.add(REMOTE_FILENAME); properties.add(COMPLETION_STRATEGY); properties.add(MOVE_DESTINATION_DIR); properties.add(MOVE_CREATE_DIRECTORY); properties.add(FTPTransfer.CONNECTION_TIMEOUT); properties.add(FTPTransfer.DATA_TIMEOUT); properties.add(FTPTransfer.USE_COMPRESSION); properties.add(FTPTransfer.CONNECTION_MODE); properties.add(FTPTransfer.TRANSFER_MODE); properties.add(FTPTransfer.PROXY_CONFIGURATION_SERVICE); properties.add(FTPTransfer.PROXY_TYPE); properties.add(FTPTransfer.PROXY_HOST); properties.add(FTPTransfer.PROXY_PORT); properties.add(FTPTransfer.HTTP_PROXY_USERNAME); properties.add(FTPTransfer.HTTP_PROXY_PASSWORD); properties.add(FTPTransfer.BUFFER_SIZE); return properties; }
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<>(); descriptors.add(DESIRED_SHEETS); descriptors.add(ROWS_TO_SKIP); descriptors.add(COLUMNS_TO_SKIP); descriptors.add(FORMAT_VALUES); descriptors.add(CSVUtils.CSV_FORMAT); descriptors.add(CSVUtils.VALUE_SEPARATOR); descriptors.add(CSVUtils.INCLUDE_HEADER_LINE); descriptors.add(CSVUtils.QUOTE_CHAR); descriptors.add(CSVUtils.ESCAPE_CHAR); descriptors.add(CSVUtils.COMMENT_MARKER); descriptors.add(CSVUtils.NULL_STRING); descriptors.add(CSVUtils.TRIM_FIELDS); descriptors.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(CSVUtils.QUOTE_MODE) .defaultValue(CSVUtils.QUOTE_NONE.getValue()) .build()); descriptors.add(CSVUtils.RECORD_SEPARATOR); descriptors.add(CSVUtils.TRAILING_DELIMITER); this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<>(); relationships.add(ORIGINAL); relationships.add(SUCCESS); relationships.add(FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor port = new PropertyDescriptor.Builder().fromPropertyDescriptor(UNDEFAULTED_PORT).defaultValue("21").build();
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor port = new PropertyDescriptor.Builder().fromPropertyDescriptor(UNDEFAULTED_PORT).defaultValue("21").build();
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor port = new PropertyDescriptor.Builder().fromPropertyDescriptor(UNDEFAULTED_PORT).defaultValue("21").build(); final List<PropertyDescriptor> properties = new ArrayList<>(); properties.add(HOSTNAME); properties.add(port); properties.add(USERNAME); properties.add(FTPTransfer.PASSWORD); properties.add(REMOTE_FILENAME); properties.add(COMPLETION_STRATEGY); properties.add(MOVE_DESTINATION_DIR); properties.add(MOVE_CREATE_DIRECTORY); properties.add(FTPTransfer.CONNECTION_TIMEOUT); properties.add(FTPTransfer.DATA_TIMEOUT); properties.add(FTPTransfer.USE_COMPRESSION); properties.add(FTPTransfer.CONNECTION_MODE); properties.add(FTPTransfer.TRANSFER_MODE); properties.add(FTPTransfer.PROXY_CONFIGURATION_SERVICE); properties.add(FTPTransfer.PROXY_TYPE); properties.add(FTPTransfer.PROXY_HOST); properties.add(FTPTransfer.PROXY_PORT); properties.add(FTPTransfer.HTTP_PROXY_USERNAME); properties.add(FTPTransfer.HTTP_PROXY_PASSWORD); properties.add(FTPTransfer.BUFFER_SIZE); return properties; }
@Override protected void init(ProcessorInitializationContext context) { super.init(context); synchronized (ALL_FIELD_NAMES) { if (ALL_FIELD_NAMES.isEmpty()) { ALL_FIELD_NAMES.addAll(UserAgentAnalyzer .newBuilder() .hideMatcherLoadStats() .delayInitialization() .dropTests() .build() .getAllPossibleFieldNamesSorted()); } } final Set<Relationship> relationshipsSet = new HashSet<>(); relationshipsSet.add(SUCCESS); relationshipsSet.add(MISSING); this.relationships = Collections.unmodifiableSet(relationshipsSet); for (String fieldName: ALL_FIELD_NAMES) { PropertyDescriptor propertyDescriptor = new PropertyDescriptor.Builder() .name(PROPERTY_PREFIX + fieldName) .description("If enabled will extract the " + fieldName + " field") .required(true) .allowableValues("true", "false") .defaultValue("false") .addValidator(StandardValidators.BOOLEAN_VALIDATOR) .build(); supportedPropertyDescriptors.add(propertyDescriptor); } }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor clientNameWithDefault = new PropertyDescriptor.Builder() .fromPropertyDescriptor(CLIENT_NAME) .defaultValue("NiFi-" + getIdentifier()) .build(); final PropertyDescriptor groupIdWithDefault = new PropertyDescriptor.Builder() .fromPropertyDescriptor(GROUP_ID) .defaultValue(getIdentifier()) .build(); final List<PropertyDescriptor> props = new ArrayList<>(); props.add(ZOOKEEPER_CONNECTION_STRING); props.add(TOPIC); props.add(ZOOKEEPER_COMMIT_DELAY); props.add(BATCH_SIZE); props.add(MESSAGE_DEMARCATOR); props.add(clientNameWithDefault); props.add(groupIdWithDefault); props.add(KAFKA_TIMEOUT); props.add(ZOOKEEPER_TIMEOUT); props.add(AUTO_OFFSET_RESET); return props; }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor clientNameWithDefault = new PropertyDescriptor.Builder() .fromPropertyDescriptor(CLIENT_NAME) .defaultValue("NiFi-" + getIdentifier()) .build(); final PropertyDescriptor groupIdWithDefault = new PropertyDescriptor.Builder() .fromPropertyDescriptor(GROUP_ID) .defaultValue(getIdentifier()) .build(); final List<PropertyDescriptor> props = new ArrayList<>(); props.add(ZOOKEEPER_CONNECTION_STRING); props.add(TOPIC); props.add(ZOOKEEPER_COMMIT_DELAY); props.add(BATCH_SIZE); props.add(MESSAGE_DEMARCATOR); props.add(clientNameWithDefault); props.add(groupIdWithDefault); props.add(KAFKA_TIMEOUT); props.add(ZOOKEEPER_TIMEOUT); props.add(AUTO_OFFSET_RESET); return props; }
protected PropertyDescriptor buildStrategyProperty(AllowableValue[] values) { return new PropertyDescriptor.Builder() .fromPropertyDescriptor(SCHEMA_ACCESS_STRATEGY) .allowableValues(values) .defaultValue(getDefaultSchemaAccessStrategy().getValue()) .build(); }
.description("The ip address or hostname of the destination.") .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .defaultValue("localhost") .required(true) .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) "the data can be read, and incoming data will be dropped.") .addValidator(StandardValidators.DATA_SIZE_VALIDATOR) .defaultValue("1 MB") .required(true) .build(); .description("The amount of time a connection should be held open without being used before closing the connection.") .required(true) .defaultValue("5 seconds") .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) .build(); .required(true) .allowableValues(TCP_VALUE, UDP_VALUE) .defaultValue(TCP_VALUE.getValue()) .build(); public static final PropertyDescriptor MESSAGE_DELIMITER = new PropertyDescriptor.Builder() .description("Specifies the character set of the data being sent.") .required(true) .defaultValue("UTF-8") .addValidator(StandardValidators.CHARACTER_SET_VALIDATOR) .build();
ALLOWABLE_VALUE_CLEAN_SESSION_FALSE .defaultValue(ALLOWABLE_VALUE_CLEAN_SESSION_TRUE.getValue()) .build(); ALLOWABLE_VALUE_MQTT_VERSION_310 .defaultValue(ALLOWABLE_VALUE_MQTT_VERSION_AUTO.getValue()) .required(true) .build(); "A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.") .required(false) .defaultValue("30") .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) .build(); "the client sends a very small \"ping\" message, which the server will acknowledge. A value of 0 disables keepalive processing in the client.") .required(false) .defaultValue("60") .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) .build();
.description("The engine to execute scripts") .allowableValues(engines) .defaultValue(engines[0].getValue()) .required(true) .expressionLanguageSupported(ExpressionLanguageScope.NONE)
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor port = new PropertyDescriptor.Builder().fromPropertyDescriptor(UNDEFAULTED_PORT).defaultValue("22").build();
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor port = new PropertyDescriptor.Builder().fromPropertyDescriptor(UNDEFAULTED_PORT).defaultValue("22").build(); final PropertyDescriptor disableDirectoryListing = new PropertyDescriptor.Builder() .fromPropertyDescriptor(SFTPTransfer.DISABLE_DIRECTORY_LISTING)
@Override protected final void init(final ProcessorInitializationContext context) { super.init(context); final Set<Relationship> rels = new HashSet<>(); rels.add(REL_SUCCESS); rels.add(REL_RETRY); rels.add(REL_FAILURE); this.putHdfsRecordRelationships = Collections.unmodifiableSet(rels); final List<PropertyDescriptor> props = new ArrayList<>(properties); props.add(RECORD_READER); props.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(DIRECTORY) .description("The parent directory to which files should be written. Will be created if it doesn't exist.") .build()); final AllowableValue[] compressionTypes = getCompressionTypes(context).toArray(new AllowableValue[0]); props.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(COMPRESSION_TYPE) .allowableValues(compressionTypes) .defaultValue(getDefaultCompressionType(context)) .build()); props.add(OVERWRITE); props.add(UMASK); props.add(REMOTE_GROUP); props.add(REMOTE_OWNER); props.addAll(getAdditionalProperties()); this.putHdfsRecordProperties = Collections.unmodifiableList(props); }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { AllowableValue[] strategies = new AllowableValue[] { SCHEMA_NAME_PROPERTY, SCHEMA_TEXT_PROPERTY, INFER_SCHEMA }; List<PropertyDescriptor> _temp = new ArrayList<>(); _temp.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(SCHEMA_ACCESS_STRATEGY) .allowableValues(strategies) .defaultValue(getDefaultSchemaAccessStrategy().getValue()) .build()); _temp.add(SCHEMA_REGISTRY); _temp.add(SCHEMA_NAME); _temp.add(SCHEMA_VERSION); _temp.add(SCHEMA_BRANCH_NAME); _temp.add(SCHEMA_TEXT); _temp.add(CONTROLLER_SERVICE); _temp.add(DATABASE_NAME); _temp.add(COLLECTION_NAME); _temp.add(LOOKUP_VALUE_FIELD); _temp.add(PROJECTION); return Collections.unmodifiableList(_temp); }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final PropertyDescriptor clientNameWithDefault = new PropertyDescriptor.Builder() .fromPropertyDescriptor(CLIENT_NAME) .defaultValue("NiFi-" + getIdentifier()) .build(); final PropertyDescriptor groupIdWithDefault = new PropertyDescriptor.Builder() .fromPropertyDescriptor(GROUP_ID) .defaultValue(getIdentifier()) .build(); final List<PropertyDescriptor> props = new ArrayList<>(); props.add(ZOOKEEPER_CONNECTION_STRING); props.add(TOPIC); props.add(ZOOKEEPER_COMMIT_DELAY); props.add(BATCH_SIZE); props.add(MESSAGE_DEMARCATOR); props.add(clientNameWithDefault); props.add(groupIdWithDefault); props.add(KAFKA_TIMEOUT); props.add(ZOOKEEPER_TIMEOUT); props.add(AUTO_OFFSET_RESET); return props; }
public static PropertyDescriptor createRollbackOnFailureProperty(String additionalDescription) { return new PropertyDescriptor.Builder() .name("rollback-on-failure") .displayName("Rollback On Failure") .description("Specify how to handle error." + " By default (false), if an error occurs while processing a FlowFile, the FlowFile will be routed to" + " 'failure' or 'retry' relationship based on error type, and processor can continue with next FlowFile." + " Instead, you may want to rollback currently processed FlowFiles and stop further processing immediately." + " In that case, you can do so by enabling this 'Rollback On Failure' property. " + " If enabled, failed FlowFiles will stay in the input relationship without penalizing it and being processed repeatedly" + " until it gets processed successfully or removed by other means." + " It is important to set adequate 'Yield Duration' to avoid retrying too frequently." + additionalDescription) .allowableValues("true", "false") .addValidator(StandardValidators.BOOLEAN_VALIDATOR) .defaultValue("false") .required(true) .build(); }
protected PropertyDescriptor buildStrategyProperty(AllowableValue[] values) { return new PropertyDescriptor.Builder() .fromPropertyDescriptor(SCHEMA_ACCESS_STRATEGY) .allowableValues(values) .defaultValue(getDefaultSchemaAccessStrategy().getValue()) .build(); }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final List<PropertyDescriptor> properties = new ArrayList<>(); final AllowableValue[] strategies = getSchemaWriteStrategyValues().toArray(new AllowableValue[0]); properties.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(SCHEMA_WRITE_STRATEGY) .defaultValue(getDefaultSchemaWriteStrategy().getValue()) .allowableValues(strategies) .build()); properties.addAll(super.getSupportedPropertyDescriptors()); return properties; }