org.apache.tez.runtime.library.shuffle.common
Class MemoryFetchedInput

java.lang.Object
  extended by org.apache.tez.runtime.library.shuffle.common.FetchedInput
      extended by org.apache.tez.runtime.library.shuffle.common.MemoryFetchedInput

public class MemoryFetchedInput
extends FetchedInput


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tez.runtime.library.shuffle.common.FetchedInput
FetchedInput.State, FetchedInput.Type
 
Field Summary
 
Fields inherited from class org.apache.tez.runtime.library.shuffle.common.FetchedInput
actualSize, callback, compressedSize, id, inputAttemptIdentifier, state, type
 
Constructor Summary
MemoryFetchedInput(long actualSize, long compressedSize, InputAttemptIdentifier inputAttemptIdentifier, FetchedInputCallback callbackHandler)
           
 
Method Summary
 void abort()
          Abort the output.
 void commit()
          Commit the output.
 void free()
          Called when this input has been consumed, so that resources can be reclaimed.
 byte[] getBytes()
           
 InputStream getInputStream()
          Return an input stream to be used to read the previously fetched data.
 OutputStream getOutputStream()
          Returns the output stream to be used to write fetched data.
 String toString()
           
 
Methods inherited from class org.apache.tez.runtime.library.shuffle.common.FetchedInput
equals, getActualSize, getCompressedSize, getInputAttemptIdentifier, getType, hashCode, notifyFetchComplete, notifyFetchFailure, notifyFreedResource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemoryFetchedInput

public MemoryFetchedInput(long actualSize,
                          long compressedSize,
                          InputAttemptIdentifier inputAttemptIdentifier,
                          FetchedInputCallback callbackHandler)
Method Detail

getOutputStream

public OutputStream getOutputStream()
Description copied from class: FetchedInput
Returns the output stream to be used to write fetched data. Users are expected to close the OutputStream when they're done

Specified by:
getOutputStream in class FetchedInput

getInputStream

public InputStream getInputStream()
Description copied from class: FetchedInput
Return an input stream to be used to read the previously fetched data. Users are expected to close the InputStream when they're done

Specified by:
getInputStream in class FetchedInput

getBytes

public byte[] getBytes()

commit

public void commit()
Description copied from class: FetchedInput
Commit the output. Should be idempotent

Specified by:
commit in class FetchedInput

abort

public void abort()
Description copied from class: FetchedInput
Abort the output. Should be idempotent

Specified by:
abort in class FetchedInput

free

public void free()
Description copied from class: FetchedInput
Called when this input has been consumed, so that resources can be reclaimed.

Specified by:
free in class FetchedInput

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Apache Software Foundation. All rights reserved.