You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2017/05/12 20:25:53 UTC

[18/22] incubator-trafodion git commit: Manual merge fixes

Manual merge fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/41fcd8d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/41fcd8d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/41fcd8d4

Branch: refs/heads/master
Commit: 41fcd8d48a2e8bbeccee741beea0b3d4cad9332f
Parents: befb8fd
Author: Sean Broeder <sb...@edev05.esgyn.local>
Authored: Wed May 10 21:37:59 2017 +0000
Committer: Sean Broeder <sb...@edev05.esgyn.local>
Committed: Wed May 10 21:37:59 2017 +0000

----------------------------------------------------------------------
 .../hadoop/hbase/client/transactional/RMInterface.java  |  6 +++---
 .../hbase/client/transactional/TransactionState.java    |  2 +-
 .../client/transactional/TransactionalScanner.java.tmpl |  8 ++++----
 .../transactional/TrxRegionEndpoint.java.tmpl           | 12 ++++++------
 .../src/main/java/org/trafodion/sql/HTableClient.java   |  3 ++-
 5 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/41fcd8d4/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/RMInterface.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/RMInterface.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/RMInterface.java
index f783b13..8a543aa 100644
--- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/RMInterface.java
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/RMInterface.java
@@ -346,7 +346,7 @@ public class RMInterface {
         else {
             if (LOG.isTraceEnabled()) LOG.trace("RMInterface:registerTransaction - Found TS in map for tx " + ts);
         }
-        HRegionLocation location = ttable.getRegionLocation(row, false /*reload*/);
+        HRegionLocation location = pv_table.getRegionLocation(row, false /*reload*/);
 
         if (LOG.isTraceEnabled()) LOG.trace("RMInterface:registerTransaction - retrieved location with startKey="
               + Hex.encodeHexString(location.getRegionInfo().getStartKey()) + ", endKey="
@@ -367,7 +367,7 @@ public class RMInterface {
 
         // register region with TM.
         if (register) {
-            ts.registerLocation(trLocation);
+            ts.registerLocation(location);
              if (LOG.isTraceEnabled()) LOG.trace("RMInterface:registerTransaction, called registerLocation TransactionRegionLocation [" + trLocation.getRegionInfo().getRegionNameAsString() +  "\nEncodedName: [" + trLocation.getRegionInfo().getEncodedName() + "], endKey: "
                   + Hex.encodeHexString(trLocation.getRegionInfo().getEndKey()) + " to transaction [" + transactionID + "]");
         }
@@ -426,7 +426,7 @@ public class RMInterface {
 
        // register region with TM.
        if (register) {
-          ts.registerLocation(trLocation);
+          ts.registerLocation(location);
           if (LOG.isTraceEnabled()) LOG.trace("static RMInterface:registerTransaction, called registerLocation TransactionRegionLocation [" + trLocation.getRegionInfo().getRegionNameAsString() +  "\nEncodedName: [" + trLocation.getRegionInfo().getEncodedName() + "], endKey: "
                    + Hex.encodeHexString(trLocation.getRegionInfo().getEndKey()) + " to transaction [" + transactionID + "]");
        }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/41fcd8d4/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionState.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionState.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionState.java
index 4b5fdf9..4ee4afb 100644
--- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionState.java
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionState.java
@@ -291,7 +291,7 @@ public class TransactionState {
     }
 
     // Used at the client end - the one performing the mutation - e.g. the SQL process
-    public void registerLocation(final TransactionRegionLocation location) throws IOException {
+    public void registerLocation(final HRegionLocation location) throws IOException {
         byte [] lv_hostname = location.getHostname().getBytes();
         int lv_port = location.getPort();
         long lv_startcode = location.getServerName().getStartcode();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/41fcd8d4/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionalScanner.java.tmpl
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionalScanner.java.tmpl b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionalScanner.java.tmpl
index 35dc84a..86853a7 100755
--- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionalScanner.java.tmpl
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionalScanner.java.tmpl
@@ -159,8 +159,8 @@ public class TransactionalScanner extends AbstractClientScanner {
                 return false;
             }
             else
-                this.currentBeginKey = TransactionManager.binaryIncrementPos(this.currentEndKey,1);
-                //this.currentBeginKey = this.currentEndKey;
+                //this.currentBeginKey = TransactionManager.binaryIncrementPos(this.currentEndKey,1);
+                  this.currentBeginKey = this.currentEndKey;
         }
         else {
             // First call to nextScanner
@@ -175,8 +175,8 @@ public class TransactionalScanner extends AbstractClientScanner {
                       "INFINITE" : Hex.encodeHexString(this.currentBeginKey))
               + " currentEndKey: " + (Bytes.equals(this.currentEndKey, HConstants.EMPTY_END_ROW) ?
                       "INFINITE" : Hex.encodeHexString(this.currentEndKey)));
-        if ( ! (Bytes.equals(this.currentEndKey, HConstants.EMPTY_END_ROW)))
-           this.currentEndKey = TransactionManager.binaryIncrementPos(currentRegion.getEndKey(), -1);
+        //if(this.currentEndKey != HConstants.EMPTY_END_ROW)
+        //   this.currentEndKey = TransactionManager.binaryIncrementPos(currentRegion.getEndKey(), -1);
 
         this.closed = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/41fcd8d4/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl
index b0f9d24..5a67afc 100644
--- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl
@@ -120,7 +120,7 @@ import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
-#ifdef HDP2.3 HDP2.4 CDH5.5 CDH5.7 APACHE1.2
+#ifdef HDP2.3 HDP2.4 CDH5.7 APACHE1.2
 import org.apache.hadoop.hbase.ChoreService;
 import org.apache.hadoop.hbase.ScheduledChore;
 #endif
@@ -4891,7 +4891,7 @@ CoprocessorService, Coprocessor {
     throws IOException {
 
     if (LOG.isTraceEnabled()) LOG.trace("Enter checkAndPut, txid: "
-                + transactionId + ", on HRegion " + this);
+                + transactionId + ", on HRegion " + m_regionDetails);
     TrxTransactionState state = this.beginTransIfNotExist(transactionId, startId);
     if (!state.getStatus().equals(Status.PENDING)) { // Active
        throw new IOException("checkAndPut late checkin for transaction " + transactionId + " in region " + m_regionDetails);
@@ -4909,7 +4909,7 @@ CoprocessorService, Coprocessor {
       get.addColumn(family, qualifier);
 
       // this will call getScanner (and then add a state scan range), and later put will call addWrite and then addRead
-      // would also add a scan range, maybe leave it nnow and optimize later
+      // would also add a scan range, maybe leave it now and optimize later
       Result rs = this.get(transactionId, startId, get);
 
       boolean valueIsNull = value == null ||
@@ -4925,7 +4925,7 @@ CoprocessorService, Coprocessor {
           result = true;
         }
         else {
-          if (LOG.isTraceEnabled()) LOG.trace("checkAndPut - txid " + transactionId + ", row " + Bytes.toStringBinary(row) + ", row in hex " + Hex.encodeHexString(row) + ", first check setting result to false");
+          if (LOG.isTraceEnabled()) LOG.trace("checkAndPut - txid " + transactionId + ", row " + Bytes.toStringBinary(row) + ", row in hex " + Hex.encodeHexString(row) + ", first check setting result to false in region " + m_regionDetails);
           result = false;
         }
       } else if ((!rs.isEmpty()) && !valueIsNull   
@@ -4933,7 +4933,7 @@ CoprocessorService, Coprocessor {
          this.put(transactionId, startId, put);
          result = true;
       } else {
-          if (LOG.isTraceEnabled()) LOG.trace("checkAndPut - txid " + transactionId + ", row " + Bytes.toStringBinary(row) + ", row in hex " + Hex.encodeHexString(row) + ", second check setting result to false");
+          if (LOG.isTraceEnabled()) LOG.trace("checkAndPut - txid " + transactionId + ", row " + Bytes.toStringBinary(row) + ", row in hex " + Hex.encodeHexString(row) + ", second check setting result to false in region " + m_regionDetails);
         result = false;
       }
     } catch (Exception e) {
@@ -4941,7 +4941,7 @@ CoprocessorService, Coprocessor {
       throw new IOException("checkAndPut - " + e.toString());
     }
 
-    if (LOG.isTraceEnabled()) LOG.trace("checkAndPut EXIT - returns " + result + ", transId " + transactionId + ", row " + Bytes.toStringBinary(row) + ", row in hex " + Hex.encodeHexString(row));
+    if (LOG.isTraceEnabled()) LOG.trace("checkAndPut EXIT - returns " + result + ", transId " + transactionId + ", row " + Bytes.toStringBinary(row) + ", row in hex " + Hex.encodeHexString(row) + " in region " + m_regionDetails);
 
     return result;
   }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/41fcd8d4/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
index 0b4e475..48cc1fe 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
@@ -1388,9 +1388,10 @@ public class HTableClient {
                             else {
                                 table.delete(del);
                             }
-                            return true;
+                            return new Boolean(res);
                         }
                     });
+		    return true;
             }
             else {
                 if (useTRex && (transID != 0)) {