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
-
Constructor Summary
ConstructorDescriptionDefault constructor.NamespacesInstanceModel
(String namespaceName) Constructor to use if namespace does not exist in HBASE.NamespacesInstanceModel
(Admin admin, String namespaceName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(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:ProtobufMessageHandler
Returns the protobuf represention of the model- Specified by:
createProtobufOutput
in interfaceProtobufMessageHandler
-
getObjectFromMessage
Description copied from interface:ProtobufMessageHandler
Initialize the model from a protobuf representation.- Specified by:
getObjectFromMessage
in interfaceProtobufMessageHandler
- Parameters:
message
- the raw bytes of the protobuf message- Returns:
- reference to self for convenience
- Throws:
IOException
-