org.apache.hadoop.fs
Class FSDataOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
org.apache.hadoop.fs.FSDataOutputStream
- All Implemented Interfaces:
- Closeable, DataOutput, Flushable
public class FSDataOutputStream
- extends DataOutputStream
Utility that wraps a FSOutputStream
in a DataOutputStream
,
buffers output through a BufferedOutputStream
and creates a checksum
file.
Constructor Summary |
FSDataOutputStream(FileSystem fs,
Path file,
boolean overwrite,
Configuration conf,
int bufferSize,
short replication,
long blockSize)
|
FSDataOutputStream(FileSystem fs,
Path file,
boolean overwrite,
Configuration conf,
int bufferSize,
short replication,
long blockSize,
Progressable progress)
|
Methods inherited from class java.io.DataOutputStream |
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHECKSUM_VERSION
public static final byte[] CHECKSUM_VERSION
FSDataOutputStream
public FSDataOutputStream(FileSystem fs,
Path file,
boolean overwrite,
Configuration conf,
int bufferSize,
short replication,
long blockSize)
throws IOException
- Throws:
IOException
FSDataOutputStream
public FSDataOutputStream(FileSystem fs,
Path file,
boolean overwrite,
Configuration conf,
int bufferSize,
short replication,
long blockSize,
Progressable progress)
throws IOException
- Throws:
IOException
getPos
public long getPos()
throws IOException
- Throws:
IOException
getChecksumLength
public static long getChecksumLength(long size,
int bytesPerSum)
Copyright © 2006 The Apache Software Foundation