NameNode.NameNodeHAContext@Private
public interface HAContext
HAState for getting/setting the
current state and performing required operations.| Modifier and Type | Method | Description |
|---|---|---|
boolean |
allowStaleReads() |
|
void |
checkOperation(NameNode.OperationCategory op) |
Verify that the given operation category is allowed in the current state.
|
HAState |
getState() |
Get the state from the context
|
void |
prepareToStopStandbyServices() |
Prepare to exit the standby state
|
void |
setState(HAState state) |
Set the state of the context to given
state |
void |
startActiveServices() |
Start the services required in active state
|
void |
startStandbyServices() |
Start the services required in standby state
|
void |
stopActiveServices() |
Stop the services when exiting active state
|
void |
stopStandbyServices() |
Stop the services when exiting standby state
|
void |
writeLock() |
Take a write-lock on the underlying namesystem
so that no concurrent state transitions or edits
can be made.
|
void |
writeUnlock() |
Unlock the lock taken by
writeLock() |
void setState(HAState state)
stateHAState getState()
void startActiveServices()
throws java.io.IOException
java.io.IOExceptionvoid stopActiveServices()
throws java.io.IOException
java.io.IOExceptionvoid startStandbyServices()
throws java.io.IOException
java.io.IOExceptionvoid prepareToStopStandbyServices()
throws org.apache.hadoop.ha.ServiceFailedException
org.apache.hadoop.ha.ServiceFailedExceptionvoid stopStandbyServices()
throws java.io.IOException
java.io.IOExceptionvoid writeLock()
void writeUnlock()
writeLock()void checkOperation(NameNode.OperationCategory op) throws org.apache.hadoop.ipc.StandbyException
org.apache.hadoop.ipc.StandbyExceptionboolean allowStaleReads()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.