public class MergeShardTask extends WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
claimedMemory, LIMITER
Constructor and Description |
---|
MergeShardTask(String mrJobId,
int shardNumber,
int shardCount,
InputReader<KeyValue<ByteBuffer,Iterator<ByteBuffer>>> in,
OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> out,
int sortReadTimeMillis) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowSliceRetry(boolean abandon) |
protected void |
callWorker(KeyValue<ByteBuffer,Iterator<ByteBuffer>> input) |
protected long |
estimateMemoryRequirement() |
protected String |
formatLastWorkItem(KeyValue<ByteBuffer,Iterator<ByteBuffer>> item) |
InputReader<KeyValue<ByteBuffer,Iterator<ByteBuffer>>> |
getInputReader() |
OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> |
getOutputWriter() |
protected Worker<MergeContext> |
getWorker() |
void |
jobCompleted(Status status)
A job completed callback to allow resource cleanup and compaction of the finalized state.
|
protected boolean |
shouldCheckpoint(long timeElapsed) |
abbrev, cleanup, getContext, isDone, prepare, run, setFinalized, toString, wasFinalized
public MergeShardTask(String mrJobId, int shardNumber, int shardCount, InputReader<KeyValue<ByteBuffer,Iterator<ByteBuffer>>> in, OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> out, int sortReadTimeMillis)
protected void callWorker(KeyValue<ByteBuffer,Iterator<ByteBuffer>> input)
callWorker
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
protected String formatLastWorkItem(KeyValue<ByteBuffer,Iterator<ByteBuffer>> item)
formatLastWorkItem
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
protected boolean shouldCheckpoint(long timeElapsed)
shouldCheckpoint
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
protected long estimateMemoryRequirement()
estimateMemoryRequirement
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
protected Worker<MergeContext> getWorker()
getWorker
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
public OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> getOutputWriter()
getOutputWriter
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
public InputReader<KeyValue<ByteBuffer,Iterator<ByteBuffer>>> getInputReader()
getInputReader
in class WorkerShardTask<KeyValue<ByteBuffer,Iterator<ByteBuffer>>,KeyValue<ByteBuffer,List<ByteBuffer>>,MergeContext>
public void jobCompleted(Status status)
IncrementalTask
status
- the status of the jobpublic boolean allowSliceRetry(boolean abandon)
abandon
- true if a retry is due to an abandoned lock.Copyright © 2015 Google. All rights reserved.