|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.server.namenode.NameNode.NameNodeHAContext
protected class NameNode.NameNodeHAContext
Class used to expose NameNode
as context to HAState
Constructor Summary | |
---|---|
protected |
NameNode.NameNodeHAContext()
|
Method Summary | |
---|---|
boolean |
allowStaleReads()
|
void |
checkOperation(NameNode.OperationCategory op)
Check if an operation of given category is allowed |
org.apache.hadoop.hdfs.server.namenode.ha.HAState |
getState()
Get the state from the context |
void |
prepareToStopStandbyServices()
Prepare to exit the standby state |
void |
setState(org.apache.hadoop.hdfs.server.namenode.ha.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() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected NameNode.NameNodeHAContext()
Method Detail |
---|
public void setState(org.apache.hadoop.hdfs.server.namenode.ha.HAState s)
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
state
setState
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
public org.apache.hadoop.hdfs.server.namenode.ha.HAState getState()
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
getState
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
public void startActiveServices() throws IOException
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
startActiveServices
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
IOException
public void stopActiveServices() throws IOException
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
stopActiveServices
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
IOException
public void startStandbyServices() throws IOException
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
startStandbyServices
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
IOException
public void prepareToStopStandbyServices() throws org.apache.hadoop.ha.ServiceFailedException
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
prepareToStopStandbyServices
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
org.apache.hadoop.ha.ServiceFailedException
public void stopStandbyServices() throws IOException
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
stopStandbyServices
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
IOException
public void writeLock()
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
writeLock
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
public void writeUnlock()
org.apache.hadoop.hdfs.server.namenode.ha.HAContext
HAContext.writeLock()
writeUnlock
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
public void checkOperation(NameNode.OperationCategory op) throws org.apache.hadoop.ipc.StandbyException
checkOperation
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
org.apache.hadoop.ipc.StandbyException
public boolean allowStaleReads()
allowStaleReads
in interface org.apache.hadoop.hdfs.server.namenode.ha.HAContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |