From fa730f89c3ed9244384951f7442163b6d860c215 Mon Sep 17 00:00:00 2001 From: stack Date: Tue, 8 Sep 2015 22:27:38 -0700 Subject: [PATCH] HBASE-14147 REST Support for Namespaces (Matt Warhaftig) --- hbase-rest/pom.xml | 2 ++ .../hadoop/hbase/rest/RootResource.java | 5 ++++ .../rest/provider/JAXBContextResolver.java | 4 +++ .../apache/hadoop/hbase/rest/XMLSchema.xsd | 28 +++++++++++++++++++ 4 files changed, 39 insertions(+) diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml index 2c3ec3f35cb..3443afc088e 100644 --- a/hbase-rest/pom.xml +++ b/hbase-rest/pom.xml @@ -366,6 +366,8 @@ CellMessage.proto CellSetMessage.proto ColumnSchemaMessage.proto + NamespacesMessage.proto + NamespacePropertiesMessage.proto ScannerMessage.proto StorageClusterStatusMessage.proto TableInfoMessage.proto diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java index c425e84afb9..c08bb8ba94a 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java @@ -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(); + } } diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/provider/JAXBContextResolver.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/provider/JAXBContextResolver.java index 216f830ba00..ba915195526 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/provider/JAXBContextResolver.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/provider/JAXBContextResolver.java @@ -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 { CellModel.class, CellSetModel.class, ColumnSchemaModel.class, + NamespacesModel.class, + NamespacesInstanceModel.class, RowModel.class, ScannerModel.class, StorageClusterStatusModel.class, diff --git a/hbase-rest/src/main/resources/org/apache/hadoop/hbase/rest/XMLSchema.xsd b/hbase-rest/src/main/resources/org/apache/hadoop/hbase/rest/XMLSchema.xsd index ab1b7222a29..53945f34bbb 100644 --- a/hbase-rest/src/main/resources/org/apache/hadoop/hbase/rest/XMLSchema.xsd +++ b/hbase-rest/src/main/resources/org/apache/hadoop/hbase/rest/XMLSchema.xsd @@ -178,4 +178,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +