org.apache.tez.runtime.library.output
Class OnFileSortedOutput

java.lang.Object
  extended by org.apache.tez.runtime.library.output.OnFileSortedOutput
All Implemented Interfaces:
org.apache.tez.runtime.api.LogicalOutput, org.apache.tez.runtime.api.Output
Direct Known Subclasses:
LocalOnFileSorterOutput, OnFileUnorderedPartitionedKVOutput

public class OnFileSortedOutput
extends Object
implements org.apache.tez.runtime.api.LogicalOutput

OnFileSortedOutput is an LogicalOutput which sorts key/value pairs written to it and persists it to a file.


Field Summary
protected  org.apache.hadoop.conf.Configuration conf
           
protected  MemoryUpdateCallbackHandler memoryUpdateCallbackHandler
           
protected  int numOutputs
           
protected  org.apache.tez.runtime.api.TezOutputContext outputContext
           
protected  ExternalSorter sorter
           
 
Constructor Summary
OnFileSortedOutput()
           
 
Method Summary
 List<org.apache.tez.runtime.api.Event> close()
           
protected  List<org.apache.tez.runtime.api.Event> generateEventsOnClose()
           
 KeyValueWriter getWriter()
           
 void handleEvents(List<org.apache.tez.runtime.api.Event> outputEvents)
           
 List<org.apache.tez.runtime.api.Event> initialize(org.apache.tez.runtime.api.TezOutputContext outputContext)
           
 void setNumPhysicalOutputs(int numOutputs)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sorter

protected ExternalSorter sorter

conf

protected org.apache.hadoop.conf.Configuration conf

numOutputs

protected int numOutputs

outputContext

protected org.apache.tez.runtime.api.TezOutputContext outputContext

memoryUpdateCallbackHandler

protected MemoryUpdateCallbackHandler memoryUpdateCallbackHandler
Constructor Detail

OnFileSortedOutput

public OnFileSortedOutput()
Method Detail

initialize

public List<org.apache.tez.runtime.api.Event> initialize(org.apache.tez.runtime.api.TezOutputContext outputContext)
                                                  throws IOException
Specified by:
initialize in interface org.apache.tez.runtime.api.Output
Throws:
IOException

start

public void start()
           throws Exception
Specified by:
start in interface org.apache.tez.runtime.api.Output
Throws:
Exception

getWriter

public KeyValueWriter getWriter()
                         throws IOException
Specified by:
getWriter in interface org.apache.tez.runtime.api.Output
Throws:
IOException

handleEvents

public void handleEvents(List<org.apache.tez.runtime.api.Event> outputEvents)
Specified by:
handleEvents in interface org.apache.tez.runtime.api.Output

setNumPhysicalOutputs

public void setNumPhysicalOutputs(int numOutputs)
Specified by:
setNumPhysicalOutputs in interface org.apache.tez.runtime.api.LogicalOutput

close

public List<org.apache.tez.runtime.api.Event> close()
                                             throws IOException
Specified by:
close in interface org.apache.tez.runtime.api.Output
Throws:
IOException

generateEventsOnClose

protected List<org.apache.tez.runtime.api.Event> generateEventsOnClose()
                                                                throws IOException
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All rights reserved.