org.apache.tez.runtime.library.shuffle.common.impl
Class SimpleFetchedInputAllocator

java.lang.Object
  extended by org.apache.tez.runtime.library.shuffle.common.impl.SimpleFetchedInputAllocator
All Implemented Interfaces:
FetchedInputAllocator, FetchedInputCallback

@InterfaceAudience.Private
public class SimpleFetchedInputAllocator
extends Object
implements FetchedInputAllocator, FetchedInputCallback

Usage: Create instance, setInitialMemoryAvailable(long), configureAndStart()


Constructor Summary
SimpleFetchedInputAllocator(String uniqueIdentifier, org.apache.hadoop.conf.Configuration conf, long maxTaskAvailableMemory, long memoryAvailable)
           
 
Method Summary
 FetchedInput allocate(long actualSize, long compressedSize, InputAttemptIdentifier inputAttemptIdentifier)
           
 void fetchComplete(FetchedInput fetchedInput)
           
 void fetchFailed(FetchedInput fetchedInput)
           
 void freeResources(FetchedInput fetchedInput)
           
static long getInitialMemoryReq(org.apache.hadoop.conf.Configuration conf, long maxAvailableTaskMemory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFetchedInputAllocator

public SimpleFetchedInputAllocator(String uniqueIdentifier,
                                   org.apache.hadoop.conf.Configuration conf,
                                   long maxTaskAvailableMemory,
                                   long memoryAvailable)
Method Detail

getInitialMemoryReq

@InterfaceAudience.Private
public static long getInitialMemoryReq(org.apache.hadoop.conf.Configuration conf,
                                                                 long maxAvailableTaskMemory)

allocate

public FetchedInput allocate(long actualSize,
                             long compressedSize,
                             InputAttemptIdentifier inputAttemptIdentifier)
                      throws IOException
Specified by:
allocate in interface FetchedInputAllocator
Throws:
IOException

fetchComplete

public void fetchComplete(FetchedInput fetchedInput)
Specified by:
fetchComplete in interface FetchedInputCallback

fetchFailed

public void fetchFailed(FetchedInput fetchedInput)
Specified by:
fetchFailed in interface FetchedInputCallback

freeResources

public void freeResources(FetchedInput fetchedInput)
Specified by:
freeResources in interface FetchedInputCallback


Copyright © 2014 Apache Software Foundation. All rights reserved.