@InterfaceAudience.Private @InterfaceStability.Unstable public class MergeManager extends Object implements FetchedInputAllocatorOrderedGrouped
Constructor and Description |
---|
MergeManager(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem localFS,
org.apache.hadoop.fs.LocalDirAllocator localDirAllocator,
org.apache.tez.runtime.api.InputContext inputContext,
Combiner combiner,
org.apache.tez.common.counters.TezCounter spilledRecordsCounter,
org.apache.tez.common.counters.TezCounter reduceCombineInputCounter,
org.apache.tez.common.counters.TezCounter mergedMapOutputsCounter,
org.apache.tez.runtime.library.common.shuffle.orderedgrouped.ExceptionReporter exceptionReporter,
long initialMemoryAvailable,
org.apache.hadoop.io.compress.CompressionCodec codec,
boolean ifileReadAheadEnabled,
int ifileReadAheadLength)
Construct the MergeManager.
|
Modifier and Type | Method and Description |
---|---|
TezRawKeyValueIterator |
close(boolean tryFinalMerge) |
void |
closeInMemoryFile(org.apache.tez.runtime.library.common.shuffle.orderedgrouped.MapOutput mapOutput) |
void |
closeInMemoryMergedFile(org.apache.tez.runtime.library.common.shuffle.orderedgrouped.MapOutput mapOutput) |
void |
closeOnDiskFile(FileChunk file) |
org.apache.hadoop.fs.FileSystem |
getLocalFileSystem() |
boolean |
isMergeComplete()
Should only be used after the Shuffle phaze is complete, otherwise can
return an invalid state since a merge may not be in progress dur to
inadequate inputs
|
boolean |
isShutdown() |
org.apache.tez.runtime.library.common.shuffle.orderedgrouped.MapOutput |
reserve(InputAttemptIdentifier srcAttemptIdentifier,
long requestedSize,
long compressedLength,
int fetcher) |
void |
unreserve(long size) |
void |
waitForInMemoryMerge() |
void |
waitForShuffleToMergeMemory() |
public MergeManager(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem localFS, org.apache.hadoop.fs.LocalDirAllocator localDirAllocator, org.apache.tez.runtime.api.InputContext inputContext, Combiner combiner, org.apache.tez.common.counters.TezCounter spilledRecordsCounter, org.apache.tez.common.counters.TezCounter reduceCombineInputCounter, org.apache.tez.common.counters.TezCounter mergedMapOutputsCounter, org.apache.tez.runtime.library.common.shuffle.orderedgrouped.ExceptionReporter exceptionReporter, long initialMemoryAvailable, org.apache.hadoop.io.compress.CompressionCodec codec, boolean ifileReadAheadEnabled, int ifileReadAheadLength)
public void waitForInMemoryMerge() throws InterruptedException
InterruptedException
public void waitForShuffleToMergeMemory() throws InterruptedException
InterruptedException
public org.apache.tez.runtime.library.common.shuffle.orderedgrouped.MapOutput reserve(InputAttemptIdentifier srcAttemptIdentifier, long requestedSize, long compressedLength, int fetcher) throws IOException
reserve
in interface FetchedInputAllocatorOrderedGrouped
IOException
public void unreserve(long size)
unreserve
in interface FetchedInputAllocatorOrderedGrouped
public void closeInMemoryFile(org.apache.tez.runtime.library.common.shuffle.orderedgrouped.MapOutput mapOutput)
closeInMemoryFile
in interface FetchedInputAllocatorOrderedGrouped
public void closeInMemoryMergedFile(org.apache.tez.runtime.library.common.shuffle.orderedgrouped.MapOutput mapOutput)
public org.apache.hadoop.fs.FileSystem getLocalFileSystem()
getLocalFileSystem
in interface FetchedInputAllocatorOrderedGrouped
public void closeOnDiskFile(FileChunk file)
closeOnDiskFile
in interface FetchedInputAllocatorOrderedGrouped
@InterfaceAudience.Private public boolean isMergeComplete()
public TezRawKeyValueIterator close(boolean tryFinalMerge) throws Throwable
Throwable
public boolean isShutdown()
Copyright © 2016 Apache Software Foundation. All rights reserved.