hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r685984 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HTable.java src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Thu, 14 Aug 2008 18:21:53 GMT
Author: jimk
Date: Thu Aug 14 11:21:53 2008
New Revision: 685984

URL: http://svn.apache.org/viewvc?rev=685984&view=rev
Log:
HBASE-831   committing BatchUpdate with no row should complain

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=685984&r1=685983&r2=685984&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Thu Aug 14 11:21:53 2008
@@ -23,6 +23,7 @@
    HBASE-808,809 MAX_VERSIONS not respected, and Deletall doesn't and inserts
                after delete don't work as expected
                (Jean-Daniel Cryans via Stack)
+   HBASE-831   committing BatchUpdate with no row should complain
 
   IMPROVEMENTS
    HBASE-801  When a table haven't disable, shell could response in a "user

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=685984&r1=685983&r2=685984&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 Thu Aug 14 11:21:53
2008
@@ -1252,6 +1252,8 @@
   public synchronized void commit(final BatchUpdate batchUpdate,
       final RowLock rl) 
   throws IOException {
+    if (batchUpdate.getRow() == null)
+      throw new IllegalArgumentException("update has null row");
     connection.getRegionServerWithRetries(
       new ServerCallable<Boolean>(connection, tableName, batchUpdate.getRow()) {
         public Boolean call() throws IOException {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=685984&r1=685983&r2=685984&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Thu
Aug 14 11:21:53 2008
@@ -1129,6 +1129,8 @@
   /** {@inheritDoc} */
   public void batchUpdate(final byte [] regionName, BatchUpdate b, long lockId)
   throws IOException {
+    if (b.getRow() == null)
+      throw new IllegalArgumentException("update has null row");
     checkOpen();
     this.requestCount.incrementAndGet();
     HRegion region = getRegion(regionName);



Mime
View raw message