Package org.apache.storm.hdfs.common
Class AbstractHDFSWriter
java.lang.Object
org.apache.storm.hdfs.common.AbstractHDFSWriter
- All Implemented Interfaces:
Writer
- Direct Known Subclasses:
AvroGenericRecordHDFSWriter
,HDFSWriter
,SequenceFileWriter
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.hadoop.fs.Path
protected long
protected boolean
protected long
protected final FileRotationPolicy
-
Constructor Summary
ConstructorDescriptionAbstractHDFSWriter
(FileRotationPolicy policy, org.apache.hadoop.fs.Path path) -
Method Summary
-
Field Details
-
filePath
protected final org.apache.hadoop.fs.Path filePath -
rotationPolicy
-
lastUsedTime
protected long lastUsedTime -
offset
protected long offset -
needsRotation
protected boolean needsRotation
-
-
Constructor Details
-
AbstractHDFSWriter
-
-
Method Details
-
write
- Specified by:
write
in interfaceWriter
- Throws:
IOException
-
sync
- Specified by:
sync
in interfaceWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceWriter
- Throws:
IOException
-
needsRotation
public boolean needsRotation()- Specified by:
needsRotation
in interfaceWriter
-
getFilePath
public org.apache.hadoop.fs.Path getFilePath()- Specified by:
getFilePath
in interfaceWriter
-
doWrite
- Throws:
IOException
-
doSync
- Throws:
IOException
-
doClose
- Throws:
IOException
-