hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r682953 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HTable.java src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java src/test/org/apache/hadoop/hbase/client/TestHTable.java
Date Tue, 05 Aug 2008 21:27:43 GMT
Author: stack
Date: Tue Aug  5 14:27:40 2008
New Revision: 682953

URL: http://svn.apache.org/viewvc?rev=682953&view=rev
Log:
HBASE-796 Deprecates Text/String methods from HTable and modifies all classes that used Text/String
methods so that they use byte[] instead

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestHTable.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=682953&r1=682952&r2=682953&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Tue Aug  5 14:27:40 2008
@@ -16,6 +16,8 @@
                0.17.0-dev.2008-02-07_12-01-58. (Tom White via Stack) 
    HBASE-696   Make bloomfilter true/false and self-sizing
    HBASE-720   clean up inconsistencies around deletes (Izaak Rubin via Stack)
+   HBASE-796   Deprecates Text methods from HTable
+               (Michael Gottesman via Stack)
 
   BUG FIXES
    HBASE-574   HBase does not load hadoop native libs (Rong-En Fan via Stack)

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java?rev=682953&r1=682952&r2=682953&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java Tue Aug  5 14:27:40
2008
@@ -58,6 +58,7 @@
    *
    * @param tableName name of the table
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public HTable(final Text tableName)
   throws IOException {
@@ -92,6 +93,7 @@
    * @param conf configuration object
    * @param tableName name of the table
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public HTable(HBaseConfiguration conf, final Text tableName)
   throws IOException {
@@ -129,6 +131,7 @@
    * @param tableName name of table to check
    * @return true if table is on-line
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public static boolean isTableEnabled(Text tableName) throws IOException {
     return isTableEnabled(tableName.getBytes());
@@ -155,6 +158,7 @@
    * @param tableName name of table to check
    * @return true if table is on-line
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public static boolean isTableEnabled(HBaseConfiguration conf, Text tableName)
   throws IOException {
@@ -188,6 +192,7 @@
    * @param row Row to find.
    * @return Location of row.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public HRegionLocation getRegionLocation(final Text row)
   throws IOException {
@@ -319,6 +324,7 @@
    * @param column column name
    * @return value for specified row/column
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Cell get(final Text row, final Text column)
   throws IOException {
@@ -333,6 +339,7 @@
    * @param numVersions - number of versions to retrieve
    * @return value for specified row/column
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Cell[] get(final Text row, final Text column, int numVersions)
   throws IOException {
@@ -417,6 +424,7 @@
    * @param numVersions - number of versions to retrieve
    * @return            - array of values that match the above criteria
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Cell[] get(final Text row, final Text column,
     final long timestamp, final int numVersions)
@@ -481,6 +489,7 @@
    * @param row row key
    * @return RowResult is empty if row does not exist.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public RowResult getRow(final Text row) throws IOException {
     return getRow(row.getBytes());
@@ -515,6 +524,7 @@
    * @param ts timestamp
    * @return RowResult is empty if row does not exist.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public RowResult getRow(final Text row, final long ts) 
   throws IOException {
@@ -561,6 +571,7 @@
    * @param columns Array of column names and families you want to retrieve.
    * @return RowResult is empty if row does not exist.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public RowResult getRow(final Text row, final Text[] columns) 
   throws IOException {
@@ -601,6 +612,7 @@
    * @param ts timestamp
    * @return RowResult is empty if row does not exist.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public RowResult getRow(final Text row, final Text [] columns, 
     final long ts) 
@@ -656,6 +668,7 @@
    * <code>\+|^&*$[]]}{)(</code>.
    * @return scanner
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Scanner getScanner(final Text [] columns)
   throws IOException {
@@ -691,6 +704,7 @@
    * @param startRow starting row in table to scan
    * @return scanner
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Scanner getScanner(final Text [] columns, final Text startRow)
   throws IOException {
@@ -832,6 +846,7 @@
    * @param timestamp only return results whose timestamp <= this value
    * @return scanner
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Scanner getScanner(final Text[] columns,
     final Text startRow, final Text stopRow, final long timestamp)
@@ -904,6 +919,7 @@
    * @param filter a row filter using row-key regexp and/or column data filter.
    * @return scanner
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public Scanner getScanner(Text[] columns,
     Text startRow, long timestamp, RowFilterInterface filter)
@@ -970,6 +986,7 @@
    *
    * @param row Key of the row you want to completely delete.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public void deleteAll(final Text row) throws IOException {
     deleteAll(row, null);
@@ -1027,6 +1044,7 @@
    * @param row Key of the row you want to completely delete.
    * @param ts Delete all cells of the same timestamp or older.
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */
   public void deleteAll(final Text row, final long ts)
   throws IOException {
@@ -1038,6 +1056,7 @@
    * @param row Row to update
    * @param column name of column whose value is to be deleted
    * @throws IOException 
+   * @deprecated Use String or byte [] overload instead
    */
   public void deleteAll(final Text row, final Text column) throws IOException {
     deleteAll(row, column, HConstants.LATEST_TIMESTAMP);
@@ -1061,6 +1080,7 @@
    * @param column name of column whose value is to be deleted
    * @param ts Delete all cells of the same timestamp or older.
    * @throws IOException 
+   * @deprecated Use String or byte [] overload instead
    */
   public void deleteAll(final Text row, final Text column, final long ts)
   throws IOException {
@@ -1114,6 +1134,7 @@
    * @param family The column family to match
    * @param timestamp Timestamp to match
    * @throws IOException
+   * @deprecated Use String or byte [] overload instead
    */  
   public void deleteFamily(final Text row, final Text family,
       final long timestamp)

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java?rev=682953&r1=682952&r2=682953&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java Tue Aug
 5 14:27:40 2008
@@ -29,10 +29,6 @@
 import org.apache.hadoop.hbase.io.BatchUpdate;
 import org.apache.hadoop.hbase.client.HTable;
 
-import org.apache.hadoop.hbase.HBaseClusterTestCase;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.LocalHBaseCluster;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.util.Bytes;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestHTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestHTable.java?rev=682953&r1=682952&r2=682953&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestHTable.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestHTable.java Tue Aug  5
14:27:40 2008
@@ -191,7 +191,7 @@
     */
   public void testTableNotFoundExceptionWithoutAnyTables() {
     try {
-      new HTable(conf, new Text("notATable"));
+      new HTable(conf, "notATable");
       fail("Should have thrown a TableNotFoundException");
     } catch (TableNotFoundException e) {
       // expected
@@ -214,7 +214,7 @@
       admin.createTable(testTableADesc);
 
       // This should throw a TableNotFoundException, it has not been created
-      new HTable(conf, new Text("notATable"));
+      new HTable(conf, "notATable");
       
       fail("Should have thrown a TableNotFoundException");
     } catch (TableNotFoundException e) {



Mime
View raw message