hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r940115 - /hadoop/hbase/branches/0.20/src/contrib/transactional/src/java/org/apache/hadoop/hbase/client/transactional/HBaseBackedTransactionLogger.java
Date Sat, 01 May 2010 21:49:39 GMT
Author: stack
Date: Sat May  1 21:49:39 2010
New Revision: 940115

URL: http://svn.apache.org/viewvc?rev=940115&view=rev
Log:
HBASE-2493 [Transactional Contrib] Avoid unsafe concurrent use of HTable

Modified:
    hadoop/hbase/branches/0.20/src/contrib/transactional/src/java/org/apache/hadoop/hbase/client/transactional/HBaseBackedTransactionLogger.java

Modified: hadoop/hbase/branches/0.20/src/contrib/transactional/src/java/org/apache/hadoop/hbase/client/transactional/HBaseBackedTransactionLogger.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/contrib/transactional/src/java/org/apache/hadoop/hbase/client/transactional/HBaseBackedTransactionLogger.java?rev=940115&r1=940114&r2=940115&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/contrib/transactional/src/java/org/apache/hadoop/hbase/client/transactional/HBaseBackedTransactionLogger.java
(original)
+++ hadoop/hbase/branches/0.20/src/contrib/transactional/src/java/org/apache/hadoop/hbase/client/transactional/HBaseBackedTransactionLogger.java
Sat May  1 21:49:39 2010
@@ -95,11 +95,7 @@ public class HBaseBackedTransactionLogge
 
     do {
       id = random.nextLong();
-      try {
       existing = getStatusForTransaction(id);
-      } catch (IOException e) {
-        throw new RuntimeException(e);
-      }
     } while (existing != null);
     
     setStatusForTransaction(id, TransactionStatus.PENDING);
@@ -107,7 +103,7 @@ public class HBaseBackedTransactionLogge
     return id;
   }
 
-  public TransactionStatus getStatusForTransaction(long transactionId) throws IOException
{
+  public TransactionStatus getStatusForTransaction(long transactionId) {
     HTable table = getTable();
     try {
       Result result = table.get(new Get(getRow(transactionId)));



Mime
View raw message