public class TextFileWriter extends AbstractDataStreamWriter implements DataStoreWriter<java.lang.String>
TextFileWriter
は、String
を生の HDF ファイルに書き込むことができる DataStoreWriter
実装です。DEFAULT_MAX_OPEN_ATTEMPTS
コンストラクターと説明 |
---|
TextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec) 新しいテキストファイルライターをインスタンス化します。 |
TextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, byte[] delimiter) 新しいテキストファイルライターをインスタンス化します。 |
TextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, byte[] delimiter, long idleTimeout) 新しいテキストファイルライターをインスタンス化します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | close() |
void | flush() |
protected void | flushTimeout() フラッシュタイムアウトを処理します。 |
protected void | handleTimeout() アイドルタイムアウトを処理します。 |
void | write(java.lang.String entity) エンティティを書き込みます。 |
getOutput, getPosition, setMaxOpenAttempts
findInitFiles, getOutputContext, getResolvedPath, initOutputContext, isAppendable, isFileWriteable, isOverwrite, isSyncable, onInit, renameFile, setAppendable, setFileNamingStrategy, setInWritingPrefix, setInWritingSuffix, setOverwrite, setRolloverStrategy, setSyncable, setWritePosition
doStart, doStop, getCodec, getConfiguration, getPath, isCompressed, resetIdleTimeout, setCloseTimeout, setFlushTimeout, setIdleTimeout
afterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stop
public TextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
configuration
- Hadoop の設定 basePath
- HDFs パス codec
- 圧縮コーデック情報 public TextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, byte[] delimiter)
configuration
- Hadoop の設定 basePath
- HDFs パス codec
- 圧縮コーデック情報 delimiter
- 区切り文字 public TextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, byte[] delimiter, long idleTimeout)
configuration
- Hadoop の設定 basePath
- HDFs パス codec
- 圧縮コーデック情報 delimiter
- 区切り文字 idleTimeout
- アイドルタイムアウト public void flush() throws java.io.IOException
java.io.Flushable
の flush
java.io.IOException
public void close() throws java.io.IOException
java.io.Closeable
の close
java.lang.AutoCloseable
の close
java.io.IOException
public void write(java.lang.String entity) throws java.io.IOException
DataWriter
DataWriter<java.lang.String>
の write
entity
- 書き込むエンティティ java.io.IOException
- I/O エラーが発生した場合 protected void handleTimeout()
StoreObjectSupport
StoreObjectSupport
の handleTimeout
protected void flushTimeout()
StoreObjectSupport
StoreObjectSupport
の flushTimeout