Interface RouterRpcMonitor
- All Known Implementing Classes:
FederationRPCPerformanceMonitor
public interface RouterRpcMonitor
Metrics and monitoring interface for the router RPC server. Allows pluggable
diagnostics and monitoring services to be attached.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the monitor.Get Router RPC metrics info.voidinit(org.apache.hadoop.conf.Configuration conf, RouterRpcServer server, StateStoreService store) Initialize the monitor.longproxyOp()Start proxying an operation to the Namenode.voidproxyOpComplete(boolean success, String nsId, FederationNamenodeServiceState state) Mark a proxy operation as completed.voidFailed to proxy an operation to a Namenode because the client was overloaded.voidFailed to proxy an operation to a namenode because of an unexpected exception.voidproxyOpFailureStandby(String nsId) Failed to proxy an operation to a namenode because it was in standby.voidproxyOpNoNamenodes(String nsId) Failed to proxy an operation because of no namenodes available.voidFailed to proxy an operation because it is not implemented.voidproxyOpPermitAccepted(String nsId) Accepted to proxy an operation to a namenode.voidproxyOpPermitRejected(String nsId) Rejected to proxy an operation to a namenode.voidRetry to proxy an operation to a Namenode because of an unexpected exception.voidIf a path is locked.voidIf a path is in a read only mount point.voidIf the Router is in safe mode.voidIf the Router cannot contact the State Store in an operation.voidstartOp()Start processing an operation on the Router.
-
Method Details
-
init
void init(org.apache.hadoop.conf.Configuration conf, RouterRpcServer server, StateStoreService store) Initialize the monitor.- Parameters:
conf- Configuration for the monitor.server- RPC server.store- State Store.
-
getRPCMetrics
FederationRPCMetrics getRPCMetrics()Get Router RPC metrics info.- Returns:
- The instance of FederationRPCMetrics.
-
close
void close()Close the monitor. -
startOp
void startOp()Start processing an operation on the Router. -
proxyOp
long proxyOp()Start proxying an operation to the Namenode.- Returns:
- id of the thread doing the proxying.
-
proxyOpComplete
Mark a proxy operation as completed.- Parameters:
success- if the operation was successful.nsId- nameservice id.state- namenode state in the federation.
-
proxyOpFailureStandby
Failed to proxy an operation to a namenode because it was in standby.- Parameters:
nsId- nameservice id.
-
proxyOpFailureCommunicate
Failed to proxy an operation to a namenode because of an unexpected exception.- Parameters:
nsId- nameservice id.
-
proxyOpPermitRejected
Rejected to proxy an operation to a namenode.- Parameters:
nsId- nameservice id.
-
proxyOpPermitAccepted
Accepted to proxy an operation to a namenode.- Parameters:
nsId- nameservice id.
-
proxyOpFailureClientOverloaded
void proxyOpFailureClientOverloaded()Failed to proxy an operation to a Namenode because the client was overloaded. -
proxyOpNotImplemented
void proxyOpNotImplemented()Failed to proxy an operation because it is not implemented. -
proxyOpRetries
void proxyOpRetries()Retry to proxy an operation to a Namenode because of an unexpected exception. -
proxyOpNoNamenodes
Failed to proxy an operation because of no namenodes available.- Parameters:
nsId- nameservice id.
-
routerFailureStateStore
void routerFailureStateStore()If the Router cannot contact the State Store in an operation. -
routerFailureSafemode
void routerFailureSafemode()If the Router is in safe mode. -
routerFailureLocked
void routerFailureLocked()If a path is locked. -
routerFailureReadOnly
void routerFailureReadOnly()If a path is in a read only mount point.
-