@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 |
|---|---|
|
Writer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file) |
|
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) |
|
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) |
|
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 |
Writer(org.apache.tez.common.counters.TezCounter writesCounter,
org.apache.tez.common.counters.TezCounter serializedBytesCounter,
boolean rle) |
| 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 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
IOExceptionprotected Writer(org.apache.tez.common.counters.TezCounter writesCounter,
org.apache.tez.common.counters.TezCounter serializedBytesCounter,
boolean rle)
public 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
IOExceptionpublic 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
IOExceptionpublic Writer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file)
throws IOException
IOExceptionprotected void writeHeader(OutputStream outputStream) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void append(Object key, Object value) throws IOException
key - value - IOExceptionpublic void appendValue(Object value) throws IOException
value - IOExceptionpublic void appendValue(org.apache.hadoop.io.DataInputBuffer value)
throws IOException
value - IOExceptionpublic <V> void appendValues(Iterator<V> valuesItr) throws IOException
valuesItr - IOExceptionpublic <K,V> void appendKeyValues(K key,
Iterator<V> valuesItr)
throws IOException
K - V - key - valuesItr - IOExceptionpublic void append(org.apache.hadoop.io.DataInputBuffer key,
org.apache.hadoop.io.DataInputBuffer value)
throws IOException
key - value - IOExceptionprotected void writeValue(byte[] data,
int offset,
int length)
throws IOException
IOExceptionprotected void writeKVPair(byte[] keyData,
int keyPos,
int keyLength,
byte[] valueData,
int valPos,
int valueLength)
throws IOException
IOExceptionprotected void writeRLE(DataOutputStream out) throws IOException
IOExceptionprotected void writeValueMarker(DataOutputStream out) throws IOException
IOExceptionpublic DataOutputStream getOutputStream()
public void updateCountersForExternalAppend(long length)
public long getRawLength()
public long getCompressedLength()
Copyright © 2019 Apache Software Foundation. All rights reserved.