hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1584858 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
Date Fri, 04 Apr 2014 18:18:46 GMT
Author: liyin
Date: Fri Apr  4 18:18:45 2014
New Revision: 1584858

URL: http://svn.apache.org/r1584858
Log:
[HBASE-9930] Add back the metascan functions which take byte[] as input.

Author: manukranthk

Summary: This diff adds metascan functions in MetaScanner which are similar to the original
functions.

Test Plan: Simple change.

Reviewers: daviddeng

Reviewed By: daviddeng

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1258271

Task ID: 3540638

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java?rev=1584858&r1=1584857&r2=1584858&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java Fri
Apr  4 18:18:45 2014
@@ -70,6 +70,13 @@ public class MetaScanner {
     metaScan(configuration, visitor, tableName, null, Integer.MAX_VALUE);
   }
 
+  public static void metaScan(Configuration configuration,
+      MetaScannerVisitor visitor, byte[] tableName)
+  throws IOException {
+    metaScan(configuration, visitor, new StringBytes(tableName),
+        null, Integer.MAX_VALUE);
+  }
+
   /**
    * Scans the meta table and calls a visitor on each RowResult. Uses a table
    * name and a row name to locate meta regions. And it only scans at most
@@ -92,6 +99,14 @@ public class MetaScanner {
         tableName, row, rowLimit);
   }
 
+  public static void metaScan(Configuration configuration,
+      MetaScannerVisitor visitor, byte[] tableName, byte[] row,
+      int rowLimit)
+  throws IOException {
+    metaScan(configuration, visitor, HConstants.META_TABLE_NAME_STRINGBYTES,
+        new StringBytes(tableName), row, rowLimit);
+  }
+
   /**
    * Scans the meta table and calls a visitor on each RowResult. Uses a table
    * name and a row name to locate meta regions. And it only scans at most
@@ -197,6 +212,14 @@ public class MetaScanner {
     } while (Bytes.compareTo(startRow, HConstants.LAST_ROW) != 0);
   }
 
+  public static void metaScan(Configuration configuration, MetaScannerVisitor visitor,
+      byte[] metaTableName, byte[] tableName, byte[] row,
+      int rowLimit) throws IOException{
+    metaScan(configuration, visitor,
+        HConstants.META_TABLE_NAME_STRINGBYTES,
+        new StringBytes(tableName), row, rowLimit);
+  }
+
   /**
    * Visitor class called to process each row of the .META. table
    */



Mime
View raw message