@InterfaceAudience.Private public class FileBasedKVWriter extends KeyValuesWriter
Modifier and Type | Field and Description |
---|---|
static int |
INDEX_RECORD_LENGTH |
Constructor and Description |
---|
FileBasedKVWriter(org.apache.tez.runtime.api.OutputContext outputContext,
org.apache.hadoop.conf.Configuration conf) |
public static final int INDEX_RECORD_LENGTH
public FileBasedKVWriter(org.apache.tez.runtime.api.OutputContext outputContext, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public boolean close() throws IOException
IOException
public void write(Object key, Object value) throws IOException
KeyValueWriter
write
in class KeyValueWriter
key
- the key to writevalue
- the value to writeIOException
- if an error occurspublic void write(Object key, Iterable<Object> values) throws IOException
KeyValuesWriter
write
in class KeyValuesWriter
key
- the key to writevalues
- values to writeIOException
public long getRawLength()
public long getCompressedLength()
public byte[] getData() throws IOException
IOException
Copyright © 2015 Apache Software Foundation. All rights reserved.