hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-14147 REST Support for Namespaces (Matt Warhaftig)
Date Wed, 09 Sep 2015 05:28:15 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 bbafb47f7 -> 39ec06e5a


HBASE-14147 REST Support for Namespaces (Matt Warhaftig)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/39ec06e5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/39ec06e5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/39ec06e5

Branch: refs/heads/branch-1
Commit: 39ec06e5acc8b60b69473abd95489d894256aec2
Parents: bbafb47
Author: stack <stack@apache.org>
Authored: Tue Sep 8 22:27:38 2015 -0700
Committer: stack <stack@apache.org>
Committed: Tue Sep 8 22:28:08 2015 -0700

----------------------------------------------------------------------
 hbase-rest/pom.xml                              |  2 ++
 .../apache/hadoop/hbase/rest/RootResource.java  |  5 ++++
 .../rest/provider/JAXBContextResolver.java      |  4 +++
 .../org/apache/hadoop/hbase/rest/XMLSchema.xsd  | 28 ++++++++++++++++++++
 4 files changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/39ec06e5/hbase-rest/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml
index 02dad90..75320da 100644
--- a/hbase-rest/pom.xml
+++ b/hbase-rest/pom.xml
@@ -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>

http://git-wip-us.apache.org/repos/asf/hbase/blob/39ec06e5/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java
----------------------------------------------------------------------
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 c425e84..c08bb8b 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();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/39ec06e5/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/provider/JAXBContextResolver.java
----------------------------------------------------------------------
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 216f830..ba91519 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<JAXBContext>
{
     CellModel.class,
     CellSetModel.class,
     ColumnSchemaModel.class,
+    NamespacesModel.class,
+    NamespacesInstanceModel.class,
     RowModel.class,
     ScannerModel.class,
     StorageClusterStatusModel.class,

http://git-wip-us.apache.org/repos/asf/hbase/blob/39ec06e5/hbase-rest/src/main/resources/org/apache/hadoop/hbase/rest/XMLSchema.xsd
----------------------------------------------------------------------
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 ab1b722..53945f3 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 @@
         <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>


Mime
View raw message