@NotThreadSafe public final class DefaultLineageMaster extends AbstractMaster implements LineageMaster
mBackupManager, mClock, mPauseStateLock, mSafeModeManager, mStateChangeLock
Modifier and Type | Method and Description |
---|---|
long |
createLineage(List<AlluxioURI> inputFiles,
List<AlluxioURI> outputFiles,
Job job)
Creates a lineage.
|
boolean |
deleteLineage(long lineageId,
boolean cascade)
Deletes a lineage.
|
Set<Class<? extends Server>> |
getDependencies() |
Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
List<LineageInfo> |
getLineageInfoList() |
LineageStoreView |
getLineageStoreView() |
String |
getName() |
Map<String,org.apache.thrift.TProcessor> |
getServices() |
void |
processJournalEntry(Journal.JournalEntry entry)
Applies a journal entry to the state machine.
|
long |
reinitializeFile(String path,
long blockSizeBytes,
long ttl,
TtlAction ttlAction)
Reinitializes the file when the file is lost or not completed.
|
void |
reportLostFile(String path)
Reports a file as lost.
|
void |
resetState()
Resets the journaled internal state of the state machine.
|
void |
scheduleCheckpoint(CheckpointPlan plan)
Schedules persistence for the output files of the given checkpoint plan.
|
void |
start(Boolean isLeader)
Starts the Alluxio server.
|
createJournalContext, getExecutorService, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createJournalContext
public Map<String,org.apache.thrift.TProcessor> getServices()
getServices
in interface Server<Boolean>
TProcessor
s that serve RPCs for this serverpublic String getName()
getName
in interface JournalEntryStateMachine
getName
in interface Server<Boolean>
public Set<Class<? extends Server>> getDependencies()
getDependencies
in interface Server<Boolean>
getDependencies
in class AbstractMaster
public void processJournalEntry(Journal.JournalEntry entry) throws IOException
JournalEntryStateMachine
processJournalEntry
in interface JournalEntryStateMachine
entry
- the entry to process to update the state of the state machineIOException
public void resetState()
JournalEntryStateMachine
resetState
in interface JournalEntryStateMachine
public void start(Boolean isLeader) throws IOException
Server
start
in interface Server<Boolean>
start
in class AbstractMaster
isLeader
- the start optionsIOException
public Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriespublic LineageStoreView getLineageStoreView()
getLineageStoreView
in interface LineageMaster
public long createLineage(List<AlluxioURI> inputFiles, List<AlluxioURI> outputFiles, Job job) throws InvalidPathException, FileAlreadyExistsException, BlockInfoException, IOException, AccessControlException, FileDoesNotExistException
LineageMaster
createLineage
in interface LineageMaster
inputFiles
- the input filesoutputFiles
- the output filesjob
- the jobInvalidPathException
- if the path to the input file is invalidFileAlreadyExistsException
- if the output file already existsBlockInfoException
- if fails to create the output fileAccessControlException
- if the permission check failsFileDoesNotExistException
- if any of the input files do not existIOException
public boolean deleteLineage(long lineageId, boolean cascade) throws LineageDoesNotExistException, LineageDeletionException, UnavailableException
LineageMaster
deleteLineage
in interface LineageMaster
lineageId
- id the of lineagecascade
- the flag if to delete all the downstream lineagesLineageDoesNotExistException
- the lineage does not existLineageDeletionException
- the lineage deletion failsUnavailableException
public long reinitializeFile(String path, long blockSizeBytes, long ttl, TtlAction ttlAction) throws InvalidPathException, LineageDoesNotExistException, AccessControlException, FileDoesNotExistException, UnavailableException
LineageMaster
reinitializeFile
in interface LineageMaster
path
- the path to the fileblockSizeBytes
- the block sizettl
- the TTLttlAction
- action to perform on ttl expiryInvalidPathException
- the file path is invalidLineageDoesNotExistException
- when the file does not existAccessControlException
- if permission checking failsFileDoesNotExistException
- if the path does not existUnavailableException
public List<LineageInfo> getLineageInfoList() throws LineageDoesNotExistException, FileDoesNotExistException
getLineageInfoList
in interface LineageMaster
LineageInfo
sLineageDoesNotExistException
- if the lineage does not existFileDoesNotExistException
- if any associated file does not existpublic void scheduleCheckpoint(CheckpointPlan plan)
LineageMaster
scheduleCheckpoint
in interface LineageMaster
plan
- the plan for checkpointingpublic void reportLostFile(String path) throws FileDoesNotExistException, AccessControlException, InvalidPathException, UnavailableException
LineageMaster
reportLostFile
in interface LineageMaster
path
- the path to the fileFileDoesNotExistException
- if the file does not existAccessControlException
- if permission checking failsInvalidPathException
- if the path is invalidUnavailableException
Copyright © 2023. All Rights Reserved.