You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by sa...@apache.org on 2017/01/14 01:10:09 UTC
phoenix git commit: Use unique name for index
Repository: phoenix
Updated Branches:
refs/heads/encodecolumns2 5e5440ef7 -> c004c6ea2
Use unique name for index
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/c004c6ea
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c004c6ea
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c004c6ea
Branch: refs/heads/encodecolumns2
Commit: c004c6ea20131f8d88d609de884b021996d2cec9
Parents: 5e5440e
Author: Samarth <sa...@salesforce.com>
Authored: Fri Jan 13 17:10:02 2017 -0800
Committer: Samarth <sa...@salesforce.com>
Committed: Fri Jan 13 17:10:02 2017 -0800
----------------------------------------------------------------------
.../src/it/java/org/apache/phoenix/tx/TransactionIT.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/c004c6ea/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
index 83128f1..0521159 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
@@ -263,7 +263,8 @@ public class TransactionIT extends ParallelStatsDisabledIT {
conn.createStatement().execute("UPSERT INTO " + nonTxTableName + " VALUES (3, 'b')");
conn.commit();
- conn.createStatement().execute("CREATE INDEX IDX ON " + nonTxTableName + "(v)");
+ String index = generateUniqueName();
+ conn.createStatement().execute("CREATE INDEX " + index + " ON " + nonTxTableName + "(v)");
// Reset empty column value to an empty value like it is pre-transactions
HTableInterface htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes( nonTxTableName));
List<Put>puts = Lists.newArrayList(new Put(PInteger.INSTANCE.toBytes(1)), new Put(PInteger.INSTANCE.toBytes(2)), new Put(PInteger.INSTANCE.toBytes(3)));
@@ -276,7 +277,7 @@ public class TransactionIT extends ParallelStatsDisabledIT {
htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes( nonTxTableName));
assertTrue(htable.getTableDescriptor().getCoprocessors().contains(PhoenixTransactionalProcessor.class.getName()));
- htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes("IDX"));
+ htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes(index));
assertTrue(htable.getTableDescriptor().getCoprocessors().contains(PhoenixTransactionalProcessor.class.getName()));
conn.createStatement().execute("UPSERT INTO " + nonTxTableName + " VALUES (4, 'c')");
@@ -289,7 +290,7 @@ public class TransactionIT extends ParallelStatsDisabledIT {
conn.createStatement().execute("UPSERT INTO " + nonTxTableName + " VALUES (5, 'd')");
rs = conn.createStatement().executeQuery("SELECT k FROM " + nonTxTableName);
- assertTrue(conn.unwrap(PhoenixConnection.class).getTable(new PTableKey(null, "IDX")).isTransactional());
+ assertTrue(conn.unwrap(PhoenixConnection.class).getTable(new PTableKey(null, index)).isTransactional());
assertTrue(rs.next());
assertEquals(1,rs.getInt(1));
assertTrue(rs.next());