瀏覽代碼

HADOOP-1711 HTable API should use interfaces instead of concrete classes as method parameters and return values

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@566291 13f79535-47bb-0310-9956-ffa450edef68
Jim Kellerman 18 年之前
父節點
當前提交
447f058483

+ 2 - 1
src/contrib/hbase/CHANGES.txt

@@ -93,4 +93,5 @@ Trunk (unreleased changes)
      serve daughter splits. Phase 2: Master assigns children of split region
      instead of HRegionServer serving both children.
  58. HADOOP-1710 All updates should be batch updates
-
+ 59. HADOOP-1711 HTable API should use interfaces instead of concrete classes as
+     method parameters and return values

+ 1 - 1
src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java

@@ -206,7 +206,7 @@ public abstract class HAbstractScanner implements HInternalScannerInterface {
    * @return true if a match was found
    * @throws IOException
    * 
-   * @see org.apache.hadoop.hbase.HScannerInterface#next(org.apache.hadoop.hbase.HStoreKey, java.util.TreeMap)
+   * @see org.apache.hadoop.hbase.HScannerInterface#next(org.apache.hadoop.hbase.HStoreKey, java.util.SortedMap)
    */
   public boolean next(HStoreKey key, TreeMap<Text, byte []> results)
   throws IOException {

+ 4 - 4
src/contrib/hbase/src/java/org/apache/hadoop/hbase/HScannerInterface.java

@@ -19,10 +19,10 @@
  */
 package org.apache.hadoop.hbase;
 
-import org.apache.hadoop.io.*;
+import org.apache.hadoop.io.Text;
 
-import java.io.*;
-import java.util.*;
+import java.io.IOException;
+import java.util.SortedMap;
 
 /**
  * HScannerInterface iterates through a set of rows.  It's implemented by
@@ -36,7 +36,7 @@ public interface HScannerInterface {
    * @return true if data was returned
    * @throws IOException
    */
-  public boolean next(HStoreKey key, TreeMap<Text, byte[]> results)
+  public boolean next(HStoreKey key, SortedMap<Text, byte[]> results)
   throws IOException;
   
   /**

+ 1 - 1
src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java

@@ -727,7 +727,7 @@ public class HTable implements HConstants {
     /**
      * {@inheritDoc}
      */
-    public boolean next(HStoreKey key, TreeMap<Text, byte[]> results) throws IOException {
+    public boolean next(HStoreKey key, SortedMap<Text, byte[]> results) throws IOException {
       checkClosed();
       if (this.closed) {
         return false;