HBASE-14147 REST Support for Namespaces (Matt Warhaftig)

This commit is contained in:
stack 2015-09-08 22:27:38 -07:00
parent e95358a7fc
commit fa730f89c3
4 changed files with 39 additions and 0 deletions

View File

@ -366,6 +366,8 @@
<include>CellMessage.proto</include>
<include>CellSetMessage.proto</include>
<include>ColumnSchemaMessage.proto</include>
<include>NamespacesMessage.proto</include>
<include>NamespacePropertiesMessage.proto</include>
<include>ScannerMessage.proto</include>
<include>StorageClusterStatusMessage.proto</include>
<include>TableInfoMessage.proto</include>

View File

@ -103,4 +103,9 @@ public class RootResource extends ResourceBase {
final @PathParam("table") String table) throws IOException {
return new TableResource(table);
}
@Path("namespaces")
public NamespacesResource getNamespaceResource() throws IOException {
return new NamespacesResource();
}
}

View File

@ -31,6 +31,8 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.rest.model.CellModel;
import org.apache.hadoop.hbase.rest.model.CellSetModel;
import org.apache.hadoop.hbase.rest.model.ColumnSchemaModel;
import org.apache.hadoop.hbase.rest.model.NamespacesInstanceModel;
import org.apache.hadoop.hbase.rest.model.NamespacesModel;
import org.apache.hadoop.hbase.rest.model.RowModel;
import org.apache.hadoop.hbase.rest.model.ScannerModel;
import org.apache.hadoop.hbase.rest.model.StorageClusterStatusModel;
@ -63,6 +65,8 @@ public class JAXBContextResolver implements ContextResolver<JAXBContext> {
CellModel.class,
CellSetModel.class,
ColumnSchemaModel.class,
NamespacesModel.class,
NamespacesInstanceModel.class,
RowModel.class,
ScannerModel.class,
StorageClusterStatusModel.class,

View File

@ -178,4 +178,32 @@
<attribute name="currentCompactedKVs" type="int"></attribute>
</complexType>
<element name="Namespaces" type="tns:Namespaces"></element>
<complexType name="Namespaces">
<sequence>
<element name="Namespace" type="string"
maxOccurs="unbounded" minOccurs="0">
</element>
</sequence>
</complexType>
<complexType name="NamespaceProperties">
<sequence>
<element name="properties">
<complexType>
<sequence>
<element name="entry" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="key" />
<element type="string" name="value" />
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</schema>