hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r678537 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/rest/MetaHandler.java src/java/org/apache/hadoop/hbase/rest/TableHandler.java
Date Mon, 21 Jul 2008 19:28:44 GMT
Author: stack
Date: Mon Jul 21 12:28:44 2008
New Revision: 678537

URL: http://svn.apache.org/viewvc?rev=678537&view=rev
Log:
HBASE-757 REST mangles table names

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/MetaHandler.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableHandler.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=678537&r1=678536&r2=678537&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Jul 21 12:28:44 2008
@@ -303,6 +303,7 @@
                (Jean-Daniel Cryans via Stack)
    HBASE-756   In HBase shell, the put command doesn't process the timestamp
                (Jean-Daniel Cryans via Stack)
+   HBASE-757   REST mangles table names (Sishen via Stack)
 
   NEW FEATURES
    HBASE-47    Option to set TTL for columns in hbase

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/MetaHandler.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/MetaHandler.java?rev=678537&r1=678536&r2=678537&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/MetaHandler.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/MetaHandler.java Mon Jul 21 12:28:44
2008
@@ -29,6 +29,7 @@
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.znerd.xmlenc.XMLOutputter;
 
 
@@ -85,7 +86,7 @@
           XMLOutputter outputter = getXMLOutputter(response.getWriter());
           outputter.startTag("tables");
           for (int i = 0; i < tables.length; i++) {
-            doElement(outputter, "table", tables[i].getName().toString());
+            doElement(outputter, "table", Bytes.toString(tables[i].getName()));
           }
           outputter.endTag();
           outputter.endDocument();
@@ -96,7 +97,7 @@
             ContentType.PLAIN.toString());
           PrintWriter out = response.getWriter();
           for (int i = 0; i < tables.length; i++) {
-            out.println(tables[i].getName().toString());
+            out.println(Bytes.toString(tables[i].getName()));
           }
           out.close();
         break;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableHandler.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableHandler.java?rev=678537&r1=678536&r2=678537&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableHandler.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableHandler.java Mon Jul 21
12:28:44 2008
@@ -391,7 +391,7 @@
     HTableDescriptor [] tables = this.admin.listTables();
     HTableDescriptor descriptor = null;
     for (int i = 0; i < tables.length; i++) {
-      if (tables[i].getName().toString().equals(tableName)) {
+      if (Bytes.toString(tables[i].getName()).equals(tableName)) {
         descriptor = tables[i];
         break;
       }
@@ -406,7 +406,7 @@
         setResponseHeader(response, 200, ContentType.XML.toString());
         XMLOutputter outputter = getXMLOutputter(response.getWriter());
         outputter.startTag("table");
-        doElement(outputter, "name", descriptor.getName().toString());
+        doElement(outputter, "name", Bytes.toString(descriptor.getName()));
         outputter.startTag("columnfamilies");
         for (HColumnDescriptor e: descriptor.getFamilies()) {
           outputter.startTag("columnfamily");



Mime
View raw message