Apache-Phoenix | master | HBase 2.4 | Build #696 FAILURE

2024-06-26 Thread Apache Jenkins Server

master branch  HBase 2.4  build #696 status FAILURE
Build #696 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/696/


Apache-Phoenix | 5.2 | HBase 2.4 | Build #28 FAILURE

2024-06-26 Thread Apache Jenkins Server

5.2 branch  HBase 2.4  build #28 status FAILURE
Build #28 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.2/28/


Apache-Phoenix | master | HBase 2.6 | Build #696 FAILURE

2024-06-26 Thread Apache Jenkins Server

master branch  HBase 2.6  build #696 status FAILURE
Build #696 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/696/


Apache-Phoenix | master | HBase 2.5 | Build #696 FAILURE

2024-06-26 Thread Apache Jenkins Server

master branch  HBase 2.5  build #696 status FAILURE
Build #696 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/696/


Apache-Phoenix | 5.2 | HBase 2.5 | Build #28 FAILURE

2024-06-26 Thread Apache Jenkins Server

5.2 branch  HBase 2.5  build #28 status FAILURE
Build #28 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.2/28/


Apache-Phoenix | 5.2 | HBase 2.6 | Build #28 FAILURE

2024-06-26 Thread Apache Jenkins Server

5.2 branch  HBase 2.6  build #28 status FAILURE
Build #28 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.2/28/


(phoenix) branch 5.2 updated: PHOENIX-7316 Need close more Statements (#1917)

2024-06-26 Thread vjasani
This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.2 by this push:
 new 7ed2a2e5a1 PHOENIX-7316 Need close more Statements (#1917)
7ed2a2e5a1 is described below

commit 7ed2a2e5a18b8d3b95d05d9a76aaba8e057d4ea0
Author: chaijunjie0101 <64140218+chaijunjie0...@users.noreply.github.com>
AuthorDate: Thu Jun 27 05:36:41 2024 +0800

PHOENIX-7316 Need close more Statements (#1917)
---
 .../java/org/apache/phoenix/schema/task/Task.java  |  23 ++--
 .../apache/phoenix/trace/PhoenixMetricsSink.java   |   8 +-
 .../java/org/apache/phoenix/trace/TraceReader.java | 146 ++---
 .../java/org/apache/phoenix/trace/TraceWriter.java |   3 +-
 .../index/automation/PhoenixMRJobSubmitter.java|  27 ++--
 5 files changed, 104 insertions(+), 103 deletions(-)

diff --git 
a/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java 
b/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java
index 0620e625f9..bd1d912b03 100644
--- a/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java
+++ b/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java
@@ -161,10 +161,11 @@ public class Task {
 try (PhoenixConnection newConnection =
  QueryUtil.getConnectionOnServer(curConn.getClientInfo(), 
conf)
  .unwrap(PhoenixConnection.class)) {
-PreparedStatement statement = addTaskAndGetStatement(
-systemTaskParams, newConnection);
-return executeStatementAndGetTaskMutations(newConnection,
-statement);
+try (PreparedStatement statement = addTaskAndGetStatement(
+systemTaskParams, newConnection)) {
+return executeStatementAndGetTaskMutations(newConnection,
+statement);
+}
 }
 }
 
@@ -202,14 +203,14 @@ public class Task {
 
 private static List populateTasks(Connection connection, 
String taskQuery)
 throws SQLException {
-PreparedStatement taskStatement = 
connection.prepareStatement(taskQuery);
-ResultSet rs = taskStatement.executeQuery();
-
 List result = new ArrayList<>();
-while (rs.next()) {
-// delete child views only if the parent table is deleted from the 
system catalog
-TaskRecord taskRecord = parseResult(rs);
-result.add(taskRecord);
+try (PreparedStatement taskStatement = 
connection.prepareStatement(taskQuery);
+ ResultSet rs = taskStatement.executeQuery()) {
+while (rs.next()) {
+// delete child views only if the parent table is deleted from 
the system catalog
+TaskRecord taskRecord = parseResult(rs);
+result.add(taskRecord);
+}
 }
 return result;
 }
diff --git 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
index e704763dae..cc672a0bcc 100644
--- 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
+++ 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
@@ -199,8 +199,9 @@ public class PhoenixMetricsSink implements MetricsSink {
 // tables created as transactional tables, make these 
table non
 // transactional
 PhoenixDatabaseMetaData.TRANSACTIONAL + "=" + 
Boolean.FALSE;
-PreparedStatement stmt = conn.prepareStatement(ddl);
-stmt.execute();
+try (PreparedStatement stmt = conn.prepareStatement(ddl)) {
+stmt.execute();
+}
 }
 
 @Override
@@ -288,8 +289,7 @@ public class PhoenixMetricsSink implements MetricsSink {
 LOGGER.trace("Logging metrics to phoenix table via: " + stmt);
 LOGGER.trace("With tags: " + variableValues);
 }
-try {
-PreparedStatement ps = conn.prepareStatement(stmt);
+try (PreparedStatement ps = conn.prepareStatement(stmt)) {
 // add everything that wouldn't/may not parse
 int index = 1;
 for (String tag : variableValues) {
diff --git 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java
index 9fc001876d..1b93000588 100644
--- 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java
+++ 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java
@@ -18,6 +18,7 @@
 package org.apache.phoenix.trace;
 
 import java.sql.Connection;
+import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import j

(phoenix) branch master updated: PHOENIX-7316 Need close more Statements (#1917)

2024-06-26 Thread vjasani
This is an automated email from the ASF dual-hosted git repository.

vjasani 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 cb82e60f98 PHOENIX-7316 Need close more Statements (#1917)
cb82e60f98 is described below

commit cb82e60f98dce8922973e71a1f06d90165125b25
Author: chaijunjie0101 <64140218+chaijunjie0...@users.noreply.github.com>
AuthorDate: Thu Jun 27 05:36:41 2024 +0800

PHOENIX-7316 Need close more Statements (#1917)
---
 .../java/org/apache/phoenix/schema/task/Task.java  |  23 ++--
 .../apache/phoenix/trace/PhoenixMetricsSink.java   |   8 +-
 .../java/org/apache/phoenix/trace/TraceReader.java | 146 ++---
 .../java/org/apache/phoenix/trace/TraceWriter.java |   3 +-
 .../index/automation/PhoenixMRJobSubmitter.java|  27 ++--
 5 files changed, 104 insertions(+), 103 deletions(-)

diff --git 
a/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java 
b/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java
index 0620e625f9..bd1d912b03 100644
--- a/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java
+++ b/phoenix-core-client/src/main/java/org/apache/phoenix/schema/task/Task.java
@@ -161,10 +161,11 @@ public class Task {
 try (PhoenixConnection newConnection =
  QueryUtil.getConnectionOnServer(curConn.getClientInfo(), 
conf)
  .unwrap(PhoenixConnection.class)) {
-PreparedStatement statement = addTaskAndGetStatement(
-systemTaskParams, newConnection);
-return executeStatementAndGetTaskMutations(newConnection,
-statement);
+try (PreparedStatement statement = addTaskAndGetStatement(
+systemTaskParams, newConnection)) {
+return executeStatementAndGetTaskMutations(newConnection,
+statement);
+}
 }
 }
 
@@ -202,14 +203,14 @@ public class Task {
 
 private static List populateTasks(Connection connection, 
String taskQuery)
 throws SQLException {
-PreparedStatement taskStatement = 
connection.prepareStatement(taskQuery);
-ResultSet rs = taskStatement.executeQuery();
-
 List result = new ArrayList<>();
-while (rs.next()) {
-// delete child views only if the parent table is deleted from the 
system catalog
-TaskRecord taskRecord = parseResult(rs);
-result.add(taskRecord);
+try (PreparedStatement taskStatement = 
connection.prepareStatement(taskQuery);
+ ResultSet rs = taskStatement.executeQuery()) {
+while (rs.next()) {
+// delete child views only if the parent table is deleted from 
the system catalog
+TaskRecord taskRecord = parseResult(rs);
+result.add(taskRecord);
+}
 }
 return result;
 }
diff --git 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
index e704763dae..cc672a0bcc 100644
--- 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
+++ 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/PhoenixMetricsSink.java
@@ -199,8 +199,9 @@ public class PhoenixMetricsSink implements MetricsSink {
 // tables created as transactional tables, make these 
table non
 // transactional
 PhoenixDatabaseMetaData.TRANSACTIONAL + "=" + 
Boolean.FALSE;
-PreparedStatement stmt = conn.prepareStatement(ddl);
-stmt.execute();
+try (PreparedStatement stmt = conn.prepareStatement(ddl)) {
+stmt.execute();
+}
 }
 
 @Override
@@ -288,8 +289,7 @@ public class PhoenixMetricsSink implements MetricsSink {
 LOGGER.trace("Logging metrics to phoenix table via: " + stmt);
 LOGGER.trace("With tags: " + variableValues);
 }
-try {
-PreparedStatement ps = conn.prepareStatement(stmt);
+try (PreparedStatement ps = conn.prepareStatement(stmt)) {
 // add everything that wouldn't/may not parse
 int index = 1;
 for (String tag : variableValues) {
diff --git 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java
index 9fc001876d..1b93000588 100644
--- 
a/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java
+++ 
b/phoenix-core-client/src/main/java/org/apache/phoenix/trace/TraceReader.java
@@ -18,6 +18,7 @@
 package org.apache.phoenix.trace;
 
 import java.sql.Connection;
+import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 im