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

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

public class DiskFetchedInput
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
DiskFetchedInput(long actualSize, long compressedSize, InputAttemptIdentifier inputAttemptIdentifier, FetchedInputCallback callbackHandler, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.LocalDirAllocator localDirAllocator, TezTaskOutputFiles filenameAllocator)
           
 
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.
 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

DiskFetchedInput

public DiskFetchedInput(long actualSize,
                        long compressedSize,
                        InputAttemptIdentifier inputAttemptIdentifier,
                        FetchedInputCallback callbackHandler,
                        org.apache.hadoop.conf.Configuration conf,
                        org.apache.hadoop.fs.LocalDirAllocator localDirAllocator,
                        TezTaskOutputFiles filenameAllocator)
                 throws IOException
Throws:
IOException
Method Detail

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
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
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
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
Throws:
IOException

commit

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

Specified by:
commit in class FetchedInput
Throws:
IOException

abort

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

Specified by:
abort in class FetchedInput
Throws:
IOException

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.