org.apache.tez.runtime.library.broadcast.output
Class FileBasedKVWriter

java.lang.Object
  extended by org.apache.tez.runtime.library.broadcast.output.FileBasedKVWriter
All Implemented Interfaces:
org.apache.tez.runtime.api.Writer, KeyValueWriter

public class FileBasedKVWriter
extends Object
implements KeyValueWriter


Field Summary
static int INDEX_RECORD_LENGTH
           
 
Constructor Summary
FileBasedKVWriter(org.apache.tez.runtime.api.TezOutputContext outputContext, org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
 boolean close()
           
 long getCompressedLength()
           
 byte[] getData()
           
 long getRawLength()
           
 void write(Object key, Object value)
          Writes a key/value pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_RECORD_LENGTH

public static final int INDEX_RECORD_LENGTH
See Also:
Constant Field Values
Constructor Detail

FileBasedKVWriter

public FileBasedKVWriter(org.apache.tez.runtime.api.TezOutputContext outputContext,
                         org.apache.hadoop.conf.Configuration conf)
                  throws IOException
Throws:
IOException
Method Detail

close

public boolean close()
              throws IOException
Returns:
true if any output was generated. false otherwise
Throws:
IOException

write

public void write(Object key,
                  Object value)
           throws IOException
Description copied from interface: KeyValueWriter
Writes a key/value pair.

Specified by:
write in interface KeyValueWriter
Parameters:
key - the key to write
value - the value to write
Throws:
IOException - if an error occurs

getRawLength

public long getRawLength()

getCompressedLength

public long getCompressedLength()

getData

public byte[] getData()
               throws IOException
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All rights reserved.