(phoenix-omid) branch master updated: OMID-275 Expose backing HBase Table from TTable
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 1f9873df OMID-275 Expose backing HBase Table from TTable 1f9873df is described below commit 1f9873dfebd4b2e3618c6e6fac3db553975f5e26 Author: Istvan Toth AuthorDate: Tue Jan 23 08:26:03 2024 +0100 OMID-275 Expose backing HBase Table from TTable --- .../src/main/java/org/apache/omid/transaction/TTable.java | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java b/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java index b80e328c..dd8cffab 100644 --- a/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java +++ b/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java @@ -499,6 +499,17 @@ public class TTable implements Closeable { return snapshotFilter.getScanner(tsscan, transaction); } +/** +* Return the raw HBase table +* +* This is needed to resolve API incompatibilities between HBase 2 and 3 in Phoenix. +* +* @return the backing table +*/ +public Table getHBaseTable() { + return table; +} + /** * * @return array of byte
Apache-Phoenix | 5.1 | HBase 2.2 | Build #309 SUCCESS
5.1 branch HBase 2.2 build #309 status SUCCESS Build #309 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/309/
Apache-Phoenix | 5.1 | HBase 2.1 | Build #309 SUCCESS
5.1 branch HBase 2.1 build #309 status SUCCESS Build #309 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/309/
Apache-Phoenix | 5.1 | HBase 2.2 | Build #310 SUCCESS
5.1 branch HBase 2.2 build #310 status SUCCESS Build #310 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/310/
Apache-Phoenix | master | HBase 2.5 | Build #629 FAILURE
master branch HBase 2.5 build #629 status FAILURE Build #629 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/629/
Apache-Phoenix | master | HBase 2.4 | Build #629 FAILURE
master branch HBase 2.4 build #629 status FAILURE Build #629 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/629/
Apache-Phoenix | 5.1 | HBase 2.3 | Build #310 SUCCESS
5.1 branch HBase 2.3 build #310 status SUCCESS Build #310 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/310/
Apache-Phoenix | 5.1 | HBase 2.1 | Build #310 SUCCESS
5.1 branch HBase 2.1 build #310 status SUCCESS Build #310 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/310/
Apache-Phoenix | 5.1 | HBase 2.4 | Build #310 FAILURE
5.1 branch HBase 2.4 build #310 status FAILURE Build #310 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/310/
Apache-Phoenix | 5.1 | HBase 2.5 | Build #310 FAILURE
5.1 branch HBase 2.5 build #310 status FAILURE Build #310 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/310/
Apache-Phoenix | 5.1 | HBase 2.4 | Build #309 SUCCESS
5.1 branch HBase 2.4 build #309 status SUCCESS Build #309 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/309/
Apache-Phoenix | 5.1 | HBase 2.3 | Build #309 SUCCESS
5.1 branch HBase 2.3 build #309 status SUCCESS Build #309 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/309/
Apache-Phoenix | 5.1 | HBase 2.5 | Build #309 FAILURE
5.1 branch HBase 2.5 build #309 status FAILURE Build #309 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/309/
(phoenix) branch 5.1 updated: PHOENIX-7175 Set java.io.tmpdir to the maven build directory for tests
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 7063d0c055 PHOENIX-7175 Set java.io.tmpdir to the maven build directory for tests 7063d0c055 is described below commit 7063d0c05553e74b8d971f07eb4e58dd62e74c77 Author: divneet-kaur AuthorDate: Wed Jan 17 09:12:41 2024 -0800 PHOENIX-7175 Set java.io.tmpdir to the maven build directory for tests --- pom.xml | 7 +++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 702a45eb21..e5618fb71b 100644 --- a/pom.xml +++ b/pom.xml @@ -102,6 +102,7 @@ target/generated-sources/antlr3 true ${project.basedir}/.. +${project.build.directory} 2.14.1 @@ -367,6 +368,9 @@ false + + ${test.tmp.dir} + @@ -632,6 +636,9 @@ exit false + +${test.tmp.dir} +
(phoenix) branch master updated: PHOENIX-7175 Set java.io.tmpdir to the maven build directory for tests
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 b70f01812f PHOENIX-7175 Set java.io.tmpdir to the maven build directory for tests b70f01812f is described below commit b70f01812fa97ec5a5d37c5289d8e69bee79840c Author: divneet-kaur AuthorDate: Wed Jan 17 09:12:41 2024 -0800 PHOENIX-7175 Set java.io.tmpdir to the maven build directory for tests --- pom.xml | 7 +++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 052b5c4a55..1be954d154 100644 --- a/pom.xml +++ b/pom.xml @@ -97,6 +97,7 @@ target/generated-sources/antlr3 true ${project.basedir}/.. +${project.build.directory} 2.14.1 @@ -365,6 +366,9 @@ false + + ${test.tmp.dir} + @@ -627,6 +631,9 @@ exit false + +${test.tmp.dir} +
(phoenix-omid) branch master updated: OMID-249 Improve default network address logic
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 a9c14a37 OMID-249 Improve default network address logic a9c14a37 is described below commit a9c14a37427a03dbb04c3292082f8d2c9b25e350 Author: Istvan Toth AuthorDate: Fri Jan 19 14:33:59 2024 +0100 OMID-249 Improve default network address logic --- .../org/apache/omid/tso/NetworkInterfaceUtils.java | 40 +- .../java/org/apache/omid/tso/TSOServerConfig.java | 2 +- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/tso-server/src/main/java/org/apache/omid/tso/NetworkInterfaceUtils.java b/tso-server/src/main/java/org/apache/omid/tso/NetworkInterfaceUtils.java index ad39bf31..ab932389 100644 --- a/tso-server/src/main/java/org/apache/omid/tso/NetworkInterfaceUtils.java +++ b/tso-server/src/main/java/org/apache/omid/tso/NetworkInterfaceUtils.java @@ -17,12 +17,16 @@ */ package org.apache.omid.tso; +import org.apache.omid.NetworkUtils; import org.apache.phoenix.thirdparty.com.google.common.net.HostAndPort; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.inject.Module; + import java.net.InetAddress; import java.net.NetworkInterface; +import java.net.Socket; import java.net.SocketException; import java.net.UnknownHostException; import java.util.Enumeration; @@ -106,9 +110,24 @@ final public class NetworkInterfaceUtils { } public static String getTSOHostAndPort(TSOServerConfig config) throws SocketException, UnknownHostException { +if (config.getNetworkIfaceName() == null) { +try { +return getTSOHostAndPortRelativeToZK(config); +} catch (Exception e) { +LOG.info("Could not determine local address relative to ZK server", e); +// Fall back to interface guessing +} +}; +return getTSOHostAndPortFromInterface(config); +} + +public static String getTSOHostAndPortFromInterface(TSOServerConfig config) throws SocketException, UnknownHostException { // Build TSO host:port string and validate it -final String tsoNetIfaceName = config.getNetworkIfaceName(); +String tsoNetIfaceName = config.getNetworkIfaceName(); +if (tsoNetIfaceName == null) { +tsoNetIfaceName = NetworkUtils.getDefaultNetworkInterface(); +} InetAddress addr = getIPAddressFromNetworkInterface(tsoNetIfaceName); final int tsoPort = config.getPort(); @@ -120,7 +139,26 @@ final public class NetworkInterfaceUtils { throw e; } return tsoHostAndPortAsString; +} +public static String getTSOHostAndPortRelativeToZK(TSOServerConfig config) throws Exception { +Module leaseModule = config.getLeaseModule(); +String zkQuorum; +if (leaseModule instanceof HALeaseManagementModule) { +LOG.info("HA is configured. Trying to determine local address facing ZK server"); +zkQuorum = ((HALeaseManagementModule) leaseModule).getZkCluster(); +// Zookeeper doesn't expose its socket, so we have to try and parse the quorum. +String firstHost = zkQuorum.split(",")[0]; +LOG.info("ZK quorum is {}, first server is {}", zkQuorum, firstHost); +HostAndPort hostAndPort = HostAndPort.fromString(firstHost); +Socket socket = new Socket(hostAndPort.getHost(), hostAndPort.getPort()); +InetAddress addr = socket.getLocalAddress(); +socket.close(); +LOG.info("Local address facing ZK server is {}", addr); +return HostAndPort.fromParts(addr.getHostAddress(), config.getPort()).toString(); +} else { +throw new Exception("HA is not configured"); +} } } diff --git a/tso-server/src/main/java/org/apache/omid/tso/TSOServerConfig.java b/tso-server/src/main/java/org/apache/omid/tso/TSOServerConfig.java index 53d8c011..b1e7a066 100644 --- a/tso-server/src/main/java/org/apache/omid/tso/TSOServerConfig.java +++ b/tso-server/src/main/java/org/apache/omid/tso/TSOServerConfig.java @@ -87,7 +87,7 @@ public class TSOServerConfig extends SecureHBaseConfig { private String waitStrategy; -private String networkIfaceName = NetworkUtils.getDefaultNetworkInterface(); +private String networkIfaceName; private String timestampType;