@ThreadSafe public final class LoadManager extends Object implements Journaled
Modifier and Type | Field and Description |
---|---|
static com.codahale.metrics.Counter |
JOB_LOAD_BLOCK_COUNT |
static com.codahale.metrics.Counter |
JOB_LOAD_BLOCK_FAIL |
static com.codahale.metrics.Counter |
JOB_LOAD_BLOCK_SIZE |
static com.codahale.metrics.Counter |
JOB_LOAD_FAIL |
static com.codahale.metrics.Meter |
JOB_LOAD_RATE |
static com.codahale.metrics.Counter |
JOB_LOAD_SUCCESS |
Constructor and Description |
---|
LoadManager(FileSystemMaster fileSystemMaster)
Constructor.
|
LoadManager(FileSystemMaster fileSystemMaster,
FileSystemContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanupStaleJob()
Removes all finished jobs outside the retention time.
|
Map<WorkerInfo,CloseableResource<BlockWorkerClient>> |
getActiveWorkers()
Get active workers.
|
CheckpointName |
getCheckpointName() |
CloseableIterator<Journal.JournalEntry> |
getJournalEntryIterator() |
Map<String,LoadJob> |
getLoadJobs()
Get load jobs.
|
String |
getLoadProgress(String loadPath,
LoadProgressReportFormat format,
boolean verbose)
Get the load job's progress report.
|
boolean |
processJournalEntry(Journal.JournalEntry entry)
Attempts to apply a journal entry.
|
void |
resetState()
Resets the object's journaled state.
|
void |
start()
Start load manager.
|
void |
stop()
Stop load manager.
|
boolean |
stopLoad(String loadPath)
Stop a load job.
|
boolean |
submitLoad(LoadJob loadJob)
Submit a load job.
|
boolean |
submitLoad(String loadPath,
OptionalLong bandwidth,
boolean usePartialListing,
boolean verificationEnabled)
Submit a load job.
|
void |
updateWorkers()
Refresh active workers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyAndJournal, restoreFromCheckpoint, writeToCheckpoint
public static final com.codahale.metrics.Counter JOB_LOAD_SUCCESS
public static final com.codahale.metrics.Counter JOB_LOAD_FAIL
public static final com.codahale.metrics.Counter JOB_LOAD_BLOCK_COUNT
public static final com.codahale.metrics.Counter JOB_LOAD_BLOCK_FAIL
public static final com.codahale.metrics.Counter JOB_LOAD_BLOCK_SIZE
public static final com.codahale.metrics.Meter JOB_LOAD_RATE
public LoadManager(FileSystemMaster fileSystemMaster)
fileSystemMaster
- fileSystemMasterpublic LoadManager(FileSystemMaster fileSystemMaster, FileSystemContext context)
fileSystemMaster
- fileSystemMastercontext
- fileSystemContextpublic void start()
public void stop()
public boolean submitLoad(String loadPath, OptionalLong bandwidth, boolean usePartialListing, boolean verificationEnabled)
loadPath
- alluxio directory path to load into Alluxiobandwidth
- bandwidth allocated to this loadusePartialListing
- whether to use partial listing or notverificationEnabled
- whether to run verification step or notpublic boolean submitLoad(LoadJob loadJob)
loadJob
- the load jobpublic boolean stopLoad(String loadPath)
loadPath
- alluxio directory path to load into Alluxiopublic String getLoadProgress(String loadPath, LoadProgressReportFormat format, boolean verbose)
loadPath
- alluxio directory path of the load jobformat
- progress report formatverbose
- whether to include details on failed files and failurespublic Map<WorkerInfo,CloseableResource<BlockWorkerClient>> getActiveWorkers()
public void cleanupStaleJob()
public void updateWorkers()
public CloseableIterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
CloseableIterator
that iterates all the journal entriespublic boolean processJournalEntry(Journal.JournalEntry entry)
Journaled
processJournalEntry
in interface Journaled
entry
- the entry to applypublic void resetState()
Journaled
resetState
in interface Journaled
public CheckpointName getCheckpointName()
getCheckpointName
in interface Checkpointed
Copyright © 2023. All Rights Reserved.