Class DisabledNameservice
java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
org.apache.hadoop.hdfs.server.federation.store.records.DisabledNameservice
- All Implemented Interfaces:
Comparable<BaseRecord>
- Direct Known Subclasses:
DisabledNameservicePBImpl
Data record indicating a specific name service ID has been disabled and
is no longer valid. Allows quick disabling of name services.
-
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
ERROR_MSG_CREATION_TIME_NEGATIVE, ERROR_MSG_MODIFICATION_TIME_NEGATIVE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGet the expiration time for the record.abstract StringGet the identifier of the name service to disable.Map of primary key names to values for the record.booleanIf the record has fields others than the primary keys.static DisabledNameservicestatic DisabledNameservicenewInstance(String nsId) abstract voidsetNameserviceId(String nameServiceId) Set the identifier of the name service to disable.Methods inherited from class org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
checkExpired, compareTo, equals, generateMashupKey, getDateCreated, getDateModified, getDeletionMs, getPrimaryKey, hashCode, init, isExpired, like, setDateCreated, setDateModified, shouldBeDeleted, toString, validate
-
Constructor Details
-
DisabledNameservice
public DisabledNameservice()
-
-
Method Details
-
newInstance
- Throws:
IOException
-
newInstance
- Throws:
IOException
-
getNameserviceId
Get the identifier of the name service to disable.- Returns:
- Identifier of the name service to disable.
-
setNameserviceId
Set the identifier of the name service to disable.- Parameters:
nameServiceId- Identifier of the name service to disable.
-
getPrimaryKeys
Description copied from class:BaseRecordMap of primary key names to values for the record. The primary key can be a combination of 1-n different State Store serialized values.- Specified by:
getPrimaryKeysin classBaseRecord- Returns:
- Map of key/value pairs that constitute this object's primary key.
-
hasOtherFields
public boolean hasOtherFields()Description copied from class:BaseRecordIf the record has fields others than the primary keys. This is used by TestStateStoreDriverBase to skip the modification check.- Overrides:
hasOtherFieldsin classBaseRecord- Returns:
- If the record has more fields.
-
getExpirationMs
public long getExpirationMs()Description copied from class:BaseRecordGet the expiration time for the record.- Specified by:
getExpirationMsin classBaseRecord- Returns:
- Expiration time for the record.
-