| Modifier | Constructor | Description |
|---|---|---|
protected |
NameNodeHAContext() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
allowStaleReads() |
|
void |
checkOperation(NameNode.OperationCategory op) |
Check if an operation of given category is allowed
|
HAState |
getState() |
Get the state from the context
|
void |
prepareToStopStandbyServices() |
Prepare to exit the standby state
|
void |
setState(HAState s) |
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
HAContext.writeLock() |
public void setState(HAState s)
HAContextstatepublic HAState getState()
HAContextpublic void startActiveServices()
throws java.io.IOException
HAContextstartActiveServices in interface HAContextjava.io.IOExceptionpublic void stopActiveServices()
throws java.io.IOException
HAContextstopActiveServices in interface HAContextjava.io.IOExceptionpublic void startStandbyServices()
throws java.io.IOException
HAContextstartStandbyServices in interface HAContextjava.io.IOExceptionpublic void prepareToStopStandbyServices()
throws org.apache.hadoop.ha.ServiceFailedException
HAContextprepareToStopStandbyServices in interface HAContextorg.apache.hadoop.ha.ServiceFailedExceptionpublic void stopStandbyServices()
throws java.io.IOException
HAContextstopStandbyServices in interface HAContextjava.io.IOExceptionpublic void writeLock()
HAContextpublic void writeUnlock()
HAContextHAContext.writeLock()writeUnlock in interface HAContextpublic void checkOperation(NameNode.OperationCategory op) throws org.apache.hadoop.ipc.StandbyException
checkOperation in interface HAContextorg.apache.hadoop.ipc.StandbyExceptionpublic boolean allowStaleReads()
allowStaleReads in interface HAContextCopyright © 2008–2025 Apache Software Foundation. All rights reserved.