public class SortShardTask extends WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>
claimedMemory, LIMITER| Constructor and Description |
|---|
SortShardTask(String mrJobId,
int shardNumber,
int shardCount,
InputReader<KeyValue<ByteBuffer,ByteBuffer>> in,
SortWorker worker,
OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> out,
int sortReadTimeMillis) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowSliceRetry(boolean abandon) |
protected void |
callWorker(KeyValue<ByteBuffer,ByteBuffer> input) |
void |
cleanup()
Clean up and release any resources claimed in prepare.
|
protected long |
estimateMemoryRequirement() |
protected String |
formatLastWorkItem(KeyValue<ByteBuffer,ByteBuffer> item) |
InputReader<KeyValue<ByteBuffer,ByteBuffer>> |
getInputReader() |
OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> |
getOutputWriter() |
protected Worker<SortContext> |
getWorker() |
void |
jobCompleted(Status status)
A job completed callback to allow resource cleanup and compaction of the finalized state.
|
void |
prepare()
Called immediately before run.
|
protected boolean |
shouldCheckpoint(long timeElapsed) |
abbrev, getContext, isDone, run, setFinalized, toString, wasFinalizedpublic SortShardTask(String mrJobId, int shardNumber, int shardCount, InputReader<KeyValue<ByteBuffer,ByteBuffer>> in, SortWorker worker, OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> out, int sortReadTimeMillis)
public void prepare()
IncrementalTaskprepare in interface IncrementalTaskprepare in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>public void cleanup()
IncrementalTaskcleanup in interface IncrementalTaskcleanup in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>protected void callWorker(KeyValue<ByteBuffer,ByteBuffer> input)
callWorker in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>protected String formatLastWorkItem(KeyValue<ByteBuffer,ByteBuffer> item)
formatLastWorkItem in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>protected boolean shouldCheckpoint(long timeElapsed)
shouldCheckpoint in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>protected long estimateMemoryRequirement()
estimateMemoryRequirement in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>protected Worker<SortContext> getWorker()
getWorker in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>public OutputWriter<KeyValue<ByteBuffer,List<ByteBuffer>>> getOutputWriter()
getOutputWriter in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>public InputReader<KeyValue<ByteBuffer,ByteBuffer>> getInputReader()
getInputReader in class WorkerShardTask<KeyValue<ByteBuffer,ByteBuffer>,KeyValue<ByteBuffer,List<ByteBuffer>>,SortContext>public boolean allowSliceRetry(boolean abandon)
abandon - true if a retry is due to an abandoned lock.public void jobCompleted(Status status)
IncrementalTaskstatus - the status of the jobCopyright © 2015 Google. All rights reserved.