You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2017/05/10 18:04:01 UTC
[02/46] phoenix git commit: Add the context to the table constructor
and change DML/DDL function names
Add the context to the table constructor and change DML/DDL function names
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/1d32eb29
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1d32eb29
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1d32eb29
Branch: refs/heads/omid
Commit: 1d32eb29fa216295976c7f17a329601768c79171
Parents: 7c2ca8c
Author: Ohad Shacham <oh...@yahoo-inc.com>
Authored: Thu Feb 9 16:02:05 2017 +0200
Committer: Ohad Shacham <oh...@yahoo-inc.com>
Committed: Thu Feb 9 16:02:05 2017 +0200
----------------------------------------------------------------------
.../transaction/OmidTransactionContext.java | 16 ++--------------
.../transaction/OmidTransactionTable.java | 4 ++++
.../transaction/PhoenixTransactionContext.java | 19 ++-----------------
.../transaction/TephraTransactionContext.java | 18 +++---------------
.../transaction/TephraTransactionTable.java | 4 ++++
5 files changed, 15 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d32eb29/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionContext.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionContext.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionContext.java
index 5f0bdce..bc5b05b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionContext.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionContext.java
@@ -38,14 +38,14 @@ public class OmidTransactionContext implements PhoenixTransactionContext {
}
@Override
- public void commitDDL(PTable dataTable) throws SQLException,
+ public void commitDDLFence(PTable dataTable) throws SQLException,
InterruptedException, TimeoutException {
// TODO Auto-generated method stub
}
@Override
- public void markDML(PTable table) {
+ public void markDMLFence(PTable table) {
// TODO Auto-generated method stub
}
@@ -57,18 +57,6 @@ public class OmidTransactionContext implements PhoenixTransactionContext {
}
@Override
- public void addTransactionTable(PhoenixTransactionalTable table) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void addTransactionToTable(PhoenixTransactionalTable table) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
public boolean isTransactionRunning() {
// TODO Auto-generated method stub
return false;
http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d32eb29/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
index f5cdd17..5a5291c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
@@ -15,6 +15,10 @@ import org.apache.hadoop.hbase.client.Scan;
public class OmidTransactionTable implements PhoenixTransactionalTable {
+ public OmidTransactionTable(PhoenixTransactionContext ctx) {
+ // TODO Auto-generated constructor stub
+ }
+
@Override
public Result get(Get get) throws IOException {
// TODO Auto-generated method stub
http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d32eb29/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
index b391144..3ac0ae3 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
@@ -51,7 +51,7 @@ public interface PhoenixTransactionContext {
* @throws InterruptedException
* @throws TimeoutException
*/
- public void commitDDL(PTable dataTable)
+ public void commitDDLFence(PTable dataTable)
throws SQLException, InterruptedException, TimeoutException;
/**
@@ -60,7 +60,7 @@ public interface PhoenixTransactionContext {
*
* @param table the table that the DML command works on
*/
- public void markDML(PTable table);
+ public void markDMLFence(PTable table);
/**
* Augment the current context with ctx modified keys
@@ -69,21 +69,6 @@ public interface PhoenixTransactionContext {
*/
public void join(PhoenixTransactionContext ctx);
- /**
- * Add transaction table to the context.
- * Will be mostly used by Tephra, since Omid keeps the changeset inside the transaction while
- * Tephra keeps it distributed at the different awares.
- *
- * @param table
- */
- public void addTransactionTable(PhoenixTransactionalTable table);
-
- /**
- * Add transaction to the table.
- * @param table
- */
- public void addTransactionToTable(PhoenixTransactionalTable table);
-
/**
* Is there a transaction in flight?
*/
http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d32eb29/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
index cfe8e9b..17c70f0 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
@@ -38,14 +38,14 @@ public class TephraTransactionContext implements PhoenixTransactionContext {
}
@Override
- public void commitDDL(PTable dataTable) throws SQLException,
+ public void commitDDLFence(PTable dataTable) throws SQLException,
InterruptedException, TimeoutException {
// TODO Auto-generated method stub
}
@Override
- public void markDML(PTable table) {
+ public void markDMLFence(PTable table) {
// TODO Auto-generated method stub
}
@@ -56,19 +56,7 @@ public class TephraTransactionContext implements PhoenixTransactionContext {
}
- @Override
- public void addTransactionTable(PhoenixTransactionalTable table) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void addTransactionToTable(PhoenixTransactionalTable table) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
+ @Override
public boolean isTransactionRunning() {
// TODO Auto-generated method stub
return false;
http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d32eb29/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionTable.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionTable.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionTable.java
index 09d37c3..0d788c1 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionTable.java
@@ -15,6 +15,10 @@ import org.apache.hadoop.hbase.client.Scan;
public class TephraTransactionTable implements PhoenixTransactionalTable {
+ public TephraTransactionTable(PhoenixTransactionContext ctx) {
+ // TODO Auto-generated constructor stub
+ }
+
@Override
public Result get(Get get) throws IOException {
// TODO Auto-generated method stub