Interface HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
-
- All Superinterfaces:
org.apache.camel.builder.EndpointConsumerBuilder
,org.apache.camel.EndpointConsumerResolver
- All Known Subinterfaces:
HdfsEndpointBuilderFactory.AdvancedHdfsEndpointBuilder
- Enclosing interface:
- HdfsEndpointBuilderFactory
public static interface HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder extends org.apache.camel.builder.EndpointConsumerBuilder
Advanced builder for endpoint consumers for the HDFS component.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default HdfsEndpointBuilderFactory.HdfsEndpointConsumerBuilder
basic()
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
blockSize(long blockSize)
The size of the HDFS blocks.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
blockSize(String blockSize)
The size of the HDFS blocks.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
bridgeErrorHandler(boolean bridgeErrorHandler)
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
bridgeErrorHandler(String bridgeErrorHandler)
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
bufferSize(int bufferSize)
The buffer size used by HDFS.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
bufferSize(String bufferSize)
The buffer size used by HDFS.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
checkIdleInterval(int checkIdleInterval)
How often (time in millis) in to run the idle checker background task.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
checkIdleInterval(String checkIdleInterval)
How often (time in millis) in to run the idle checker background task.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
chunkSize(int chunkSize)
When reading a normal file, this is split into chunks producing a message per chunk.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
chunkSize(String chunkSize)
When reading a normal file, this is split into chunks producing a message per chunk.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
compressionCodec(String compressionCodec)
The compression codec to use.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
compressionCodec(org.apache.camel.component.hdfs.HdfsCompressionCodec compressionCodec)
The compression codec to use.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
compressionType(String compressionType)
The compression type to use (is default not in use).default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
compressionType(org.apache.hadoop.io.SequenceFile.CompressionType compressionType)
The compression type to use (is default not in use).default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
exceptionHandler(String exceptionHandler)
To let the consumer use a custom ExceptionHandler.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
exceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler)
To let the consumer use a custom ExceptionHandler.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
exchangePattern(String exchangePattern)
Sets the exchange pattern when the consumer creates an exchange.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
exchangePattern(org.apache.camel.ExchangePattern exchangePattern)
Sets the exchange pattern when the consumer creates an exchange.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
openedSuffix(String openedSuffix)
When a file is opened for reading/writing the file is renamed with this suffix to avoid to read it during the writing phase.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
pollStrategy(String pollStrategy)
A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
pollStrategy(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
readSuffix(String readSuffix)
Once the file has been read is renamed with this suffix to avoid to read it again.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
replication(short replication)
The HDFS replication factor.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
replication(String replication)
The HDFS replication factor.default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder
splitStrategy(String splitStrategy)
In the current version of Hadoop opening a file in append mode is disabled since it's not very reliable.
-
-
-
Method Detail
-
basic
default HdfsEndpointBuilderFactory.HdfsEndpointConsumerBuilder basic()
-
bridgeErrorHandler
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder bridgeErrorHandler(boolean bridgeErrorHandler)
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>boolean</code> type. Default: false Group: consumer (advanced)- Parameters:
bridgeErrorHandler
- the value to set- Returns:
- the dsl builder
-
bridgeErrorHandler
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder bridgeErrorHandler(String bridgeErrorHandler)
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer (advanced)- Parameters:
bridgeErrorHandler
- the value to set- Returns:
- the dsl builder
-
exceptionHandler
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder exceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler)
To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)- Parameters:
exceptionHandler
- the value to set- Returns:
- the dsl builder
-
exceptionHandler
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder exceptionHandler(String exceptionHandler)
To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)- Parameters:
exceptionHandler
- the value to set- Returns:
- the dsl builder
-
exchangePattern
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder exchangePattern(org.apache.camel.ExchangePattern exchangePattern)
Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)- Parameters:
exchangePattern
- the value to set- Returns:
- the dsl builder
-
exchangePattern
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder exchangePattern(String exchangePattern)
Sets the exchange pattern when the consumer creates an exchange. The option will be converted to a <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)- Parameters:
exchangePattern
- the value to set- Returns:
- the dsl builder
-
pollStrategy
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder pollStrategy(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option is a: <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. Group: consumer (advanced)- Parameters:
pollStrategy
- the value to set- Returns:
- the dsl builder
-
pollStrategy
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder pollStrategy(String pollStrategy)
A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option will be converted to a <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. Group: consumer (advanced)- Parameters:
pollStrategy
- the value to set- Returns:
- the dsl builder
-
blockSize
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder blockSize(long blockSize)
The size of the HDFS blocks. The option is a: <code>long</code> type. Default: 67108864 Group: advanced- Parameters:
blockSize
- the value to set- Returns:
- the dsl builder
-
blockSize
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder blockSize(String blockSize)
The size of the HDFS blocks. The option will be converted to a <code>long</code> type. Default: 67108864 Group: advanced- Parameters:
blockSize
- the value to set- Returns:
- the dsl builder
-
bufferSize
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder bufferSize(int bufferSize)
The buffer size used by HDFS. The option is a: <code>int</code> type. Default: 4096 Group: advanced- Parameters:
bufferSize
- the value to set- Returns:
- the dsl builder
-
bufferSize
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder bufferSize(String bufferSize)
The buffer size used by HDFS. The option will be converted to a <code>int</code> type. Default: 4096 Group: advanced- Parameters:
bufferSize
- the value to set- Returns:
- the dsl builder
-
checkIdleInterval
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder checkIdleInterval(int checkIdleInterval)
How often (time in millis) in to run the idle checker background task. This option is only in use if the splitter strategy is IDLE. The option is a: <code>int</code> type. Default: 500 Group: advanced- Parameters:
checkIdleInterval
- the value to set- Returns:
- the dsl builder
-
checkIdleInterval
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder checkIdleInterval(String checkIdleInterval)
How often (time in millis) in to run the idle checker background task. This option is only in use if the splitter strategy is IDLE. The option will be converted to a <code>int</code> type. Default: 500 Group: advanced- Parameters:
checkIdleInterval
- the value to set- Returns:
- the dsl builder
-
chunkSize
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder chunkSize(int chunkSize)
When reading a normal file, this is split into chunks producing a message per chunk. The option is a: <code>int</code> type. Default: 4096 Group: advanced- Parameters:
chunkSize
- the value to set- Returns:
- the dsl builder
-
chunkSize
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder chunkSize(String chunkSize)
When reading a normal file, this is split into chunks producing a message per chunk. The option will be converted to a <code>int</code> type. Default: 4096 Group: advanced- Parameters:
chunkSize
- the value to set- Returns:
- the dsl builder
-
compressionCodec
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder compressionCodec(org.apache.camel.component.hdfs.HdfsCompressionCodec compressionCodec)
The compression codec to use. The option is a: <code>org.apache.camel.component.hdfs.HdfsCompressionCodec</code> type. Default: DEFAULT Group: advanced- Parameters:
compressionCodec
- the value to set- Returns:
- the dsl builder
-
compressionCodec
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder compressionCodec(String compressionCodec)
The compression codec to use. The option will be converted to a <code>org.apache.camel.component.hdfs.HdfsCompressionCodec</code> type. Default: DEFAULT Group: advanced- Parameters:
compressionCodec
- the value to set- Returns:
- the dsl builder
-
compressionType
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder compressionType(org.apache.hadoop.io.SequenceFile.CompressionType compressionType)
The compression type to use (is default not in use). The option is a: <code>org.apache.hadoop.io.SequenceFile.CompressionType</code> type. Default: NONE Group: advanced- Parameters:
compressionType
- the value to set- Returns:
- the dsl builder
-
compressionType
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder compressionType(String compressionType)
The compression type to use (is default not in use). The option will be converted to a <code>org.apache.hadoop.io.SequenceFile.CompressionType</code> type. Default: NONE Group: advanced- Parameters:
compressionType
- the value to set- Returns:
- the dsl builder
-
openedSuffix
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder openedSuffix(String openedSuffix)
When a file is opened for reading/writing the file is renamed with this suffix to avoid to read it during the writing phase. The option is a: <code>java.lang.String</code> type. Default: opened Group: advanced- Parameters:
openedSuffix
- the value to set- Returns:
- the dsl builder
-
readSuffix
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder readSuffix(String readSuffix)
Once the file has been read is renamed with this suffix to avoid to read it again. The option is a: <code>java.lang.String</code> type. Default: read Group: advanced- Parameters:
readSuffix
- the value to set- Returns:
- the dsl builder
-
replication
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder replication(short replication)
The HDFS replication factor. The option is a: <code>short</code> type. Default: 3 Group: advanced- Parameters:
replication
- the value to set- Returns:
- the dsl builder
-
replication
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder replication(String replication)
The HDFS replication factor. The option will be converted to a <code>short</code> type. Default: 3 Group: advanced- Parameters:
replication
- the value to set- Returns:
- the dsl builder
-
splitStrategy
default HdfsEndpointBuilderFactory.AdvancedHdfsEndpointConsumerBuilder splitStrategy(String splitStrategy)
In the current version of Hadoop opening a file in append mode is disabled since it's not very reliable. So, for the moment, it's only possible to create new files. The Camel HDFS endpoint tries to solve this problem in this way: If the split strategy option has been defined, the hdfs path will be used as a directory and files will be created using the configured UuidGenerator. Every time a splitting condition is met, a new file is created. The splitStrategy option is defined as a string with the following syntax: splitStrategy=ST:value,ST:value,... where ST can be: BYTES a new file is created, and the old is closed when the number of written bytes is more than value MESSAGES a new file is created, and the old is closed when the number of written messages is more than value IDLE a new file is created, and the old is closed when no writing happened in the last value milliseconds. The option is a: <code>java.lang.String</code> type. Group: advanced- Parameters:
splitStrategy
- the value to set- Returns:
- the dsl builder
-
-