public interface DataStoreTextWriterConfigurer
DataStoreTextWriterConfigurer
is an interface for DataStoreTextWriterBuilder
which is
exposed to user via SpringDataStoreTextWriterConfigurerAdapter
.
Typically configuration is shown below.
@Configuration @EnableDataStoreTextWriter static class Config extends SpringDataStoreTextWriterConfigurerAdapter { @Override public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .basePath("/tmp/foo1"); } }
Modifier and Type | Method and Description |
---|---|
DataStoreTextWriterConfigurer |
append(boolean append)
Specify if writer is allowed to do file append.
|
DataStoreTextWriterConfigurer |
basePath(org.apache.hadoop.fs.Path path)
Specify a writer's base path.
|
DataStoreTextWriterConfigurer |
basePath(java.lang.String path)
Specify a writer's base path.
|
DataStoreTextWriterConfigurer |
closeTimeout(long timeout)
Specify a writer's close timeout.
|
DataStoreTextWriterConfigurer |
codec(CodecInfo codec)
Specify a writer's compression coded.
|
DataStoreTextWriterConfigurer |
codec(Codecs codec)
Specify a writer's compression coded.
|
DataStoreTextWriterConfigurer |
codec(java.lang.String codec)
Specify a writer's compression coded.
|
DataStoreTextWriterConfigurer |
configuration(org.apache.hadoop.conf.Configuration configuration)
Specify a writer's Hadoop configuration.
|
DataStoreTextWriterConfigurer |
fileOpenAttempts(int attempts)
Specify a writer's max file open attempts.
|
DataStoreTextWriterConfigurer |
idleTimeout(long timeout)
Specify a writer's idle timeout.
|
DataStoreTextWriterConfigurer |
inWritingPrefix(java.lang.String prefix)
Specify a writer's in-use prefix.
|
DataStoreTextWriterConfigurer |
inWritingSuffix(java.lang.String suffix)
Specify a writer's in-use suffix.
|
DataStoreTextWriterConfigurer |
overwrite(boolean overwrite)
Specify if writer is allowed to overwrite files.
|
NamingStrategyConfigurer |
withNamingStrategy()
Specify a writer's naming strategy.
|
PartitionStrategyConfigurer |
withPartitionStrategy()
Specify a writer's partition strategy.
|
RolloverStrategyConfigurer |
withRolloverStrategy()
Specify a writer's rollover strategy.
|
PartitionStrategyConfigurer withPartitionStrategy() throws java.lang.Exception
DefaultPartitionStrategyConfigurer
into current builder.
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .withPartitionStrategy() .map("spelexpression"); }
PartitionStrategyConfigurer
for chainingjava.lang.Exception
- exceptionNamingStrategyConfigurer withNamingStrategy() throws java.lang.Exception
DefaultNamingStrategyConfigurer
into current builder.
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .withNamingStrategy() .name("foo") .uuid() .rolling() .codec(); }
NamingStrategyConfigurer
for chainingjava.lang.Exception
- exceptionRolloverStrategyConfigurer withRolloverStrategy() throws java.lang.Exception
DefaultRolloverStrategyConfigurer
into current builder.
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .withRolloverStrategy() .size("1M"); }
RolloverStrategyConfigurer
for chainingjava.lang.Exception
- exceptionDataStoreTextWriterConfigurer configuration(org.apache.hadoop.conf.Configuration configuration)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .configuration(new Configuration()); }
configuration
- the hadoop configurationDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer basePath(org.apache.hadoop.fs.Path path)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .basePath(new Path("/my/path")); }
path
- the pathDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer basePath(java.lang.String path)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .basePath("/my/path"); }
path
- the pathDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer codec(CodecInfo codec)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .codec(Codecs.BZIP2.getCodecInfo()); }
codec
- the codecDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer codec(java.lang.String codec)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .codec("gzip"); }
codec
- the codecDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer codec(Codecs codec)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .codec(Codecs.BZIP2); }
codec
- the codecDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer overwrite(boolean overwrite)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .overwrite(false); }
overwrite
- enable overwriteDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer append(boolean append)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .append(false); }
append
- enable append supportDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer inWritingPrefix(java.lang.String prefix)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .inWritingPrefix("myprefix"); }
prefix
- the in-writing prefixDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer inWritingSuffix(java.lang.String suffix)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .inWritingSuffix("mysuffix"); }
suffix
- the in-writing suffixDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer idleTimeout(long timeout)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .idleTimeout(60000); }
timeout
- the idle timeoutDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer closeTimeout(long timeout)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .closeTimeout(60000); }
timeout
- the close timeoutDataStoreTextWriterConfigurer
for chainingDataStoreTextWriterConfigurer fileOpenAttempts(int attempts)
public void configure(DataStoreTextWriterConfigurer writer) throws Exception { writer .fileOpenAttempts(10); }
attempts
- the attemps countDataStoreTextWriterConfigurer
for chaining