Class MembershipStatePBImpl
java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
org.apache.hadoop.hdfs.server.federation.store.records.MembershipState
org.apache.hadoop.hdfs.server.federation.store.records.impl.pb.MembershipStatePBImpl
- All Implemented Interfaces:
Comparable<BaseRecord>,FederationNamenodeContext,PBRecord
Protobuf implementation of the MembershipState record.
-
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.federation.store.records.MembershipState
ERROR_MSG_NO_BP_SPECIFIED, ERROR_MSG_NO_NS_SPECIFIED, ERROR_MSG_NO_RPC_ADDR_SPECIFIED, ERROR_MSG_NO_WEB_ADDR_SPECIFIED, NAME_COMPARATORFields inherited from class org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
ERROR_MSG_CREATION_TIME_NEGATIVE, ERROR_MSG_MODIFICATION_TIME_NEGATIVE -
Constructor Summary
ConstructorsConstructorDescriptionMembershipStatePBImpl(org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.NamenodeMembershipRecordProto proto) -
Method Summary
Modifier and TypeMethodDescriptionlongGet the creation time for the record.longGet the modification time for the record.booleanlongGet the Lifeline RPC server address of the namenode.Identifier for the namenode.Identifier for the nameservice/namespace.org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.NamenodeMembershipRecordProtogetProto()Get the protocol for the record.Get the RPC server address of the namenode.Get the Service RPC server address of the namenode.getState()The current state of the namenode (active, standby, etc).getStats()Get the HTTP(s) server address of the namenode.Get the Scheme of web address of the namenode.voidreadInstance(String base64String) Populate this record with serialized data.voidsetBlockPoolId(String blockPoolId) voidsetClusterId(String clusterId) voidsetDateCreated(long time) Set the creation time for the record.voidsetDateModified(long time) Set the modification time for the record.voidsetIsSafeMode(boolean isSafeMode) voidsetLastContact(long contact) voidsetLifelineAddress(String lifelineAddress) voidsetNamenodeId(String namenodeId) voidsetNameserviceId(String nameserviceId) voidsetProto(org.apache.hadoop.thirdparty.protobuf.Message proto) Set the protocol for the record.voidsetRouterId(String routerId) voidsetRpcAddress(String rpcAddress) voidsetServiceAddress(String serviceAddress) voidvoidsetStats(MembershipStats stats) voidsetWebAddress(String webAddress) voidsetWebScheme(String webScheme) Methods inherited from class org.apache.hadoop.hdfs.server.federation.store.records.MembershipState
checkExpired, compareNameTo, compareTo, getDeletionMs, getExpirationMs, getNamenodeKey, getNamenodeKey, getPrimaryKeys, isAvailable, isExpired, like, newInstance, newInstance, overrideState, setDeletionMs, setExpirationMs, toString, validateMethods inherited from class org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
equals, generateMashupKey, getPrimaryKey, hashCode, hasOtherFields, init, shouldBeDeleted
-
Constructor Details
-
MembershipStatePBImpl
public MembershipStatePBImpl() -
MembershipStatePBImpl
public MembershipStatePBImpl(org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.NamenodeMembershipRecordProto proto)
-
-
Method Details
-
getProto
public org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.NamenodeMembershipRecordProto getProto()Description copied from interface:PBRecordGet the protocol for the record. -
setProto
public void setProto(org.apache.hadoop.thirdparty.protobuf.Message proto) Description copied from interface:PBRecordSet the protocol for the record. -
readInstance
Description copied from interface:PBRecordPopulate this record with serialized data.- Specified by:
readInstancein interfacePBRecord- Parameters:
base64String- Serialized data in base64.- Throws:
IOException- If it cannot read the data.
-
setRouterId
- Specified by:
setRouterIdin classMembershipState
-
setNameserviceId
- Specified by:
setNameserviceIdin classMembershipState
-
setNamenodeId
- Specified by:
setNamenodeIdin classMembershipState
-
setWebAddress
- Specified by:
setWebAddressin classMembershipState
-
setRpcAddress
- Specified by:
setRpcAddressin classMembershipState
-
setServiceAddress
- Specified by:
setServiceAddressin classMembershipState
-
setLifelineAddress
- Specified by:
setLifelineAddressin classMembershipState
-
setIsSafeMode
public void setIsSafeMode(boolean isSafeMode) - Specified by:
setIsSafeModein classMembershipState
-
setClusterId
- Specified by:
setClusterIdin classMembershipState
-
setBlockPoolId
- Specified by:
setBlockPoolIdin classMembershipState
-
setState
- Specified by:
setStatein classMembershipState
-
setWebScheme
- Specified by:
setWebSchemein classMembershipState
-
getRouterId
- Specified by:
getRouterIdin classMembershipState
-
getNameserviceId
Description copied from interface:FederationNamenodeContextIdentifier for the nameservice/namespace.- Specified by:
getNameserviceIdin interfaceFederationNamenodeContext- Specified by:
getNameserviceIdin classMembershipState- Returns:
- Namenode nameservice identifier.
-
getNamenodeId
Description copied from interface:FederationNamenodeContextIdentifier for the namenode.- Specified by:
getNamenodeIdin interfaceFederationNamenodeContext- Specified by:
getNamenodeIdin classMembershipState- Returns:
- String
-
getClusterId
- Specified by:
getClusterIdin classMembershipState
-
getBlockPoolId
- Specified by:
getBlockPoolIdin classMembershipState
-
getRpcAddress
Description copied from interface:FederationNamenodeContextGet the RPC server address of the namenode.- Specified by:
getRpcAddressin interfaceFederationNamenodeContext- Specified by:
getRpcAddressin classMembershipState- Returns:
- RPC server address in the form of host:port.
-
getServiceAddress
Description copied from interface:FederationNamenodeContextGet the Service RPC server address of the namenode.- Specified by:
getServiceAddressin interfaceFederationNamenodeContext- Specified by:
getServiceAddressin classMembershipState- Returns:
- Service RPC server address in the form of host:port.
-
getWebAddress
Description copied from interface:FederationNamenodeContextGet the HTTP(s) server address of the namenode.- Specified by:
getWebAddressin interfaceFederationNamenodeContext- Specified by:
getWebAddressin classMembershipState- Returns:
- HTTP(s) address in the form of host:port.
-
getLifelineAddress
Description copied from interface:FederationNamenodeContextGet the Lifeline RPC server address of the namenode.- Specified by:
getLifelineAddressin interfaceFederationNamenodeContext- Specified by:
getLifelineAddressin classMembershipState- Returns:
- Lifeline RPC server address in the form of host:port.
-
getIsSafeMode
public boolean getIsSafeMode()- Specified by:
getIsSafeModein classMembershipState
-
getState
Description copied from interface:FederationNamenodeContextThe current state of the namenode (active, standby, etc).- Specified by:
getStatein interfaceFederationNamenodeContext- Specified by:
getStatein classMembershipState- Returns:
- FederationNamenodeServiceState State of the namenode.
-
getWebScheme
Description copied from interface:FederationNamenodeContextGet the Scheme of web address of the namenode.- Specified by:
getWebSchemein interfaceFederationNamenodeContext- Specified by:
getWebSchemein classMembershipState- Returns:
- Scheme of web address (HTTP/HTTPS).
-
setStats
- Specified by:
setStatsin classMembershipState
-
getStats
- Specified by:
getStatsin classMembershipState
-
setLastContact
public void setLastContact(long contact) - Specified by:
setLastContactin classMembershipState
-
getLastContact
public long getLastContact()- Specified by:
getLastContactin classMembershipState
-
setDateModified
public void setDateModified(long time) Description copied from class:BaseRecordSet the modification time for the record.- Specified by:
setDateModifiedin classBaseRecord- Parameters:
time- Modification time of the record.
-
getDateModified
public long getDateModified()Description copied from class:BaseRecordGet the modification time for the record.- Specified by:
getDateModifiedin interfaceFederationNamenodeContext- Specified by:
getDateModifiedin classBaseRecord- Returns:
- Modification time of the record.
-
setDateCreated
public void setDateCreated(long time) Description copied from class:BaseRecordSet the creation time for the record.- Specified by:
setDateCreatedin classBaseRecord- Parameters:
time- Creation time of the record.
-
getDateCreated
public long getDateCreated()Description copied from class:BaseRecordGet the creation time for the record.- Specified by:
getDateCreatedin classBaseRecord- Returns:
- Creation time of the record
-