[phoenix] branch master updated: PHOENIX-6675 create-release script broken by upgrade to Yetus 0.13
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new bc080c3 PHOENIX-6675 create-release script broken by upgrade to Yetus 0.13 bc080c3 is described below commit bc080c3ddf6253c3cef3418d7da86b5bd5d8bbe3 Author: Istvan Toth AuthorDate: Fri Mar 25 08:38:38 2022 +0100 PHOENIX-6675 create-release script broken by upgrade to Yetus 0.13 --- dev/create-release/phoenix-rm/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/create-release/phoenix-rm/Dockerfile b/dev/create-release/phoenix-rm/Dockerfile index be91e9a..9aa97aa 100644 --- a/dev/create-release/phoenix-rm/Dockerfile +++ b/dev/create-release/phoenix-rm/Dockerfile @@ -38,12 +38,15 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \ maven='3.6.0-*' \ openjdk-8-jdk='8*' \ python-pip='9.0.1-*' \ +python3-pip='9.0.1-*' \ subversion='1.9.7-*' \ wget='1.19.4-*' \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \ && pip install \ +python-dateutil==2.8.1 \ + && pip3 install \ python-dateutil==2.8.1 # Install Apache Yetus ENV YETUS_VERSION 0.13.0
[phoenix-queryserver] branch master updated: PHOENIX-6614: QueryServerTest fails for hostname upper case letters
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git The following commit(s) were added to refs/heads/master by this push: new 121ba72 PHOENIX-6614: QueryServerTest fails for hostname upper case letters 121ba72 is described below commit 121ba724221416aa93ac01552cdb9741fc1e6177 Author: Vitalii Diravka AuthorDate: Thu Dec 16 20:12:04 2021 +0200 PHOENIX-6614: QueryServerTest fails for hostname upper case letters --- .../java/org/apache/phoenix/queryserver/server/QueryServerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerTest.java b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerTest.java index bf6acff..64eab60 100644 --- a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerTest.java +++ b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerTest.java @@ -40,7 +40,7 @@ public class QueryServerTest { @BeforeClass public static void setupOnce() throws IOException { -EXPECTED_HOSTNAME = InetAddress.getLocalHost().getCanonicalHostName(); +EXPECTED_HOSTNAME = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase(); } @Before
[phoenix-queryserver] branch master updated (1f36031 -> a659fa9)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git. from 1f36031 PHOENIX-6664 Update Jetty to 9.4.43.v20210629 in PQS add a659fa9 PHOENIX-6613 QueryServerBasicsIT usage by external tools No new revisions were added by this update. Summary of changes: .../src/it/java/org/apache/phoenix/end2end/QueryServerBasicsIT.java | 4 .../src/it/java/org/apache/phoenix/end2end/TlsUtil.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
[phoenix] branch 4.16 updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new ea972b9 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) ea972b9 is described below commit ea972b965d149aee0d5302a80fdb2e073a0109e8 Author: Istvan Toth AuthorDate: Tue Mar 22 05:36:44 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) --- .../src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index bac1dec..5d26d2e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1119,6 +1119,7 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { throws SQLException { PreparedStatement ps = conn.prepareStatement("SELECT NEXT ? VALUES FOR " + sequenceName + " "); +ps.getMetaData(); // check for PHOENIX-6665 ps.setLong(1, numSlotToAllocate); ResultSet rs = ps.executeQuery(); assertTrue(rs.next());
[phoenix] branch 4.x updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 861b4d7 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) 861b4d7 is described below commit 861b4d7d4aab3842e4238f6ddc8f18667a03d01b Author: Istvan Toth AuthorDate: Tue Mar 22 05:36:44 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) --- .../src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index bac1dec..5d26d2e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1119,6 +1119,7 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { throws SQLException { PreparedStatement ps = conn.prepareStatement("SELECT NEXT ? VALUES FOR " + sequenceName + " "); +ps.getMetaData(); // check for PHOENIX-6665 ps.setLong(1, numSlotToAllocate); ResultSet rs = ps.executeQuery(); assertTrue(rs.next());
[phoenix] branch 5.1 updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 0810ce8 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) 0810ce8 is described below commit 0810ce85a94e0063bb32d3fa7a24ce7e79570a9c Author: Istvan Toth AuthorDate: Tue Mar 22 05:36:44 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) --- .../src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index bac1dec..5d26d2e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1119,6 +1119,7 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { throws SQLException { PreparedStatement ps = conn.prepareStatement("SELECT NEXT ? VALUES FOR " + sequenceName + " "); +ps.getMetaData(); // check for PHOENIX-6665 ps.setLong(1, numSlotToAllocate); ResultSet rs = ps.executeQuery(); assertTrue(rs.next());
[phoenix] branch master updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 27541c9 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) 27541c9 is described below commit 27541c90120da12257a38480e647fac36e52427d Author: Istvan Toth AuthorDate: Tue Mar 22 05:36:44 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" (addendum: add test) --- .../src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index bac1dec..5d26d2e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1119,6 +1119,7 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { throws SQLException { PreparedStatement ps = conn.prepareStatement("SELECT NEXT ? VALUES FOR " + sequenceName + " "); +ps.getMetaData(); // check for PHOENIX-6665 ps.setLong(1, numSlotToAllocate); ResultSet rs = ps.executeQuery(); assertTrue(rs.next());
[phoenix] branch 4.16 updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 16f96b1 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" 16f96b1 is described below commit 16f96b18807a732c431abf07a6cc3ee31225720a Author: Istvan Toth AuthorDate: Mon Mar 21 06:44:47 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" --- .../phoenix/end2end/SequenceBulkAllocationIT.java | 18 ++--- .../apache/phoenix/compile/SequenceManager.java| 82 +- .../phoenix/compile/SequenceValueExpression.java | 25 +-- .../phoenix/jdbc/PhoenixPreparedStatement.java | 4 +- .../java/org/apache/phoenix/schema/Sequence.java | 6 +- 5 files changed, 84 insertions(+), 51 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index 489513a..bac1dec 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1165,15 +1165,15 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { .executeQuery( "SELECT start_with, current_value, increment_by, cache_size, min_value, max_value, cycle_flag, sequence_schema, sequence_name FROM \"SYSTEM\".\"SEQUENCE\" where sequence_name='" + props.getNameWithoutSchema() + "'"); assertTrue(rs.next()); -assertEquals(props.startsWith, rs.getLong("start_with")); -assertEquals(props.incrementBy, rs.getLong("increment_by")); -assertEquals(props.cacheSize, rs.getLong("cache_size")); -assertEquals(false, rs.getBoolean("cycle_flag")); -assertEquals(props.getSchemaName(), rs.getString("sequence_schema")); -assertEquals(props.getNameWithoutSchema(), rs.getString("sequence_name")); -assertEquals(currentValue, rs.getLong("current_value")); -assertEquals(props.minValue, rs.getLong("min_value")); -assertEquals(props.maxValue, rs.getLong("max_value")); +assertEquals("start_with", props.startsWith, rs.getLong("start_with")); +assertEquals("increment_by", props.incrementBy, rs.getLong("increment_by")); +assertEquals("cache_size", props.cacheSize, rs.getLong("cache_size")); +assertEquals("cycle_flag", false, rs.getBoolean("cycle_flag")); +assertEquals("sequence_schema", props.getSchemaName(), rs.getString("sequence_schema")); +assertEquals("sequence_name", props.getNameWithoutSchema(), rs.getString("sequence_name")); +assertEquals("current_value", currentValue, rs.getLong("current_value")); +assertEquals("min_value", props.minValue, rs.getLong("min_value")); +assertEquals("max_value", props.maxValue, rs.getLong("max_value")); assertFalse(rs.next()); } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java index c19b3cb..0f50443 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.expression.Expression; +import org.apache.phoenix.expression.LiteralExpression; import org.apache.phoenix.jdbc.PhoenixStatement; import org.apache.phoenix.parse.ParseNode; import org.apache.phoenix.parse.SequenceValueParseNode; @@ -50,9 +51,9 @@ public class SequenceManager { private int[] sequencePosition; private List nextSequences; private List currentSequences; -private final Map sequenceMap = Maps.newHashMap(); +private final Map sequenceMap = Maps.newHashMap(); private final BitSet isNextSequence = new BitSet(); - + public SequenceManager(PhoenixStatement statement) { this.statement = statement; } @@ -130,64 +131,78 @@ public class SequenceManager { int nSaltBuckets = statement.getConnection().getQueryServices().getSequenceSaltBuckets(); ParseNode numToAllocateNode
[phoenix] branch 4.x updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new a566c62 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" a566c62 is described below commit a566c62fccb9e1003a8e52a7c3ad0544d3ffeac7 Author: Istvan Toth AuthorDate: Mon Mar 21 06:44:47 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" --- .../phoenix/end2end/SequenceBulkAllocationIT.java | 18 ++--- .../apache/phoenix/compile/SequenceManager.java| 82 +- .../phoenix/compile/SequenceValueExpression.java | 25 +-- .../phoenix/jdbc/PhoenixPreparedStatement.java | 4 +- .../java/org/apache/phoenix/schema/Sequence.java | 6 +- 5 files changed, 84 insertions(+), 51 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index 489513a..bac1dec 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1165,15 +1165,15 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { .executeQuery( "SELECT start_with, current_value, increment_by, cache_size, min_value, max_value, cycle_flag, sequence_schema, sequence_name FROM \"SYSTEM\".\"SEQUENCE\" where sequence_name='" + props.getNameWithoutSchema() + "'"); assertTrue(rs.next()); -assertEquals(props.startsWith, rs.getLong("start_with")); -assertEquals(props.incrementBy, rs.getLong("increment_by")); -assertEquals(props.cacheSize, rs.getLong("cache_size")); -assertEquals(false, rs.getBoolean("cycle_flag")); -assertEquals(props.getSchemaName(), rs.getString("sequence_schema")); -assertEquals(props.getNameWithoutSchema(), rs.getString("sequence_name")); -assertEquals(currentValue, rs.getLong("current_value")); -assertEquals(props.minValue, rs.getLong("min_value")); -assertEquals(props.maxValue, rs.getLong("max_value")); +assertEquals("start_with", props.startsWith, rs.getLong("start_with")); +assertEquals("increment_by", props.incrementBy, rs.getLong("increment_by")); +assertEquals("cache_size", props.cacheSize, rs.getLong("cache_size")); +assertEquals("cycle_flag", false, rs.getBoolean("cycle_flag")); +assertEquals("sequence_schema", props.getSchemaName(), rs.getString("sequence_schema")); +assertEquals("sequence_name", props.getNameWithoutSchema(), rs.getString("sequence_name")); +assertEquals("current_value", currentValue, rs.getLong("current_value")); +assertEquals("min_value", props.minValue, rs.getLong("min_value")); +assertEquals("max_value", props.maxValue, rs.getLong("max_value")); assertFalse(rs.next()); } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java index c19b3cb..0f50443 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.expression.Expression; +import org.apache.phoenix.expression.LiteralExpression; import org.apache.phoenix.jdbc.PhoenixStatement; import org.apache.phoenix.parse.ParseNode; import org.apache.phoenix.parse.SequenceValueParseNode; @@ -50,9 +51,9 @@ public class SequenceManager { private int[] sequencePosition; private List nextSequences; private List currentSequences; -private final Map sequenceMap = Maps.newHashMap(); +private final Map sequenceMap = Maps.newHashMap(); private final BitSet isNextSequence = new BitSet(); - + public SequenceManager(PhoenixStatement statement) { this.statement = statement; } @@ -130,64 +131,78 @@ public class SequenceManager { int nSaltBuckets = statement.getConnection().getQueryServices().getSequenceSaltBuckets(); ParseNode numToAllocateNode
[phoenix] branch 5.1 updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 3fe8720 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" 3fe8720 is described below commit 3fe8720836f163bf7d0d8174cfdbc3fcd2b87b92 Author: Istvan Toth AuthorDate: Mon Mar 21 06:44:47 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" --- .../phoenix/end2end/SequenceBulkAllocationIT.java | 18 ++--- .../apache/phoenix/compile/SequenceManager.java| 82 +- .../phoenix/compile/SequenceValueExpression.java | 25 +-- .../phoenix/jdbc/PhoenixPreparedStatement.java | 4 +- .../java/org/apache/phoenix/schema/Sequence.java | 6 +- 5 files changed, 84 insertions(+), 51 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index 489513a..bac1dec 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1165,15 +1165,15 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { .executeQuery( "SELECT start_with, current_value, increment_by, cache_size, min_value, max_value, cycle_flag, sequence_schema, sequence_name FROM \"SYSTEM\".\"SEQUENCE\" where sequence_name='" + props.getNameWithoutSchema() + "'"); assertTrue(rs.next()); -assertEquals(props.startsWith, rs.getLong("start_with")); -assertEquals(props.incrementBy, rs.getLong("increment_by")); -assertEquals(props.cacheSize, rs.getLong("cache_size")); -assertEquals(false, rs.getBoolean("cycle_flag")); -assertEquals(props.getSchemaName(), rs.getString("sequence_schema")); -assertEquals(props.getNameWithoutSchema(), rs.getString("sequence_name")); -assertEquals(currentValue, rs.getLong("current_value")); -assertEquals(props.minValue, rs.getLong("min_value")); -assertEquals(props.maxValue, rs.getLong("max_value")); +assertEquals("start_with", props.startsWith, rs.getLong("start_with")); +assertEquals("increment_by", props.incrementBy, rs.getLong("increment_by")); +assertEquals("cache_size", props.cacheSize, rs.getLong("cache_size")); +assertEquals("cycle_flag", false, rs.getBoolean("cycle_flag")); +assertEquals("sequence_schema", props.getSchemaName(), rs.getString("sequence_schema")); +assertEquals("sequence_name", props.getNameWithoutSchema(), rs.getString("sequence_name")); +assertEquals("current_value", currentValue, rs.getLong("current_value")); +assertEquals("min_value", props.minValue, rs.getLong("min_value")); +assertEquals("max_value", props.maxValue, rs.getLong("max_value")); assertFalse(rs.next()); } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java index c19b3cb..0f50443 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.expression.Expression; +import org.apache.phoenix.expression.LiteralExpression; import org.apache.phoenix.jdbc.PhoenixStatement; import org.apache.phoenix.parse.ParseNode; import org.apache.phoenix.parse.SequenceValueParseNode; @@ -50,9 +51,9 @@ public class SequenceManager { private int[] sequencePosition; private List nextSequences; private List currentSequences; -private final Map sequenceMap = Maps.newHashMap(); +private final Map sequenceMap = Maps.newHashMap(); private final BitSet isNextSequence = new BitSet(); - + public SequenceManager(PhoenixStatement statement) { this.statement = statement; } @@ -130,64 +131,78 @@ public class SequenceManager { int nSaltBuckets = statement.getConnection().getQueryServices().getSequenceSaltBuckets(); ParseNode numToAllocateNode
[phoenix] branch master updated: PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new b248756 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" b248756 is described below commit b2487566934c4749d21e7f9d34c44cd925b94f07 Author: Istvan Toth AuthorDate: Mon Mar 21 06:44:47 2022 +0100 PHOENIX-6665 PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ" --- .../phoenix/end2end/SequenceBulkAllocationIT.java | 18 ++--- .../apache/phoenix/compile/SequenceManager.java| 82 +- .../phoenix/compile/SequenceValueExpression.java | 25 +-- .../phoenix/jdbc/PhoenixPreparedStatement.java | 4 +- .../java/org/apache/phoenix/schema/Sequence.java | 6 +- 5 files changed, 84 insertions(+), 51 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java index 489513a..bac1dec 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java @@ -1165,15 +1165,15 @@ public class SequenceBulkAllocationIT extends ParallelStatsDisabledIT { .executeQuery( "SELECT start_with, current_value, increment_by, cache_size, min_value, max_value, cycle_flag, sequence_schema, sequence_name FROM \"SYSTEM\".\"SEQUENCE\" where sequence_name='" + props.getNameWithoutSchema() + "'"); assertTrue(rs.next()); -assertEquals(props.startsWith, rs.getLong("start_with")); -assertEquals(props.incrementBy, rs.getLong("increment_by")); -assertEquals(props.cacheSize, rs.getLong("cache_size")); -assertEquals(false, rs.getBoolean("cycle_flag")); -assertEquals(props.getSchemaName(), rs.getString("sequence_schema")); -assertEquals(props.getNameWithoutSchema(), rs.getString("sequence_name")); -assertEquals(currentValue, rs.getLong("current_value")); -assertEquals(props.minValue, rs.getLong("min_value")); -assertEquals(props.maxValue, rs.getLong("max_value")); +assertEquals("start_with", props.startsWith, rs.getLong("start_with")); +assertEquals("increment_by", props.incrementBy, rs.getLong("increment_by")); +assertEquals("cache_size", props.cacheSize, rs.getLong("cache_size")); +assertEquals("cycle_flag", false, rs.getBoolean("cycle_flag")); +assertEquals("sequence_schema", props.getSchemaName(), rs.getString("sequence_schema")); +assertEquals("sequence_name", props.getNameWithoutSchema(), rs.getString("sequence_name")); +assertEquals("current_value", currentValue, rs.getLong("current_value")); +assertEquals("min_value", props.minValue, rs.getLong("min_value")); +assertEquals("max_value", props.maxValue, rs.getLong("max_value")); assertFalse(rs.next()); } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java index c19b3cb..0f50443 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.expression.Expression; +import org.apache.phoenix.expression.LiteralExpression; import org.apache.phoenix.jdbc.PhoenixStatement; import org.apache.phoenix.parse.ParseNode; import org.apache.phoenix.parse.SequenceValueParseNode; @@ -50,9 +51,9 @@ public class SequenceManager { private int[] sequencePosition; private List nextSequences; private List currentSequences; -private final Map sequenceMap = Maps.newHashMap(); +private final Map sequenceMap = Maps.newHashMap(); private final BitSet isNextSequence = new BitSet(); - + public SequenceManager(PhoenixStatement statement) { this.statement = statement; } @@ -130,64 +131,78 @@ public class SequenceManager { int nSaltBuckets = statement.getConnection().getQueryServices().getSequenceSaltBuckets(); ParseNode numToAllocateNode
[phoenix] branch 4.x updated: PHOENIX-6626 Make the without.tephra profile behaviour the default in 4.x and master, and remove the profile
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 452c09f PHOENIX-6626 Make the without.tephra profile behaviour the default in 4.x and master, and remove the profile 452c09f is described below commit 452c09f63d8e604f70e66fea98654dd3fc24318d Author: Istvan Toth AuthorDate: Mon Jan 31 20:20:58 2022 +0100 PHOENIX-6626 Make the without.tephra profile behaviour the default in 4.x and master, and remove the profile --- phoenix-core/pom.xml | 85 +++--- phoenix-pherf/pom.xml | 7 - phoenix-server/pom.xml | 8 - pom.xml| 52 +- 4 files changed, 39 insertions(+), 113 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 39ef14d..e1492c7 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -312,7 +312,30 @@ - + + + org.apache.tephra + tephra-api + provided + + + org.apache.tephra + tephra-core-shaded + provided + + + org.apache.tephra + tephra-hbase-compat-${tephra.hbase.compat.version} + shaded + provided + + + org.apache.thrift + libthrift + provided + + + org.antlr antlr-runtime @@ -577,65 +600,7 @@ 1.6 - -exclude-tephra - - -without.tephra - - - - -org.apache.tephra -tephra-api -provided - - -org.apache.tephra -tephra-core-shaded -provided - - -org.apache.tephra - tephra-hbase-compat-${tephra.hbase.compat.version} -shaded -provided - - -org.apache.thrift -libthrift -provided - - - - -include-tephra - - -!without.tephra - - - - -org.apache.tephra -tephra-api - - -org.apache.tephra -tephra-core-shaded - - -org.apache.tephra - tephra-hbase-compat-${tephra.hbase.compat.version} -shaded - - -org.apache.thrift -libthrift - - - - + diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml index b679a89..2f02623 100644 --- a/phoenix-pherf/pom.xml +++ b/phoenix-pherf/pom.xml @@ -121,13 +121,6 @@ test - org.apache.tephra - tephra-core - ${tephra.version} - test-jar - test - - org.apache.hadoop hadoop-minicluster test diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml index 54a8564..dac7f45 100644 --- a/phoenix-server/pom.xml +++ b/phoenix-server/pom.xml @@ -101,7 +101,6 @@ org.apache.phoenix:phoenix-hbase-compat-${hbase.compat.version} org.iq80.snappy:snappy org.antlr:antlr* - org.apache.tephra:tephra* org.apache.omid:omid* org.apache.commons:commons-collections4 org.jboss.netty:netty @@ -170,12 +169,5 @@ hbase-testing-util test - - org.apache.tephra - tephra-core - ${tephra.version} - test-jar - test - diff --git a/pom.xml b/pom.xml index 46345f7..347420d 100644 --- a/pom.xml +++ b/pom.xml @@ -310,6 +310,13 @@ false false + + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift + @@ -508,6 +515,13 @@ ${test.output.tofile} exit false + + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift + @@ -1248,44 +1262,6 @@ - - exclude-tephra - - - without.tephra - - - - - -org.apache.maven.plugins -maven-failsafe-plugin - - - org.apache.tephra:tephra-api - org.apache.tephra:tephra-core-shaded
[phoenix] branch master updated: PHOENIX-6626 Make the without.tephra profile behaviour the default in 4.x and master, and remove the profile
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new d6bf8df PHOENIX-6626 Make the without.tephra profile behaviour the default in 4.x and master, and remove the profile d6bf8df is described below commit d6bf8df2e1e2e5b664c3de123f85cf6c99889532 Author: Istvan Toth AuthorDate: Mon Jan 31 19:58:55 2022 +0100 PHOENIX-6626 Make the without.tephra profile behaviour the default in 4.x and master, and remove the profile --- phoenix-core/pom.xml | 81 +++- pom.xml | 52 + 2 files changed, 37 insertions(+), 96 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index db6008c..ba772a4 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -412,6 +412,29 @@ omid-common + + + org.apache.tephra + tephra-api + provided + + + org.apache.tephra + tephra-core-shaded + provided + + + org.apache.tephra + tephra-hbase-compat-${tephra.hbase.compat.version} + shaded + provided + + + org.apache.thrift + libthrift + provided + + org.apache.omid @@ -561,64 +584,6 @@ -exclude-tephra - - -without.tephra - - - - -org.apache.tephra -tephra-api -provided - - -org.apache.tephra -tephra-core-shaded -provided - - -org.apache.tephra - tephra-hbase-compat-${tephra.hbase.compat.version} -shaded -provided - - -org.apache.thrift -libthrift -provided - - - - -include-tephra - - -!without.tephra - - - - -org.apache.tephra -tephra-api - - -org.apache.tephra -tephra-core-shaded - - -org.apache.tephra - tephra-hbase-compat-${tephra.hbase.compat.version} -shaded - - -org.apache.thrift -libthrift - - - - phoenix-hbase-compat-2.3.0 diff --git a/pom.xml b/pom.xml index 00a2381..078e9ad 100644 --- a/pom.xml +++ b/pom.xml @@ -316,6 +316,13 @@ false false + + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift + @@ -558,6 +565,13 @@ ${test.output.tofile} exit false + + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift + @@ -1539,44 +1553,6 @@ - - exclude-tephra - - - without.tephra - - - - - -org.apache.maven.plugins -maven-failsafe-plugin - - - org.apache.tephra:tephra-api - org.apache.tephra:tephra-core-shaded - org.apache.tephra:tephra-core - org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} - org.apache.thrift:libthrift - - - - -org.apache.maven.plugins -maven-surefire-plugin - - - org.apache.tephra:tephra-api - org.apache.tephra:tephra-core-shaded - org.apache.tephra:tephra-core - org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} - org.apache.thrift:libthrift - - - - - -
[phoenix-queryserver] branch master updated: PHOENIX-6664 Update Jetty to 9.4.43.v20210629 in PQS
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git The following commit(s) were added to refs/heads/master by this push: new 1f36031 PHOENIX-6664 Update Jetty to 9.4.43.v20210629 in PQS 1f36031 is described below commit 1f360311568e0e3b8e07acb79715aebbc9bc Author: Istvan Toth AuthorDate: Wed Mar 16 07:57:45 2022 +0100 PHOENIX-6664 Update Jetty to 9.4.43.v20210629 in PQS --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef7b947..a82c89a 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ 2.12.0 2.2.4 -9.4.31.v20200723 +9.4.43.v20210629 2.11.0 3.2.2 1.9.0
[phoenix] branch 5.1 updated: PHOENIX-6658 Replace HRegion.get() calls
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new b65fc1b PHOENIX-6658 Replace HRegion.get() calls b65fc1b is described below commit b65fc1b0d959200d00651f99108c97d9d77a4898 Author: Istvan Toth AuthorDate: Mon Feb 28 18:53:19 2022 +0100 PHOENIX-6658 Replace HRegion.get() calls --- .../phoenix/coprocessor/MetaDataEndpointImpl.java | 33 ++ .../coprocessor/SequenceRegionObserver.java| 71 -- .../apache/phoenix/index/PhoenixIndexBuilder.java | 13 +++- .../apache/phoenix/util/PhoenixKeyValueUtil.java | 27 ++-- 4 files changed, 92 insertions(+), 52 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java index 238a90f..77da732 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java @@ -3514,19 +3514,22 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES); if (rowLock == null) { throw new IOException("Failed to acquire lock on " + Bytes.toStringBinary(key)); } -try { -Get get = new Get(key); -get.addColumn(TABLE_FAMILY_BYTES, DATA_TABLE_NAME_BYTES); -get.addColumn(TABLE_FAMILY_BYTES, INDEX_STATE_BYTES); -get.addColumn(TABLE_FAMILY_BYTES, INDEX_DISABLE_TIMESTAMP_BYTES); -get.addColumn(TABLE_FAMILY_BYTES, ROW_KEY_ORDER_OPTIMIZABLE_BYTES); -Result currentResult = region.get(get); -if (currentResult.rawCells().length == 0) { + +Get get = new Get(key); +get.addColumn(TABLE_FAMILY_BYTES, DATA_TABLE_NAME_BYTES); +get.addColumn(TABLE_FAMILY_BYTES, INDEX_STATE_BYTES); +get.addColumn(TABLE_FAMILY_BYTES, INDEX_DISABLE_TIMESTAMP_BYTES); +get.addColumn(TABLE_FAMILY_BYTES, ROW_KEY_ORDER_OPTIMIZABLE_BYTES); +try (RegionScanner scanner = region.getScanner(new Scan(get))) { +List cells = new ArrayList<>(); +scanner.next(cells); +if (cells.isEmpty()) { builder.setReturnCode(MetaDataProtos.MutationCode.TABLE_NOT_FOUND); builder.setMutationTime(EnvironmentEdgeManager.currentTimeMillis()); done.run(builder.build()); return; } +Result currentResult = Result.create(cells); Cell dataTableKV = currentResult.getColumnLatestCell(TABLE_FAMILY_BYTES, DATA_TABLE_NAME_BYTES); Cell currentStateKV = currentResult.getColumnLatestCell(TABLE_FAMILY_BYTES, INDEX_STATE_BYTES); Cell currentDisableTimeStamp = currentResult.getColumnLatestCell(TABLE_FAMILY_BYTES, INDEX_DISABLE_TIMESTAMP_BYTES); @@ -3628,10 +3631,14 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES); if (currentState == PIndexState.PENDING_DISABLE) { if (newState == PIndexState.ACTIVE) { //before making index ACTIVE check if all clients succeed otherwise keep it PENDING_DISABLE -byte[] count = region -.get(new Get(key).addColumn(TABLE_FAMILY_BYTES, - PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES)) -.getValue(TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES); +byte[] count; +try (RegionScanner countScanner = region.getScanner(new Scan(get))) { +List countCells = new ArrayList<>(); +scanner.next(countCells); +count = Result.create(countCells) +.getValue(TABLE_FAMILY_BYTES, + PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES); +} if (count != null && Bytes.toLong(count) != 0) { newState = PIndexState.PENDING_DISABLE; newKVs.remove(disableTimeStampKVIndex); @@ -4055,7 +4062,7 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES); Region region = env.getRegion(); Scan scan = MetaDataUtil.newTableRowsScan(keys.get(0), MIN_TABLE_TIMESTAMP, clientTimeStamp); List results = Lists.newArrayList(); -try (RegionScanner scanner = region.getScanner(scan);) { +try (RegionScanner sc
[phoenix] branch master updated: PHOENIX-6658 Replace HRegion.get() calls
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 93c2d2f PHOENIX-6658 Replace HRegion.get() calls 93c2d2f is described below commit 93c2d2fde43e97206ee760b25a1993e8c72d92b3 Author: Istvan Toth AuthorDate: Mon Feb 28 18:53:19 2022 +0100 PHOENIX-6658 Replace HRegion.get() calls --- .../phoenix/coprocessor/MetaDataEndpointImpl.java | 33 ++ .../coprocessor/SequenceRegionObserver.java| 71 -- .../apache/phoenix/index/PhoenixIndexBuilder.java | 13 +++- .../apache/phoenix/util/PhoenixKeyValueUtil.java | 27 ++-- 4 files changed, 92 insertions(+), 52 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java index 59961af..bc790a0 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java @@ -3874,19 +3874,22 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES); if (rowLock == null) { throw new IOException("Failed to acquire lock on " + Bytes.toStringBinary(key)); } -try { -Get get = new Get(key); -get.addColumn(TABLE_FAMILY_BYTES, DATA_TABLE_NAME_BYTES); -get.addColumn(TABLE_FAMILY_BYTES, INDEX_STATE_BYTES); -get.addColumn(TABLE_FAMILY_BYTES, INDEX_DISABLE_TIMESTAMP_BYTES); -get.addColumn(TABLE_FAMILY_BYTES, ROW_KEY_ORDER_OPTIMIZABLE_BYTES); -Result currentResult = region.get(get); -if (currentResult.rawCells().length == 0) { + +Get get = new Get(key); +get.addColumn(TABLE_FAMILY_BYTES, DATA_TABLE_NAME_BYTES); +get.addColumn(TABLE_FAMILY_BYTES, INDEX_STATE_BYTES); +get.addColumn(TABLE_FAMILY_BYTES, INDEX_DISABLE_TIMESTAMP_BYTES); +get.addColumn(TABLE_FAMILY_BYTES, ROW_KEY_ORDER_OPTIMIZABLE_BYTES); +try (RegionScanner scanner = region.getScanner(new Scan(get))) { +List cells = new ArrayList<>(); +scanner.next(cells); +if (cells.isEmpty()) { builder.setReturnCode(MetaDataProtos.MutationCode.TABLE_NOT_FOUND); builder.setMutationTime(EnvironmentEdgeManager.currentTimeMillis()); done.run(builder.build()); return; } +Result currentResult = Result.create(cells); Cell dataTableKV = currentResult.getColumnLatestCell(TABLE_FAMILY_BYTES, DATA_TABLE_NAME_BYTES); Cell currentStateKV = currentResult.getColumnLatestCell(TABLE_FAMILY_BYTES, INDEX_STATE_BYTES); Cell currentDisableTimeStamp = currentResult.getColumnLatestCell(TABLE_FAMILY_BYTES, INDEX_DISABLE_TIMESTAMP_BYTES); @@ -3988,10 +3991,14 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES); if (currentState == PIndexState.PENDING_DISABLE) { if (newState == PIndexState.ACTIVE) { //before making index ACTIVE check if all clients succeed otherwise keep it PENDING_DISABLE -byte[] count = region -.get(new Get(key).addColumn(TABLE_FAMILY_BYTES, - PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES)) -.getValue(TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES); +byte[] count; +try (RegionScanner countScanner = region.getScanner(new Scan(get))) { +List countCells = new ArrayList<>(); +scanner.next(countCells); +count = Result.create(countCells) +.getValue(TABLE_FAMILY_BYTES, + PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES); +} if (count != null && Bytes.toLong(count) != 0) { newState = PIndexState.PENDING_DISABLE; newKVs.remove(disableTimeStampKVIndex); @@ -4415,7 +4422,7 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES); Region region = env.getRegion(); Scan scan = MetaDataUtil.newTableRowsScan(keys.get(0), MIN_TABLE_TIMESTAMP, clientTimeStamp); List results = Lists.newArrayList(); -try (RegionScanner scanner = region.getScanner(scan);) { +try (RegionScanner sc
[phoenix-queryserver] branch master updated: PHOENIX-6660 Ship reload4j in queryserver assembly
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git The following commit(s) were added to refs/heads/master by this push: new 5d24015 PHOENIX-6660 Ship reload4j in queryserver assembly 5d24015 is described below commit 5d24015e6372bec128f2a031ea1a2dc9f84b7b3e Author: Istvan Toth AuthorDate: Wed Mar 2 13:59:09 2022 +0100 PHOENIX-6660 Ship reload4j in queryserver assembly --- BUILDING.md | 11 ++- bin/phoenix_queryserver_utils.py | 11 +-- bin/queryserver.py| 8 ++-- bin/sqlline-thin.py | 8 +--- phoenix-queryserver-assembly/pom.xml | 7 +-- phoenix-queryserver-assembly/src/assembly/cluster.xml | 9 - pom.xml | 13 - 7 files changed, 51 insertions(+), 16 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index c6eeb2a..4b84ede 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -29,8 +29,11 @@ By default, this tarball does not contain a Phoenix client jar as it is meant to of Phoenix version (one PQS release can be used against any Phoenix version). Today, PQS builds against the Phoenix 5.1.1 release with HBase 2.4.2. +In order to use Phoenix Query Server, you need to copy the phoenix-client-embedded jar appropriate +for your cluster into the Queryserver root directory. + Note that the resulting Query Server binaries are not tied to any Phoenix, Hbase or Hadoop versions, -and will work with all recent Phoenix versions. +The current release requires at least Phoenix 4.16.0 or 5.1.0. ``` $ mvn clean package @@ -41,12 +44,10 @@ $ mvn clean package To build a release of PQS which packages a specific version of Phoenix, specify the `package-phoenix-client` system property and specify the `phoenix.version` system property to indicate a specific Phoenix version, as well as the `phoenix.client.artifactid` to choose the phoenix-client HBase variant. +You need to bundle the embedded client variant, to avoid conflicts with the logging libraries. ``` -$ mvn clean package -Dpackage.phoenix.client -Dphoenix.version=5.1.1 -Dphoenix.client.artifactid=phoenix-client-hbase-2.4 -pl '!phoenix-queryserver-it' -``` -``` -$ mvn clean package -Dpackage.phoenix.client -Dphoenix.version=4.15.0-HBase-1.4 -Dphoenix.client.artifactid=phoenix-client -pl '!phoenix-queryserver-it' +$ mvn clean package -Dpackage.phoenix.client -Dphoenix.version=5.1.1 -Dphoenix.client.artifactid=phoenix-client-embedded-hbase-2.4 -pl '!phoenix-queryserver-it' ``` ### Running integration tests diff --git a/bin/phoenix_queryserver_utils.py b/bin/phoenix_queryserver_utils.py index cbc8f1e..02db08b 100755 --- a/bin/phoenix_queryserver_utils.py +++ b/bin/phoenix_queryserver_utils.py @@ -82,9 +82,11 @@ def setPath(): PHOENIX_QUERYSERVER_JAR_PATTERN = "phoenix-queryserver-[!c]*.jar" PHOENIX_LOADBALANCER_JAR_PATTERN = "load-balancer-*[!t][!e][!s][!t][!s].jar" SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar" -SLF4J_SIMPLE_JAR_PATTERN = "slf4j-simple-*[!s].jar" +SLF4J_BACKEND_JAR_PATTERN = "slf4j-reload4j-*[!s].jar" +LOGGING_JAR_PATTERN = "reload4j-*[!s].jar" OVERRIDE_SLF4J_BACKEND = "PHOENIX_THIN_OVERRIDE_SLF4J_BACKEND" +OVERRIDE_LOGGING = "OVERRIDE_LOGGING_JAR_LOCATION" # Backward support old env variable PHOENIX_LIB_DIR replaced by PHOENIX_CLASS_PATH global phoenix_class_path @@ -159,7 +161,12 @@ def setPath(): global slf4j_backend_jar slf4j_backend_jar = os.environ.get(OVERRIDE_SLF4J_BACKEND) if slf4j_backend_jar is None or slf4j_backend_jar == "": -slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_SIMPLE_JAR_PATTERN, os.path.join(current_dir, "..","lib")) +slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_BACKEND_JAR_PATTERN, os.path.join(current_dir, "..","lib")) + +global logging_jar +logging_jar = os.environ.get(OVERRIDE_LOGGING) +if logging_jar is None or logging_jar == "": +logging_jar = findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN, os.path.join(current_dir, "..","lib")) return "" diff --git a/bin/queryserver.py b/bin/queryserver.py index be17098..24594c3 100755 --- a/bin/queryserver.py +++ b/bin/queryserver.py @@ -120,9 +120,13 @@ out_file_path = os.path.join(log_dir, phoenix_out_file) #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \ # The command is run through subprocess so environment variables a
[phoenix-queryserver] branch master updated: PHOENIX-6661 Sqlline does not work on PowerPC linux
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git The following commit(s) were added to refs/heads/master by this push: new 78f9a1f PHOENIX-6661 Sqlline does not work on PowerPC linux 78f9a1f is described below commit 78f9a1f3013ba6bc9a908f704aae1576f31684f1 Author: Istvan Toth AuthorDate: Thu Mar 3 09:09:43 2022 +0100 PHOENIX-6661 Sqlline does not work on PowerPC linux --- bin/sqlline-thin.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/bin/sqlline-thin.py b/bin/sqlline-thin.py index c763f98..e5ef5f4 100755 --- a/bin/sqlline-thin.py +++ b/bin/sqlline-thin.py @@ -145,6 +145,11 @@ colorSetting = tryDecode(args.color) if os.name == 'nt': colorSetting = "false" +if os.uname()[4].startswith('ppc'): +disable_jna = " -Dorg.jline.terminal.jna=false " +else: +disable_jna = "" + # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override hbase_config_path = os.getenv('HBASE_CONF_DIR', phoenix_queryserver_utils.current_dir) @@ -209,6 +214,7 @@ java_cmd = java + ' $PHOENIX_OPTS ' + \ os.pathsep + phoenix_queryserver_utils.slf4j_backend_jar + '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_queryserver_utils.current_dir, "log4j.properties") + \ ' -Djavax.security.auth.useSubjectCredsOnly=false ' + \ +disable_jna + \ " org.apache.phoenix.queryserver.client.SqllineWrapper -d org.apache.phoenix.queryserver.client.Driver " + \ ' -u "' + jdbc_url + '"' + " -n none -p none " + \ " --color=" + colorSetting + " --fastConnect=" + tryDecode(args.fastconnect) + " --verbose=" + tryDecode(args.verbose) + \
[phoenix] branch 4.16 updated: PHOENIX-6661 Sqlline does not work on PowerPC linux
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 5a6272b PHOENIX-6661 Sqlline does not work on PowerPC linux 5a6272b is described below commit 5a6272bcd419eda3a5c65d8ceb874f1ecb9efd27 Author: Istvan Toth AuthorDate: Thu Mar 3 08:46:02 2022 +0100 PHOENIX-6661 Sqlline does not work on PowerPC linux --- bin/sqlline.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bin/sqlline.py b/bin/sqlline.py index 4a2d62f..39b76d5 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -107,6 +107,12 @@ colorSetting = tryDecode(args.color) if os.name == 'nt': colorSetting = "false" +#See PHOENIX-6661 +if os.uname()[4].startswith('ppc'): +disable_jna = " -Dorg.jline.terminal.jna=false " +else: +disable_jna = "" + java_cmd = java + ' $PHOENIX_OPTS ' + \ ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + \ phoenix_utils.hadoop_conf + os.pathsep + \ @@ -115,6 +121,7 @@ java_cmd = java + ' $PHOENIX_OPTS ' + \ phoenix_utils.logging_jar + os.pathsep + \ phoenix_utils.phoenix_client_embedded_jar + \ '" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ +disable_jna + \ " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver" + \ " -u jdbc:phoenix:" + phoenix_utils.shell_quote([zookeeper]) + \ " -n none -p none --color=" + colorSetting + " --fastConnect=" + tryDecode(args.fastconnect) + \
[phoenix] branch 4.x updated: PHOENIX-6661 Sqlline does not work on PowerPC linux
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new ba5bef1 PHOENIX-6661 Sqlline does not work on PowerPC linux ba5bef1 is described below commit ba5bef124092d864cd85e449ad50352b5065c06c Author: Istvan Toth AuthorDate: Thu Mar 3 08:46:02 2022 +0100 PHOENIX-6661 Sqlline does not work on PowerPC linux --- bin/sqlline.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bin/sqlline.py b/bin/sqlline.py index 4a2d62f..39b76d5 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -107,6 +107,12 @@ colorSetting = tryDecode(args.color) if os.name == 'nt': colorSetting = "false" +#See PHOENIX-6661 +if os.uname()[4].startswith('ppc'): +disable_jna = " -Dorg.jline.terminal.jna=false " +else: +disable_jna = "" + java_cmd = java + ' $PHOENIX_OPTS ' + \ ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + \ phoenix_utils.hadoop_conf + os.pathsep + \ @@ -115,6 +121,7 @@ java_cmd = java + ' $PHOENIX_OPTS ' + \ phoenix_utils.logging_jar + os.pathsep + \ phoenix_utils.phoenix_client_embedded_jar + \ '" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ +disable_jna + \ " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver" + \ " -u jdbc:phoenix:" + phoenix_utils.shell_quote([zookeeper]) + \ " -n none -p none --color=" + colorSetting + " --fastConnect=" + tryDecode(args.fastconnect) + \
[phoenix] branch 5.1 updated: PHOENIX-6661 Sqlline does not work on PowerPC linux
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 5385f96 PHOENIX-6661 Sqlline does not work on PowerPC linux 5385f96 is described below commit 5385f9683505e27d712dfd25457fe8904f4e3a4e Author: Istvan Toth AuthorDate: Thu Mar 3 08:46:02 2022 +0100 PHOENIX-6661 Sqlline does not work on PowerPC linux --- bin/sqlline.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bin/sqlline.py b/bin/sqlline.py index 5d95e0e..615decb 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -107,6 +107,12 @@ colorSetting = tryDecode(args.color) if os.name == 'nt': colorSetting = "false" +#See PHOENIX-6661 +if os.uname()[4].startswith('ppc'): +disable_jna = " -Dorg.jline.terminal.jna=false " +else: +disable_jna = "" + java_cmd = java + ' $PHOENIX_OPTS ' + \ ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + \ phoenix_utils.hadoop_conf + os.pathsep + \ @@ -115,6 +121,7 @@ java_cmd = java + ' $PHOENIX_OPTS ' + \ phoenix_utils.logging_jar + os.pathsep + \ phoenix_utils.phoenix_client_embedded_jar + \ '" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ +disable_jna + \ " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver" + \ " -u jdbc:phoenix:" + phoenix_utils.shell_quote([zookeeper]) + \ " -n none -p none --color=" + colorSetting + " --fastConnect=" + tryDecode(args.fastconnect) + \
[phoenix] branch master updated: PHOENIX-6661 Sqlline does not work on PowerPC linux
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 74c2974 PHOENIX-6661 Sqlline does not work on PowerPC linux 74c2974 is described below commit 74c29741799d1c87c2f410c10c21cf08ce402069 Author: Istvan Toth AuthorDate: Thu Mar 3 08:46:02 2022 +0100 PHOENIX-6661 Sqlline does not work on PowerPC linux --- bin/sqlline.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bin/sqlline.py b/bin/sqlline.py index 5d95e0e..615decb 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -107,6 +107,12 @@ colorSetting = tryDecode(args.color) if os.name == 'nt': colorSetting = "false" +#See PHOENIX-6661 +if os.uname()[4].startswith('ppc'): +disable_jna = " -Dorg.jline.terminal.jna=false " +else: +disable_jna = "" + java_cmd = java + ' $PHOENIX_OPTS ' + \ ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + \ phoenix_utils.hadoop_conf + os.pathsep + \ @@ -115,6 +121,7 @@ java_cmd = java + ' $PHOENIX_OPTS ' + \ phoenix_utils.logging_jar + os.pathsep + \ phoenix_utils.phoenix_client_embedded_jar + \ '" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ +disable_jna + \ " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver" + \ " -u jdbc:phoenix:" + phoenix_utils.shell_quote([zookeeper]) + \ " -n none -p none --color=" + colorSetting + " --fastConnect=" + tryDecode(args.fastconnect) + \
[phoenix-queryserver] branch master updated: PHOENIX-6654 queryserver.py sets the umask to 0000 when starting PQS in daemon mode
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git The following commit(s) were added to refs/heads/master by this push: new b593892 PHOENIX-6654 queryserver.py sets the umask to when starting PQS in daemon mode b593892 is described below commit b59389266a4566ac2c35f9d2be5036911c342da9 Author: Istvan Toth AuthorDate: Wed Mar 2 11:18:35 2022 +0100 PHOENIX-6654 queryserver.py sets the umask to when starting PQS in daemon mode --- bin/queryserver.py | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/queryserver.py b/bin/queryserver.py index 19e0109..be17098 100755 --- a/bin/queryserver.py +++ b/bin/queryserver.py @@ -162,6 +162,7 @@ if command == 'start': pidfile = daemon.PidFile(pid_file_path, 'Query Server already running, PID file found: %s' % pid_file_path), stdout = out, stderr = out, +umask = current_umask ) print('starting Query Server, logging to %s' % log_file_path) with context: @@ -176,12 +177,8 @@ if command == 'start': sys.exit(0) signal.signal(signal.SIGTERM, handler) -def initsubproc(): -# set the parent's umask -os.umask(current_umask) - print('%s launching %s' % (datetime.datetime.now(), cmd)) -child = subprocess.Popen(cmd.split(), preexec_fn=initsubproc) +child = subprocess.Popen(cmd.split()) sys.exit(child.wait()) elif command == 'stop': @@ -207,7 +204,7 @@ elif command == 'stop': print("stopping Query Server pid %s" % pid) with open(out_file_path, 'a+') as out: -sys.stderr.write("daemon mode not supported on this platform{}".format(os.linesep)) +sys.stderr.write("sending SIGTERM{}".format(os.linesep)) os.kill(pid, signal.SIGTERM) else:
[phoenix] branch 4.16 updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 64d6313 PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) 64d6313 is described below commit 64d631348254e002ac1f6d163558011672416fc7 Author: Istvan Toth AuthorDate: Sat Feb 26 09:55:59 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) --- bin/performance.py | 4 +++- bin/pherf-standalone.py | 8 +++- bin/phoenix_utils.py| 12 ++-- bin/psql.py | 6 -- bin/sqlline.py | 11 ++- 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 16fee48..6107c93 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -100,7 +100,9 @@ else: execute = ('%s $PHOENIX_OPTS -cp "%s%s%s" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ -(java_cmd, hbase_config_path, os.pathsep, phoenix_utils.phoenix_client_jar, table, zookeeper) +(java_cmd, hbase_config_path, os.pathsep, phoenix_utils.slf4j_backend_jar, os.pathsep, + phoenix_utils.logging_jar, os.pathsep, phoenix_utils.phoenix_client_embedded_jar, + table, zookeeper) # Create Table DDL createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\ diff --git a/bin/pherf-standalone.py b/bin/pherf-standalone.py index b87585e..9e6b11c 100755 --- a/bin/pherf-standalone.py +++ b/bin/pherf-standalone.py @@ -64,7 +64,13 @@ if java_home: else: java = 'java' -java_cmd = java +' -Xms512m -Xmx3072m -cp "' + phoenix_utils.pherf_conf_path + os.pathsep + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + os.pathsep + phoenix_utils.phoenix_pherf_jar + \ +java_cmd = java +' -Xms512m -Xmx3072m -cp "' + \ +phoenix_utils.pherf_conf_path + os.pathsep + \ +phoenix_utils.hbase_conf_dir + os.pathsep + \ +phoenix_utils.slf4j_backend_jar + os.pathsep + \ +phoenix_utils.logging_jar + os.pathsep + \ +phoenix_utils.phoenix_client_embedded_jar + os.pathsep +\ +phoenix_utils.phoenix_pherf_jar + \ '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " org.apache.phoenix.pherf.Pherf " + args diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index d5cfab6..4ba8255 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -81,11 +81,13 @@ def setPath(): PHOENIX_TRACESERVER_JAR_PATTERN = "phoenix-tracing-webapp-*-runnable.jar" PHOENIX_TESTS_JAR_PATTERN = "phoenix-core-*-tests*.jar" PHOENIX_PHERF_JAR_PATTERN = "phoenix-pherf-*[!s].jar" -SLF4J_LOG4J12_JAR_PATTERN = "slf4j-log4j12-*[!s].jar" +SLF4J_BACKEND_JAR_PATTERN = "slf4j-reload4j-*[!s].jar" +LOGGING_JAR_PATTERN = "reload4j-*[!s].jar" SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar" OVERRIDE_SLF4J_BACKEND = "OVERRIDE_SLF4J_BACKEND_JAR_LOCATION" +OVERRIDE_LOGGING = "OVERRIDE_LOGGING_JAR_LOCATION" OVERRIDE_SQLLINE = "OVERRIDE_SQLLINE_JAR_LOCATION" # Backward support old env variable PHOENIX_LIB_DIR replaced by PHOENIX_CLASS_PATH @@ -190,7 +192,12 @@ def setPath(): global slf4j_backend_jar slf4j_backend_jar = os.environ.get(OVERRIDE_SLF4J_BACKEND) if slf4j_backend_jar is None or slf4j_backend_jar == "": -slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_LOG4J12_JAR_PATTERN, os.path.join(current_dir, "..","lib")) +slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_BACKEND_JAR_PATTERN, os.path.join(current_dir, "..","lib")) + +global logging_jar +logging_jar = os.environ.get(OVERRIDE_LOGGING) +if logging_jar is None or logging_jar == "": +logging_jar = findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN, os.path.join(current_dir, "..","lib")) return "" @@ -231,3 +238,4 @@ if __name__ == "__main__": print("hadoop_classpath:", hadoop_classpath) print("sqlline_with_deps_jar:", sqlline_with_deps_jar) print("slf4j_backend_jar:", slf4j_backend_jar) +print("logging_jar:", logging_jar) diff --git a/bin/psql.py b/bin/psql.py index 0e57c77..1e0342d 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -65,8 +65,10 @@ else: java = 'java' java_cmd = java + ' $PHOENIX_OPTS ' + \ -
[phoenix] branch 4.x updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 84e75d9 PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) 84e75d9 is described below commit 84e75d9bdf53378846dc3aad09a29ef97e565d90 Author: Istvan Toth AuthorDate: Sat Feb 26 09:55:59 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) --- bin/performance.py | 4 +++- bin/pherf-standalone.py | 8 +++- bin/phoenix_utils.py| 12 ++-- bin/psql.py | 6 -- bin/sqlline.py | 11 ++- 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 16fee48..6107c93 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -100,7 +100,9 @@ else: execute = ('%s $PHOENIX_OPTS -cp "%s%s%s" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ -(java_cmd, hbase_config_path, os.pathsep, phoenix_utils.phoenix_client_jar, table, zookeeper) +(java_cmd, hbase_config_path, os.pathsep, phoenix_utils.slf4j_backend_jar, os.pathsep, + phoenix_utils.logging_jar, os.pathsep, phoenix_utils.phoenix_client_embedded_jar, + table, zookeeper) # Create Table DDL createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\ diff --git a/bin/pherf-standalone.py b/bin/pherf-standalone.py index b87585e..9e6b11c 100755 --- a/bin/pherf-standalone.py +++ b/bin/pherf-standalone.py @@ -64,7 +64,13 @@ if java_home: else: java = 'java' -java_cmd = java +' -Xms512m -Xmx3072m -cp "' + phoenix_utils.pherf_conf_path + os.pathsep + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + os.pathsep + phoenix_utils.phoenix_pherf_jar + \ +java_cmd = java +' -Xms512m -Xmx3072m -cp "' + \ +phoenix_utils.pherf_conf_path + os.pathsep + \ +phoenix_utils.hbase_conf_dir + os.pathsep + \ +phoenix_utils.slf4j_backend_jar + os.pathsep + \ +phoenix_utils.logging_jar + os.pathsep + \ +phoenix_utils.phoenix_client_embedded_jar + os.pathsep +\ +phoenix_utils.phoenix_pherf_jar + \ '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " org.apache.phoenix.pherf.Pherf " + args diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index d5cfab6..4ba8255 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -81,11 +81,13 @@ def setPath(): PHOENIX_TRACESERVER_JAR_PATTERN = "phoenix-tracing-webapp-*-runnable.jar" PHOENIX_TESTS_JAR_PATTERN = "phoenix-core-*-tests*.jar" PHOENIX_PHERF_JAR_PATTERN = "phoenix-pherf-*[!s].jar" -SLF4J_LOG4J12_JAR_PATTERN = "slf4j-log4j12-*[!s].jar" +SLF4J_BACKEND_JAR_PATTERN = "slf4j-reload4j-*[!s].jar" +LOGGING_JAR_PATTERN = "reload4j-*[!s].jar" SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar" OVERRIDE_SLF4J_BACKEND = "OVERRIDE_SLF4J_BACKEND_JAR_LOCATION" +OVERRIDE_LOGGING = "OVERRIDE_LOGGING_JAR_LOCATION" OVERRIDE_SQLLINE = "OVERRIDE_SQLLINE_JAR_LOCATION" # Backward support old env variable PHOENIX_LIB_DIR replaced by PHOENIX_CLASS_PATH @@ -190,7 +192,12 @@ def setPath(): global slf4j_backend_jar slf4j_backend_jar = os.environ.get(OVERRIDE_SLF4J_BACKEND) if slf4j_backend_jar is None or slf4j_backend_jar == "": -slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_LOG4J12_JAR_PATTERN, os.path.join(current_dir, "..","lib")) +slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_BACKEND_JAR_PATTERN, os.path.join(current_dir, "..","lib")) + +global logging_jar +logging_jar = os.environ.get(OVERRIDE_LOGGING) +if logging_jar is None or logging_jar == "": +logging_jar = findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN, os.path.join(current_dir, "..","lib")) return "" @@ -231,3 +238,4 @@ if __name__ == "__main__": print("hadoop_classpath:", hadoop_classpath) print("sqlline_with_deps_jar:", sqlline_with_deps_jar) print("slf4j_backend_jar:", slf4j_backend_jar) +print("logging_jar:", logging_jar) diff --git a/bin/psql.py b/bin/psql.py index 0e57c77..1e0342d 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -65,8 +65,10 @@ else: java = 'java' java_cmd = java + ' $PHOENIX_OPTS ' + \ -
[phoenix] branch 5.1 updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 6d56fde PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) 6d56fde is described below commit 6d56fde0969fb3ce4fb49972eb52831c809dad43 Author: Istvan Toth AuthorDate: Sat Feb 26 09:55:59 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) --- bin/performance.py | 3 ++- bin/pherf-standalone.py | 8 +++- bin/phoenix_utils.py| 12 ++-- bin/psql.py | 1 + bin/sqlline.py | 7 +-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 0215806..212a1f6 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -101,7 +101,8 @@ execute = ('%s $PHOENIX_OPTS -cp "%s%s%s%s%s" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ (java_cmd, hbase_config_path, os.pathsep, phoenix_utils.slf4j_backend_jar, os.pathsep, - phoenix_utils.phoenix_client_embedded_jar, table, zookeeper) + phoenix_utils.logging_jar, os.pathsep, phoenix_utils.phoenix_client_embedded_jar, + table, zookeeper) # Create Table DDL createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\ diff --git a/bin/pherf-standalone.py b/bin/pherf-standalone.py index 86d6984..16617d6 100755 --- a/bin/pherf-standalone.py +++ b/bin/pherf-standalone.py @@ -64,7 +64,13 @@ if java_home: else: java = 'java' -java_cmd = java +' -Xms512m -Xmx3072m -cp "' + phoenix_utils.pherf_conf_path + os.pathsep + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.slf4j_backend_jar + os.pathsep + phoenix_utils.phoenix_client_embedded_jar + os.pathsep + phoenix_utils.phoenix_pherf_jar + \ +java_cmd = java +' -Xms512m -Xmx3072m -cp "' + \ +phoenix_utils.pherf_conf_path + os.pathsep + \ +phoenix_utils.hbase_conf_dir + os.pathsep + \ +phoenix_utils.slf4j_backend_jar + os.pathsep + \ +phoenix_utils.logging_jar + os.pathsep + \ +phoenix_utils.phoenix_client_embedded_jar + os.pathsep +\ +phoenix_utils.phoenix_pherf_jar + \ '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " org.apache.phoenix.pherf.Pherf " + args diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index f58e113..012d09d 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -81,11 +81,13 @@ def setPath(): PHOENIX_TRACESERVER_JAR_PATTERN = "phoenix-tracing-webapp-*-runnable.jar" PHOENIX_TESTS_JAR_PATTERN = "phoenix-core-*-tests*.jar" PHOENIX_PHERF_JAR_PATTERN = "phoenix-pherf-*[!s].jar" -SLF4J_LOG4J12_JAR_PATTERN = "slf4j-log4j12-*[!s].jar" +SLF4J_BACKEND_JAR_PATTERN = "slf4j-reload4j-*[!s].jar" +LOGGING_JAR_PATTERN = "reload4j-*[!s].jar" SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar" OVERRIDE_SLF4J_BACKEND = "OVERRIDE_SLF4J_BACKEND_JAR_LOCATION" +OVERRIDE_LOGGING = "OVERRIDE_LOGGING_JAR_LOCATION" OVERRIDE_SQLLINE = "OVERRIDE_SQLLINE_JAR_LOCATION" # Backward support old env variable PHOENIX_LIB_DIR replaced by PHOENIX_CLASS_PATH @@ -176,7 +178,12 @@ def setPath(): global slf4j_backend_jar slf4j_backend_jar = os.environ.get(OVERRIDE_SLF4J_BACKEND) if slf4j_backend_jar is None or slf4j_backend_jar == "": -slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_LOG4J12_JAR_PATTERN, os.path.join(current_dir, "..","lib")) +slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_BACKEND_JAR_PATTERN, os.path.join(current_dir, "..","lib")) + +global logging_jar +logging_jar = os.environ.get(OVERRIDE_LOGGING) +if logging_jar is None or logging_jar == "": +logging_jar = findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN, os.path.join(current_dir, "..","lib")) return "" @@ -212,3 +219,4 @@ if __name__ == "__main__": print("hadoop_classpath:", hadoop_classpath) print("sqlline_with_deps_jar:", sqlline_with_deps_jar) print("slf4j_backend_jar:", slf4j_backend_jar) +print("logging_jar:", logging_jar) diff --git a/bin/psql.py b/bin/psql.py index 9e2de5a..6c63a21 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -67,6 +67,7 @@ else: java_cmd = java + ' $PHOENIX_
[phoenix] branch master updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new df58e9c PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) df58e9c is described below commit df58e9c8a616c20f9b27ee3c0aeb5e17ae968052 Author: Istvan Toth AuthorDate: Sat Feb 26 09:55:59 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j (addendum: fix python scripts) --- bin/performance.py | 3 ++- bin/pherf-standalone.py | 8 +++- bin/phoenix_utils.py| 12 ++-- bin/psql.py | 1 + bin/sqlline.py | 7 +-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 0215806..212a1f6 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -101,7 +101,8 @@ execute = ('%s $PHOENIX_OPTS -cp "%s%s%s%s%s" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ (java_cmd, hbase_config_path, os.pathsep, phoenix_utils.slf4j_backend_jar, os.pathsep, - phoenix_utils.phoenix_client_embedded_jar, table, zookeeper) + phoenix_utils.logging_jar, os.pathsep, phoenix_utils.phoenix_client_embedded_jar, + table, zookeeper) # Create Table DDL createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\ diff --git a/bin/pherf-standalone.py b/bin/pherf-standalone.py index 86d6984..16617d6 100755 --- a/bin/pherf-standalone.py +++ b/bin/pherf-standalone.py @@ -64,7 +64,13 @@ if java_home: else: java = 'java' -java_cmd = java +' -Xms512m -Xmx3072m -cp "' + phoenix_utils.pherf_conf_path + os.pathsep + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.slf4j_backend_jar + os.pathsep + phoenix_utils.phoenix_client_embedded_jar + os.pathsep + phoenix_utils.phoenix_pherf_jar + \ +java_cmd = java +' -Xms512m -Xmx3072m -cp "' + \ +phoenix_utils.pherf_conf_path + os.pathsep + \ +phoenix_utils.hbase_conf_dir + os.pathsep + \ +phoenix_utils.slf4j_backend_jar + os.pathsep + \ +phoenix_utils.logging_jar + os.pathsep + \ +phoenix_utils.phoenix_client_embedded_jar + os.pathsep +\ +phoenix_utils.phoenix_pherf_jar + \ '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " org.apache.phoenix.pherf.Pherf " + args diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index f58e113..012d09d 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -81,11 +81,13 @@ def setPath(): PHOENIX_TRACESERVER_JAR_PATTERN = "phoenix-tracing-webapp-*-runnable.jar" PHOENIX_TESTS_JAR_PATTERN = "phoenix-core-*-tests*.jar" PHOENIX_PHERF_JAR_PATTERN = "phoenix-pherf-*[!s].jar" -SLF4J_LOG4J12_JAR_PATTERN = "slf4j-log4j12-*[!s].jar" +SLF4J_BACKEND_JAR_PATTERN = "slf4j-reload4j-*[!s].jar" +LOGGING_JAR_PATTERN = "reload4j-*[!s].jar" SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar" OVERRIDE_SLF4J_BACKEND = "OVERRIDE_SLF4J_BACKEND_JAR_LOCATION" +OVERRIDE_LOGGING = "OVERRIDE_LOGGING_JAR_LOCATION" OVERRIDE_SQLLINE = "OVERRIDE_SQLLINE_JAR_LOCATION" # Backward support old env variable PHOENIX_LIB_DIR replaced by PHOENIX_CLASS_PATH @@ -176,7 +178,12 @@ def setPath(): global slf4j_backend_jar slf4j_backend_jar = os.environ.get(OVERRIDE_SLF4J_BACKEND) if slf4j_backend_jar is None or slf4j_backend_jar == "": -slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_LOG4J12_JAR_PATTERN, os.path.join(current_dir, "..","lib")) +slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_BACKEND_JAR_PATTERN, os.path.join(current_dir, "..","lib")) + +global logging_jar +logging_jar = os.environ.get(OVERRIDE_LOGGING) +if logging_jar is None or logging_jar == "": +logging_jar = findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN, os.path.join(current_dir, "..","lib")) return "" @@ -212,3 +219,4 @@ if __name__ == "__main__": print("hadoop_classpath:", hadoop_classpath) print("sqlline_with_deps_jar:", sqlline_with_deps_jar) print("slf4j_backend_jar:", slf4j_backend_jar) +print("logging_jar:", logging_jar) diff --git a/bin/psql.py b/bin/psql.py index 9e2de5a..6c63a21 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -67,6 +67,7 @@ else: java_cmd = java + ' $PHOENIX_
[phoenix] branch 4.16 updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 977ecae PHOENIX-6636 Replace bundled log4j libraries with reload4j 977ecae is described below commit 977ecae4851f2bee71b04a5aae94b9f173f20e35 Author: Istvan Toth AuthorDate: Mon Jan 31 12:48:12 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j --- phoenix-assembly/src/build/package-to-tar-all.xml | 3 +- .../phoenix-client-embedded/pom.xml| 13 +++ phoenix-client-parent/phoenix-client/pom.xml | 14 +-- phoenix-core/pom.xml | 10 ++--- phoenix-tracing-webapp/pom.xml | 4 +- pom.xml| 45 ++ 6 files changed, 69 insertions(+), 20 deletions(-) diff --git a/phoenix-assembly/src/build/package-to-tar-all.xml b/phoenix-assembly/src/build/package-to-tar-all.xml index f64ace9..e03d4e8 100644 --- a/phoenix-assembly/src/build/package-to-tar-all.xml +++ b/phoenix-assembly/src/build/package-to-tar-all.xml @@ -36,7 +36,8 @@ false /lib -org.slf4j:slf4j-log4j12 +org.slf4j:slf4j-reload4j +ch.qos.reload4j:reload4j diff --git a/phoenix-client-parent/phoenix-client-embedded/pom.xml b/phoenix-client-parent/phoenix-client-embedded/pom.xml index 815f0ce..f757e65 100644 --- a/phoenix-client-parent/phoenix-client-embedded/pom.xml +++ b/phoenix-client-parent/phoenix-client-embedded/pom.xml @@ -73,8 +73,21 @@ org.slf4j + slf4j-reload4j + + + ch.qos.reload4j + reload4j + + + + org.slf4j slf4j-log4j12 + + log4j + log4j + diff --git a/phoenix-client-parent/phoenix-client/pom.xml b/phoenix-client-parent/phoenix-client/pom.xml index e2eb54f..9af876e 100644 --- a/phoenix-client-parent/phoenix-client/pom.xml +++ b/phoenix-client-parent/phoenix-client/pom.xml @@ -77,12 +77,18 @@ false - sqlline - sqlline + org.slf4j + slf4j-reload4j + runtime - org.slf4j - slf4j-log4j12 + ch.qos.reload4j + reload4j + runtime + + + sqlline + sqlline diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 2208e12..ebaf43f 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -178,8 +178,12 @@ + ch.qos.reload4j + reload4j + + org.slf4j - slf4j-log4j12 + slf4j-reload4j sqlline @@ -347,10 +351,6 @@ protobuf-java - log4j - log4j - - org.slf4j slf4j-api diff --git a/phoenix-tracing-webapp/pom.xml b/phoenix-tracing-webapp/pom.xml index 62675ca..9963c21 100755 --- a/phoenix-tracing-webapp/pom.xml +++ b/phoenix-tracing-webapp/pom.xml @@ -61,8 +61,8 @@ slf4j-api -log4j -log4j +ch.qos.reload4j +reload4j compile diff --git a/pom.xml b/pom.xml index fa66753..8d67042 100644 --- a/pom.xml +++ b/pom.xml @@ -97,9 +97,9 @@ 2.7.1 2.12.4 3.5.2 -1.2.17 +1.2.19 3.3.6 -1.6.4 +1.7.36 2.6 2.5 @@ -1090,18 +1090,13 @@ ${protobuf-java.version} -log4j -log4j -${log4j.version} - - org.slf4j slf4j-api ${slf4j.version} org.slf4j -slf4j-log4j12 +slf4j-reload4j ${slf4j.version} @@ -1175,6 +1170,40 @@ + + + +junit +junit +${junit.version} +test + + +org.mockito +mockito-core +${mockito.version} +test + + + + +ch.qos.reload4j +reload4j +${reload4j.version} +runtime + + +org.slf4j +slf4j-reload4j +${slf4j.version} +runtime + + +sqlline +sqlline +${sqlline.version} +runtime +
[phoenix] branch 4.x updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new a404c23 PHOENIX-6636 Replace bundled log4j libraries with reload4j a404c23 is described below commit a404c236092a16a4eb2dde9a835f6a452ba5f8a2 Author: Istvan Toth AuthorDate: Mon Jan 31 12:48:12 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j --- phoenix-assembly/src/build/package-to-tar-all.xml | 3 +- .../phoenix-client-embedded/pom.xml| 13 +++ phoenix-client-parent/phoenix-client/pom.xml | 14 +-- phoenix-core/pom.xml | 10 ++--- phoenix-tracing-webapp/pom.xml | 4 +- pom.xml| 45 ++ 6 files changed, 69 insertions(+), 20 deletions(-) diff --git a/phoenix-assembly/src/build/package-to-tar-all.xml b/phoenix-assembly/src/build/package-to-tar-all.xml index f64ace9..e03d4e8 100644 --- a/phoenix-assembly/src/build/package-to-tar-all.xml +++ b/phoenix-assembly/src/build/package-to-tar-all.xml @@ -36,7 +36,8 @@ false /lib -org.slf4j:slf4j-log4j12 +org.slf4j:slf4j-reload4j +ch.qos.reload4j:reload4j diff --git a/phoenix-client-parent/phoenix-client-embedded/pom.xml b/phoenix-client-parent/phoenix-client-embedded/pom.xml index b487027..4a4d402 100644 --- a/phoenix-client-parent/phoenix-client-embedded/pom.xml +++ b/phoenix-client-parent/phoenix-client-embedded/pom.xml @@ -73,8 +73,21 @@ org.slf4j + slf4j-reload4j + + + ch.qos.reload4j + reload4j + + + + org.slf4j slf4j-log4j12 + + log4j + log4j + diff --git a/phoenix-client-parent/phoenix-client/pom.xml b/phoenix-client-parent/phoenix-client/pom.xml index 8278e06..007d949 100644 --- a/phoenix-client-parent/phoenix-client/pom.xml +++ b/phoenix-client-parent/phoenix-client/pom.xml @@ -77,12 +77,18 @@ false - sqlline - sqlline + org.slf4j + slf4j-reload4j + runtime - org.slf4j - slf4j-log4j12 + ch.qos.reload4j + reload4j + runtime + + + sqlline + sqlline diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index ff2bd66..39ef14d 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -178,8 +178,12 @@ + ch.qos.reload4j + reload4j + + org.slf4j - slf4j-log4j12 + slf4j-reload4j sqlline @@ -347,10 +351,6 @@ protobuf-java - log4j - log4j - - org.slf4j slf4j-api diff --git a/phoenix-tracing-webapp/pom.xml b/phoenix-tracing-webapp/pom.xml index 31ca4a5..1d4291b 100755 --- a/phoenix-tracing-webapp/pom.xml +++ b/phoenix-tracing-webapp/pom.xml @@ -61,8 +61,8 @@ slf4j-api -log4j -log4j +ch.qos.reload4j +reload4j compile diff --git a/pom.xml b/pom.xml index e2034c6..46345f7 100644 --- a/pom.xml +++ b/pom.xml @@ -95,9 +95,9 @@ 2.7.1 2.12.4 3.5.2 -1.2.17 +1.2.19 3.3.6 -1.6.4 +1.7.36 2.6 2.5 @@ -1075,18 +1075,13 @@ ${protobuf-java.version} -log4j -log4j -${log4j.version} - - org.slf4j slf4j-api ${slf4j.version} org.slf4j -slf4j-log4j12 +slf4j-reload4j ${slf4j.version} @@ -1170,6 +1165,40 @@ + + + +junit +junit +${junit.version} +test + + +org.mockito +mockito-core +${mockito.version} +test + + + + +ch.qos.reload4j +reload4j +${reload4j.version} +runtime + + +org.slf4j +slf4j-reload4j +${slf4j.version} +runtime + + +sqlline +sqlline +${sqlline.version} +runtime +
[phoenix] branch 5.1 updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new cd35c52 PHOENIX-6636 Replace bundled log4j libraries with reload4j cd35c52 is described below commit cd35c5239bd7e3f263d3f2a99ce1b996205bde4b Author: Istvan Toth AuthorDate: Mon Jan 31 12:48:12 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j --- phoenix-assembly/src/build/package-to-tar-all.xml | 3 ++- phoenix-client-parent/phoenix-client-embedded/pom.xml | 13 + phoenix-client-parent/phoenix-client/pom.xml | 6 +++--- phoenix-core/pom.xml | 6 +- phoenix-server/pom.xml| 2 ++ phoenix-tracing-webapp/pom.xml| 4 ++-- pom.xml | 18 +- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/phoenix-assembly/src/build/package-to-tar-all.xml b/phoenix-assembly/src/build/package-to-tar-all.xml index f64ace9..e03d4e8 100644 --- a/phoenix-assembly/src/build/package-to-tar-all.xml +++ b/phoenix-assembly/src/build/package-to-tar-all.xml @@ -36,7 +36,8 @@ false /lib -org.slf4j:slf4j-log4j12 +org.slf4j:slf4j-reload4j +ch.qos.reload4j:reload4j diff --git a/phoenix-client-parent/phoenix-client-embedded/pom.xml b/phoenix-client-parent/phoenix-client-embedded/pom.xml index ccc6c7f..b7bf508 100644 --- a/phoenix-client-parent/phoenix-client-embedded/pom.xml +++ b/phoenix-client-parent/phoenix-client-embedded/pom.xml @@ -72,8 +72,21 @@ org.slf4j + slf4j-reload4j + + + ch.qos.reload4j + reload4j + + + + org.slf4j slf4j-log4j12 + + log4j + log4j + diff --git a/phoenix-client-parent/phoenix-client/pom.xml b/phoenix-client-parent/phoenix-client/pom.xml index 62b1cab..1b823dd 100644 --- a/phoenix-client-parent/phoenix-client/pom.xml +++ b/phoenix-client-parent/phoenix-client/pom.xml @@ -77,12 +77,12 @@ org.slf4j - slf4j-log4j12 + slf4j-reload4j runtime - log4j - log4j + ch.qos.reload4j + reload4j runtime diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index bfd08ab..5969913 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -193,8 +193,12 @@ + ch.qos.reload4j + reload4j + + org.slf4j - slf4j-log4j12 + slf4j-reload4j sqlline diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml index 12f6dc2..75aaafe 100644 --- a/phoenix-server/pom.xml +++ b/phoenix-server/pom.xml @@ -117,8 +117,10 @@ org.apache.phoenix:phoenix-server sqlline:sqlline log4j:log4j +ch.qos.reload4j:reload4j org.slf4j:slf4j-api org.slf4j:slf4j-log4j12 +org.slf4j:slf4j-reload4j diff --git a/phoenix-tracing-webapp/pom.xml b/phoenix-tracing-webapp/pom.xml index a932c62..6b56f02 100755 --- a/phoenix-tracing-webapp/pom.xml +++ b/phoenix-tracing-webapp/pom.xml @@ -62,8 +62,8 @@ slf4j-api -log4j -log4j +ch.qos.reload4j +reload4j compile diff --git a/pom.xml b/pom.xml index c9929a5..bb38862 100644 --- a/pom.xml +++ b/pom.xml @@ -99,9 +99,9 @@ 2.12.4 3.5.2 -1.2.17 +1.2.19 3.3.6 -1.7.25 +1.7.36 com.google.protobuf 2.5.0 @@ -373,7 +373,7 @@ org.apache.omid:omid-timestamp-storage-hbase2.x - org.slf4j:slf4j-log4j12 + org.slf4j:slf4j-reload4j org.apache.hbase:hbase-testing-util @@ -1482,15 +1482,15 @@ - - log4j - log4j - ${log4j.version} - runtime + +ch.qos.reload4j +reload4j +${reload4j.version} +runtime org.slf4j -slf4j-log4j12 +slf4j-reload4j ${slf4j.version} runtime
[phoenix] branch master updated: PHOENIX-6636 Replace bundled log4j libraries with reload4j
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 7793bbf PHOENIX-6636 Replace bundled log4j libraries with reload4j 7793bbf is described below commit 7793bbffd8b8aa6746accfc6e7e9718d6be7d397 Author: Istvan Toth AuthorDate: Mon Jan 31 12:48:12 2022 +0100 PHOENIX-6636 Replace bundled log4j libraries with reload4j --- phoenix-assembly/src/build/package-to-tar-all.xml | 3 ++- phoenix-client-parent/phoenix-client-embedded/pom.xml | 13 + phoenix-client-parent/phoenix-client/pom.xml | 6 +++--- phoenix-core/pom.xml | 6 +- phoenix-server/pom.xml| 2 ++ phoenix-tracing-webapp/pom.xml| 4 ++-- pom.xml | 18 +- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/phoenix-assembly/src/build/package-to-tar-all.xml b/phoenix-assembly/src/build/package-to-tar-all.xml index f64ace9..e03d4e8 100644 --- a/phoenix-assembly/src/build/package-to-tar-all.xml +++ b/phoenix-assembly/src/build/package-to-tar-all.xml @@ -36,7 +36,8 @@ false /lib -org.slf4j:slf4j-log4j12 +org.slf4j:slf4j-reload4j +ch.qos.reload4j:reload4j diff --git a/phoenix-client-parent/phoenix-client-embedded/pom.xml b/phoenix-client-parent/phoenix-client-embedded/pom.xml index 980f4c0..74aacf1 100644 --- a/phoenix-client-parent/phoenix-client-embedded/pom.xml +++ b/phoenix-client-parent/phoenix-client-embedded/pom.xml @@ -72,8 +72,21 @@ org.slf4j + slf4j-reload4j + + + ch.qos.reload4j + reload4j + + + + org.slf4j slf4j-log4j12 + + log4j + log4j + diff --git a/phoenix-client-parent/phoenix-client/pom.xml b/phoenix-client-parent/phoenix-client/pom.xml index d70c1e7..415b4fd 100644 --- a/phoenix-client-parent/phoenix-client/pom.xml +++ b/phoenix-client-parent/phoenix-client/pom.xml @@ -77,12 +77,12 @@ org.slf4j - slf4j-log4j12 + slf4j-reload4j runtime - log4j - log4j + ch.qos.reload4j + reload4j runtime diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 5167399..db6008c 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -193,8 +193,12 @@ + ch.qos.reload4j + reload4j + + org.slf4j - slf4j-log4j12 + slf4j-reload4j sqlline diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml index ea30e91..dc62e14 100644 --- a/phoenix-server/pom.xml +++ b/phoenix-server/pom.xml @@ -117,8 +117,10 @@ org.apache.phoenix:phoenix-server sqlline:sqlline log4j:log4j +ch.qos.reload4j:reload4j org.slf4j:slf4j-api org.slf4j:slf4j-log4j12 +org.slf4j:slf4j-reload4j diff --git a/phoenix-tracing-webapp/pom.xml b/phoenix-tracing-webapp/pom.xml index 31fe2ef..3766403 100755 --- a/phoenix-tracing-webapp/pom.xml +++ b/phoenix-tracing-webapp/pom.xml @@ -62,8 +62,8 @@ slf4j-api -log4j -log4j +ch.qos.reload4j +reload4j compile diff --git a/pom.xml b/pom.xml index 8cfda4f..00a2381 100644 --- a/pom.xml +++ b/pom.xml @@ -99,9 +99,9 @@ 2.12.4 3.5.2 -1.2.17 +1.2.19 3.3.6 -1.7.25 +1.7.36 com.google.protobuf 2.5.0 @@ -373,7 +373,7 @@ org.apache.omid:omid-timestamp-storage-hbase2.x - org.slf4j:slf4j-log4j12 + org.slf4j:slf4j-reload4j org.apache.hbase:hbase-testing-util @@ -1482,15 +1482,15 @@ - - log4j - log4j - ${log4j.version} - runtime + +ch.qos.reload4j +reload4j +${reload4j.version} +runtime org.slf4j -slf4j-log4j12 +slf4j-reload4j ${slf4j.version} runtime
[phoenix] 01/02: PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git commit 0dcddf58000f0d9689ae10a76cd70739f312a9b2 Author: Istvan Toth AuthorDate: Thu Feb 17 18:18:01 2022 +0100 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade --- .../java/org/apache/phoenix/end2end/UpgradeIT.java | 59 + .../phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 + .../phoenix/query/ConnectionQueryServicesImpl.java | 61 +- .../java/org/apache/phoenix/util/UpgradeUtil.java | 24 - 4 files changed, 132 insertions(+), 14 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java index 29c72c2..3a1b8f1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java @@ -18,6 +18,7 @@ package org.apache.phoenix.end2end; import static org.apache.phoenix.thirdparty.com.google.common.base.Preconditions.checkNotNull; +import static org.apache.hadoop.hbase.HColumnDescriptor.KEEP_DELETED_CELLS; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LAST_DDL_TIMESTAMP; @@ -43,7 +44,9 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.sql.Types; +import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Set; @@ -60,6 +63,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; @@ -78,6 +84,7 @@ import org.apache.phoenix.query.DelegateConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.schema.PName; import org.apache.phoenix.schema.PNameFactory; +import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.PTable.LinkType; import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.schema.SequenceAllocation; @@ -358,6 +365,58 @@ public class UpgradeIT extends ParallelStatsDisabledIT { } } +@Test +public void testRemoveScnFromTaskAndLog() throws Exception { +PhoenixConnection conn = getConnection(false, null).unwrap(PhoenixConnection.class); +ConnectionQueryServicesImpl cqs = (ConnectionQueryServicesImpl)(conn.getQueryServices()); +//Set the SCN related properties on SYSTEM.STATS and SYSTEM.LOG +try (Statement stmt = conn.createStatement()) { +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +} +//Check that the HBase tables reflect the change +PTable sysLogTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_LOG_NAME); +HTableDescriptor sysLogDesc = utility.getHBaseAdmin().getTableDescriptor(SchemaUtil.getPhysicalTableName( +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME, cqs.getProps())); +assertEquals(KeepDeletedCells.TRUE, sysLogDesc.getFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getKeepDeletedCells()); +assertEquals(1000, sysLogDesc.getFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getMaxVersions()); + +PTable sysStatsTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_STATS_NAME); +HTableDescriptor sysStatsDesc = utility.getHBaseAdmin().getTableDescriptor(SchemaUtil.getPhysicalTableName( +PhoenixDatabaseMetaData.SYSTEM_STATS_NAME, cqs.getProps())); +assertEquals(KeepDeletedCells.TRUE, sysStatsDesc.getFamily( + SchemaUtil.getEmptyColumnFam
[phoenix] branch 4.16 updated (41963df -> a33c2d0)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a change to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git. from 41963df PHOENIX-6576 Do not use guava's Files.createTempDir() new 0dcddf5 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade new a33c2d0 PHOENIX-6646 System tables are not upgraded after namespace migration The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../end2end/ConnectionQueryServicesTestImpl.java | 12 +- .../phoenix/end2end/SnapshotTestTemplateIT.java| 119 +++ .../java/org/apache/phoenix/end2end/UpgradeIT.java | 59 .../phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 + .../org/apache/phoenix/jdbc/PhoenixStatement.java | 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 160 - .../java/org/apache/phoenix/util/MetaDataUtil.java | 26 ++-- .../java/org/apache/phoenix/util/UpgradeUtil.java | 37 - .../java/org/apache/phoenix/query/BaseTest.java| 2 +- 9 files changed, 329 insertions(+), 90 deletions(-) create mode 100644 phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java
[phoenix] 02/02: PHOENIX-6646 System tables are not upgraded after namespace migration
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git commit a33c2d02b7dbb042ee719a146ed23c856d730369 Author: Istvan Toth AuthorDate: Wed Feb 16 14:43:50 2022 +0100 PHOENIX-6646 System tables are not upgraded after namespace migration refactor upgrade code to better handle NS mapping + version update case fix ConnectionQueryServicesTestImpl to avoid deadlock on upsert...select improve handling of missing Hbase system tables on upgrade add template for IT that loads HBase table snapshots from local FS --- .../end2end/ConnectionQueryServicesTestImpl.java | 12 ++- .../phoenix/end2end/SnapshotTestTemplateIT.java| 119 + .../org/apache/phoenix/jdbc/PhoenixStatement.java | 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 99 - .../java/org/apache/phoenix/util/MetaDataUtil.java | 26 +++-- .../java/org/apache/phoenix/util/UpgradeUtil.java | 13 +-- .../java/org/apache/phoenix/query/BaseTest.java| 2 +- 7 files changed, 197 insertions(+), 76 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index c6b0e3f..7e7b6b1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -23,8 +23,10 @@ import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Properties; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; @@ -53,9 +55,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl { private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionQueryServicesTestImpl.class); -protected int NUM_SLAVES_BASE = 1; // number of slaves for the cluster // Track open connections to free them on close as unit tests don't always do this. -private Set connections = Sets.newHashSet(); +private Set connections = +Collections.newSetFromMap(new ConcurrentHashMap()); private final PhoenixTransactionService[] txServices = new PhoenixTransactionService[TransactionFactory.Provider.values().length]; public ConnectionQueryServicesTestImpl(QueryServices services, ConnectionInfo info, Properties props) throws SQLException { @@ -63,13 +65,15 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl } @Override -public synchronized void addConnection(PhoenixConnection connection) throws SQLException { +public void addConnection(PhoenixConnection connection) throws SQLException { connections.add(connection); +super.addConnection(connection); } @Override -public synchronized void removeConnection(PhoenixConnection connection) throws SQLException { +public void removeConnection(PhoenixConnection connection) throws SQLException { connections.remove(connection); +super.removeConnection(connection); } @Override diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java new file mode 100644 index 000..a990ab3 --- /dev/null +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.end2end; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.
[phoenix] branch 4.x updated: PHOENIX-6646 System tables are not upgraded after namespace migration (addendum:backport fixes)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new ace3e78 PHOENIX-6646 System tables are not upgraded after namespace migration (addendum:backport fixes) ace3e78 is described below commit ace3e7832aed2cee73b456386efba71eae2e7ed9 Author: Istvan Toth AuthorDate: Thu Feb 24 17:22:22 2022 +0100 PHOENIX-6646 System tables are not upgraded after namespace migration (addendum:backport fixes) --- .../src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java | 2 +- .../main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java index 767baf2..a990ab3 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java @@ -108,7 +108,7 @@ public class SnapshotTestTemplateIT extends BaseTest { assertEquals(0, importExitCode); //load the snapshot -utility.getAdmin().restoreSnapshot(key); +utility.getHBaseAdmin().restoreSnapshot(key); } @Test diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 00abf7a..4863687 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -126,6 +126,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HRegionLocation; +import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.NamespaceNotFoundException;
[phoenix] branch 4.x updated: PHOENIX-6646 System tables are not upgraded after namespace migration
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 5321563 PHOENIX-6646 System tables are not upgraded after namespace migration 5321563 is described below commit 5321563744f6b5760e41c904579a36c64d839e78 Author: Istvan Toth AuthorDate: Wed Feb 16 14:43:50 2022 +0100 PHOENIX-6646 System tables are not upgraded after namespace migration refactor upgrade code to better handle NS mapping + version update case fix ConnectionQueryServicesTestImpl to avoid deadlock on upsert...select improve handling of missing Hbase system tables on upgrade add template for IT that loads HBase table snapshots from local FS --- .../end2end/ConnectionQueryServicesTestImpl.java | 12 ++- .../phoenix/end2end/SnapshotTestTemplateIT.java| 119 + .../org/apache/phoenix/jdbc/PhoenixStatement.java | 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 100 - .../java/org/apache/phoenix/util/MetaDataUtil.java | 26 +++-- .../java/org/apache/phoenix/util/UpgradeUtil.java | 13 +-- .../java/org/apache/phoenix/query/BaseTest.java| 2 +- 7 files changed, 197 insertions(+), 77 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index c6b0e3f..7e7b6b1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -23,8 +23,10 @@ import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Properties; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; @@ -53,9 +55,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl { private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionQueryServicesTestImpl.class); -protected int NUM_SLAVES_BASE = 1; // number of slaves for the cluster // Track open connections to free them on close as unit tests don't always do this. -private Set connections = Sets.newHashSet(); +private Set connections = +Collections.newSetFromMap(new ConcurrentHashMap()); private final PhoenixTransactionService[] txServices = new PhoenixTransactionService[TransactionFactory.Provider.values().length]; public ConnectionQueryServicesTestImpl(QueryServices services, ConnectionInfo info, Properties props) throws SQLException { @@ -63,13 +65,15 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl } @Override -public synchronized void addConnection(PhoenixConnection connection) throws SQLException { +public void addConnection(PhoenixConnection connection) throws SQLException { connections.add(connection); +super.addConnection(connection); } @Override -public synchronized void removeConnection(PhoenixConnection connection) throws SQLException { +public void removeConnection(PhoenixConnection connection) throws SQLException { connections.remove(connection); +super.removeConnection(connection); } @Override diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java new file mode 100644 index 000..767baf2 --- /dev/null +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.
[phoenix] branch 5.1 updated: PHOENIX-6646 System tables are not upgraded after namespace migration
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new aa91592 PHOENIX-6646 System tables are not upgraded after namespace migration aa91592 is described below commit aa91592ec589c07e09736323b97eabbe640e392d Author: Istvan Toth AuthorDate: Wed Feb 16 14:43:50 2022 +0100 PHOENIX-6646 System tables are not upgraded after namespace migration refactor upgrade code to better handle NS mapping + version update case fix ConnectionQueryServicesTestImpl to avoid deadlock on upsert...select improve handling of missing Hbase system tables on upgrade add template for IT that loads HBase table snapshots from local FS --- .../end2end/ConnectionQueryServicesTestImpl.java | 12 ++- .../phoenix/end2end/SnapshotTestTemplateIT.java| 119 + .../org/apache/phoenix/jdbc/PhoenixStatement.java | 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 112 +-- .../java/org/apache/phoenix/util/MetaDataUtil.java | 26 +++-- .../java/org/apache/phoenix/util/UpgradeUtil.java | 15 +-- .../java/org/apache/phoenix/query/BaseTest.java| 2 +- 7 files changed, 204 insertions(+), 84 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index c6b0e3f..7e7b6b1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -23,8 +23,10 @@ import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Properties; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; @@ -53,9 +55,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl { private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionQueryServicesTestImpl.class); -protected int NUM_SLAVES_BASE = 1; // number of slaves for the cluster // Track open connections to free them on close as unit tests don't always do this. -private Set connections = Sets.newHashSet(); +private Set connections = +Collections.newSetFromMap(new ConcurrentHashMap()); private final PhoenixTransactionService[] txServices = new PhoenixTransactionService[TransactionFactory.Provider.values().length]; public ConnectionQueryServicesTestImpl(QueryServices services, ConnectionInfo info, Properties props) throws SQLException { @@ -63,13 +65,15 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl } @Override -public synchronized void addConnection(PhoenixConnection connection) throws SQLException { +public void addConnection(PhoenixConnection connection) throws SQLException { connections.add(connection); +super.addConnection(connection); } @Override -public synchronized void removeConnection(PhoenixConnection connection) throws SQLException { +public void removeConnection(PhoenixConnection connection) throws SQLException { connections.remove(connection); +super.removeConnection(connection); } @Override diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java new file mode 100644 index 000..767baf2 --- /dev/null +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.
[phoenix] branch master updated: PHOENIX-6646 System tables are not upgraded after namespace migration
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 455b1a7 PHOENIX-6646 System tables are not upgraded after namespace migration 455b1a7 is described below commit 455b1a7696a9fde454c9bcc089d607b6842cdf99 Author: Istvan Toth AuthorDate: Wed Feb 16 14:43:50 2022 +0100 PHOENIX-6646 System tables are not upgraded after namespace migration refactor upgrade code to better handle NS mapping + version update case fix ConnectionQueryServicesTestImpl to avoid deadlock on upsert...select improve handling of missing Hbase system tables on upgrade add template for IT that loads HBase table snapshots from local FS --- .../end2end/ConnectionQueryServicesTestImpl.java | 12 ++- .../phoenix/end2end/SnapshotTestTemplateIT.java| 119 + .../org/apache/phoenix/jdbc/PhoenixStatement.java | 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 112 +-- .../java/org/apache/phoenix/util/MetaDataUtil.java | 26 +++-- .../java/org/apache/phoenix/util/UpgradeUtil.java | 15 +-- .../java/org/apache/phoenix/query/BaseTest.java| 2 +- 7 files changed, 204 insertions(+), 84 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index c6b0e3f..7e7b6b1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -23,8 +23,10 @@ import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Properties; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; @@ -53,9 +55,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl { private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionQueryServicesTestImpl.class); -protected int NUM_SLAVES_BASE = 1; // number of slaves for the cluster // Track open connections to free them on close as unit tests don't always do this. -private Set connections = Sets.newHashSet(); +private Set connections = +Collections.newSetFromMap(new ConcurrentHashMap()); private final PhoenixTransactionService[] txServices = new PhoenixTransactionService[TransactionFactory.Provider.values().length]; public ConnectionQueryServicesTestImpl(QueryServices services, ConnectionInfo info, Properties props) throws SQLException { @@ -63,13 +65,15 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl } @Override -public synchronized void addConnection(PhoenixConnection connection) throws SQLException { +public void addConnection(PhoenixConnection connection) throws SQLException { connections.add(connection); +super.addConnection(connection); } @Override -public synchronized void removeConnection(PhoenixConnection connection) throws SQLException { +public void removeConnection(PhoenixConnection connection) throws SQLException { connections.remove(connection); +super.removeConnection(connection); } @Override diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java new file mode 100644 index 000..767baf2 --- /dev/null +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SnapshotTestTemplateIT.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.
[phoenix] branch 4.x updated: PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 42baa30 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade 42baa30 is described below commit 42baa30516a9979553263aca8f6468314e27cadc Author: Istvan Toth AuthorDate: Thu Feb 17 18:18:01 2022 +0100 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade --- .../java/org/apache/phoenix/end2end/UpgradeIT.java | 59 + .../phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 + .../phoenix/query/ConnectionQueryServicesImpl.java | 60 +- .../java/org/apache/phoenix/util/UpgradeUtil.java | 25 - 4 files changed, 131 insertions(+), 15 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java index 29c72c2..3a1b8f1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java @@ -18,6 +18,7 @@ package org.apache.phoenix.end2end; import static org.apache.phoenix.thirdparty.com.google.common.base.Preconditions.checkNotNull; +import static org.apache.hadoop.hbase.HColumnDescriptor.KEEP_DELETED_CELLS; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LAST_DDL_TIMESTAMP; @@ -43,7 +44,9 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.sql.Types; +import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Set; @@ -60,6 +63,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; @@ -78,6 +84,7 @@ import org.apache.phoenix.query.DelegateConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.schema.PName; import org.apache.phoenix.schema.PNameFactory; +import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.PTable.LinkType; import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.schema.SequenceAllocation; @@ -358,6 +365,58 @@ public class UpgradeIT extends ParallelStatsDisabledIT { } } +@Test +public void testRemoveScnFromTaskAndLog() throws Exception { +PhoenixConnection conn = getConnection(false, null).unwrap(PhoenixConnection.class); +ConnectionQueryServicesImpl cqs = (ConnectionQueryServicesImpl)(conn.getQueryServices()); +//Set the SCN related properties on SYSTEM.STATS and SYSTEM.LOG +try (Statement stmt = conn.createStatement()) { +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +} +//Check that the HBase tables reflect the change +PTable sysLogTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_LOG_NAME); +HTableDescriptor sysLogDesc = utility.getHBaseAdmin().getTableDescriptor(SchemaUtil.getPhysicalTableName( +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME, cqs.getProps())); +assertEquals(KeepDeletedCells.TRUE, sysLogDesc.getFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getKeepDeletedCells()); +assertEquals(1000, sysLogDesc.getFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getMaxVersions()); + +PTable sysStatsTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_STATS_NAME); +HTableDescriptor sysStatsDesc = utility.getHBaseAdmin().getTableDescriptor(SchemaUtil
[phoenix] branch 4.x updated: PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 39c1634 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade 39c1634 is described below commit 39c163468356c22effef6d82afdaaf04c84abf01 Author: Istvan Toth AuthorDate: Thu Feb 17 18:18:01 2022 +0100 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade --- .../java/org/apache/phoenix/end2end/UpgradeIT.java | 59 + .../phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 + .../phoenix/query/ConnectionQueryServicesImpl.java | 60 +- .../java/org/apache/phoenix/util/UpgradeUtil.java | 25 - 4 files changed, 131 insertions(+), 15 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java index 29c72c2..3a1b8f1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java @@ -18,6 +18,7 @@ package org.apache.phoenix.end2end; import static org.apache.phoenix.thirdparty.com.google.common.base.Preconditions.checkNotNull; +import static org.apache.hadoop.hbase.HColumnDescriptor.KEEP_DELETED_CELLS; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LAST_DDL_TIMESTAMP; @@ -43,7 +44,9 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.sql.Types; +import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Set; @@ -60,6 +63,9 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; @@ -78,6 +84,7 @@ import org.apache.phoenix.query.DelegateConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.schema.PName; import org.apache.phoenix.schema.PNameFactory; +import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.PTable.LinkType; import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.schema.SequenceAllocation; @@ -358,6 +365,58 @@ public class UpgradeIT extends ParallelStatsDisabledIT { } } +@Test +public void testRemoveScnFromTaskAndLog() throws Exception { +PhoenixConnection conn = getConnection(false, null).unwrap(PhoenixConnection.class); +ConnectionQueryServicesImpl cqs = (ConnectionQueryServicesImpl)(conn.getQueryServices()); +//Set the SCN related properties on SYSTEM.STATS and SYSTEM.LOG +try (Statement stmt = conn.createStatement()) { +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +} +//Check that the HBase tables reflect the change +PTable sysLogTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_LOG_NAME); +HTableDescriptor sysLogDesc = utility.getHBaseAdmin().getTableDescriptor(SchemaUtil.getPhysicalTableName( +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME, cqs.getProps())); +assertEquals(KeepDeletedCells.TRUE, sysLogDesc.getFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getKeepDeletedCells()); +assertEquals(1000, sysLogDesc.getFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getMaxVersions()); + +PTable sysStatsTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_STATS_NAME); +HTableDescriptor sysStatsDesc = utility.getHBaseAdmin().getTableDescriptor(SchemaUtil
[phoenix] branch 5.1 updated: PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 194db99 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade 194db99 is described below commit 194db993741798fd49d50145e0ba12fecf6b34af Author: Istvan Toth AuthorDate: Thu Feb 17 18:18:01 2022 +0100 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade --- .../java/org/apache/phoenix/end2end/UpgradeIT.java | 59 .../phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 + .../phoenix/query/ConnectionQueryServicesImpl.java | 62 +- .../java/org/apache/phoenix/util/UpgradeUtil.java | 24 - 4 files changed, 132 insertions(+), 15 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java index 274df5f..b4e62c9 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java @@ -17,6 +17,7 @@ */ package org.apache.phoenix.end2end; +import static org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LAST_DDL_TIMESTAMP; @@ -43,7 +44,9 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.sql.Types; +import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Set; @@ -57,12 +60,15 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.phoenix.schema.types.PInteger; import org.apache.phoenix.thirdparty.com.google.common.collect.Lists; import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; @@ -77,6 +83,7 @@ import org.apache.phoenix.query.DelegateConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.schema.PName; import org.apache.phoenix.schema.PNameFactory; +import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.PTable.LinkType; import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.schema.SequenceAllocation; @@ -358,6 +365,58 @@ public class UpgradeIT extends ParallelStatsDisabledIT { } } +@Test +public void testRemoveScnFromTaskAndLog() throws Exception { +PhoenixConnection conn = getConnection(false, null).unwrap(PhoenixConnection.class); +ConnectionQueryServicesImpl cqs = (ConnectionQueryServicesImpl)(conn.getQueryServices()); +//Set the SCN related properties on SYSTEM.STATS and SYSTEM.LOG +try (Statement stmt = conn.createStatement()) { +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +} +//Check that the HBase tables reflect the change +PTable sysLogTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_LOG_NAME); +TableDescriptor sysLogDesc = utility.getAdmin().getDescriptor(SchemaUtil.getPhysicalTableName( +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME, cqs.getProps())); +assertEquals(KeepDeletedCells.TRUE, sysLogDesc.getColumnFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getKeepDeletedCells()); +assertEquals(1000, sysLogDesc.getColumnFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getMaxVersions()); + +PTable sysStatsTable = PhoenixR
[phoenix] branch master updated: PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 47887b3 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade 47887b3 is described below commit 47887b3cefeb22ef70d8aba4f181f8704e553a79 Author: Istvan Toth AuthorDate: Thu Feb 17 18:18:01 2022 +0100 PHOENIX-6645 Remove unneccessary SCN related properties from SYSTEM tables on upgrade --- .../java/org/apache/phoenix/end2end/UpgradeIT.java | 59 .../phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 + .../phoenix/query/ConnectionQueryServicesImpl.java | 62 +- .../java/org/apache/phoenix/util/UpgradeUtil.java | 25 - 4 files changed, 132 insertions(+), 16 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java index 274df5f..b4e62c9 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java @@ -17,6 +17,7 @@ */ package org.apache.phoenix.end2end; +import static org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LAST_DDL_TIMESTAMP; @@ -43,7 +44,9 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.sql.Types; +import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.Set; @@ -57,12 +60,15 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.phoenix.schema.types.PInteger; import org.apache.phoenix.thirdparty.com.google.common.collect.Lists; import org.apache.phoenix.thirdparty.com.google.common.collect.Sets; @@ -77,6 +83,7 @@ import org.apache.phoenix.query.DelegateConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.schema.PName; import org.apache.phoenix.schema.PNameFactory; +import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.PTable.LinkType; import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.schema.SequenceAllocation; @@ -358,6 +365,58 @@ public class UpgradeIT extends ParallelStatsDisabledIT { } } +@Test +public void testRemoveScnFromTaskAndLog() throws Exception { +PhoenixConnection conn = getConnection(false, null).unwrap(PhoenixConnection.class); +ConnectionQueryServicesImpl cqs = (ConnectionQueryServicesImpl)(conn.getQueryServices()); +//Set the SCN related properties on SYSTEM.STATS and SYSTEM.LOG +try (Statement stmt = conn.createStatement()) { +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +stmt.executeUpdate("ALTER TABLE " + +PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + +KEEP_DELETED_CELLS + "='" + KeepDeletedCells.TRUE + "',\n" + +HConstants.VERSIONS + "='1000'\n"); +} +//Check that the HBase tables reflect the change +PTable sysLogTable = PhoenixRuntime.getTable(conn, PhoenixDatabaseMetaData.SYSTEM_LOG_NAME); +TableDescriptor sysLogDesc = utility.getAdmin().getDescriptor(SchemaUtil.getPhysicalTableName( +PhoenixDatabaseMetaData.SYSTEM_LOG_NAME, cqs.getProps())); +assertEquals(KeepDeletedCells.TRUE, sysLogDesc.getColumnFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getKeepDeletedCells()); +assertEquals(1000, sysLogDesc.getColumnFamily( + SchemaUtil.getEmptyColumnFamily(sysLogTable)).getMaxVersions()); + +PTable sysStatsTable = PhoenixR
[phoenix-thirdparty] branch master updated: PHOENIX-6648 Change next release version of phoenix-thirdparty to 2.0.0
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-thirdparty.git The following commit(s) were added to refs/heads/master by this push: new 823d96e PHOENIX-6648 Change next release version of phoenix-thirdparty to 2.0.0 823d96e is described below commit 823d96e5e760b89197fbcefc31fe466d7bcf36cf Author: Istvan Toth AuthorDate: Thu Feb 10 08:16:27 2022 +0100 PHOENIX-6648 Change next release version of phoenix-thirdparty to 2.0.0 --- phoenix-shaded-commons-cli/pom.xml | 2 +- phoenix-shaded-guava/pom.xml | 2 +- pom.xml| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phoenix-shaded-commons-cli/pom.xml b/phoenix-shaded-commons-cli/pom.xml index 6f85993..955e861 100644 --- a/phoenix-shaded-commons-cli/pom.xml +++ b/phoenix-shaded-commons-cli/pom.xml @@ -23,7 +23,7 @@ org.apache.phoenix.thirdparty phoenix-thirdparty -1.2.0-SNAPSHOT +2.0.0-SNAPSHOT phoenix-shaded-commons-cli Apache Phoenix Patched and Relocated (Shaded) Commons-CLI diff --git a/phoenix-shaded-guava/pom.xml b/phoenix-shaded-guava/pom.xml index e1f9a45..1ba56ee 100644 --- a/phoenix-shaded-guava/pom.xml +++ b/phoenix-shaded-guava/pom.xml @@ -24,7 +24,7 @@ org.apache.phoenix.thirdparty phoenix-thirdparty -1.2.0-SNAPSHOT +2.0.0-SNAPSHOT phoenix-shaded-guava diff --git a/pom.xml b/pom.xml index 4beb0f9..b0efdf8 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.apache.phoenix.thirdparty phoenix-thirdparty - 1.2.0-SNAPSHOT + 2.0.0-SNAPSHOT pom Apache Phoenix Third-Party Libs Packaging of relocated (renamed, shaded) third-party libraries used by Phoenix.
[phoenix-thirdparty] branch master updated: PHOENIX-6641 Bump Guava to 31.0.1 in phoenix-thirdparty
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-thirdparty.git The following commit(s) were added to refs/heads/master by this push: new 8fd9561 PHOENIX-6641 Bump Guava to 31.0.1 in phoenix-thirdparty 8fd9561 is described below commit 8fd956152631537876080653b325bfeab33c4e3b Author: Istvan Toth AuthorDate: Thu Feb 3 13:07:48 2022 +0100 PHOENIX-6641 Bump Guava to 31.0.1 in phoenix-thirdparty --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0b31dc9..4beb0f9 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ org.apache.phoenix.thirdparty -29.0-android +31.0.1-android 1.5.0
[phoenix] branch 4.16 updated: PHOENIX-6576 Do not use guava's Files.createTempDir()
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 41963df PHOENIX-6576 Do not use guava's Files.createTempDir() 41963df is described below commit 41963df656b419e57e9f84fa0e8f1fad0775a35d Author: Istvan Toth AuthorDate: Thu Feb 3 17:39:50 2022 +0100 PHOENIX-6576 Do not use guava's Files.createTempDir() --- .../org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java| 3 +-- .../java/org/apache/phoenix/query/QueryServicesTestImpl.java | 11 +-- .../src/test/java/org/apache/phoenix/util/TestUtil.java | 9 - 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java index 0313b0c..1acec12 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java @@ -34,7 +34,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; @Category(ParallelStatsDisabledTest.class) public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @@ -58,7 +57,7 @@ public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @Before public void setup() throws Exception { tableName = generateUniqueName(); -spoolDir = Files.createTempDir(); +spoolDir = TestUtil.createTempDirectory().toFile(); try (Connection conn = getConnection()) { Statement stmt = conn.createStatement(); stmt.execute("CREATE TABLE " + tableName + " (ID varchar NOT NULL PRIMARY KEY) SPLIT ON ('EA','EZ')"); diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java index ed6cc12..4c94dc1 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java @@ -20,10 +20,10 @@ package org.apache.phoenix.query; import static org.apache.phoenix.query.QueryServicesOptions.DEFAULT_SPOOL_DIRECTORY; import static org.apache.phoenix.query.QueryServicesOptions.withDefaults; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; import org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.ReadOnlyProps; +import org.apache.phoenix.util.TestUtil; import org.apache.tephra.TxConstants; @@ -88,6 +88,13 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { } private static QueryServicesOptions getDefaultServicesOptions() { +String txSnapshotDir; +try { +txSnapshotDir = TestUtil.createTempDirectory().toString(); +} catch (Exception e) { +throw new RuntimeException("Could not create " ++ TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, e); +} return withDefaults() .setSequenceCacheSize(DEFAULT_SEQUENCE_CACHE_SIZE) .setTransactionsEnabled(DEFAULT_TRANSACTIONS_ENABLED) @@ -129,7 +136,7 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { .set(TxConstants.Service.CFG_DATA_TX_CLIENT_RETRY_STRATEGY, "n-times") .set(TxConstants.Service.CFG_DATA_TX_CLIENT_ATTEMPTS, 1) .set(TxConstants.Service.CFG_DATA_TX_CLIENT_DISCOVERY_TIMEOUT_SEC, 60) -.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, Files.createTempDir().getAbsolutePath()) +.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, txSnapshotDir) .set(TxConstants.Manager.CFG_TX_TIMEOUT, DEFAULT_TXN_TIMEOUT_SECONDS) .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L) ; diff --git a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java index 5cb92f1..de0efcf 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java @@ -38,6 +38,9 @@ import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.net.ServerSocket; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; @@ -1407,6 +1410,10 @@
[phoenix] branch 4.x updated: PHOENIX-6576 Do not use guava's Files.createTempDir()
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 28c51ab PHOENIX-6576 Do not use guava's Files.createTempDir() 28c51ab is described below commit 28c51ab70329b89ddc9bd4ec9818fd4ff6aa8e54 Author: Istvan Toth AuthorDate: Thu Feb 3 17:39:50 2022 +0100 PHOENIX-6576 Do not use guava's Files.createTempDir() --- .../org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java| 3 +-- .../java/org/apache/phoenix/query/QueryServicesTestImpl.java | 11 +-- .../src/test/java/org/apache/phoenix/util/TestUtil.java | 9 - 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java index 0313b0c..1acec12 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java @@ -34,7 +34,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; @Category(ParallelStatsDisabledTest.class) public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @@ -58,7 +57,7 @@ public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @Before public void setup() throws Exception { tableName = generateUniqueName(); -spoolDir = Files.createTempDir(); +spoolDir = TestUtil.createTempDirectory().toFile(); try (Connection conn = getConnection()) { Statement stmt = conn.createStatement(); stmt.execute("CREATE TABLE " + tableName + " (ID varchar NOT NULL PRIMARY KEY) SPLIT ON ('EA','EZ')"); diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java index ed6cc12..4c94dc1 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java @@ -20,10 +20,10 @@ package org.apache.phoenix.query; import static org.apache.phoenix.query.QueryServicesOptions.DEFAULT_SPOOL_DIRECTORY; import static org.apache.phoenix.query.QueryServicesOptions.withDefaults; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; import org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.ReadOnlyProps; +import org.apache.phoenix.util.TestUtil; import org.apache.tephra.TxConstants; @@ -88,6 +88,13 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { } private static QueryServicesOptions getDefaultServicesOptions() { +String txSnapshotDir; +try { +txSnapshotDir = TestUtil.createTempDirectory().toString(); +} catch (Exception e) { +throw new RuntimeException("Could not create " ++ TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, e); +} return withDefaults() .setSequenceCacheSize(DEFAULT_SEQUENCE_CACHE_SIZE) .setTransactionsEnabled(DEFAULT_TRANSACTIONS_ENABLED) @@ -129,7 +136,7 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { .set(TxConstants.Service.CFG_DATA_TX_CLIENT_RETRY_STRATEGY, "n-times") .set(TxConstants.Service.CFG_DATA_TX_CLIENT_ATTEMPTS, 1) .set(TxConstants.Service.CFG_DATA_TX_CLIENT_DISCOVERY_TIMEOUT_SEC, 60) -.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, Files.createTempDir().getAbsolutePath()) +.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, txSnapshotDir) .set(TxConstants.Manager.CFG_TX_TIMEOUT, DEFAULT_TXN_TIMEOUT_SECONDS) .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L) ; diff --git a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java index 5cb92f1..de0efcf 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java @@ -38,6 +38,9 @@ import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.net.ServerSocket; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; @@ -1407,6 +1410,10 @@
[phoenix] branch 5.1 updated: PHOENIX-6576 Do not use guava's Files.createTempDir()
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new a508684 PHOENIX-6576 Do not use guava's Files.createTempDir() a508684 is described below commit a508684edc76bb70e88c036a08e0ea0eed51f8a7 Author: Istvan Toth AuthorDate: Thu Feb 3 17:39:50 2022 +0100 PHOENIX-6576 Do not use guava's Files.createTempDir() --- .../org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java| 3 +-- .../java/org/apache/phoenix/query/QueryServicesTestImpl.java | 11 +-- .../src/test/java/org/apache/phoenix/util/TestUtil.java | 9 - 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java index 0313b0c..1acec12 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java @@ -34,7 +34,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; @Category(ParallelStatsDisabledTest.class) public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @@ -58,7 +57,7 @@ public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @Before public void setup() throws Exception { tableName = generateUniqueName(); -spoolDir = Files.createTempDir(); +spoolDir = TestUtil.createTempDirectory().toFile(); try (Connection conn = getConnection()) { Statement stmt = conn.createStatement(); stmt.execute("CREATE TABLE " + tableName + " (ID varchar NOT NULL PRIMARY KEY) SPLIT ON ('EA','EZ')"); diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java index ed6cc12..4c94dc1 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java @@ -20,10 +20,10 @@ package org.apache.phoenix.query; import static org.apache.phoenix.query.QueryServicesOptions.DEFAULT_SPOOL_DIRECTORY; import static org.apache.phoenix.query.QueryServicesOptions.withDefaults; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; import org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.ReadOnlyProps; +import org.apache.phoenix.util.TestUtil; import org.apache.tephra.TxConstants; @@ -88,6 +88,13 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { } private static QueryServicesOptions getDefaultServicesOptions() { +String txSnapshotDir; +try { +txSnapshotDir = TestUtil.createTempDirectory().toString(); +} catch (Exception e) { +throw new RuntimeException("Could not create " ++ TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, e); +} return withDefaults() .setSequenceCacheSize(DEFAULT_SEQUENCE_CACHE_SIZE) .setTransactionsEnabled(DEFAULT_TRANSACTIONS_ENABLED) @@ -129,7 +136,7 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { .set(TxConstants.Service.CFG_DATA_TX_CLIENT_RETRY_STRATEGY, "n-times") .set(TxConstants.Service.CFG_DATA_TX_CLIENT_ATTEMPTS, 1) .set(TxConstants.Service.CFG_DATA_TX_CLIENT_DISCOVERY_TIMEOUT_SEC, 60) -.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, Files.createTempDir().getAbsolutePath()) +.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, txSnapshotDir) .set(TxConstants.Manager.CFG_TX_TIMEOUT, DEFAULT_TXN_TIMEOUT_SECONDS) .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L) ; diff --git a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java index d2fd650..da443a1 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java @@ -38,6 +38,9 @@ import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.net.ServerSocket; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; @@ -1413,6 +1416,10 @@
[phoenix] branch master updated: PHOENIX-6576 Do not use guava's Files.createTempDir()
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 7a1ec5a PHOENIX-6576 Do not use guava's Files.createTempDir() 7a1ec5a is described below commit 7a1ec5af265fb1d48655bfba8b61e565163f23da Author: Istvan Toth AuthorDate: Thu Feb 3 17:39:50 2022 +0100 PHOENIX-6576 Do not use guava's Files.createTempDir() --- .../org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java| 3 +-- .../java/org/apache/phoenix/query/QueryServicesTestImpl.java | 11 +-- .../src/test/java/org/apache/phoenix/util/TestUtil.java | 9 - 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java index 0313b0c..1acec12 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SpooledTmpFileDeleteIT.java @@ -34,7 +34,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; @Category(ParallelStatsDisabledTest.class) public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @@ -58,7 +57,7 @@ public class SpooledTmpFileDeleteIT extends ParallelStatsDisabledIT { @Before public void setup() throws Exception { tableName = generateUniqueName(); -spoolDir = Files.createTempDir(); +spoolDir = TestUtil.createTempDirectory().toFile(); try (Connection conn = getConnection()) { Statement stmt = conn.createStatement(); stmt.execute("CREATE TABLE " + tableName + " (ID varchar NOT NULL PRIMARY KEY) SPLIT ON ('EA','EZ')"); diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java index ed6cc12..4c94dc1 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java @@ -20,10 +20,10 @@ package org.apache.phoenix.query; import static org.apache.phoenix.query.QueryServicesOptions.DEFAULT_SPOOL_DIRECTORY; import static org.apache.phoenix.query.QueryServicesOptions.withDefaults; -import org.apache.phoenix.thirdparty.com.google.common.io.Files; import org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.ReadOnlyProps; +import org.apache.phoenix.util.TestUtil; import org.apache.tephra.TxConstants; @@ -88,6 +88,13 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { } private static QueryServicesOptions getDefaultServicesOptions() { +String txSnapshotDir; +try { +txSnapshotDir = TestUtil.createTempDirectory().toString(); +} catch (Exception e) { +throw new RuntimeException("Could not create " ++ TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, e); +} return withDefaults() .setSequenceCacheSize(DEFAULT_SEQUENCE_CACHE_SIZE) .setTransactionsEnabled(DEFAULT_TRANSACTIONS_ENABLED) @@ -129,7 +136,7 @@ public final class QueryServicesTestImpl extends BaseQueryServicesImpl { .set(TxConstants.Service.CFG_DATA_TX_CLIENT_RETRY_STRATEGY, "n-times") .set(TxConstants.Service.CFG_DATA_TX_CLIENT_ATTEMPTS, 1) .set(TxConstants.Service.CFG_DATA_TX_CLIENT_DISCOVERY_TIMEOUT_SEC, 60) -.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, Files.createTempDir().getAbsolutePath()) +.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, txSnapshotDir) .set(TxConstants.Manager.CFG_TX_TIMEOUT, DEFAULT_TXN_TIMEOUT_SECONDS) .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L) ; diff --git a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java index d2fd650..da443a1 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java @@ -38,6 +38,9 @@ import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.net.ServerSocket; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; @@ -1413,6 +1416,10 @@
[phoenix] branch 4.16 updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new ae42801 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) ae42801 is described below commit ae42801eb0ca5e3eb4a43f04461eba85eab961eb Author: Istvan Toth AuthorDate: Wed Feb 2 15:01:33 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) --- .../end2end/ConnectionQueryServicesTestImpl.java | 4 +- .../transaction/OmidTransactionService.java| 124 .../transaction/PhoenixTransactionService.java | 0 .../transaction/TephraTransactionService.java | 93 + .../transaction/TestTransactionServiceManager.java | 207 - .../transaction/TransactionServiceManager.java | 38 6 files changed, 257 insertions(+), 209 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index 7f436ba..c6b0e3f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,7 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; -import org.apache.phoenix.transaction.TestTransactionServiceManager; +import org.apache.phoenix.transaction.TransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -106,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java new file mode 100644 index 000..64e721c --- /dev/null +++ b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.transaction; + +import java.io.IOException; +import java.sql.SQLException; + +import org.apache.hadoop.conf.Configuration; +import org.apache.omid.committable.CommitTable; +import org.apache.omid.committable.InMemoryCommitTable; +import org.apache.omid.committable.CommitTable.Client; +import org.apache.omid.committable.CommitTable.Writer; +import org.apache.omid.transaction.HBaseOmidClientConfiguration; +import org.apache.omid.transaction.HBaseTransactionManager; +import org.apache.omid.tso.TSOMockModule; +import org.apache.omid.tso.TSOServer; +import org.apache.omid.tso.TSOServerConfig; +import org.apache.omid.tso.TSOServerConfig.WAIT_STRATEGY; +import org.apache.omid.tso.client.OmidClientConfiguration; +import org.apache.omid.tso.client.TSOClient; +import org.apache.phoenix.exception.SQLExceptionCode; +import org.apache.phoenix.exception.SQLExceptionInfo; +import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; + +import com.google.i
[phoenix] branch 4.x updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 569000a PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) 569000a is described below commit 569000ad0853cdb16e506602253858ed3729e4b6 Author: Istvan Toth AuthorDate: Wed Feb 2 15:01:33 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) --- .../end2end/ConnectionQueryServicesTestImpl.java | 4 +- .../transaction/OmidTransactionService.java| 124 .../transaction/PhoenixTransactionService.java | 0 .../transaction/TephraTransactionService.java | 93 + .../transaction/TestTransactionServiceManager.java | 207 - .../transaction/TransactionServiceManager.java | 38 6 files changed, 257 insertions(+), 209 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index 7f436ba..c6b0e3f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,7 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; -import org.apache.phoenix.transaction.TestTransactionServiceManager; +import org.apache.phoenix.transaction.TransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -106,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java new file mode 100644 index 000..64e721c --- /dev/null +++ b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.transaction; + +import java.io.IOException; +import java.sql.SQLException; + +import org.apache.hadoop.conf.Configuration; +import org.apache.omid.committable.CommitTable; +import org.apache.omid.committable.InMemoryCommitTable; +import org.apache.omid.committable.CommitTable.Client; +import org.apache.omid.committable.CommitTable.Writer; +import org.apache.omid.transaction.HBaseOmidClientConfiguration; +import org.apache.omid.transaction.HBaseTransactionManager; +import org.apache.omid.tso.TSOMockModule; +import org.apache.omid.tso.TSOServer; +import org.apache.omid.tso.TSOServerConfig; +import org.apache.omid.tso.TSOServerConfig.WAIT_STRATEGY; +import org.apache.omid.tso.client.OmidClientConfiguration; +import org.apache.omid.tso.client.TSOClient; +import org.apache.phoenix.exception.SQLExceptionCode; +import org.apache.phoenix.exception.SQLExceptionInfo; +import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; + +import com.google.i
[phoenix] branch 5.1 updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new af06490 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) af06490 is described below commit af064907c98d00e6229167124ddcbe1351272331 Author: Istvan Toth AuthorDate: Wed Feb 2 15:01:33 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) --- .../end2end/ConnectionQueryServicesTestImpl.java | 4 +- .../transaction/OmidTransactionService.java| 124 .../transaction/PhoenixTransactionService.java | 0 .../transaction/TephraTransactionService.java | 93 + .../transaction/TestTransactionServiceManager.java | 207 - .../transaction/TransactionServiceManager.java | 38 6 files changed, 257 insertions(+), 209 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index 7f436ba..c6b0e3f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,7 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; -import org.apache.phoenix.transaction.TestTransactionServiceManager; +import org.apache.phoenix.transaction.TransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -106,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java new file mode 100644 index 000..64e721c --- /dev/null +++ b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.transaction; + +import java.io.IOException; +import java.sql.SQLException; + +import org.apache.hadoop.conf.Configuration; +import org.apache.omid.committable.CommitTable; +import org.apache.omid.committable.InMemoryCommitTable; +import org.apache.omid.committable.CommitTable.Client; +import org.apache.omid.committable.CommitTable.Writer; +import org.apache.omid.transaction.HBaseOmidClientConfiguration; +import org.apache.omid.transaction.HBaseTransactionManager; +import org.apache.omid.tso.TSOMockModule; +import org.apache.omid.tso.TSOServer; +import org.apache.omid.tso.TSOServerConfig; +import org.apache.omid.tso.TSOServerConfig.WAIT_STRATEGY; +import org.apache.omid.tso.client.OmidClientConfiguration; +import org.apache.omid.tso.client.TSOClient; +import org.apache.phoenix.exception.SQLExceptionCode; +import org.apache.phoenix.exception.SQLExceptionInfo; +import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; + +import com.google.i
[phoenix] branch master updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 596aca8 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) 596aca8 is described below commit 596aca88530ef2e83caf05d606b61202bfa3ab5b Author: Istvan Toth AuthorDate: Wed Feb 2 15:01:33 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:split TransactionServiceManager to avoid CNFE with -Dwithout.tephra) --- .../end2end/ConnectionQueryServicesTestImpl.java | 4 +- .../transaction/OmidTransactionService.java| 124 .../transaction/PhoenixTransactionService.java | 0 .../transaction/TephraTransactionService.java | 93 + .../transaction/TestTransactionServiceManager.java | 207 - .../transaction/TransactionServiceManager.java | 38 6 files changed, 257 insertions(+), 209 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index 7f436ba..c6b0e3f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,7 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; -import org.apache.phoenix.transaction.TestTransactionServiceManager; +import org.apache.phoenix.transaction.TransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -106,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java new file mode 100644 index 000..64e721c --- /dev/null +++ b/phoenix-core/src/test/java/org/apache/phoenix/transaction/OmidTransactionService.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.transaction; + +import java.io.IOException; +import java.sql.SQLException; + +import org.apache.hadoop.conf.Configuration; +import org.apache.omid.committable.CommitTable; +import org.apache.omid.committable.InMemoryCommitTable; +import org.apache.omid.committable.CommitTable.Client; +import org.apache.omid.committable.CommitTable.Writer; +import org.apache.omid.transaction.HBaseOmidClientConfiguration; +import org.apache.omid.transaction.HBaseTransactionManager; +import org.apache.omid.tso.TSOMockModule; +import org.apache.omid.tso.TSOServer; +import org.apache.omid.tso.TSOServerConfig; +import org.apache.omid.tso.TSOServerConfig.WAIT_STRATEGY; +import org.apache.omid.tso.client.OmidClientConfiguration; +import org.apache.omid.tso.client.TSOClient; +import org.apache.phoenix.exception.SQLExceptionCode; +import org.apache.phoenix.exception.SQLExceptionInfo; +import org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.ConnectionInfo; + +import com.google.i
[phoenix] branch 4.16 updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new c89c730 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider c89c730 is described below commit c89c730ef39a42e718eed92feda2fc052fb2f5ff Author: Istvan Toth AuthorDate: Thu Jan 27 10:54:35 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider --- phoenix-core/pom.xml | 8 +- .../end2end/ConnectionQueryServicesTestImpl.java | 3 +- .../phoenix/tx/ParameterizedTransactionIT.java | 9 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 38 ++-- .../NotAvailableTransactionProvider.java | 14 +- .../transaction/OmidTransactionProvider.java | 97 +- .../transaction/PhoenixTransactionProvider.java| 6 +- .../transaction/TephraTransactionProvider.java | 68 +-- .../phoenix/transaction/TransactionFactory.java| 1 - .../transaction/TestTransactionServiceManager.java | 207 + 10 files changed, 258 insertions(+), 193 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 77e9395..2208e12 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -231,6 +231,8 @@ phoenix-hbase-compat-${hbase.compat.version} true + + org.apache.omid omid-hbase-client-hbase1.x @@ -256,9 +258,12 @@ + + org.apache.omid omid-tso-server-hbase1.x +test org.apache.curator @@ -281,6 +286,7 @@ org.apache.omid omid-tso-server-hbase1.x +test test-jar @@ -302,7 +308,7 @@ - + org.antlr antlr-runtime diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index da88f3a..7f436ba 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,6 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; +import org.apache.phoenix.transaction.TestTransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -105,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = provider.getTransactionProvider().getTransactionService(config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java index c97c7ba..8a73d77 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java @@ -41,7 +41,6 @@ import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.coprocessor.RegionObserver; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.coprocessor.TephraTransactionalProcessor; import org.apache.phoenix.end2end.ParallelStatsDisabledIT; @@ -390,8 +389,7 @@ public class ParameterizedTransactionIT extends ParallelStatsDisabledIT { assertFalse(rs.next()); htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes("SYSTEM." + nonTxTableName)); -Class clazz = transactionProvider.getCoprocessor(); - assertFalse(htable.getTableDescriptor().getCoprocessors().contains(clazz.getName())); + assertFalse(htable.getTableDescriptor().getCoprocessors().contains(transactionProvider.getCoprocessorClassName())); assertEquals(1,conn.unwrap(PhoenixConnection.class).getQueryServices(). getTableDescriptor(Bytes.toBytes("SYSTEM.&qu
[phoenix] branch 4.x updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:fix duplicate dependencies)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new acf843a PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:fix duplicate dependencies) acf843a is described below commit acf843a0a7da5193821fd903fd6b175bbf87e13f Author: Istvan Toth AuthorDate: Wed Feb 2 06:36:49 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider (addendum:fix duplicate dependencies) --- phoenix-core/pom.xml | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 08a314c..ff2bd66 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -258,9 +258,12 @@ + + org.apache.omid omid-tso-server-hbase1.x +test org.apache.curator @@ -283,6 +286,7 @@ org.apache.omid omid-tso-server-hbase1.x +test test-jar @@ -304,19 +308,6 @@ - - - org.apache.omid - omid-tso-server-hbase1.x - test - - - org.apache.omid - omid-tso-server-hbase1.x - test - test-jar - - org.antlr
[phoenix] branch 4.x updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new dda24cc PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider dda24cc is described below commit dda24cc251cf54f70515e5f6bea02b07b8962f9e Author: Istvan Toth AuthorDate: Thu Jan 27 10:54:35 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider --- phoenix-core/pom.xml | 24 +-- .../end2end/ConnectionQueryServicesTestImpl.java | 3 +- .../phoenix/tx/ParameterizedTransactionIT.java | 9 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 38 ++-- .../NotAvailableTransactionProvider.java | 14 +- .../transaction/OmidTransactionProvider.java | 97 +- .../transaction/PhoenixTransactionProvider.java| 6 +- .../transaction/TephraTransactionProvider.java | 68 +-- .../phoenix/transaction/TransactionFactory.java| 1 - .../transaction/TestTransactionServiceManager.java | 207 + 10 files changed, 263 insertions(+), 204 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index bfc79bc..08a314c 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -231,6 +231,8 @@ phoenix-hbase-compat-${hbase.compat.version} true + + org.apache.omid omid-hbase-client-hbase1.x @@ -302,22 +304,20 @@ - - - org.apache.tephra - tephra-api - + - org.apache.tephra - tephra-core-shaded + org.apache.omid + omid-tso-server-hbase1.x + test - org.apache.tephra - tephra-hbase-compat-${tephra.hbase.compat.version} - shaded + org.apache.omid + omid-tso-server-hbase1.x + test + test-jar - - + + org.antlr antlr-runtime diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index da88f3a..7f436ba 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,6 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; +import org.apache.phoenix.transaction.TestTransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -105,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = provider.getTransactionProvider().getTransactionService(config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java index c97c7ba..8a73d77 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java @@ -41,7 +41,6 @@ import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.coprocessor.RegionObserver; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.coprocessor.TephraTransactionalProcessor; import org.apache.phoenix.end2end.ParallelStatsDisabledIT; @@ -390,8 +389,7 @@ public class ParameterizedTransactionIT extends ParallelStatsDisabledIT { assertFalse(rs.next()); htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes("SYSTEM." + nonTxTableName)); -Class clazz = transactionProvider.getCoprocessor(); - assertFalse(htable.getTableDescriptor().getCoprocessors().contains(clazz.getName())); + assertFalse(htable.getTableDescriptor().getCoprocessors().contains(transactionProvider.getCoprocessorClassName())); assertEquals(1,c
[phoenix] branch 5.1 updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new b2b49d5 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider b2b49d5 is described below commit b2b49d5604c9801dd5950e77e8a23e4fbfc3cd88 Author: Istvan Toth AuthorDate: Thu Jan 27 10:54:35 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider --- phoenix-core/pom.xml | 10 +- .../end2end/ConnectionQueryServicesTestImpl.java | 3 +- .../phoenix/tx/ParameterizedTransactionIT.java | 10 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 38 ++-- .../NotAvailableTransactionProvider.java | 14 +- .../transaction/OmidTransactionProvider.java | 97 +- .../transaction/PhoenixTransactionProvider.java| 6 +- .../transaction/TephraTransactionProvider.java | 68 +-- .../phoenix/transaction/TransactionFactory.java| 1 - .../transaction/TestTransactionServiceManager.java | 207 + 10 files changed, 257 insertions(+), 197 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 2763fcb..bfd08ab 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -385,10 +385,6 @@ org.apache.omid - omid-tso-server-hbase2.x - - - org.apache.omid omid-hbase-common-hbase2.x @@ -416,6 +412,12 @@ org.apache.omid omid-tso-server-hbase2.x + test + + + org.apache.omid + omid-tso-server-hbase2.x + test test-jar diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index da88f3a..7f436ba 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,6 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; +import org.apache.phoenix.transaction.TestTransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -105,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = provider.getTransactionProvider().getTransactionService(config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java index 93e55f9..29aa9ef 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java @@ -42,7 +42,6 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.client.TableDescriptorBuilder; -import org.apache.hadoop.hbase.coprocessor.RegionObserver; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.coprocessor.TephraTransactionalProcessor; import org.apache.phoenix.end2end.ParallelStatsDisabledIT; @@ -63,7 +62,6 @@ import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.util.ByteUtil; import org.apache.phoenix.util.PropertiesUtil; import org.apache.phoenix.util.TestUtil; -import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -392,8 +390,7 @@ public class ParameterizedTransactionIT extends ParallelStatsDisabledIT { assertFalse(rs.next()); htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes("SYSTEM." + nonTxTableName)); -Class clazz = transactionProvider.getCoprocessor(); - assertFalse(htable.getDescriptor().getCoprocessors().contains(clazz.getName())); + assertFalse(htable.getDescriptor().getCoprocessors(
[phoenix] branch master updated: PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 22f5d22 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider 22f5d22 is described below commit 22f5d22bc20df3e419440d6076c98412b4b30ae2 Author: Istvan Toth AuthorDate: Thu Jan 27 10:54:35 2022 +0100 PHOENIX-6441 Remove TSOMockModule reference from OmidTransactionProvider --- phoenix-core/pom.xml | 10 +- .../end2end/ConnectionQueryServicesTestImpl.java | 3 +- .../phoenix/tx/ParameterizedTransactionIT.java | 10 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 38 ++-- .../NotAvailableTransactionProvider.java | 14 +- .../transaction/OmidTransactionProvider.java | 97 +- .../transaction/PhoenixTransactionProvider.java| 6 +- .../transaction/TephraTransactionProvider.java | 68 +-- .../phoenix/transaction/TransactionFactory.java| 1 - .../transaction/TestTransactionServiceManager.java | 207 + 10 files changed, 257 insertions(+), 197 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index d022973..5167399 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -385,10 +385,6 @@ org.apache.omid - omid-tso-server-hbase2.x - - - org.apache.omid omid-hbase-common-hbase2.x @@ -416,6 +412,12 @@ org.apache.omid omid-tso-server-hbase2.x + test + + + org.apache.omid + omid-tso-server-hbase2.x + test test-jar diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java index da88f3a..7f436ba 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConnectionQueryServicesTestImpl.java @@ -32,6 +32,7 @@ import org.apache.phoenix.query.ConnectionQueryServicesImpl; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.transaction.PhoenixTransactionClient; import org.apache.phoenix.transaction.PhoenixTransactionService; +import org.apache.phoenix.transaction.TestTransactionServiceManager; import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.transaction.TransactionFactory.Provider; import org.apache.phoenix.util.SQLCloseables; @@ -105,7 +106,7 @@ public class ConnectionQueryServicesTestImpl extends ConnectionQueryServicesImpl PhoenixTransactionService txService = txServices[provider.ordinal()]; if (txService == null) { int port = TestUtil.getRandomPort(); -txService = txServices[provider.ordinal()] = provider.getTransactionProvider().getTransactionService(config, connectionInfo, port); +txService = txServices[provider.ordinal()] = TestTransactionServiceManager.startTransactionService(provider, config, connectionInfo, port); } return super.initTransactionClient(provider); } diff --git a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java index 93e55f9..29aa9ef 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java @@ -42,7 +42,6 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.client.TableDescriptorBuilder; -import org.apache.hadoop.hbase.coprocessor.RegionObserver; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.coprocessor.TephraTransactionalProcessor; import org.apache.phoenix.end2end.ParallelStatsDisabledIT; @@ -63,7 +62,6 @@ import org.apache.phoenix.transaction.TransactionFactory; import org.apache.phoenix.util.ByteUtil; import org.apache.phoenix.util.PropertiesUtil; import org.apache.phoenix.util.TestUtil; -import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -392,8 +390,7 @@ public class ParameterizedTransactionIT extends ParallelStatsDisabledIT { assertFalse(rs.next()); htable = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes("SYSTEM." + nonTxTableName)); -Class clazz = transactionProvider.getCoprocessor(); - assertFalse(htable.getDescriptor().getCoprocessors().contains(clazz.getName())); + assertFalse(htable.getDescriptor().getCoprocessors(
[phoenix] branch 4.16 updated: PHOENIX-6638 Test suite fails with -Dwithout.tephra
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 7558ed2 PHOENIX-6638 Test suite fails with -Dwithout.tephra 7558ed2 is described below commit 7558ed2c380c5e2e82c923a73114843aedddc700 Author: Istvan Toth AuthorDate: Tue Feb 1 10:31:14 2022 +0100 PHOENIX-6638 Test suite fails with -Dwithout.tephra --- .../phoenix/transaction/TephraTransactionProvider.java | 10 +- .../org/apache/phoenix/transaction/TransactionFactory.java | 13 - pom.xml | 12 ++-- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java index f3ff188..9a216ee 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java @@ -52,24 +52,24 @@ import com.google.inject.util.Providers; public class TephraTransactionProvider implements PhoenixTransactionProvider { private static final TephraTransactionProvider INSTANCE = new TephraTransactionProvider(); - + public static final TephraTransactionProvider getInstance() { return INSTANCE; } - + private TephraTransactionProvider() { } - + @Override public String toString() { return getProvider().toString(); } - + @Override public PhoenixTransactionContext getTransactionContext(byte[] txnBytes) throws IOException { return new TephraTransactionContext(txnBytes); } - + @Override public PhoenixTransactionContext getTransactionContext(PhoenixConnection connection) throws SQLException { return new TephraTransactionContext(connection); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java index ec55920..ab0d4c9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java @@ -18,20 +18,23 @@ package org.apache.phoenix.transaction; import java.io.IOException; -import java.util.List; import org.apache.phoenix.coprocessor.MetaDataProtocol; public class TransactionFactory { -private static PhoenixTransactionProvider tephraTransactionProvider; +private static final PhoenixTransactionProvider tephraTransactionProvider; static{ +boolean tephraEnabled = true; try { -tephraTransactionProvider = (PhoenixTransactionProvider) - Class.forName("org.apache.phoenix.transaction.TephraTransactionProvider") -.getMethod("getInstance").invoke(null); +Class.forName("org.apache.tephra.TransactionFailureException"); } catch (Throwable e) { +tephraEnabled = false; +} +if (tephraEnabled) { +tephraTransactionProvider = TephraTransactionProvider.getInstance(); +} else { tephraTransactionProvider = NotAvailableTransactionProvider.getInstance(); } } diff --git a/pom.xml b/pom.xml index 86fb020..fa66753 100644 --- a/pom.xml +++ b/pom.xml @@ -1251,7 +1251,11 @@ maven-failsafe-plugin - org.apache.tephra:tephra-api,org.apache.tephra:tephra-core,org.apache.thrift:libthrift + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift @@ -1260,7 +1264,11 @@ maven-surefire-plugin - org.apache.tephra:tephra-api,org.apache.tephra:tephra-core,org.apache.thrift:libthrift + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift
[phoenix] branch 4.x updated: PHOENIX-6638 Test suite fails with -Dwithout.tephra
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 7f61cce PHOENIX-6638 Test suite fails with -Dwithout.tephra 7f61cce is described below commit 7f61cceccc822ca2a9ef730defa80689a4002d01 Author: Istvan Toth AuthorDate: Tue Feb 1 10:31:14 2022 +0100 PHOENIX-6638 Test suite fails with -Dwithout.tephra --- .../phoenix/transaction/TephraTransactionProvider.java | 10 +- .../org/apache/phoenix/transaction/TransactionFactory.java | 13 - pom.xml | 12 ++-- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java index f3ff188..9a216ee 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java @@ -52,24 +52,24 @@ import com.google.inject.util.Providers; public class TephraTransactionProvider implements PhoenixTransactionProvider { private static final TephraTransactionProvider INSTANCE = new TephraTransactionProvider(); - + public static final TephraTransactionProvider getInstance() { return INSTANCE; } - + private TephraTransactionProvider() { } - + @Override public String toString() { return getProvider().toString(); } - + @Override public PhoenixTransactionContext getTransactionContext(byte[] txnBytes) throws IOException { return new TephraTransactionContext(txnBytes); } - + @Override public PhoenixTransactionContext getTransactionContext(PhoenixConnection connection) throws SQLException { return new TephraTransactionContext(connection); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java index ec55920..ab0d4c9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java @@ -18,20 +18,23 @@ package org.apache.phoenix.transaction; import java.io.IOException; -import java.util.List; import org.apache.phoenix.coprocessor.MetaDataProtocol; public class TransactionFactory { -private static PhoenixTransactionProvider tephraTransactionProvider; +private static final PhoenixTransactionProvider tephraTransactionProvider; static{ +boolean tephraEnabled = true; try { -tephraTransactionProvider = (PhoenixTransactionProvider) - Class.forName("org.apache.phoenix.transaction.TephraTransactionProvider") -.getMethod("getInstance").invoke(null); +Class.forName("org.apache.tephra.TransactionFailureException"); } catch (Throwable e) { +tephraEnabled = false; +} +if (tephraEnabled) { +tephraTransactionProvider = TephraTransactionProvider.getInstance(); +} else { tephraTransactionProvider = NotAvailableTransactionProvider.getInstance(); } } diff --git a/pom.xml b/pom.xml index 756773e..e2034c6 100644 --- a/pom.xml +++ b/pom.xml @@ -1233,7 +1233,11 @@ maven-failsafe-plugin - org.apache.tephra:tephra-api,org.apache.tephra:tephra-core,org.apache.thrift:libthrift + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift @@ -1242,7 +1246,11 @@ maven-surefire-plugin - org.apache.tephra:tephra-api,org.apache.tephra:tephra-core,org.apache.thrift:libthrift + org.apache.tephra:tephra-api + org.apache.tephra:tephra-core-shaded + org.apache.tephra:tephra-core + org.apache.tephra:tephra-hbase-compat-${tephra.hbase.compat.version} + org.apache.thrift:libthrift
[phoenix] branch 5.1 updated: PHOENIX-6638 Test suite fails with -Dwithout.tephra
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new b88338a PHOENIX-6638 Test suite fails with -Dwithout.tephra b88338a is described below commit b88338ad6422ad2fbd697bf55da0ea6a8ece9e2e Author: Istvan Toth AuthorDate: Tue Feb 1 10:31:14 2022 +0100 PHOENIX-6638 Test suite fails with -Dwithout.tephra --- .../phoenix/transaction/TephraTransactionProvider.java | 10 +- .../org/apache/phoenix/transaction/TransactionFactory.java | 13 - phoenix-hbase-compat-2.1.6/pom.xml | 7 ++- phoenix-hbase-compat-2.2.5/pom.xml | 6 ++ phoenix-hbase-compat-2.3.0/pom.xml | 6 ++ phoenix-hbase-compat-2.4.0/pom.xml | 6 ++ phoenix-hbase-compat-2.4.1/pom.xml | 6 ++ pom.xml | 12 ++-- 8 files changed, 53 insertions(+), 13 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java index f3ff188..9a216ee 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java @@ -52,24 +52,24 @@ import com.google.inject.util.Providers; public class TephraTransactionProvider implements PhoenixTransactionProvider { private static final TephraTransactionProvider INSTANCE = new TephraTransactionProvider(); - + public static final TephraTransactionProvider getInstance() { return INSTANCE; } - + private TephraTransactionProvider() { } - + @Override public String toString() { return getProvider().toString(); } - + @Override public PhoenixTransactionContext getTransactionContext(byte[] txnBytes) throws IOException { return new TephraTransactionContext(txnBytes); } - + @Override public PhoenixTransactionContext getTransactionContext(PhoenixConnection connection) throws SQLException { return new TephraTransactionContext(connection); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java index ec55920..ab0d4c9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java @@ -18,20 +18,23 @@ package org.apache.phoenix.transaction; import java.io.IOException; -import java.util.List; import org.apache.phoenix.coprocessor.MetaDataProtocol; public class TransactionFactory { -private static PhoenixTransactionProvider tephraTransactionProvider; +private static final PhoenixTransactionProvider tephraTransactionProvider; static{ +boolean tephraEnabled = true; try { -tephraTransactionProvider = (PhoenixTransactionProvider) - Class.forName("org.apache.phoenix.transaction.TephraTransactionProvider") -.getMethod("getInstance").invoke(null); +Class.forName("org.apache.tephra.TransactionFailureException"); } catch (Throwable e) { +tephraEnabled = false; +} +if (tephraEnabled) { +tephraTransactionProvider = TephraTransactionProvider.getInstance(); +} else { tephraTransactionProvider = NotAvailableTransactionProvider.getInstance(); } } diff --git a/phoenix-hbase-compat-2.1.6/pom.xml b/phoenix-hbase-compat-2.1.6/pom.xml index 72d6a01..caff1ea 100644 --- a/phoenix-hbase-compat-2.1.6/pom.xml +++ b/phoenix-hbase-compat-2.1.6/pom.xml @@ -98,7 +98,12 @@ ${hbase21.compat.version} provided + + + junit + junit + test + - diff --git a/phoenix-hbase-compat-2.2.5/pom.xml b/phoenix-hbase-compat-2.2.5/pom.xml index f78bbb7..746bfde 100644 --- a/phoenix-hbase-compat-2.2.5/pom.xml +++ b/phoenix-hbase-compat-2.2.5/pom.xml @@ -97,6 +97,12 @@ ${hbase22.compat.version} provided + + + junit + junit + test + diff --git a/phoenix-hbase-compat-2.3.0/pom.xml b/phoenix-hbase-compat-2.3.0/pom.xml index 562bec2..e745987 100644 --- a/phoenix-hbase-compat-2.3.0/pom.xml +++ b/phoenix-hbase-compat-2.3.0/pom.xml @@ -103,6 +103,12 @@ ${slf4j.version} provided + + + junit + junit + test + diff --git a/phoenix-hbase-compat-2.4.0/pom.xml
[phoenix] branch master updated: PHOENIX-6638 Test suite fails with -Dwithout.tephra
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 1c75f46 PHOENIX-6638 Test suite fails with -Dwithout.tephra 1c75f46 is described below commit 1c75f46d0740e93f9a8c5d214fc27c4ac37ac511 Author: Istvan Toth AuthorDate: Tue Feb 1 10:31:14 2022 +0100 PHOENIX-6638 Test suite fails with -Dwithout.tephra --- .../phoenix/transaction/TephraTransactionProvider.java | 10 +- .../org/apache/phoenix/transaction/TransactionFactory.java | 13 - phoenix-hbase-compat-2.1.6/pom.xml | 7 ++- phoenix-hbase-compat-2.2.5/pom.xml | 6 ++ phoenix-hbase-compat-2.3.0/pom.xml | 6 ++ phoenix-hbase-compat-2.4.0/pom.xml | 6 ++ phoenix-hbase-compat-2.4.1/pom.xml | 6 ++ pom.xml | 12 ++-- 8 files changed, 53 insertions(+), 13 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java index f3ff188..9a216ee 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionProvider.java @@ -52,24 +52,24 @@ import com.google.inject.util.Providers; public class TephraTransactionProvider implements PhoenixTransactionProvider { private static final TephraTransactionProvider INSTANCE = new TephraTransactionProvider(); - + public static final TephraTransactionProvider getInstance() { return INSTANCE; } - + private TephraTransactionProvider() { } - + @Override public String toString() { return getProvider().toString(); } - + @Override public PhoenixTransactionContext getTransactionContext(byte[] txnBytes) throws IOException { return new TephraTransactionContext(txnBytes); } - + @Override public PhoenixTransactionContext getTransactionContext(PhoenixConnection connection) throws SQLException { return new TephraTransactionContext(connection); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java index ec55920..ab0d4c9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java @@ -18,20 +18,23 @@ package org.apache.phoenix.transaction; import java.io.IOException; -import java.util.List; import org.apache.phoenix.coprocessor.MetaDataProtocol; public class TransactionFactory { -private static PhoenixTransactionProvider tephraTransactionProvider; +private static final PhoenixTransactionProvider tephraTransactionProvider; static{ +boolean tephraEnabled = true; try { -tephraTransactionProvider = (PhoenixTransactionProvider) - Class.forName("org.apache.phoenix.transaction.TephraTransactionProvider") -.getMethod("getInstance").invoke(null); +Class.forName("org.apache.tephra.TransactionFailureException"); } catch (Throwable e) { +tephraEnabled = false; +} +if (tephraEnabled) { +tephraTransactionProvider = TephraTransactionProvider.getInstance(); +} else { tephraTransactionProvider = NotAvailableTransactionProvider.getInstance(); } } diff --git a/phoenix-hbase-compat-2.1.6/pom.xml b/phoenix-hbase-compat-2.1.6/pom.xml index a3da830..9c92608 100644 --- a/phoenix-hbase-compat-2.1.6/pom.xml +++ b/phoenix-hbase-compat-2.1.6/pom.xml @@ -98,7 +98,12 @@ ${hbase21.compat.version} provided + + + junit + junit + test + - diff --git a/phoenix-hbase-compat-2.2.5/pom.xml b/phoenix-hbase-compat-2.2.5/pom.xml index 6bd35da..a0bd138 100644 --- a/phoenix-hbase-compat-2.2.5/pom.xml +++ b/phoenix-hbase-compat-2.2.5/pom.xml @@ -97,6 +97,12 @@ ${hbase22.compat.version} provided + + + junit + junit + test + diff --git a/phoenix-hbase-compat-2.3.0/pom.xml b/phoenix-hbase-compat-2.3.0/pom.xml index cca6199..c1afaee 100644 --- a/phoenix-hbase-compat-2.3.0/pom.xml +++ b/phoenix-hbase-compat-2.3.0/pom.xml @@ -103,6 +103,12 @@ ${slf4j.version} provided + + + junit + junit + test + diff --git a/phoenix-hbase-compat-2.4.0/p
[phoenix] branch 4.16 updated: PHOENIX-6064 Make Tephra support optional (addendum: fix backport)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new e61df3c PHOENIX-6064 Make Tephra support optional (addendum: fix backport) e61df3c is described below commit e61df3cc802e6b2494c3b7640bd4123fa3c3c325 Author: Istvan Toth AuthorDate: Mon Jan 31 21:01:46 2022 +0100 PHOENIX-6064 Make Tephra support optional (addendum: fix backport) --- phoenix-core/pom.xml | 15 --- phoenix-server/pom.xml | 45 +++-- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index b2e7fab..77e9395 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -302,21 +302,6 @@ - - - org.apache.tephra - tephra-api - - - org.apache.tephra - tephra-core-shaded - - - org.apache.tephra - tephra-hbase-compat-${tephra.hbase.compat.version} - shaded - - org.antlr diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml index 9e82a62..021a08f 100644 --- a/phoenix-server/pom.xml +++ b/phoenix-server/pom.xml @@ -101,7 +101,6 @@ org.apache.phoenix:phoenix-hbase-compat-${hbase.compat.version} org.iq80.snappy:snappy org.antlr:antlr* - org.apache.tephra:tephra* org.apache.omid:omid* org.apache.commons:commons-collections4 org.jboss.netty:netty @@ -113,7 +112,6 @@ com.google.inject.extensions:guice-assistedinject it.unimi.dsi:fastutil io.dropwizard.metrics:metrics-core - org.apache.thrift:libthrift com.clearspring.analytics:stream com.salesforce.i18n:i18n-util com.ibm.icu:icu4j @@ -162,7 +160,6 @@ org.apache.hadoop hadoop-auth - 2.7.1 test @@ -170,12 +167,40 @@ hbase-testing-util test - - org.apache.tephra - tephra-core - ${tephra.version} - test-jar - test - + + + + include-tephra + + + !without.tephra + + + + + +org.apache.maven.plugins +maven-shade-plugin + + +package + + shade + + + + + org.apache.tephra:tephra* + org.apache.thrift:libthrift + + + + + + + + + +
[phoenix] branch 4.16 updated: PHOENIX-6591 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new b0d91ee PHOENIX-6591 Update OWASP plugin to latest b0d91ee is described below commit b0d91eeb6c68bd230788a182560fbfc9fda37636 Author: Istvan Toth AuthorDate: Mon Jan 31 08:09:56 2022 +0100 PHOENIX-6591 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index edf8a34..86fb020 100644 --- a/pom.xml +++ b/pom.xml @@ -162,7 +162,7 @@ 0.600 2.12.0 -6.3.1 +6.5.3 0.6.1 1.5.0.Final
[phoenix] branch 4.x updated: PHOENIX-6591 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 479bbb0 PHOENIX-6591 Update OWASP plugin to latest 479bbb0 is described below commit 479bbb0a0f001235bbd35088c7d8ade8ef1dcdd7 Author: Istvan Toth AuthorDate: Mon Jan 31 08:09:56 2022 +0100 PHOENIX-6591 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8193bd20..756773e 100644 --- a/pom.xml +++ b/pom.xml @@ -162,7 +162,7 @@ 2.12.0 2.1.12 -6.3.1 +6.5.3 0.6.1 1.5.0.Final
[phoenix] branch 5.1 updated: PHOENIX-6591 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 21d5fa3 PHOENIX-6591 Update OWASP plugin to latest 21d5fa3 is described below commit 21d5fa30b153241c1fd3385360f3c4a704cabf6c Author: Istvan Toth AuthorDate: Mon Jan 31 08:09:56 2022 +0100 PHOENIX-6591 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 24b9f53..9a58277 100644 --- a/pom.xml +++ b/pom.xml @@ -163,7 +163,7 @@ 0.700 0.600 -6.3.1 +6.5.3 0.6.1 1.5.0.Final
[phoenix] branch master updated: PHOENIX-6591 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 5c28445 PHOENIX-6591 Update OWASP plugin to latest 5c28445 is described below commit 5c2844567b6928c6dd03b8725860ae146dc5024b Author: Istvan Toth AuthorDate: Mon Jan 31 08:09:56 2022 +0100 PHOENIX-6591 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6152f8a..57d13ca 100644 --- a/pom.xml +++ b/pom.xml @@ -163,7 +163,7 @@ 0.700 0.600 -6.3.1 +6.5.3 0.6.1 1.5.0.Final
[phoenix-queryserver] branch master updated: PHOENIX-6591 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git The following commit(s) were added to refs/heads/master by this push: new 0b91085 PHOENIX-6591 Update OWASP plugin to latest 0b91085 is described below commit 0b91085d3cde7d7be9af0a0a81e507deecf5de1a Author: Istvan Toth AuthorDate: Mon Jan 31 08:18:34 2022 +0100 PHOENIX-6591 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20c5611..8c02ff0 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ 1.9.1 4.1.3 4.1.3 -5.3.2 +6.5.3 0.8.5
[phoenix-connectors] branch master updated: PHOENIX-6591 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-connectors.git The following commit(s) were added to refs/heads/master by this push: new 72496e5 PHOENIX-6591 Update OWASP plugin to latest 72496e5 is described below commit 72496e57b6a5bb03c66af535b4b8625f0c7a793c Author: Istvan Toth AuthorDate: Mon Jan 31 08:52:15 2022 +0100 PHOENIX-6591 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ef5459..1c9267f 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ 1.6.0 4.1.3 4.1.3 -5.3.2 +6.5.3 8
[phoenix-omid] branch master updated: OMID-218 Update OWASP plugin to latest
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-omid.git The following commit(s) were added to refs/heads/master by this push: new 1b7fc46 OMID-218 Update OWASP plugin to latest 1b7fc46 is described below commit 1b7fc4687d14b2e1dbd29001829aa932c21117c4 Author: Istvan Toth AuthorDate: Mon Jan 31 09:05:23 2022 +0100 OMID-218 Update OWASP plugin to latest --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 169df98..bece349 100644 --- a/pom.xml +++ b/pom.xml @@ -209,7 +209,7 @@ 2.17 2.3 3.0.1 -5.3.2 +6.5.3 misc/header.txt
[phoenix] branch 4.16 updated: PHOENIX-6064 Make Tephra support optional
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 5801a2a PHOENIX-6064 Make Tephra support optional 5801a2a is described below commit 5801a2ac27597bc0f6feb04e9c4d74d234c8490b Author: Istvan Toth AuthorDate: Mon Aug 3 07:40:02 2020 +0200 PHOENIX-6064 Make Tephra support optional build with -Dwithout.tephra to omit Tephra from the artifacts (also fixed phoenix-pherf compilation problem) --- phoenix-core/pom.xml | 72 - .../end2end/ParameterizedIndexUpgradeToolIT.java | 2 +- .../apache/phoenix/end2end/UpsertWithSCNIT.java| 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 4 +- .../apache/phoenix/query/QueryServicesOptions.java | 3 +- .../phoenix/schema/stats/UpdateStatisticsTool.java | 14 +++- .../NotAvailableTransactionProvider.java | 89 ++ .../phoenix/transaction/TransactionFactory.java| 39 +++--- .../org/apache/phoenix/pherf/util/PhoenixUtil.java | 1 + phoenix-tracing-webapp/pom.xml | 14 pom.xml| 50 ++-- 11 files changed, 264 insertions(+), 26 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 5049898..b2e7fab 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -598,5 +598,75 @@ 1.6 - + +exclude-tephra + + +without.tephra + + + + +org.apache.tephra +tephra-api +provided + + +org.apache.tephra +tephra-core-shaded +provided + + +org.apache.tephra + tephra-hbase-compat-${tephra.hbase.compat.version} +shaded +provided + + +org.apache.thrift +libthrift +provided + + + + +include-tephra + + +!without.tephra + + + + +org.apache.tephra +tephra-api + + +org.apache.tephra +tephra-core-shaded + + +org.apache.tephra + tephra-hbase-compat-${tephra.hbase.compat.version} +shaded + + +org.apache.thrift +libthrift + + + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + + diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java index 2600ef6..c81e7e7 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java @@ -202,7 +202,7 @@ public class ParameterizedIndexUpgradeToolIT extends BaseTest { TRANSACTIONAL_TABLE_LIST[0] = transactTable; conn.createStatement().execute("CREATE TABLE " + transactTable + " (id bigint NOT NULL " + "PRIMARY KEY, a.name varchar, sal bigint, address varchar) " -+ " TRANSACTIONAL=true " ++ " TRANSACTIONAL=true, TRANSACTION_PROVIDER='OMID' " + ((tableDDLOptions.trim().length() > 0) ? "," : "") + tableDDLOptions); String mockOneViewOne = "TEST." + generateUniqueName(); diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java index 8b97e7f..16c9cfd 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java @@ -56,7 +56,7 @@ public class UpsertWithSCNIT extends ParallelStatsDisabledIT { + "METRIC_ID CHAR(15) NOT NULL,METRIC_VALUE VARCHAR(50) CONSTRAINT PK PRIMARY KEY(" + (rowColumn? "CREATED_DATE ROW_TIMESTAMP, ":"") + "METRIC_ID)) " + "IMMUTABLE_ROWS=" + (mutable? "false" : "true" ) -+ (txTable ? ", TRANSACTION_PROVIDER='TEPHRA',TRANSACTIONAL=true":""); ++ (txTable ? ", TRANSACTION_PROVIDER='OMID',TRANSACTIONAL=true":""); props = new Properties(); Connection conn = DriverManager.getConnection(getUrl(), props); conn.createStatement().execute(createTable); diff --git a/phoenix-core/src/m
[phoenix] branch 4.x updated: PHOENIX-6064 Make Tephra support optional
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new a6cbf0c PHOENIX-6064 Make Tephra support optional a6cbf0c is described below commit a6cbf0cdfca2b38c8e969d400aae6c8a82e68cdc Author: Istvan Toth AuthorDate: Mon Aug 3 07:40:02 2020 +0200 PHOENIX-6064 Make Tephra support optional build with -Dwithout.tephra to omit Tephra from the artifacts --- phoenix-core/pom.xml | 72 - .../end2end/ParameterizedIndexUpgradeToolIT.java | 2 +- .../apache/phoenix/end2end/UpsertWithSCNIT.java| 2 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 4 +- .../apache/phoenix/query/QueryServicesOptions.java | 3 +- .../phoenix/schema/stats/UpdateStatisticsTool.java | 18 - .../NotAvailableTransactionProvider.java | 89 ++ .../phoenix/transaction/TransactionFactory.java| 39 +++--- phoenix-tracing-webapp/pom.xml | 14 pom.xml| 50 ++-- 10 files changed, 266 insertions(+), 27 deletions(-) diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 4020d29..bfc79bc 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -586,5 +586,75 @@ 1.6 - + +exclude-tephra + + +without.tephra + + + + +org.apache.tephra +tephra-api +provided + + +org.apache.tephra +tephra-core-shaded +provided + + +org.apache.tephra + tephra-hbase-compat-${tephra.hbase.compat.version} +shaded +provided + + +org.apache.thrift +libthrift +provided + + + + +include-tephra + + +!without.tephra + + + + +org.apache.tephra +tephra-api + + +org.apache.tephra +tephra-core-shaded + + +org.apache.tephra + tephra-hbase-compat-${tephra.hbase.compat.version} +shaded + + +org.apache.thrift +libthrift + + + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + + diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java index 02cd47a..7fafdeb 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java @@ -203,7 +203,7 @@ public class ParameterizedIndexUpgradeToolIT extends BaseTest { TRANSACTIONAL_TABLE_LIST[0] = transactTable; conn.createStatement().execute("CREATE TABLE " + transactTable + " (id bigint NOT NULL " + "PRIMARY KEY, a.name varchar, sal bigint, address varchar) " -+ " TRANSACTIONAL=true " ++ " TRANSACTIONAL=true, TRANSACTION_PROVIDER='OMID' " + ((tableDDLOptions.trim().length() > 0) ? "," : "") + tableDDLOptions); String mockOneViewOne = "TEST." + generateUniqueName(); diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java index 8b97e7f..16c9cfd 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java @@ -56,7 +56,7 @@ public class UpsertWithSCNIT extends ParallelStatsDisabledIT { + "METRIC_ID CHAR(15) NOT NULL,METRIC_VALUE VARCHAR(50) CONSTRAINT PK PRIMARY KEY(" + (rowColumn? "CREATED_DATE ROW_TIMESTAMP, ":"") + "METRIC_ID)) " + "IMMUTABLE_ROWS=" + (mutable? "false" : "true" ) -+ (txTable ? ", TRANSACTION_PROVIDER='TEPHRA',TRANSACTIONAL=true":""); ++ (txTable ? ", TRANSACTION_PROVIDER='OMID',TRANSACTIONAL=true":""); props = new Properties(); Connection conn = DriverManager.getConnection(getUrl(), props); conn.createStatement().execute(createTable); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoe
[phoenix] branch 5.1 updated: PHOENIX-6615 The Tephra transaction processor cannot be loaded anymore.
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 05379de PHOENIX-6615 The Tephra transaction processor cannot be loaded anymore. 05379de is described below commit 05379dedb6eca435933c52a0cf5f6c02b0f7d3c6 Author: Lars Hofhansl AuthorDate: Mon Jan 3 10:08:23 2022 +0100 PHOENIX-6615 The Tephra transaction processor cannot be loaded anymore. --- .../main/java/org/apache/phoenix/transaction/TransactionFactory.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java index c453c71..ec55920 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java @@ -30,7 +30,7 @@ public class TransactionFactory { try { tephraTransactionProvider = (PhoenixTransactionProvider) Class.forName("org.apache.phoenix.transaction.TephraTransactionProvider") -.newInstance(); +.getMethod("getInstance").invoke(null); } catch (Throwable e) { tephraTransactionProvider = NotAvailableTransactionProvider.getInstance(); }
[phoenix] 01/02: PHOENIX-6579 ACL check doesn't honor the namespace mapping for mapped views.
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git commit f93c93168809b44f687ad5cf16fb31f5b8a3fa28 Author: Sergey Soldatov AuthorDate: Fri Oct 29 20:29:56 2021 +0300 PHOENIX-6579 ACL check doesn't honor the namespace mapping for mapped views. --- .../apache/phoenix/end2end/BasePermissionsIT.java | 6 +-- .../phoenix/end2end/PermissionNSEnabledIT.java | 45 ++ .../phoenix/coprocessor/MetaDataEndpointImpl.java | 4 +- .../coprocessor/PhoenixAccessController.java | 27 +++-- 4 files changed, 66 insertions(+), 16 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java index d1ce77a..c9fc1a7 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java @@ -99,7 +99,7 @@ public abstract class BasePermissionsIT extends BaseTest { private static final String SUPER_USER = System.getProperty("user.name"); -private static HBaseTestingUtility testUtil; +static HBaseTestingUtility testUtil; private static final Set PHOENIX_SYSTEM_TABLES = new HashSet<>(Arrays.asList("SYSTEM.CATALOG", "SYSTEM.SEQUENCE", "SYSTEM.STATS", "SYSTEM.FUNCTION", "SYSTEM.MUTEX", "SYSTEM.CHILD_LINK", "SYSTEM.TRANSFORM")); @@ -365,7 +365,7 @@ public abstract class BasePermissionsIT extends BaseTest { // UG Object // 1. Instance of String --> represents GROUP name // 2. Instance of User --> represents HBase user -private AccessTestAction grantPermissions(final String actions, final Object ug, +AccessTestAction grantPermissions(final String actions, final Object ug, final String tableOrSchemaList, final boolean isSchema) throws SQLException { return grantPermissions(actions, ug, Collections.singleton(tableOrSchemaList), isSchema); } @@ -958,7 +958,7 @@ public abstract class BasePermissionsIT extends BaseTest { } } -private String surroundWithDoubleQuotes(String input) { +String surroundWithDoubleQuotes(String input) { return "\"" + input + "\""; } diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java index 7a2a995..292654f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PermissionNSEnabledIT.java @@ -18,8 +18,14 @@ package org.apache.phoenix.end2end; import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; +import org.apache.hadoop.hbase.client.TableDescriptor; +import org.apache.hadoop.hbase.client.TableDescriptorBuilder; import org.apache.hadoop.hbase.security.AccessDeniedException; import org.apache.hadoop.hbase.security.access.Permission; +import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.util.SchemaUtil; import org.junit.BeforeClass; @@ -29,11 +35,13 @@ import org.junit.experimental.categories.Category; import java.security.PrivilegedExceptionAction; import java.sql.Connection; import java.sql.SQLException; +import java.sql.Statement; import java.util.Collections; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CHILD_LINK_TABLE; import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_SCHEMA_NAME; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -48,6 +56,43 @@ public class PermissionNSEnabledIT extends BasePermissionsIT { public static synchronized void doSetup() throws Exception { BasePermissionsIT.initCluster(true); } +private AccessTestAction createMappedView(final String schemaName, final String tableName) throws SQLException { +return new AccessTestAction() { +@Override +public Object run() throws Exception { +try (Connection conn = getConnection(); Statement stmt = conn.createStatement();) { +String viewStmtSQL = "CREATE VIEW \"" + schemaName + "\".\"" + tableName + "\" ( PK varchar primary key)"; +assertFalse(stmt.
[phoenix] 02/02: PHOENIX-6615 The Tephra transaction processor cannot be loaded anymore.
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git commit 6ea9dec20f1302c10d7831f544cf9615eba633f5 Author: Lars Hofhansl AuthorDate: Mon Jan 3 10:08:23 2022 +0100 PHOENIX-6615 The Tephra transaction processor cannot be loaded anymore. --- .../main/java/org/apache/phoenix/transaction/TransactionFactory.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java index c453c71..ec55920 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TransactionFactory.java @@ -30,7 +30,7 @@ public class TransactionFactory { try { tephraTransactionProvider = (PhoenixTransactionProvider) Class.forName("org.apache.phoenix.transaction.TephraTransactionProvider") -.newInstance(); +.getMethod("getInstance").invoke(null); } catch (Throwable e) { tephraTransactionProvider = NotAvailableTransactionProvider.getInstance(); }
[phoenix] branch master updated (01e1d2b -> 6ea9dec)
This is an automated email from the ASF dual-hosted git repository. stoty pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git. from 01e1d2b PHOENIX-6611 Fix IndexTool -snap option and set VERIFIED in PhoenixIndexImportDirectReducer new f93c931 PHOENIX-6579 ACL check doesn't honor the namespace mapping for mapped views. new 6ea9dec PHOENIX-6615 The Tephra transaction processor cannot be loaded anymore. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/phoenix/end2end/BasePermissionsIT.java | 6 +-- .../phoenix/end2end/PermissionNSEnabledIT.java | 45 ++ .../phoenix/coprocessor/MetaDataEndpointImpl.java | 4 +- .../coprocessor/PhoenixAccessController.java | 27 +++-- .../phoenix/transaction/TransactionFactory.java| 2 +- 5 files changed, 67 insertions(+), 17 deletions(-)
[phoenix] branch 4.16 updated: PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 18ce300 PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available 18ce300 is described below commit 18ce300dbf97bdd816d826d12d2ab6a0fd09f914 Author: Istvan Toth AuthorDate: Mon Jan 3 09:44:38 2022 +0100 PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available do not pin openjdk-11 version in Dockerfiles --- dev/docker/Dockerfile.multibranch | 2 +- dev/docker/Dockerfile.yetus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/docker/Dockerfile.multibranch b/dev/docker/Dockerfile.multibranch index b319895..bfd74c3 100644 --- a/dev/docker/Dockerfile.multibranch +++ b/dev/docker/Dockerfile.multibranch @@ -31,7 +31,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 \ +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # diff --git a/dev/docker/Dockerfile.yetus b/dev/docker/Dockerfile.yetus index bc4ce68..9d2b1ec 100644 --- a/dev/docker/Dockerfile.yetus +++ b/dev/docker/Dockerfile.yetus @@ -43,7 +43,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 \ +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* #
[phoenix] branch 4.x updated: PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 44e2cee PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available 44e2cee is described below commit 44e2cee73ced63f705e4aa3aa3c955a8f9b18160 Author: Istvan Toth AuthorDate: Mon Jan 3 09:44:38 2022 +0100 PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available do not pin openjdk-11 version in Dockerfiles --- dev/docker/Dockerfile.multibranch | 2 +- dev/docker/Dockerfile.yetus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/docker/Dockerfile.multibranch b/dev/docker/Dockerfile.multibranch index b319895..bfd74c3 100644 --- a/dev/docker/Dockerfile.multibranch +++ b/dev/docker/Dockerfile.multibranch @@ -31,7 +31,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 \ +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # diff --git a/dev/docker/Dockerfile.yetus b/dev/docker/Dockerfile.yetus index bc4ce68..9d2b1ec 100644 --- a/dev/docker/Dockerfile.yetus +++ b/dev/docker/Dockerfile.yetus @@ -43,7 +43,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 \ +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* #
[phoenix] branch 5.1 updated: PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new abed3c2 PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available abed3c2 is described below commit abed3c2d918c38f5e3e91ae213ff106315348735 Author: Istvan Toth AuthorDate: Mon Jan 3 09:44:38 2022 +0100 PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available do not pin openjdk-11 version in Dockerfiles --- dev/docker/Dockerfile.multibranch | 2 +- dev/docker/Dockerfile.yetus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/docker/Dockerfile.multibranch b/dev/docker/Dockerfile.multibranch index 4989169..3f658e4 100644 --- a/dev/docker/Dockerfile.multibranch +++ b/dev/docker/Dockerfile.multibranch @@ -31,7 +31,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre # # Set default JDK to 11 # diff --git a/dev/docker/Dockerfile.yetus b/dev/docker/Dockerfile.yetus index 2f27d45..90b84f0 100644 --- a/dev/docker/Dockerfile.yetus +++ b/dev/docker/Dockerfile.yetus @@ -43,7 +43,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre # # Set default JDK to 11 #
[phoenix] branch master updated: PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 061052b PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available 061052b is described below commit 061052b0574a787b2a85a21daa92824508af0b0b Author: Istvan Toth AuthorDate: Mon Jan 3 09:44:38 2022 +0100 PHOENIX-6618 Yetus docker image cannot be built as openjdk 11.0.11 is no longer available do not pin openjdk-11 version in Dockerfiles --- dev/docker/Dockerfile.multibranch | 2 +- dev/docker/Dockerfile.yetus | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/docker/Dockerfile.multibranch b/dev/docker/Dockerfile.multibranch index 4989169..3f658e4 100644 --- a/dev/docker/Dockerfile.multibranch +++ b/dev/docker/Dockerfile.multibranch @@ -31,7 +31,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre # # Set default JDK to 11 # diff --git a/dev/docker/Dockerfile.yetus b/dev/docker/Dockerfile.yetus index 2f27d45..90b84f0 100644 --- a/dev/docker/Dockerfile.yetus +++ b/dev/docker/Dockerfile.yetus @@ -43,7 +43,7 @@ RUN mkdir -p /run/user/910/gnupg/ \ # Update Java 11 packages to 11.0.11 (to avoid Java 11.0.9.1 version Jetty bug) # RUN apt-get update \ -&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre-headless=11.0.11+9-0ubuntu2~20.04 openjdk-11-jre=11.0.11+9-0ubuntu2~20.04 +&& apt-get -q install --no-install-recommends -y openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-jre # # Set default JDK to 11 #
[phoenix-connectors] branch master updated: PHOENIX-6609 Update log4j2 test depenency version for phoenix-hive connector
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-connectors.git The following commit(s) were added to refs/heads/master by this push: new 22d52df PHOENIX-6609 Update log4j2 test depenency version for phoenix-hive connector 22d52df is described below commit 22d52dfc1a3d4958781906bebfc0b8101d1097f6 Author: Istvan Toth AuthorDate: Mon Dec 13 12:52:39 2021 +0100 PHOENIX-6609 Update log4j2 test depenency version for phoenix-hive connector --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cfe71b3..0ef5459 100644 --- a/pom.xml +++ b/pom.xml @@ -98,7 +98,7 @@ 2.11 1.2.17 -2.10.0 +2.16.0 3.3.6 1.7.30 3.2.2
[phoenix] branch 5.1 updated: PHOENIX-6582 Bump default HBase version to 2.3.7 and 2.4.8
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 6388bd3 PHOENIX-6582 Bump default HBase version to 2.3.7 and 2.4.8 6388bd3 is described below commit 6388bd39115d9cb510a5bdfae3c5e77f390a02cd Author: luoc AuthorDate: Sat Nov 13 15:43:50 2021 +0800 PHOENIX-6582 Bump default HBase version to 2.3.7 and 2.4.8 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8994ab3..24b9f53 100644 --- a/pom.xml +++ b/pom.xml @@ -86,9 +86,9 @@ 2.1.10 2.2.7 -2.3.6 +2.3.7 2.4.0 -2.4.6 +2.4.8 src/main/antlr3
[phoenix] branch master updated: PHOENIX-6582 Bump default HBase version to 2.3.7 and 2.4.8
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new aae1b21 PHOENIX-6582 Bump default HBase version to 2.3.7 and 2.4.8 aae1b21 is described below commit aae1b215f06fa0e6140f6633518b5bfe3c788022 Author: luoc AuthorDate: Sat Nov 13 15:43:50 2021 +0800 PHOENIX-6582 Bump default HBase version to 2.3.7 and 2.4.8 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6baaae7..6152f8a 100644 --- a/pom.xml +++ b/pom.xml @@ -86,9 +86,9 @@ 2.1.10 2.2.7 -2.3.6 +2.3.7 2.4.0 -2.4.6 +2.4.8 src/main/antlr3
[phoenix] branch 4.16 updated: PHOENIX-6601 Fix IndexTools bugs with namespace mapping
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 368c5a6 PHOENIX-6601 Fix IndexTools bugs with namespace mapping 368c5a6 is described below commit 368c5a6b60d2a206de532304addb57022c71b8cf Author: Istvan Toth AuthorDate: Mon Nov 22 13:00:59 2021 +0100 PHOENIX-6601 Fix IndexTools bugs with namespace mapping --- .../phoenix/end2end/IndexBuildTimestampIT.java | 19 ++- .../org/apache/phoenix/end2end/IndexToolIT.java| 141 + .../apache/phoenix/mapreduce/index/IndexTool.java | 14 +- 3 files changed, 116 insertions(+), 58 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java index ea6d6de..521ae75 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java @@ -28,6 +28,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.List; +import java.util.Map; import java.util.Properties; import org.apache.hadoop.hbase.client.ResultScanner; @@ -37,18 +38,22 @@ import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixResultSet; import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.query.QueryServicesOptions; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.util.EnvironmentEdge; import org.apache.phoenix.util.EnvironmentEdgeManager; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.QueryUtil; +import org.apache.phoenix.util.ReadOnlyProps; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; + import org.apache.phoenix.thirdparty.com.google.common.collect.Lists; +import org.apache.phoenix.thirdparty.com.google.common.collect.Maps; @Category(NeedsOwnMiniClusterTest.class) @RunWith(Parameterized.class) @@ -73,7 +78,19 @@ public class IndexBuildTimestampIT extends BaseTest { @BeforeClass public static synchronized void setup() throws Exception { -IndexToolIT.setup(); +Map serverProps = Maps.newHashMapWithExpectedSize(2); +serverProps.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(20)); + serverProps.put(QueryServices.MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS_ATTRIB, Long.toString(5)); +serverProps.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, +QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS); +serverProps.put(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(8)); +Map clientProps = Maps.newHashMapWithExpectedSize(2); +clientProps.put(QueryServices.USE_STATS_FOR_PARALLELIZATION, Boolean.toString(true)); +clientProps.put(QueryServices.STATS_UPDATE_FREQ_MS_ATTRIB, Long.toString(5)); +clientProps.put(QueryServices.TRANSACTIONS_ENABLED, Boolean.TRUE.toString()); +clientProps.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, Boolean.TRUE.toString()); +setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), +new ReadOnlyProps(clientProps.entrySet().iterator())); } @Parameters( diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java index 9d29d6a..fad144c 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java @@ -55,7 +55,6 @@ import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.ConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.query.QueryServicesOptions; -import org.apache.phoenix.schema.PIndexState; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.transaction.PhoenixTransactionProvider.Feature; import org.apache.phoenix.transaction.TransactionFactory; @@ -65,11 +64,11 @@ import org.apache.phoenix.util.QueryUtil; import org.apache.phoenix.util.ReadOnlyProps; import org.apache.phoenix.util.SchemaUtil; import org.apache.phoenix.util.TestUtil; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.BeforeParam; import org.junit.runners.Parameterized.Parameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory
[phoenix] branch 4.x updated: PHOENIX-6601 Fix IndexTools bugs with namespace mapping
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 01e4b7d PHOENIX-6601 Fix IndexTools bugs with namespace mapping 01e4b7d is described below commit 01e4b7d0af8d4072db9fbee71e9117647c12855f Author: Istvan Toth AuthorDate: Mon Nov 22 13:00:59 2021 +0100 PHOENIX-6601 Fix IndexTools bugs with namespace mapping --- .../phoenix/end2end/IndexBuildTimestampIT.java | 19 ++- .../org/apache/phoenix/end2end/IndexToolIT.java| 141 + .../apache/phoenix/mapreduce/index/IndexTool.java | 14 +- 3 files changed, 116 insertions(+), 58 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java index ea6d6de..521ae75 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java @@ -28,6 +28,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.List; +import java.util.Map; import java.util.Properties; import org.apache.hadoop.hbase.client.ResultScanner; @@ -37,18 +38,22 @@ import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixResultSet; import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.query.QueryServicesOptions; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.util.EnvironmentEdge; import org.apache.phoenix.util.EnvironmentEdgeManager; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.QueryUtil; +import org.apache.phoenix.util.ReadOnlyProps; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; + import org.apache.phoenix.thirdparty.com.google.common.collect.Lists; +import org.apache.phoenix.thirdparty.com.google.common.collect.Maps; @Category(NeedsOwnMiniClusterTest.class) @RunWith(Parameterized.class) @@ -73,7 +78,19 @@ public class IndexBuildTimestampIT extends BaseTest { @BeforeClass public static synchronized void setup() throws Exception { -IndexToolIT.setup(); +Map serverProps = Maps.newHashMapWithExpectedSize(2); +serverProps.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(20)); + serverProps.put(QueryServices.MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS_ATTRIB, Long.toString(5)); +serverProps.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, +QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS); +serverProps.put(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(8)); +Map clientProps = Maps.newHashMapWithExpectedSize(2); +clientProps.put(QueryServices.USE_STATS_FOR_PARALLELIZATION, Boolean.toString(true)); +clientProps.put(QueryServices.STATS_UPDATE_FREQ_MS_ATTRIB, Long.toString(5)); +clientProps.put(QueryServices.TRANSACTIONS_ENABLED, Boolean.TRUE.toString()); +clientProps.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, Boolean.TRUE.toString()); +setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), +new ReadOnlyProps(clientProps.entrySet().iterator())); } @Parameters( diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java index 9d29d6a..fad144c 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java @@ -55,7 +55,6 @@ import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.ConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.query.QueryServicesOptions; -import org.apache.phoenix.schema.PIndexState; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.transaction.PhoenixTransactionProvider.Feature; import org.apache.phoenix.transaction.TransactionFactory; @@ -65,11 +64,11 @@ import org.apache.phoenix.util.QueryUtil; import org.apache.phoenix.util.ReadOnlyProps; import org.apache.phoenix.util.SchemaUtil; import org.apache.phoenix.util.TestUtil; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.BeforeParam; import org.junit.runners.Parameterized.Parameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory
[phoenix] branch 5.1 updated: PHOENIX-6601 Fix IndexTools bugs with namespace mapping
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new c59f92f PHOENIX-6601 Fix IndexTools bugs with namespace mapping c59f92f is described below commit c59f92f74dbccd7636358a92b4eadfd56a905567 Author: Istvan Toth AuthorDate: Mon Nov 22 13:00:59 2021 +0100 PHOENIX-6601 Fix IndexTools bugs with namespace mapping --- .../phoenix/end2end/IndexBuildTimestampIT.java | 19 ++- .../org/apache/phoenix/end2end/IndexToolIT.java| 150 + .../apache/phoenix/mapreduce/index/IndexTool.java | 17 +-- 3 files changed, 122 insertions(+), 64 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java index 6c36838..faa6cb0 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java @@ -28,6 +28,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.List; +import java.util.Map; import java.util.Properties; import org.apache.hadoop.hbase.client.ResultScanner; @@ -37,18 +38,22 @@ import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixResultSet; import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.query.QueryServicesOptions; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.util.EnvironmentEdge; import org.apache.phoenix.util.EnvironmentEdgeManager; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.QueryUtil; +import org.apache.phoenix.util.ReadOnlyProps; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; + import org.apache.phoenix.thirdparty.com.google.common.collect.Lists; +import org.apache.phoenix.thirdparty.com.google.common.collect.Maps; @Category(NeedsOwnMiniClusterTest.class) @RunWith(Parameterized.class) @@ -73,7 +78,19 @@ public class IndexBuildTimestampIT extends BaseTest { @BeforeClass public static synchronized void setup() throws Exception { -IndexToolIT.setup(); +Map serverProps = Maps.newHashMapWithExpectedSize(2); +serverProps.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(20)); + serverProps.put(QueryServices.MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS_ATTRIB, Long.toString(5)); +serverProps.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, +QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS); +serverProps.put(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(8)); +Map clientProps = Maps.newHashMapWithExpectedSize(2); +clientProps.put(QueryServices.USE_STATS_FOR_PARALLELIZATION, Boolean.toString(true)); +clientProps.put(QueryServices.STATS_UPDATE_FREQ_MS_ATTRIB, Long.toString(5)); +clientProps.put(QueryServices.TRANSACTIONS_ENABLED, Boolean.TRUE.toString()); +clientProps.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, Boolean.TRUE.toString()); +setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), +new ReadOnlyProps(clientProps.entrySet().iterator())); } @Parameters( diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java index c2de883..b121c3f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java @@ -29,7 +29,6 @@ import org.apache.hadoop.hbase.HBaseIOException; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; -import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.Mutation; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; @@ -55,7 +54,6 @@ import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.ConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.query.QueryServicesOptions; -import org.apache.phoenix.schema.PIndexState; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.transaction.PhoenixTransactionProvider.Feature; import org.apache.phoenix.transaction.TransactionFactory; @@ -65,11 +63,11 @@ import org.apache.phoenix.util.QueryUtil; import org.apache.phoenix.util.ReadOnlyProps; import
[phoenix] branch master updated: PHOENIX-6601 Fix IndexTools bugs with namespace mapping
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 12bc597 PHOENIX-6601 Fix IndexTools bugs with namespace mapping 12bc597 is described below commit 12bc597d2a06de88ea39645d09a002db8c853945 Author: Istvan Toth AuthorDate: Mon Nov 22 13:00:59 2021 +0100 PHOENIX-6601 Fix IndexTools bugs with namespace mapping --- .../phoenix/end2end/IndexBuildTimestampIT.java | 19 ++- .../org/apache/phoenix/end2end/IndexToolIT.java| 150 + .../apache/phoenix/mapreduce/index/IndexTool.java | 17 +-- 3 files changed, 122 insertions(+), 64 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java index 6c36838..faa6cb0 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexBuildTimestampIT.java @@ -28,6 +28,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.List; +import java.util.Map; import java.util.Properties; import org.apache.hadoop.hbase.client.ResultScanner; @@ -37,18 +38,22 @@ import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixResultSet; import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.QueryServices; +import org.apache.phoenix.query.QueryServicesOptions; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.util.EnvironmentEdge; import org.apache.phoenix.util.EnvironmentEdgeManager; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.QueryUtil; +import org.apache.phoenix.util.ReadOnlyProps; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; + import org.apache.phoenix.thirdparty.com.google.common.collect.Lists; +import org.apache.phoenix.thirdparty.com.google.common.collect.Maps; @Category(NeedsOwnMiniClusterTest.class) @RunWith(Parameterized.class) @@ -73,7 +78,19 @@ public class IndexBuildTimestampIT extends BaseTest { @BeforeClass public static synchronized void setup() throws Exception { -IndexToolIT.setup(); +Map serverProps = Maps.newHashMapWithExpectedSize(2); +serverProps.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(20)); + serverProps.put(QueryServices.MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS_ATTRIB, Long.toString(5)); +serverProps.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, +QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS); +serverProps.put(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(8)); +Map clientProps = Maps.newHashMapWithExpectedSize(2); +clientProps.put(QueryServices.USE_STATS_FOR_PARALLELIZATION, Boolean.toString(true)); +clientProps.put(QueryServices.STATS_UPDATE_FREQ_MS_ATTRIB, Long.toString(5)); +clientProps.put(QueryServices.TRANSACTIONS_ENABLED, Boolean.TRUE.toString()); +clientProps.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, Boolean.TRUE.toString()); +setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), +new ReadOnlyProps(clientProps.entrySet().iterator())); } @Parameters( diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java index c2de883..b121c3f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java @@ -29,7 +29,6 @@ import org.apache.hadoop.hbase.HBaseIOException; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; -import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.Mutation; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; @@ -55,7 +54,6 @@ import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.ConnectionQueryServices; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.query.QueryServicesOptions; -import org.apache.phoenix.schema.PIndexState; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.transaction.PhoenixTransactionProvider.Feature; import org.apache.phoenix.transaction.TransactionFactory; @@ -65,11 +63,11 @@ import org.apache.phoenix.util.QueryUtil; import org.apache.phoenix.util.ReadOnlyProps; import
[phoenix] branch 5.1 updated: PHOENIX-6594 Clean up vararg warnings flagged as errors by Eclipse
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 4446e2f PHOENIX-6594 Clean up vararg warnings flagged as errors by Eclipse 4446e2f is described below commit 4446e2f90ea9cb63c4a9285d0397136e42f7b213 Author: Istvan Toth AuthorDate: Wed Nov 17 05:51:40 2021 +0100 PHOENIX-6594 Clean up vararg warnings flagged as errors by Eclipse --- .../src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java | 2 +- .../test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java index 294e58c..ad95b86 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java @@ -74,7 +74,7 @@ public class IndexToolUtil { Preconditions.checkNotNull(connection); final String alterQuery = String.format(ALTER_INDEX_QUERY_TEMPLATE,indexTable,masterTable,state.name()); connection.createStatement().execute(alterQuery); -LOGGER.info(" Updated the status of the index {} on {} to {} " , new String[] {indexTable , masterTable, state.name()}); +LOGGER.info(" Updated the status of the index {} on {} to {} ", indexTable, masterTable, state.name()); } } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java index 533f32e..a49db73 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java @@ -69,7 +69,7 @@ public class MathTrigFunctionTest { @Parameters(name = "{0} {1}") public static synchronized Collection data() { -return Arrays.asList(new Object[][]{ +return Arrays.asList((Object[]) new Object[][]{ { new BigDecimal[]{BigDecimal.valueOf(1.0), BigDecimal.valueOf(0.0), BigDecimal.valueOf(-1.0), BigDecimal.valueOf(123.1234),
[phoenix] branch master updated: PHOENIX-6594 Clean up vararg warnings flagged as errors by Eclipse
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 8676597 PHOENIX-6594 Clean up vararg warnings flagged as errors by Eclipse 8676597 is described below commit 8676597a4cc6fb2559e18400922cc6758e44ab09 Author: Istvan Toth AuthorDate: Wed Nov 17 05:51:40 2021 +0100 PHOENIX-6594 Clean up vararg warnings flagged as errors by Eclipse --- .../src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java | 2 +- .../test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java index 294e58c..ad95b86 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolUtil.java @@ -74,7 +74,7 @@ public class IndexToolUtil { Preconditions.checkNotNull(connection); final String alterQuery = String.format(ALTER_INDEX_QUERY_TEMPLATE,indexTable,masterTable,state.name()); connection.createStatement().execute(alterQuery); -LOGGER.info(" Updated the status of the index {} on {} to {} " , new String[] {indexTable , masterTable, state.name()}); +LOGGER.info(" Updated the status of the index {} on {} to {} ", indexTable, masterTable, state.name()); } } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java index 533f32e..a49db73 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/expression/MathTrigFunctionTest.java @@ -69,7 +69,7 @@ public class MathTrigFunctionTest { @Parameters(name = "{0} {1}") public static synchronized Collection data() { -return Arrays.asList(new Object[][]{ +return Arrays.asList((Object[]) new Object[][]{ { new BigDecimal[]{BigDecimal.valueOf(1.0), BigDecimal.valueOf(0.0), BigDecimal.valueOf(-1.0), BigDecimal.valueOf(123.1234),
[phoenix] branch 4.16 updated: PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new 9962877 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads 9962877 is described below commit 9962877367fcfbff42571ef7919cf7af70b33c49 Author: Istvan Toth AuthorDate: Mon Nov 15 09:25:17 2021 +0100 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads --- .../apache/phoenix/query/PhoenixStatsCacheLoader.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java index fd794cb..8061342 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java @@ -21,15 +21,18 @@ import org.apache.phoenix.thirdparty.com.google.common.cache.CacheLoader; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.Futures; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFuture; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFutureTask; +import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.conf.Configuration; import org.apache.phoenix.schema.stats.GuidePostsInfo; import org.apache.phoenix.schema.stats.GuidePostsKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; /** * {@link CacheLoader} asynchronous implementation for the Phoenix Table Stats cache. @@ -43,15 +46,20 @@ public class PhoenixStatsCacheLoader extends CacheLoader
[phoenix] branch 4.x updated: PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 411dc3f PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads 411dc3f is described below commit 411dc3fdf824fa05a2752d116f471f4134bf7e85 Author: Istvan Toth AuthorDate: Mon Nov 15 09:25:17 2021 +0100 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads --- .../apache/phoenix/query/PhoenixStatsCacheLoader.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java index fd794cb..8061342 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java @@ -21,15 +21,18 @@ import org.apache.phoenix.thirdparty.com.google.common.cache.CacheLoader; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.Futures; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFuture; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFutureTask; +import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.conf.Configuration; import org.apache.phoenix.schema.stats.GuidePostsInfo; import org.apache.phoenix.schema.stats.GuidePostsKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; /** * {@link CacheLoader} asynchronous implementation for the Phoenix Table Stats cache. @@ -43,15 +46,20 @@ public class PhoenixStatsCacheLoader extends CacheLoader
[phoenix] branch 5.1 updated: PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new ea28f51 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads ea28f51 is described below commit ea28f517158dbb8b0c68ca180579bf543ac82f2f Author: Istvan Toth AuthorDate: Mon Nov 15 09:25:17 2021 +0100 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads --- .../apache/phoenix/query/PhoenixStatsCacheLoader.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java index b068f31..911d7d1 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java @@ -21,15 +21,18 @@ import org.apache.phoenix.thirdparty.com.google.common.cache.CacheLoader; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.Futures; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFuture; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFutureTask; +import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.conf.Configuration; import org.apache.phoenix.schema.stats.GuidePostsInfo; import org.apache.phoenix.schema.stats.GuidePostsKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; /** * {@link CacheLoader} asynchronous implementation for the Phoenix Table Stats cache. @@ -43,15 +46,20 @@ public class PhoenixStatsCacheLoader extends CacheLoader
[phoenix] branch master updated: PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new d095d23 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads d095d23 is described below commit d095d234752c3754c76c1a7decff76169766e6c8 Author: Istvan Toth AuthorDate: Mon Nov 15 09:25:17 2021 +0100 PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads --- .../apache/phoenix/query/PhoenixStatsCacheLoader.java| 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java index b068f31..911d7d1 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java @@ -21,15 +21,18 @@ import org.apache.phoenix.thirdparty.com.google.common.cache.CacheLoader; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.Futures; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFuture; import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ListenableFutureTask; +import org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder; import org.apache.hadoop.conf.Configuration; import org.apache.phoenix.schema.stats.GuidePostsInfo; import org.apache.phoenix.schema.stats.GuidePostsKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; /** * {@link CacheLoader} asynchronous implementation for the Phoenix Table Stats cache. @@ -43,15 +46,20 @@ public class PhoenixStatsCacheLoader extends CacheLoader
[phoenix] branch 4.16 updated: PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new a0bc298 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables a0bc298 is described below commit a0bc29844ca704e03edd7bed28682be09e019d90 Author: Istvan Toth AuthorDate: Thu Nov 4 15:48:27 2021 +0100 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables --- .../org/apache/phoenix/end2end/CreateTableIT.java | 57 ++ .../apache/phoenix/exception/SQLExceptionCode.java | 3 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 10 .../org/apache/phoenix/schema/MetaDataClient.java | 6 +++ 4 files changed, 75 insertions(+), 1 deletion(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java index 0a75b28..af633e7 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java @@ -1186,6 +1186,63 @@ public class CreateTableIT extends ParallelStatsDisabledIT { } } +@Test +public void testNormalizerIsDisbledForSalted() throws Exception { +String tableName = generateUniqueName(); +String indexName = generateUniqueName(); + +String mtTableName = generateUniqueName(); +String mtViewName = generateUniqueName(); +String mtIndexName = generateUniqueName(); + +String conflictTableName = generateUniqueName(); + +String ddl = +"create table " + tableName + " ( id integer PRIMARY KEY," + " col1 integer," ++ " col2 bigint" + " ) SALT_BUCKETS=4"; +String indexDdl = +"create index IF NOT EXISTS " + indexName + " on " + tableName + " (col2)"; +String mtDdl = +"CREATE TABLE " + mtTableName + " (TenantId UNSIGNED_INT NOT NULL ," ++ " Id UNSIGNED_INT NOT NULL ," + " val VARCHAR, " ++ " CONSTRAINT pk PRIMARY KEY(TenantId, Id) " ++ " ) MULTI_TENANT=true, SALT_BUCKETS=4"; +String mtViewDdl = +"CREATE VIEW " + mtViewName + "(view_column CHAR(15)) AS " + " SELECT * FROM " ++ mtTableName + " WHERE val='L' "; +String mtIndexDdl = "CREATE INDEX " + mtIndexName + " on " + mtViewName + " (view_column) "; + +String confictDdl = +"create table " + conflictTableName + " ( id integer PRIMARY KEY," ++ " col1 integer," + " col2 bigint" + " ) SALT_BUCKETS=4, " ++ HTableDescriptor.NORMALIZATION_ENABLED + "=true"; + +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); +conn.createStatement().execute(ddl); +conn.createStatement().execute(indexDdl); +conn.createStatement().execute(mtDdl); +conn.createStatement().execute(mtViewDdl); +conn.createStatement().execute(mtIndexDdl); + +HBaseAdmin admin = driver.getConnectionQueryServices(getUrl(), props).getAdmin(); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes(tableName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes(indexName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes(mtTableName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes("_IDX_" + mtTableName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); + +try { +conn.createStatement().execute(confictDdl); +fail("Should have thrown an exception"); +} catch (Exception e) { +assertTrue(e instanceof SQLException); +} +} + public static long verifyLastDDLTimestamp(String dataTableFullName, long startTS, Connection conn) throws SQLException { long endTS = EnvironmentEdgeManager.currentTimeMillis(); //Now try the PTable API diff --git a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java index b6e088b..c7908f8 100644 --- a/p
[phoenix] branch 4.x updated: PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new 7265be4 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables 7265be4 is described below commit 7265be48f3ccd23418697c6c6255146ab7740cdd Author: Istvan Toth AuthorDate: Thu Nov 4 15:48:27 2021 +0100 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables --- .../org/apache/phoenix/end2end/CreateTableIT.java | 57 ++ .../apache/phoenix/exception/SQLExceptionCode.java | 3 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 10 .../org/apache/phoenix/schema/MetaDataClient.java | 6 +++ 4 files changed, 75 insertions(+), 1 deletion(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java index e41b6ae..16b2928 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java @@ -1232,6 +1232,63 @@ public class CreateTableIT extends ParallelStatsDisabledIT { } } +@Test +public void testNormalizerIsDisbledForSalted() throws Exception { +String tableName = generateUniqueName(); +String indexName = generateUniqueName(); + +String mtTableName = generateUniqueName(); +String mtViewName = generateUniqueName(); +String mtIndexName = generateUniqueName(); + +String conflictTableName = generateUniqueName(); + +String ddl = +"create table " + tableName + " ( id integer PRIMARY KEY," + " col1 integer," ++ " col2 bigint" + " ) SALT_BUCKETS=4"; +String indexDdl = +"create index IF NOT EXISTS " + indexName + " on " + tableName + " (col2)"; +String mtDdl = +"CREATE TABLE " + mtTableName + " (TenantId UNSIGNED_INT NOT NULL ," ++ " Id UNSIGNED_INT NOT NULL ," + " val VARCHAR, " ++ " CONSTRAINT pk PRIMARY KEY(TenantId, Id) " ++ " ) MULTI_TENANT=true, SALT_BUCKETS=4"; +String mtViewDdl = +"CREATE VIEW " + mtViewName + "(view_column CHAR(15)) AS " + " SELECT * FROM " ++ mtTableName + " WHERE val='L' "; +String mtIndexDdl = "CREATE INDEX " + mtIndexName + " on " + mtViewName + " (view_column) "; + +String confictDdl = +"create table " + conflictTableName + " ( id integer PRIMARY KEY," ++ " col1 integer," + " col2 bigint" + " ) SALT_BUCKETS=4, " ++ HTableDescriptor.NORMALIZATION_ENABLED + "=true"; + +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); +conn.createStatement().execute(ddl); +conn.createStatement().execute(indexDdl); +conn.createStatement().execute(mtDdl); +conn.createStatement().execute(mtViewDdl); +conn.createStatement().execute(mtIndexDdl); + +HBaseAdmin admin = driver.getConnectionQueryServices(getUrl(), props).getAdmin(); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes(tableName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes(indexName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes(mtTableName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getTableDescriptor(Bytes.toBytes("_IDX_" + mtTableName)) +.getValue(HTableDescriptor.NORMALIZATION_ENABLED)); + +try { +conn.createStatement().execute(confictDdl); +fail("Should have thrown an exception"); +} catch (Exception e) { +assertTrue(e instanceof SQLException); +} +} + public static long verifyLastDDLTimestamp(String dataTableFullName, long startTS, Connection conn) throws SQLException { long endTS = EnvironmentEdgeManager.currentTimeMillis(); //Now try the PTable API diff --git a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java index 2e0c55f..c129d9a 100644 --- a/p
[phoenix] branch 5.1 updated: PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 712babc PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables 712babc is described below commit 712babcddd078a0e0b15d3510226ef615ed4a197 Author: Istvan Toth AuthorDate: Thu Nov 4 15:48:27 2021 +0100 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables --- .../org/apache/phoenix/end2end/CreateTableIT.java | 58 ++ .../apache/phoenix/exception/SQLExceptionCode.java | 3 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 10 .../org/apache/phoenix/schema/MetaDataClient.java | 6 +++ 4 files changed, 76 insertions(+), 1 deletion(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java index 3f62343..fd48e5f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java @@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory; import org.apache.hadoop.hbase.regionserver.BloomType; import org.apache.hadoop.hbase.client.TableDescriptor; +import org.apache.hadoop.hbase.client.TableDescriptorBuilder; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData; @@ -1187,6 +1188,63 @@ public class CreateTableIT extends ParallelStatsDisabledIT { } } +@Test +public void testNormalizerIsDisbledForSalted() throws Exception { +String tableName = generateUniqueName(); +String indexName = generateUniqueName(); + +String mtTableName = generateUniqueName(); +String mtViewName = generateUniqueName(); +String mtIndexName = generateUniqueName(); + +String conflictTableName = generateUniqueName(); + +String ddl = +"create table " + tableName + " ( id integer PRIMARY KEY," + " col1 integer," ++ " col2 bigint" + " ) SALT_BUCKETS=4"; +String indexDdl = +"create index IF NOT EXISTS " + indexName + " on " + tableName + " (col2)"; +String mtDdl = +"CREATE TABLE " + mtTableName + " (TenantId UNSIGNED_INT NOT NULL ," ++ " Id UNSIGNED_INT NOT NULL ," + " val VARCHAR, " ++ " CONSTRAINT pk PRIMARY KEY(TenantId, Id) " ++ " ) MULTI_TENANT=true, SALT_BUCKETS=4"; +String mtViewDdl = +"CREATE VIEW " + mtViewName + "(view_column CHAR(15)) AS " + " SELECT * FROM " ++ mtTableName + " WHERE val='L' "; +String mtIndexDdl = "CREATE INDEX " + mtIndexName + " on " + mtViewName + " (view_column) "; + +String confictDdl = +"create table " + conflictTableName + " ( id integer PRIMARY KEY," ++ " col1 integer," + " col2 bigint" + " ) SALT_BUCKETS=4, " ++ TableDescriptorBuilder.NORMALIZATION_ENABLED + "=true"; + +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); +conn.createStatement().execute(ddl); +conn.createStatement().execute(indexDdl); +conn.createStatement().execute(mtDdl); +conn.createStatement().execute(mtViewDdl); +conn.createStatement().execute(mtIndexDdl); + +Admin admin = driver.getConnectionQueryServices(getUrl(), props).getAdmin(); +assertEquals("false", admin.getDescriptor(TableName.valueOf(tableName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getDescriptor(TableName.valueOf(indexName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getDescriptor(TableName.valueOf(mtTableName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getDescriptor(TableName.valueOf("_IDX_" + mtTableName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); + +try { +conn.createStatement().execute(confictDdl); +fail("Should have thrown an exception"); +} catch (Exception e) { +
[phoenix] branch master updated: PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/master by this push: new 4abe296 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables 4abe296 is described below commit 4abe296252c8584b8ecb6028e949212c718ad8af Author: Istvan Toth AuthorDate: Thu Nov 4 15:48:27 2021 +0100 PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables --- .../org/apache/phoenix/end2end/CreateTableIT.java | 58 ++ .../apache/phoenix/exception/SQLExceptionCode.java | 3 +- .../phoenix/query/ConnectionQueryServicesImpl.java | 10 .../org/apache/phoenix/schema/MetaDataClient.java | 6 +++ 4 files changed, 76 insertions(+), 1 deletion(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java index 2666f05..672b15e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java @@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory; import org.apache.hadoop.hbase.regionserver.BloomType; import org.apache.hadoop.hbase.client.TableDescriptor; +import org.apache.hadoop.hbase.client.TableDescriptorBuilder; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData; @@ -1233,6 +1234,63 @@ public class CreateTableIT extends ParallelStatsDisabledIT { } } +@Test +public void testNormalizerIsDisbledForSalted() throws Exception { +String tableName = generateUniqueName(); +String indexName = generateUniqueName(); + +String mtTableName = generateUniqueName(); +String mtViewName = generateUniqueName(); +String mtIndexName = generateUniqueName(); + +String conflictTableName = generateUniqueName(); + +String ddl = +"create table " + tableName + " ( id integer PRIMARY KEY," + " col1 integer," ++ " col2 bigint" + " ) SALT_BUCKETS=4"; +String indexDdl = +"create index IF NOT EXISTS " + indexName + " on " + tableName + " (col2)"; +String mtDdl = +"CREATE TABLE " + mtTableName + " (TenantId UNSIGNED_INT NOT NULL ," ++ " Id UNSIGNED_INT NOT NULL ," + " val VARCHAR, " ++ " CONSTRAINT pk PRIMARY KEY(TenantId, Id) " ++ " ) MULTI_TENANT=true, SALT_BUCKETS=4"; +String mtViewDdl = +"CREATE VIEW " + mtViewName + "(view_column CHAR(15)) AS " + " SELECT * FROM " ++ mtTableName + " WHERE val='L' "; +String mtIndexDdl = "CREATE INDEX " + mtIndexName + " on " + mtViewName + " (view_column) "; + +String confictDdl = +"create table " + conflictTableName + " ( id integer PRIMARY KEY," ++ " col1 integer," + " col2 bigint" + " ) SALT_BUCKETS=4, " ++ TableDescriptorBuilder.NORMALIZATION_ENABLED + "=true"; + +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); +conn.createStatement().execute(ddl); +conn.createStatement().execute(indexDdl); +conn.createStatement().execute(mtDdl); +conn.createStatement().execute(mtViewDdl); +conn.createStatement().execute(mtIndexDdl); + +Admin admin = driver.getConnectionQueryServices(getUrl(), props).getAdmin(); +assertEquals("false", admin.getDescriptor(TableName.valueOf(tableName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getDescriptor(TableName.valueOf(indexName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getDescriptor(TableName.valueOf(mtTableName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); +assertEquals("false", admin.getDescriptor(TableName.valueOf("_IDX_" + mtTableName)) +.getValue(TableDescriptorBuilder.NORMALIZATION_ENABLED)); + +try { +conn.createStatement().execute(confictDdl); +fail("Should have thrown an exception"); +} catch (Exception e) {
[phoenix-thirdparty] branch master updated: PHOENIX-6575 Replace patched commons-cli with original one when a release with CLI-254 is available
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix-thirdparty.git The following commit(s) were added to refs/heads/master by this push: new 4af3ab6 PHOENIX-6575 Replace patched commons-cli with original one when a release with CLI-254 is available 4af3ab6 is described below commit 4af3ab6457248840566ec39d90496a9199360d11 Author: Istvan Toth AuthorDate: Mon Nov 8 10:16:24 2021 +0100 PHOENIX-6575 Replace patched commons-cli with original one when a release with CLI-254 is available --- phoenix-shaded-commons-cli/pom.xml | 101 ++--- .../src/main/patches/CLI-254-1.4.patch | 72 --- pom.xml| 2 +- 3 files changed, 11 insertions(+), 164 deletions(-) diff --git a/phoenix-shaded-commons-cli/pom.xml b/phoenix-shaded-commons-cli/pom.xml index cc286c0..6f85993 100644 --- a/phoenix-shaded-commons-cli/pom.xml +++ b/phoenix-shaded-commons-cli/pom.xml @@ -28,112 +28,24 @@ phoenix-shaded-commons-cli Apache Phoenix Patched and Relocated (Shaded) Commons-CLI -Pulls down commons-cli, patches it, compiles, and then relocates/shades. +Pulls down commons-cli, relocates it and then makes a new jar with it. - maven-clean-plugin - - -pre-generate-sources -generate-sources - - clean - - - - ${basedir}/src/main/java + ${basedir} -**/** +dependency-reduced-pom.xml - false - -org.apache.maven.plugins -maven-dependency-plugin - - -unpack -generate-sources - - unpack - - - - - commons-cli - commons-cli - ${commons-cli.version} - sources - jar - true - ${basedir}/src/main/java - - - - - - - -org.apache.maven.plugins -maven-compiler-plugin - - - -org.apache.maven.plugins -maven-patch-plugin -1.2 - - ${basedir} - false - - - -patch -process-sources - - apply - - - 0 - ${basedir}/src/main/patches - ${project.build.directory}/patches-applied.txt - true - - - - - -org.apache.maven.plugins -maven-source-plugin - - -attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins maven-shade-plugin @@ -157,4 +69,11 @@ + + + commons-cli + commons-cli + ${commons-cli.version} + + \ No newline at end of file diff --git a/phoenix-shaded-commons-cli/src/main/patches/CLI-254-1.4.patch b/phoenix-shaded-commons-cli/src/main/patches/CLI-254-1.4.patch deleted file mode 100644 index 4616fab..000 --- a/phoenix-shaded-commons-cli/src/main/patches/CLI-254-1.4.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git src/main/java/org/apache/commons/cli/DefaultParser.java src/main/java/org/apache/commons/cli/DefaultParser.java -index d762a3e..ebc324f 100644 src/main/java/org/apache/commons/cli/DefaultParser.java -+++ src/main/java/org/apache/commons/cli/DefaultParser.java -@@ -54,7 +54,44 @@ public class DefaultParser implements CommandLineParser - - /** The required options and groups expected to be found when parsing the command line. */ - protected List expectedOpts; -- -+ -+public DefaultParser() { -+this.stripLeadingAndTrailingQuotes = true; -+} -+ -+/** Flag indicating if balanced leading and trailing double quotes should be stripped from option arguments. */ -+private final boolean stripLeadingAndTrailingQuotes; -+ -+/** -+ * Create a new DefaultParser instance with the specified partial matching and quote -+ * stripping policy. -+ * -+ * By "partial matching" we mean that given the following code: -+ * -+ * {@code -+ * final Options options = new Options(); -+ * options.addOption(new Option("d", "debug", false, "Turn on debug.")); -+ * options.addOption(new Option("e", "extract", false, "Turn on extract."));
[phoenix] branch 4.16 updated: PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.16 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.16 by this push: new f01aa1c PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes f01aa1c is described below commit f01aa1c74b4989415225557749a31638e59133ef Author: Alejandro Anadon AuthorDate: Tue Nov 2 14:54:47 2021 +0100 PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes --- .../it/java/org/apache/phoenix/end2end/NullIT.java | 56 +- .../org/apache/phoenix/schema/types/PBinary.java | 11 +++-- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java index da9a133..36a008b 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java @@ -36,6 +36,8 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; import java.util.Collection; import java.util.List; import java.util.Properties; @@ -149,5 +151,57 @@ public class NullIT extends BaseQueryIT { conn.close(); } } - + +// PHOENIX-6583 +@Test +public void testBinaryNullAssignment() throws SQLException { +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); + +ResultSet rs; + +try (Statement stmt = conn.createStatement()) { + +String binTestTable=generateUniqueName(); + +stmt.execute("create table "+binTestTable+" (id integer not null, text varchar(255), testbin binary(16), CONSTRAINT pk primary key (id))"); +conn.commit(); + +String queryIsNull = "select id, text , testbin from "+binTestTable+" where testbin is null"; + + +// Let's see if without providing it, it is stored as null +stmt.execute("upsert into "+binTestTable+" (id,text) values (1,'anytext')"); +conn.commit(); +rs= stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +// Let's see if providing it, but it is set as null, it is also stored as null +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext',null)"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +//Now let's set a value. Now It should be NOT null +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext','a')"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(false == rs.next()); +rs.close(); + +//Right now it has a value let's see if we can set it again a null value +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext',null)"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +stmt.execute("DROP TABLE "+binTestTable+" "); +conn.commit(); + +rs.close(); +} +} } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java index b6d2c82..539bc87 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java @@ -36,11 +36,12 @@ public class PBinary extends PBinaryBase { } @Override -public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength, -Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale, -SortOrder expectedModifier) { -PVarbinary.INSTANCE.coerceBytes(ptr, o, actualType, actualMaxLength, actualScale, actualModifier, desiredMaxLength, desiredScale, expectedModifier); -if (null != desiredMaxLength && null != expectedModifier) { +public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, +Integer actualMaxLength, Integer actualScale, SortOrder actualModifier, +Integer desiredMaxLength, Integer d
[phoenix] branch 4.x updated: PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/4.x by this push: new bdaa98e PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes bdaa98e is described below commit bdaa98e7b5d7823e3681e439938a5d85753e9fbd Author: Alejandro Anadon AuthorDate: Tue Nov 2 14:54:47 2021 +0100 PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes --- .../it/java/org/apache/phoenix/end2end/NullIT.java | 56 +- .../org/apache/phoenix/schema/types/PBinary.java | 11 +++-- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java index da9a133..36a008b 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java @@ -36,6 +36,8 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; import java.util.Collection; import java.util.List; import java.util.Properties; @@ -149,5 +151,57 @@ public class NullIT extends BaseQueryIT { conn.close(); } } - + +// PHOENIX-6583 +@Test +public void testBinaryNullAssignment() throws SQLException { +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); + +ResultSet rs; + +try (Statement stmt = conn.createStatement()) { + +String binTestTable=generateUniqueName(); + +stmt.execute("create table "+binTestTable+" (id integer not null, text varchar(255), testbin binary(16), CONSTRAINT pk primary key (id))"); +conn.commit(); + +String queryIsNull = "select id, text , testbin from "+binTestTable+" where testbin is null"; + + +// Let's see if without providing it, it is stored as null +stmt.execute("upsert into "+binTestTable+" (id,text) values (1,'anytext')"); +conn.commit(); +rs= stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +// Let's see if providing it, but it is set as null, it is also stored as null +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext',null)"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +//Now let's set a value. Now It should be NOT null +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext','a')"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(false == rs.next()); +rs.close(); + +//Right now it has a value let's see if we can set it again a null value +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext',null)"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +stmt.execute("DROP TABLE "+binTestTable+" "); +conn.commit(); + +rs.close(); +} +} } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java index b6d2c82..539bc87 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java @@ -36,11 +36,12 @@ public class PBinary extends PBinaryBase { } @Override -public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength, -Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale, -SortOrder expectedModifier) { -PVarbinary.INSTANCE.coerceBytes(ptr, o, actualType, actualMaxLength, actualScale, actualModifier, desiredMaxLength, desiredScale, expectedModifier); -if (null != desiredMaxLength && null != expectedModifier) { +public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, +Integer actualMaxLength, Integer actualScale, SortOrder actualModifier, +Integer desiredMaxLength, Integer d
[phoenix] branch 5.1 updated: PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes
This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/5.1 by this push: new 854accb PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes 854accb is described below commit 854accb713dcbee34655e6d7be75a6cbccbeb94d Author: Alejandro Anadon AuthorDate: Tue Nov 2 14:54:47 2021 +0100 PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes --- .../it/java/org/apache/phoenix/end2end/NullIT.java | 56 +- .../org/apache/phoenix/schema/types/PBinary.java | 11 +++-- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java index da9a133..36a008b 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NullIT.java @@ -36,6 +36,8 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; import java.util.Collection; import java.util.List; import java.util.Properties; @@ -149,5 +151,57 @@ public class NullIT extends BaseQueryIT { conn.close(); } } - + +// PHOENIX-6583 +@Test +public void testBinaryNullAssignment() throws SQLException { +Properties props = new Properties(); +Connection conn = DriverManager.getConnection(getUrl(), props); + +ResultSet rs; + +try (Statement stmt = conn.createStatement()) { + +String binTestTable=generateUniqueName(); + +stmt.execute("create table "+binTestTable+" (id integer not null, text varchar(255), testbin binary(16), CONSTRAINT pk primary key (id))"); +conn.commit(); + +String queryIsNull = "select id, text , testbin from "+binTestTable+" where testbin is null"; + + +// Let's see if without providing it, it is stored as null +stmt.execute("upsert into "+binTestTable+" (id,text) values (1,'anytext')"); +conn.commit(); +rs= stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +// Let's see if providing it, but it is set as null, it is also stored as null +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext',null)"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +//Now let's set a value. Now It should be NOT null +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext','a')"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(false == rs.next()); +rs.close(); + +//Right now it has a value let's see if we can set it again a null value +stmt.execute("upsert into "+binTestTable+" (id,text,testbin) values (1,'anytext',null)"); +conn.commit(); +rs = stmt.executeQuery(queryIsNull); +assertTrue(rs.next()); +rs.close(); + +stmt.execute("DROP TABLE "+binTestTable+" "); +conn.commit(); + +rs.close(); +} +} } diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java index b6d2c82..539bc87 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PBinary.java @@ -36,11 +36,12 @@ public class PBinary extends PBinaryBase { } @Override -public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength, -Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale, -SortOrder expectedModifier) { -PVarbinary.INSTANCE.coerceBytes(ptr, o, actualType, actualMaxLength, actualScale, actualModifier, desiredMaxLength, desiredScale, expectedModifier); -if (null != desiredMaxLength && null != expectedModifier) { +public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, +Integer actualMaxLength, Integer actualScale, SortOrder actualModifier, +Integer desiredMaxLength, Integer d