@InterfaceAudience.Private public class NamespacesInstanceModel extends Object implements Serializable, ProtobufMessageHandler
Modifier and Type | Field and Description |
---|---|
private String |
namespaceName |
private Map<String,String> |
properties |
private static long |
serialVersionUID |
Constructor and Description |
---|
NamespacesInstanceModel()
Default constructor.
|
NamespacesInstanceModel(Admin admin,
String namespaceName)
Constructor
|
NamespacesInstanceModel(String namespaceName)
Constructor to use if namespace does not exist in HBASE.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(String key,
String value)
Add property to the namespace.
|
byte[] |
createProtobufOutput() |
String |
getNamespaceName() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
Map<String,String> |
getProperties() |
String |
toString() |
private static final long serialVersionUID
private Map<String,String> properties
private String namespaceName
public NamespacesInstanceModel()
public NamespacesInstanceModel(String namespaceName) throws IOException
namespaceName
- the namespace name.IOException
public NamespacesInstanceModel(Admin admin, String namespaceName) throws IOException
admin
- the administrative APInamespaceName
- the namespace name.IOException
public void addProperty(String key, String value)
key
- attribute namevalue
- attribute valuepublic Map<String,String> getProperties()
public String getNamespaceName()
public byte[] createProtobufOutput()
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf messageIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.