|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.io.RCFile.Writer
public static class RCFile.Writer
Write KeyBuffer/ValueBuffer pairs to a RCFile. RCFile's format is compatible with SequenceFile's.
Field Summary | |
---|---|
static String |
COLUMNS_BUFFER_SIZE_CONF_STR
|
Constructor Summary | |
---|---|
RCFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path name)
Constructs a RCFile Writer. |
|
RCFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path name,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress,
org.apache.hadoop.io.SequenceFile.Metadata metadata,
org.apache.hadoop.io.compress.CompressionCodec codec)
Constructs a RCFile Writer. |
|
RCFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path name,
org.apache.hadoop.util.Progressable progress,
org.apache.hadoop.io.compress.CompressionCodec codec)
Constructs a RCFile Writer. |
|
RCFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path name,
org.apache.hadoop.util.Progressable progress,
org.apache.hadoop.io.SequenceFile.Metadata metadata,
org.apache.hadoop.io.compress.CompressionCodec codec)
Constructs a RCFile Writer. |
Method Summary | |
---|---|
void |
append(org.apache.hadoop.io.Writable val)
Append a row of values. |
void |
close()
|
void |
flushBlock(RCFile.KeyBuffer keyBuffer,
RCFile.ValueBuffer valueBuffer,
int recordLen,
int keyLength,
int compressedKeyLen)
flush a block out without doing anything except compressing the key part. |
org.apache.hadoop.io.compress.CompressionCodec |
getCompressionCodec()
Deprecated. |
long |
getLength()
|
void |
sync()
create a sync point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String COLUMNS_BUFFER_SIZE_CONF_STR
Constructor Detail |
---|
public RCFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path name) throws IOException
IOException
public RCFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path name, org.apache.hadoop.util.Progressable progress, org.apache.hadoop.io.compress.CompressionCodec codec) throws IOException
fs
- the file system usedconf
- the configuration filename
- the file name
IOException
public RCFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path name, org.apache.hadoop.util.Progressable progress, org.apache.hadoop.io.SequenceFile.Metadata metadata, org.apache.hadoop.io.compress.CompressionCodec codec) throws IOException
fs
- the file system usedconf
- the configuration filename
- the file nameprogress
- a progress meter to update as the file is writtenmetadata
- a string to string map in the file header
IOException
public RCFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path name, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress, org.apache.hadoop.io.SequenceFile.Metadata metadata, org.apache.hadoop.io.compress.CompressionCodec codec) throws IOException
fs
- the file system usedconf
- the configuration filename
- the file namebufferSize
- the size of the file bufferreplication
- the number of replicas for the fileblockSize
- the block size of the fileprogress
- the progress meter for writing the filemetadata
- a string to string map in the file header
IOException
Method Detail |
---|
public long getLength() throws IOException
IOException
@Deprecated public org.apache.hadoop.io.compress.CompressionCodec getCompressionCodec()
public void sync() throws IOException
IOException
public void append(org.apache.hadoop.io.Writable val) throws IOException
BytesRefArrayWritable
. If its size()
is less than the
column number in the file, zero bytes are appended for the empty columns.
If its size() is greater then the column number in the file, the exceeded
columns' bytes are ignored.
val
- a BytesRefArrayWritable with the list of serialized columns
IOException
public void flushBlock(RCFile.KeyBuffer keyBuffer, RCFile.ValueBuffer valueBuffer, int recordLen, int keyLength, int compressedKeyLen) throws IOException
IOException
public void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |