Class NamespacesInstanceModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.NamespacesInstanceModel
- All Implemented Interfaces:
Serializable,ProtobufMessageHandler
@Private
public class NamespacesInstanceModel
extends Object
implements Serializable, ProtobufMessageHandler
List a HBase namespace's key/value properties.
- NamespaceProperties: outer element
- properties: sequence property elements
- entry
- key: property key
- value: property value
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.NamespacesInstanceModel(String namespaceName) Constructor to use if namespace does not exist in HBASE.NamespacesInstanceModel(Admin admin, String namespaceName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String key, String value) Add property to the namespace.byte[]Returns the protobuf represention of the modelgetObjectFromMessage(byte[] message) Initialize the model from a protobuf representation.Returns The map of uncategorized namespace properties.toString()
-
Field Details
-
serialVersionUID
- See Also:
-
properties
-
namespaceName
-
-
Constructor Details
-
NamespacesInstanceModel
public NamespacesInstanceModel()Default constructor. Do not use. -
NamespacesInstanceModel
Constructor to use if namespace does not exist in HBASE.- Parameters:
namespaceName- the namespace name.- Throws:
IOException
-
NamespacesInstanceModel
Constructor- Parameters:
admin- the administrative APInamespaceName- the namespace name.- Throws:
IOException
-
-
Method Details
-
addProperty
Add property to the namespace.- Parameters:
key- attribute namevalue- attribute value
-
getProperties
Returns The map of uncategorized namespace properties. -
getNamespaceName
-
toString
-
createProtobufOutput
Description copied from interface:ProtobufMessageHandlerReturns the protobuf represention of the model- Specified by:
createProtobufOutputin interfaceProtobufMessageHandler
-
getObjectFromMessage
Description copied from interface:ProtobufMessageHandlerInitialize the model from a protobuf representation.- Specified by:
getObjectFromMessagein interfaceProtobufMessageHandler- Parameters:
message- the raw bytes of the protobuf message- Returns:
- reference to self for convenience
- Throws:
IOException
-