public static PropertyDescriptor createProxyConfigPropertyDescriptor(final boolean hasComponentProxyConfigs, final ProxySpec ... _specs) { final Set<ProxySpec> specs = getUniqueProxySpecs(_specs); final StringBuilder description = new StringBuilder("Specifies the Proxy Configuration Controller Service to proxy network requests."); if (hasComponentProxyConfigs) { description.append(" If set, it supersedes proxy settings configured per component."); } description.append(" Supported proxies: "); description.append(specs.stream().map(ProxySpec::getDisplayName).collect(Collectors.joining(", "))); return new PropertyDescriptor.Builder() .fromPropertyDescriptor(ProxyConfigurationService.PROXY_CONFIGURATION_SERVICE) .description(description.toString()) .build(); }
@Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { List<PropertyDescriptor> props = new ArrayList<>(properties); props.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(DIRECTORY) .description("The parent HDFS directory to which files should be written. The directory will be created if it doesn't exist.") .build()); props.add(CONFLICT_RESOLUTION); props.add(BLOCK_SIZE); props.add(BUFFER_SIZE); props.add(REPLICATION_FACTOR); props.add(UMASK); props.add(REMOTE_OWNER); props.add(REMOTE_GROUP); props.add(COMPRESSION_CODEC); return props; }
public QueryDatabaseTable() { final Set<Relationship> r = new HashSet<>(); r.add(REL_SUCCESS); relationships = Collections.unmodifiableSet(r); final List<PropertyDescriptor> pds = new ArrayList<>(); pds.add(DBCP_SERVICE); pds.add(DB_TYPE); pds.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(TABLE_NAME) .description("The name of the database table to be queried. When a custom query is used, this property is used to alias the query and appears as an attribute on the FlowFile.") .build()); pds.add(COLUMN_NAMES); pds.add(WHERE_CLAUSE); pds.add(SQL_QUERY); pds.add(MAX_VALUE_COLUMN_NAMES); pds.add(QUERY_TIMEOUT); pds.add(FETCH_SIZE); pds.add(MAX_ROWS_PER_FLOW_FILE); pds.add(OUTPUT_BATCH_SIZE); pds.add(MAX_FRAGMENTS); pds.add(NORMALIZE_NAMES_FOR_AVRO); pds.add(TRANS_ISOLATION_LEVEL); pds.add(USE_AVRO_LOGICAL_TYPES); pds.add(DEFAULT_PRECISION); pds.add(DEFAULT_SCALE); propDescriptors = Collections.unmodifiableList(pds); }
@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; }
@Override public final List<PropertyDescriptor> getSupportedPropertyDescriptors() { List<PropertyDescriptor> descriptorsNew = new ArrayList<>(); descriptorsNew.add(TESS_DATA_PATH); descriptorsNew.add(TESSERACT_PAGE_SEG_MODE); descriptorsNew.add(TESSERACT_CONFIGS); descriptorsNew.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(TESSERACT_LANGUAGE) .allowableValues(SUPPORTED_LANGUAGES) .build()); return descriptorsNew; }
public static PropertyDescriptor createProxyConfigPropertyDescriptor(final boolean hasComponentProxyConfigs, final ProxySpec ... _specs) { final Set<ProxySpec> specs = getUniqueProxySpecs(_specs); final StringBuilder description = new StringBuilder("Specifies the Proxy Configuration Controller Service to proxy network requests."); if (hasComponentProxyConfigs) { description.append(" If set, it supersedes proxy settings configured per component."); } description.append(" Supported proxies: "); description.append(specs.stream().map(ProxySpec::getDisplayName).collect(Collectors.joining(", "))); return new PropertyDescriptor.Builder() .fromPropertyDescriptor(ProxyConfigurationService.PROXY_CONFIGURATION_SERVICE) .description(description.toString()) .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 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("21").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) .description(String.format("Control how '%s' is created when '%s' is '%s' and '%s' is enabled. %s", MOVE_DESTINATION_DIR.getDisplayName(),
@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 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 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() { 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); }
public QueryDatabaseTableRecord() { final Set<Relationship> r = new HashSet<>(); r.add(REL_SUCCESS); relationships = Collections.unmodifiableSet(r); final List<PropertyDescriptor> pds = new ArrayList<>(); pds.add(DBCP_SERVICE); pds.add(DB_TYPE); pds.add(new PropertyDescriptor.Builder() .fromPropertyDescriptor(TABLE_NAME) .description("The name of the database table to be queried. When a custom query is used, this property is used to alias the query and appears as an attribute on the FlowFile.") .build()); pds.add(COLUMN_NAMES); pds.add(WHERE_CLAUSE); pds.add(SQL_QUERY); pds.add(RECORD_WRITER_FACTORY); pds.add(MAX_VALUE_COLUMN_NAMES); pds.add(QUERY_TIMEOUT); pds.add(FETCH_SIZE); pds.add(MAX_ROWS_PER_FLOW_FILE); pds.add(OUTPUT_BATCH_SIZE); pds.add(MAX_FRAGMENTS); pds.add(NORMALIZE_NAMES); pds.add(USE_AVRO_LOGICAL_TYPES); propDescriptors = Collections.unmodifiableList(pds); }
@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; }
private PropertyDescriptor getPropertyDescriptor(final PropertyDescriptor specDescriptor) { PropertyDescriptor descriptor = null; //check if property supported final List<PropertyDescriptor> supportedDescriptors = getSupportedPropertyDescriptors(); if (supportedDescriptors != null) { for (final PropertyDescriptor desc : supportedDescriptors) { //find actual descriptor if (specDescriptor.equals(desc)) { return desc; } } } descriptor = getSupportedDynamicPropertyDescriptor(specDescriptor.getName()); if (descriptor != null && !descriptor.isDynamic()) { descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(descriptor).dynamic(true).build(); } if (descriptor == null) { descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(specDescriptor).addValidator(Validator.INVALID).dynamic(true).build(); } return descriptor; }
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; }