(phoenix) branch PHOENIX-6978-feature updated: PHOENIX-7040 (ADDENDUM): Support TTL for views using the new column TTL in SYSTEM.CATALOG (#1782)
This is an automated email from the ASF dual-hosted git repository. lokiore pushed a commit to branch PHOENIX-6978-feature in repository https://gitbox.apache.org/repos/asf/phoenix.git The following commit(s) were added to refs/heads/PHOENIX-6978-feature by this push: new 021a7d52a3 PHOENIX-7040 (ADDENDUM): Support TTL for views using the new column TTL in SYSTEM.CATALOG (#1782) 021a7d52a3 is described below commit 021a7d52a395c1b49423be848ec9f5f5ef5c3b0e Author: Lokesh Khurana AuthorDate: Mon Feb 19 20:20:26 2024 -0800 PHOENIX-7040 (ADDENDUM): Support TTL for views using the new column TTL in SYSTEM.CATALOG (#1782) Co-authored-by: lokesh-khurana --- .../apache/phoenix/end2end/TTLAsPhoenixTTLIT.java | 37 +- .../it/java/org/apache/phoenix/end2end/TTLIT.java | 853 + .../phoenix/coprocessor/MetaDataEndpointImpl.java | 144 ++-- .../org/apache/phoenix/schema/MetaDataClient.java | 4 +- 4 files changed, 970 insertions(+), 68 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TTLAsPhoenixTTLIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TTLAsPhoenixTTLIT.java index 62fc219e9c..82735fa7b0 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TTLAsPhoenixTTLIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TTLAsPhoenixTTLIT.java @@ -53,9 +53,9 @@ import static org.junit.Assert.fail; @Category(ParallelStatsDisabledTest.class) public class TTLAsPhoenixTTLIT extends ParallelStatsDisabledIT{ -private static final long DEFAULT_TTL_FOR_TEST = 86400; -private static final long DEFAULT_TTL_FOR_CHILD = 1; -public static final String TENANT_URL_FMT = "%s;%s=%s"; +private static final int DEFAULT_TTL_FOR_TEST = 86400; +private static final int DEFAULT_TTL_FOR_CHILD = 1; +private static final int DEFAULT_TTL_FOR_ALTER = 7000; /** * test TTL is being set as PhoenixTTL when PhoenixTTL is enabled. @@ -153,9 +153,10 @@ public class TTLAsPhoenixTTLIT extends ParallelStatsDisabledIT{ //Checking Default TTL in case of PhoenixTTLEnabled assertTTLValueOfTableOrView(conn.unwrap(PhoenixConnection.class), PhoenixDatabaseMetaData.TTL_NOT_DEFINED, tableName); String ddl = "ALTER TABLE " + tableName -+ " SET TTL=1000"; ++ " SET TTL = " + DEFAULT_TTL_FOR_ALTER; conn.createStatement().execute(ddl); -assertTTLValueOfTableOrView(conn.unwrap(PhoenixConnection.class), 1000, tableName); +assertTTLValueOfTableOrView(conn.unwrap(PhoenixConnection.class), +DEFAULT_TTL_FOR_ALTER, tableName); //Asserting TTL should not be stored as CF Descriptor properties when //phoenix.table.ttl.enabled is true Admin admin = driver.getConnectionQueryServices(getUrl(), new Properties()).getAdmin(); @@ -339,7 +340,7 @@ public class TTLAsPhoenixTTLIT extends ParallelStatsDisabledIT{ } try { -ddl = "ALTER TABLE " + tableName + " SET TTL=" + DEFAULT_TTL_FOR_TEST; +ddl = "ALTER TABLE " + tableName + " SET TTL=" + DEFAULT_TTL_FOR_ALTER; conn.createStatement().execute(ddl); } catch (SQLException sqe) { assertEquals("Should fail with TTL already defined in hierarchy", @@ -359,9 +360,9 @@ public class TTLAsPhoenixTTLIT extends ParallelStatsDisabledIT{ assertTTLValueOfTableOrView(tenantConn.unwrap(PhoenixConnection.class), TTL_NOT_DEFINED, childView); -ddl = "ALTER VIEW " + viewName + " SET TTL=" + DEFAULT_TTL_FOR_CHILD; +ddl = "ALTER VIEW " + viewName + " SET TTL=" + DEFAULT_TTL_FOR_ALTER; conn.createStatement().execute(ddl); -assertTTLValueOfTableOrView(conn.unwrap(PhoenixConnection.class), DEFAULT_TTL_FOR_CHILD, viewName); +assertTTLValueOfTableOrView(conn.unwrap(PhoenixConnection.class), DEFAULT_TTL_FOR_ALTER, viewName); } } @@ -398,7 +399,7 @@ public class TTLAsPhoenixTTLIT extends ParallelStatsDisabledIT{ assertTTLValueOfTableOrView(tenantConn1.unwrap(PhoenixConnection.class), DEFAULT_TTL_FOR_TEST, childView1); -String alter = "ALTER TABLE " + tableName + " SET TTL = " + DEFAULT_TTL_FOR_CHILD; +String alter = "ALTER TABLE " + tableName + " SET TTL = " + DEFAULT_TTL_FOR_ALTER; conn.createStatement().execute(alter); //Clear Cache for all Tables to reflect Alter TTL commands in hierarchy @@ -409,11 +410,11 @@ public class TTLAsPhoenixTTLIT extends ParallelStatsDisabledIT{ //Assert TTL for each entity again with altered value assertTTLValueOfTableOrView(conn.unwrap(PhoenixConnection.class), -DEFAULT_TTL_FOR_CHILD, viewName); +DEFAULT_TTL_
Apache-Phoenix | 5.1 | HBase 2.2 | Build #317 FAILURE
5.1 branch HBase 2.2 build #317 status FAILURE Build #317 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/317/
Apache-Phoenix | 5.1 | HBase 2.3 | Build #318 SUCCESS
5.1 branch HBase 2.3 build #318 status SUCCESS Build #318 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/318/
Apache-Phoenix | 5.1 | HBase 2.3 | Build #317 SUCCESS
5.1 branch HBase 2.3 build #317 status SUCCESS Build #317 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/317/
Apache-Phoenix | master | HBase 2.5 | Build #643 FAILURE
master branch HBase 2.5 build #643 status FAILURE Build #643 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/643/
Apache-Phoenix | master | HBase 2.4 | Build #643 SUCCESS
master branch HBase 2.4 build #643 status SUCCESS Build #643 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/643/
Apache-Phoenix | 5.1 | HBase 2.4 | Build #317 SUCCESS
5.1 branch HBase 2.4 build #317 status SUCCESS Build #317 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/317/
Apache-Phoenix | 5.1 | HBase 2.4 | Build #318 SUCCESS
5.1 branch HBase 2.4 build #318 status SUCCESS Build #318 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/318/
Apache-Phoenix | 5.1 | HBase 2.5 | Build #318 FAILURE
5.1 branch HBase 2.5 build #318 status FAILURE Build #318 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/318/
Apache-Phoenix | 5.1 | HBase 2.5 | Build #317 FAILURE
5.1 branch HBase 2.5 build #317 status FAILURE Build #317 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/317/
Apache-Phoenix | 5.1 | HBase 2.1 | Build #318 FAILURE
5.1 branch HBase 2.1 build #318 status FAILURE Build #318 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/318/
Apache-Phoenix | 5.1 | HBase 2.2 | Build #318 FAILURE
5.1 branch HBase 2.2 build #318 status FAILURE Build #318 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/318/
Apache-Phoenix | 5.1 | HBase 2.1 | Build #317 FAILURE
5.1 branch HBase 2.1 build #317 status FAILURE Build #317 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/317/
(phoenix) branch 5.1 updated: PHOENIX-7193 Fix cluster override for mapreduce jobs for non-ZK registries
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 21f4532ba3 PHOENIX-7193 Fix cluster override for mapreduce jobs for non-ZK registries 21f4532ba3 is described below commit 21f4532ba3781d653ac66f1ba03b579dc41f8641 Author: Istvan Toth AuthorDate: Wed Jan 31 15:56:04 2024 +0100 PHOENIX-7193 Fix cluster override for mapreduce jobs for non-ZK registries --- .../phoenix/mapreduce/PhoenixOutputFormat.java | 5 +- .../phoenix/mapreduce/PhoenixRecordWriter.java | 2 +- .../phoenix/mapreduce/util/ConnectionUtil.java | 89 ++ .../mapreduce/util/PhoenixConfigurationUtil.java | 79 ++- .../apache/phoenix/index/IndexUpgradeToolTest.java | 15 +++- .../mapreduce/PhoenixMultiViewInputFormatTest.java | 29 --- .../util/PhoenixConfigurationUtilTest.java | 24 +++--- .../apache/phoenix/query/ConnectionlessTest.java | 6 +- .../org/apache/phoenix/util/QueryUtilTest.java | 5 ++ 9 files changed, 153 insertions(+), 101 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java index 055ce1f93c..23847cb397 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java @@ -38,14 +38,13 @@ import org.slf4j.LoggerFactory; */ public class PhoenixOutputFormat extends OutputFormat { private static final Logger LOGGER = LoggerFactory.getLogger(PhoenixOutputFormat.class); -private final Set propsToIgnore; public PhoenixOutputFormat() { this(Collections.emptySet()); } +// FIXME Never used, and the ignore feature didn't work anyway public PhoenixOutputFormat(Set propsToIgnore) { -this.propsToIgnore = propsToIgnore; } @Override @@ -63,7 +62,7 @@ public class PhoenixOutputFormat extends OutputFormat getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException { try { -return new PhoenixRecordWriter(context.getConfiguration(), propsToIgnore); +return new PhoenixRecordWriter(context.getConfiguration()); } catch (SQLException e) { LOGGER.error("Error calling PhoenixRecordWriter " + e.getMessage()); throw new RuntimeException(e); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java index 6f5b84e366..14e986c159 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java @@ -54,7 +54,7 @@ public class PhoenixRecordWriter extends RecordWriter propsToIgnore) throws SQLException { Connection connection = null; try { -connection = ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, propsToIgnore); +connection = ConnectionUtil.getOutputConnection(configuration); this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration); final String upsertQuery = PhoenixConfigurationUtil.getUpsertStatement(configuration); this.statement = connection.prepareStatement(upsertQuery); diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java index ccd55fd059..7b7d8431be 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java @@ -20,30 +20,25 @@ package org.apache.phoenix.mapreduce.util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; -import java.util.Collections; import java.util.Properties; -import java.util.Set; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HConstants; import org.apache.phoenix.thirdparty.com.google.common.base.Preconditions; -import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.PropertiesUtil; -import org.apache.phoenix.util.QueryUtil; /** * Utility class to return a {@link Connection} . */ public class ConnectionUtil { -private static String TEST_PARAM = -PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR + PhoenixRuntime.PHOENIX_TEST_DRIVER_URL_PARAM; - /** * Retrieve the configured input Connection. * @param conf configuration containing connection information * @return the configured input connection */
(phoenix) branch 5.1 updated: PHOENIX-7220 Make HBase 2.5 profile the default
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 2ffb334101 PHOENIX-7220 Make HBase 2.5 profile the default 2ffb334101 is described below commit 2ffb334101e5b0d041142416a3a64bd5387c8ac6 Author: Istvan Toth AuthorDate: Fri Feb 16 20:26:31 2024 +0100 PHOENIX-7220 Make HBase 2.5 profile the default --- pom.xml | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index f22ed8d63d..86ee18e18e 100644 --- a/pom.xml +++ b/pom.xml @@ -1652,19 +1652,20 @@ - - - phoenix-hbase-compat-2.4.1-default + + + phoenix-hbase-compat-2.5.4-default !hbase.profile -2.4 -2.4.1 -${hbase-2.4.runtime.version} -3.5.7 +2.5 +2.5.4 +3.2.3 +${hbase-2.5.runtime.version} +3.8.3 2.4 @@ -1758,7 +1759,7 @@ - + phoenix-hbase-compat-2.5.0 @@ -1776,7 +1777,7 @@ - + phoenix-hbase-compat-2.5.4
(phoenix) branch master updated: PHOENIX-7220 Make HBase 2.5 profile the default
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 8a94074c67 PHOENIX-7220 Make HBase 2.5 profile the default 8a94074c67 is described below commit 8a94074c67e596ba952b7b9206aaa60ab29e295c Author: Istvan Toth AuthorDate: Fri Feb 16 20:26:31 2024 +0100 PHOENIX-7220 Make HBase 2.5 profile the default --- pom.xml | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 14ca1a98d0..1d2afc02a3 100644 --- a/pom.xml +++ b/pom.xml @@ -1763,18 +1763,19 @@ - - - phoenix-hbase-compat-2.4.1-default + + + phoenix-hbase-compat-2.5.4-default !hbase.profile -2.4 -2.4.1 -${hbase-2.4.runtime.version} +2.5 +2.5.4 +3.2.3 +${hbase-2.5.runtime.version}