hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r608762 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/rest/GenericHandler.java src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java
Date Fri, 04 Jan 2008 06:56:29 GMT
Author: stack
Date: Thu Jan  3 22:56:28 2008
New Revision: 608762

URL: http://svn.apache.org/viewvc?rev=608762&view=rev
Log:
HADOOP-2507 REST servlet does not properly base64 row keys and column names

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/GenericHandler.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=608762&r1=608761&r2=608762&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Thu Jan  3 22:56:28 2008
@@ -101,6 +101,8 @@
    HADOOP-2505 formatter classes missing apache license
    HADOOP-2504 REST servlet method for deleting a scanner was not properly
                mapped (Bryan Duxbury via Stack)
+   HADOOP-2507 REST servlet does not properly base64 row keys and column names
+               (Bryan Duxbury via Stack)
    
   IMPROVEMENTS
    HADOOP-2401 Add convenience put method that takes writable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/GenericHandler.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/GenericHandler.java?rev=608762&r1=608761&r2=608762&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/GenericHandler.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/GenericHandler.java
Thu Jan  3 22:56:28 2008
@@ -231,7 +231,9 @@
   throws IllegalStateException, IllegalArgumentException, IOException {
     for (Map.Entry<Text, byte[]> e: m.entrySet()) {
       outputter.startTag(COLUMN);
-      doElement(outputter, "name", e.getKey().toString());
+      doElement(outputter, "name", 
+        org.apache.hadoop.hbase.util.Base64.encodeBytes(
+          e.getKey().getBytes()));
       // We don't know String from binary data so we always base64 encode.
       doElement(outputter, "value",
         org.apache.hadoop.hbase.util.Base64.encodeBytes(e.getValue()));

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java?rev=608762&r1=608761&r2=608762&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/rest/ScannerHandler.java
Thu Jan  3 22:56:28 2008
@@ -180,12 +180,15 @@
     outputter.startTag(ROW);
     
     // write the row key
-    doElement(outputter, "name", key.getRow().toString());
+    doElement(outputter, "name", 
+      org.apache.hadoop.hbase.util.Base64.encodeBytes(key.getRow().getBytes()));
     
     // Normally no column is supplied when scanning.
     if (key.getColumn() != null &&
         key.getColumn().getLength() > 0) {
-      doElement(outputter, "key-column", key.getColumn().toString());
+      doElement(outputter, "key-column", 
+        org.apache.hadoop.hbase.util.Base64.encodeBytes(
+          key.getColumn().getBytes()));
     }
     
     doElement(outputter, "timestamp", Long.toString(key.getTimestamp()));



Mime
View raw message