@InterfaceAudience.Private @InterfaceStability.Evolving public class WALProcedureStore extends ProcedureStoreBase
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
WALProcedureStore.LeaseRecovery |
static class |
WALProcedureStore.SyncMetrics |
ProcedureStore.ProcedureIterator, ProcedureStore.ProcedureLoader, ProcedureStore.ProcedureStoreListener| 限定符和类型 | 字段和说明 |
|---|---|
static String |
MAX_RETRIES_BEFORE_ROLL_CONF_KEY |
static String |
MAX_SYNC_FAILURE_ROLL_CONF_KEY |
static String |
PERIODIC_ROLL_CONF_KEY |
static String |
ROLL_RETRIES_CONF_KEY |
static String |
ROLL_THRESHOLD_CONF_KEY |
static String |
STORE_WAL_SYNC_STATS_COUNT |
static String |
SYNC_WAIT_MSEC_CONF_KEY |
static String |
USE_HSYNC_CONF_KEY |
static String |
WAIT_BEFORE_ROLL_CONF_KEY |
| 构造器和说明 |
|---|
WALProcedureStore(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path walDir,
WALProcedureStore.LeaseRecovery leaseRecovery) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
delete(long procId)
The specified procId was removed from the executor,
due to completion, abort or failure.
|
void |
delete(Procedure proc,
long[] subProcIds)
The parent procedure completed.
|
ArrayList<ProcedureWALFile> |
getActiveLogs() |
Set<ProcedureWALFile> |
getCorruptedLogs() |
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
protected org.apache.hadoop.fs.Path |
getLogFilePath(long logId) |
long |
getMillisFromLastRoll() |
long |
getMillisToNextPeriodicRoll() |
int |
getNumThreads() |
ProcedureStoreTracker |
getStoreTracker() |
ArrayList<WALProcedureStore.SyncMetrics> |
getSyncMetrics() |
org.apache.hadoop.fs.Path |
getWALDir() |
void |
insert(Procedure proc,
Procedure[] subprocs)
When a procedure is submitted to the executor insert(proc, null) will be called.
|
void |
load(ProcedureStore.ProcedureLoader loader)
Load the Procedures in the store.
|
protected void |
periodicRollForTesting() |
void |
recoverLease()
Acquire the lease for the procedure store.
|
protected boolean |
rollWriterForTesting() |
void |
start(int numSlots)
Start/Open the procedure store
|
void |
stop(boolean abort)
Stop/Close the procedure store
|
protected long |
syncSlots(org.apache.hadoop.fs.FSDataOutputStream stream,
ByteSlot[] slots,
int offset,
int count) |
void |
update(Procedure proc)
The specified procedure was executed,
and the new state should be written to the store.
|
isRunning, registerListener, sendAbortProcessSignal, sendPostSyncSignal, setRunning, unregisterListenerpublic static final String MAX_RETRIES_BEFORE_ROLL_CONF_KEY
public WALProcedureStore(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path walDir,
WALProcedureStore.LeaseRecovery leaseRecovery)
public void start(int numSlots)
throws IOException
ProcedureStoreIOExceptionpublic void stop(boolean abort)
ProcedureStoreabort - true if the stop is an abortpublic int getNumThreads()
public ProcedureStoreTracker getStoreTracker()
public ArrayList<ProcedureWALFile> getActiveLogs()
public Set<ProcedureWALFile> getCorruptedLogs()
public void recoverLease()
throws IOException
ProcedureStoreIOExceptionpublic void load(ProcedureStore.ProcedureLoader loader) throws IOException
ProcedureStoreloader - the ProcedureLoader that will handle the store-load eventsIOExceptionpublic void insert(Procedure proc, Procedure[] subprocs)
ProcedureStoreproc - the procedure to serialize and write to the store.subprocs - the newly created child of the proc.public void update(Procedure proc)
ProcedureStoreproc - the procedure to serialize and write to the store.public void delete(long procId)
ProcedureStoreprocId - the ID of the procedure to remove.public void delete(Procedure proc, long[] subProcIds)
ProcedureStoreproc - the parent procedure to serialize and write to the store.subProcIds - the IDs of the sub-procedure to remove.public ArrayList<WALProcedureStore.SyncMetrics> getSyncMetrics()
protected long syncSlots(org.apache.hadoop.fs.FSDataOutputStream stream,
ByteSlot[] slots,
int offset,
int count)
throws IOException
IOExceptionpublic long getMillisToNextPeriodicRoll()
public long getMillisFromLastRoll()
protected void periodicRollForTesting()
throws IOException
IOExceptionprotected boolean rollWriterForTesting()
throws IOException
IOExceptionpublic org.apache.hadoop.fs.Path getWALDir()
public org.apache.hadoop.fs.FileSystem getFileSystem()
protected org.apache.hadoop.fs.Path getLogFilePath(long logId)
throws IOException
IOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.