public class RetryableJobProgressTrackerClient extends Object implements JobProgressTrackerClient
Modifier and Type | Field and Description |
---|---|
static IntConfOption |
RETRYABLE_JOB_PROGRESS_CLIENT_NUM_RETRIES
Conf option for number of retries
|
static IntConfOption |
RETRYABLE_JOB_PROGRESS_CLIENT_RETRY_WAIT_MS
Conf option for wait time between retries
|
Constructor and Description |
---|
RetryableJobProgressTrackerClient()
Default constructor.
|
RetryableJobProgressTrackerClient(GiraphConfiguration conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Close the connections if any
|
void |
init(GiraphConfiguration conf)
Initialize the client.
|
void |
logError(String logLine,
byte[] exByteArray)
Call this when you want to log an error line and exception
object from any mapper to command line
KryoWritableWrapper.convertFromByteArray can be used to
get exception object back
|
void |
logFailure(String reason)
Notify that job is failing
|
void |
logInfo(String logLine)
Call this when you want to log an info line from any mapper to command line
|
void |
mapperStarted()
Notify JobProgressTracker that mapper started
|
void |
sendMasterCounters(GiraphCountersThriftStruct giraphCounters)
Master should call this method after all supersteps are finished,
and send the aggregated counters to the job client
|
void |
updateMasterProgress(MasterProgress masterProgress)
Master should call this method to update its progress
|
void |
updateProgress(WorkerProgress workerProgress)
Workers should call this method to update their progress
|
public static final IntConfOption RETRYABLE_JOB_PROGRESS_CLIENT_NUM_RETRIES
public static final IntConfOption RETRYABLE_JOB_PROGRESS_CLIENT_RETRY_WAIT_MS
public RetryableJobProgressTrackerClient()
init(GiraphConfiguration)
.public RetryableJobProgressTrackerClient(GiraphConfiguration conf) throws ExecutionException, InterruptedException
conf
- Giraph configurationExecutionException
InterruptedException
public void init(GiraphConfiguration conf) throws Exception
JobProgressTrackerClient
init
in interface JobProgressTrackerClient
conf
- Job configurationException
public void cleanup() throws IOException
JobProgressTrackerClient
cleanup
in interface JobProgressTrackerClient
IOException
public void mapperStarted()
JobProgressTracker
mapperStarted
in interface JobProgressTracker
public void logInfo(String logLine)
JobProgressTracker
logInfo
in interface JobProgressTracker
logLine
- Line to logpublic void logError(String logLine, byte[] exByteArray)
JobProgressTracker
logError
in interface JobProgressTracker
logLine
- Line to logexByteArray
- Exception byte arraypublic void logFailure(String reason)
JobProgressTracker
logFailure
in interface JobProgressTracker
reason
- Reason for failurepublic void updateProgress(WorkerProgress workerProgress)
JobProgressTracker
updateProgress
in interface JobProgressTracker
workerProgress
- Progress of the workerpublic void updateMasterProgress(MasterProgress masterProgress)
JobProgressTracker
updateMasterProgress
in interface JobProgressTracker
masterProgress
- Progress of the masterpublic void sendMasterCounters(GiraphCountersThriftStruct giraphCounters)
JobProgressTracker
sendMasterCounters
in interface JobProgressTracker
giraphCounters
- Giraph-based countersCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.