@InterfaceAudience.Private @InterfaceStability.Unstable public static class IFile.Writer extends Object
IFile.Writer
to write out intermediate map-outputs.Modifier and Type | Field and Description |
---|---|
protected DataOutputStream |
out |
protected boolean |
rle |
Modifier | Constructor and Description |
---|---|
|
IFile.Writer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file) |
|
IFile.Writer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file,
Class keyClass,
Class valueClass,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter writesCounter,
org.apache.tez.common.counters.TezCounter serializedBytesCounter) |
|
IFile.Writer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataOutputStream outputStream,
Class keyClass,
Class valueClass,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter writesCounter,
org.apache.tez.common.counters.TezCounter serializedBytesCounter) |
|
IFile.Writer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataOutputStream outputStream,
Class keyClass,
Class valueClass,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter writesCounter,
org.apache.tez.common.counters.TezCounter serializedBytesCounter,
boolean rle) |
protected |
IFile.Writer(org.apache.tez.common.counters.TezCounter writesCounter,
org.apache.tez.common.counters.TezCounter serializedBytesCounter) |
Modifier and Type | Method and Description |
---|---|
void |
append(org.apache.hadoop.io.DataInputBuffer key,
org.apache.hadoop.io.DataInputBuffer value)
Send key/value to be appended to IFile.
|
void |
append(Object key,
Object value)
Send key/value to be appended to IFile.
|
<K,V> void |
appendKeyValues(K key,
Iterator<V> valuesItr)
Append key and its associated set of values.
|
void |
appendValue(org.apache.hadoop.io.DataInputBuffer value)
Appends the value to previous key.
|
void |
appendValue(Object value)
Appends the value to previous key.
|
<V> void |
appendValues(Iterator<V> valuesItr)
Appends the value to previous key.
|
void |
close() |
long |
getCompressedLength() |
DataOutputStream |
getOutputStream() |
long |
getRawLength() |
void |
updateCountersForExternalAppend(long length) |
protected void |
writeHeader(OutputStream outputStream) |
protected void |
writeKVPair(byte[] keyData,
int keyPos,
int keyLength,
byte[] valueData,
int valPos,
int valueLength) |
protected void |
writeRLE(DataOutputStream out) |
protected void |
writeValue(byte[] data,
int offset,
int length) |
protected void |
writeValueMarker(DataOutputStream out) |
protected DataOutputStream out
protected final boolean rle
public IFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file, Class keyClass, Class valueClass, org.apache.hadoop.io.compress.CompressionCodec codec, org.apache.tez.common.counters.TezCounter writesCounter, org.apache.tez.common.counters.TezCounter serializedBytesCounter) throws IOException
IOException
protected IFile.Writer(org.apache.tez.common.counters.TezCounter writesCounter, org.apache.tez.common.counters.TezCounter serializedBytesCounter)
public IFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FSDataOutputStream outputStream, Class keyClass, Class valueClass, org.apache.hadoop.io.compress.CompressionCodec codec, org.apache.tez.common.counters.TezCounter writesCounter, org.apache.tez.common.counters.TezCounter serializedBytesCounter) throws IOException
IOException
public IFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FSDataOutputStream outputStream, Class keyClass, Class valueClass, org.apache.hadoop.io.compress.CompressionCodec codec, org.apache.tez.common.counters.TezCounter writesCounter, org.apache.tez.common.counters.TezCounter serializedBytesCounter, boolean rle) throws IOException
IOException
public IFile.Writer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file) throws IOException
IOException
protected void writeHeader(OutputStream outputStream) throws IOException
IOException
public void close() throws IOException
IOException
public void append(Object key, Object value) throws IOException
key
- value
- IOException
public void appendValue(Object value) throws IOException
value
- IOException
public void appendValue(org.apache.hadoop.io.DataInputBuffer value) throws IOException
value
- IOException
public <V> void appendValues(Iterator<V> valuesItr) throws IOException
valuesItr
- IOException
public <K,V> void appendKeyValues(K key, Iterator<V> valuesItr) throws IOException
K
- V
- key
- valuesItr
- IOException
public void append(org.apache.hadoop.io.DataInputBuffer key, org.apache.hadoop.io.DataInputBuffer value) throws IOException
key
- value
- IOException
protected void writeValue(byte[] data, int offset, int length) throws IOException
IOException
protected void writeKVPair(byte[] keyData, int keyPos, int keyLength, byte[] valueData, int valPos, int valueLength) throws IOException
IOException
protected void writeRLE(DataOutputStream out) throws IOException
IOException
protected void writeValueMarker(DataOutputStream out) throws IOException
IOException
public DataOutputStream getOutputStream()
public void updateCountersForExternalAppend(long length)
public long getRawLength()
public long getCompressedLength()
Copyright © 2015 Apache Software Foundation. All rights reserved.