[2/2] phoenix git commit: PHOENIX-5013 Increase timeout for Tephra discovery service

2018-11-15 Thread tdsilva
PHOENIX-5013 Increase timeout for Tephra discovery service


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/9e7da9a1
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/9e7da9a1
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/9e7da9a1

Branch: refs/heads/master
Commit: 9e7da9a176ab931ffe87fc4f47a908ee1ef31915
Parents: 316014f
Author: Thomas D'Silva 
Authored: Thu Nov 15 12:33:26 2018 -0800
Committer: Thomas D'Silva 
Committed: Thu Nov 15 19:12:11 2018 -0800

--
 .../test/java/org/apache/phoenix/query/QueryServicesTestImpl.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9e7da9a1/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java
--
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 49fb8e8..eae951a 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
@@ -130,6 +130,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_BIND_PORT, 
TestUtil.getRandomPort())
+
.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_TIMEOUT, 
DEFAULT_TXN_TIMEOUT_SECONDS)
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L)



[2/2] phoenix git commit: PHOENIX-5013 Increase timeout for Tephra discovery service

2018-11-15 Thread tdsilva
PHOENIX-5013 Increase timeout for Tephra discovery service


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/3d196a2e
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/3d196a2e
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/3d196a2e

Branch: refs/heads/4.x-HBase-1.4
Commit: 3d196a2e173e9af983e0d602cd8f63a27bdf4315
Parents: 7328feb
Author: Thomas D'Silva 
Authored: Thu Nov 15 12:33:26 2018 -0800
Committer: Thomas D'Silva 
Committed: Thu Nov 15 19:11:58 2018 -0800

--
 .../test/java/org/apache/phoenix/query/QueryServicesTestImpl.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3d196a2e/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java
--
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 49fb8e8..eae951a 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
@@ -130,6 +130,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_BIND_PORT, 
TestUtil.getRandomPort())
+
.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_TIMEOUT, 
DEFAULT_TXN_TIMEOUT_SECONDS)
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L)



[2/2] phoenix git commit: PHOENIX-5013 Increase timeout for Tephra discovery service

2018-11-10 Thread jamestaylor
PHOENIX-5013 Increase timeout for Tephra discovery service


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d9d8fd0c
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d9d8fd0c
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d9d8fd0c

Branch: refs/heads/master
Commit: d9d8fd0c449553f3abc9a6e7cba917378ee12e8d
Parents: 7a97b68
Author: James Taylor 
Authored: Sat Nov 10 11:07:02 2018 -0800
Committer: James Taylor 
Committed: Sat Nov 10 11:15:06 2018 -0800

--
 .../apache/phoenix/query/QueryServicesTestImpl.java   |  6 +++---
 .../test/java/org/apache/phoenix/util/TestUtil.java   | 14 ++
 2 files changed, 17 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d9d8fd0c/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java
--
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 841abb6..49fb8e8 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
@@ -25,8 +25,8 @@ import 
org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec;
 import org.apache.phoenix.transaction.OmidTransactionProvider;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
 import org.apache.tephra.TxConstants;
-import org.apache.twill.internal.utils.Networks;
 
 
 /**
@@ -129,12 +129,12 @@ public final class QueryServicesTestImpl extends 
BaseQueryServicesImpl {
 .set(TxConstants.Manager.CFG_DO_PERSIST, false)
 .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_BIND_PORT, 
Networks.getRandomPort())
+.set(TxConstants.Service.CFG_DATA_TX_BIND_PORT, 
TestUtil.getRandomPort())
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, 
Files.createTempDir().getAbsolutePath())
 .set(TxConstants.Manager.CFG_TX_TIMEOUT, 
DEFAULT_TXN_TIMEOUT_SECONDS)
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L)
 // setup default test configs for Omid
-.set(OmidTransactionProvider.OMID_TSO_PORT, 
Networks.getRandomPort())
+.set(OmidTransactionProvider.OMID_TSO_PORT, 
TestUtil.getRandomPort())
 ;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d9d8fd0c/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
--
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 a1b6a88..40b9cfb 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
@@ -36,6 +36,7 @@ import static org.junit.Assert.fail;
 import java.io.File;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.net.ServerSocket;
 import java.sql.Connection;
 import java.sql.Date;
 import java.sql.DriverManager;
@@ -1112,4 +1113,17 @@ public class TestUtil {
 }
 return filteredData;
 }
+
+/**
+ * Find a random free port in localhost for binding.
+ * @return A port number or -1 for failure.
+ */
+public static int getRandomPort() {
+try (ServerSocket socket = new ServerSocket(0)) {
+socket.setReuseAddress(true);
+return socket.getLocalPort();
+} catch (IOException e) {
+return -1;
+}
+}
 }



[2/2] phoenix git commit: PHOENIX-5013 Increase timeout for Tephra discovery service

2018-11-10 Thread jamestaylor
PHOENIX-5013 Increase timeout for Tephra discovery service


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/70a699e3
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/70a699e3
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/70a699e3

Branch: refs/heads/4.x-HBase-1.4
Commit: 70a699e30d7d1a2b8448168d7d06e2a5926c9c61
Parents: 483d9de
Author: James Taylor 
Authored: Sat Nov 10 11:07:02 2018 -0800
Committer: James Taylor 
Committed: Sat Nov 10 11:12:47 2018 -0800

--
 .../apache/phoenix/query/QueryServicesTestImpl.java   |  6 +++---
 .../test/java/org/apache/phoenix/util/TestUtil.java   | 14 ++
 2 files changed, 17 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/70a699e3/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java
--
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 841abb6..49fb8e8 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
@@ -25,8 +25,8 @@ import 
org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec;
 import org.apache.phoenix.transaction.OmidTransactionProvider;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
 import org.apache.tephra.TxConstants;
-import org.apache.twill.internal.utils.Networks;
 
 
 /**
@@ -129,12 +129,12 @@ public final class QueryServicesTestImpl extends 
BaseQueryServicesImpl {
 .set(TxConstants.Manager.CFG_DO_PERSIST, false)
 .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_BIND_PORT, 
Networks.getRandomPort())
+.set(TxConstants.Service.CFG_DATA_TX_BIND_PORT, 
TestUtil.getRandomPort())
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, 
Files.createTempDir().getAbsolutePath())
 .set(TxConstants.Manager.CFG_TX_TIMEOUT, 
DEFAULT_TXN_TIMEOUT_SECONDS)
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L)
 // setup default test configs for Omid
-.set(OmidTransactionProvider.OMID_TSO_PORT, 
Networks.getRandomPort())
+.set(OmidTransactionProvider.OMID_TSO_PORT, 
TestUtil.getRandomPort())
 ;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/70a699e3/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
--
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 f0a26b9..f3faa0c 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
@@ -36,6 +36,7 @@ import static org.junit.Assert.fail;
 import java.io.File;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.net.ServerSocket;
 import java.sql.Connection;
 import java.sql.Date;
 import java.sql.DriverManager;
@@ -1105,4 +1106,17 @@ public class TestUtil {
 }
 return filteredData;
 }
+
+/**
+ * Find a random free port in localhost for binding.
+ * @return A port number or -1 for failure.
+ */
+public static int getRandomPort() {
+try (ServerSocket socket = new ServerSocket(0)) {
+socket.setReuseAddress(true);
+return socket.getLocalPort();
+} catch (IOException e) {
+return -1;
+}
+}
 }



[2/2] phoenix git commit: PHOENIX-5013 Increase timeout for Tephra discovery service

2018-11-10 Thread jamestaylor
PHOENIX-5013 Increase timeout for Tephra discovery service


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/526de533
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/526de533
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/526de533

Branch: refs/heads/4.x-HBase-1.2
Commit: 526de53368adff68ce15af6a4c33c161a2468296
Parents: aba9cb3
Author: James Taylor 
Authored: Sat Nov 10 11:07:02 2018 -0800
Committer: James Taylor 
Committed: Sat Nov 10 11:10:35 2018 -0800

--
 .../apache/phoenix/query/QueryServicesTestImpl.java   |  6 +++---
 .../test/java/org/apache/phoenix/util/TestUtil.java   | 14 ++
 2 files changed, 17 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/526de533/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java
--
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 841abb6..49fb8e8 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
@@ -25,8 +25,8 @@ import 
org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec;
 import org.apache.phoenix.transaction.OmidTransactionProvider;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
 import org.apache.tephra.TxConstants;
-import org.apache.twill.internal.utils.Networks;
 
 
 /**
@@ -129,12 +129,12 @@ public final class QueryServicesTestImpl extends 
BaseQueryServicesImpl {
 .set(TxConstants.Manager.CFG_DO_PERSIST, false)
 .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_BIND_PORT, 
Networks.getRandomPort())
+.set(TxConstants.Service.CFG_DATA_TX_BIND_PORT, 
TestUtil.getRandomPort())
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, 
Files.createTempDir().getAbsolutePath())
 .set(TxConstants.Manager.CFG_TX_TIMEOUT, 
DEFAULT_TXN_TIMEOUT_SECONDS)
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L)
 // setup default test configs for Omid
-.set(OmidTransactionProvider.OMID_TSO_PORT, 
Networks.getRandomPort())
+.set(OmidTransactionProvider.OMID_TSO_PORT, 
TestUtil.getRandomPort())
 ;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/526de533/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
--
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 f0a26b9..f3faa0c 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
@@ -36,6 +36,7 @@ import static org.junit.Assert.fail;
 import java.io.File;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.net.ServerSocket;
 import java.sql.Connection;
 import java.sql.Date;
 import java.sql.DriverManager;
@@ -1105,4 +1106,17 @@ public class TestUtil {
 }
 return filteredData;
 }
+
+/**
+ * Find a random free port in localhost for binding.
+ * @return A port number or -1 for failure.
+ */
+public static int getRandomPort() {
+try (ServerSocket socket = new ServerSocket(0)) {
+socket.setReuseAddress(true);
+return socket.getLocalPort();
+} catch (IOException e) {
+return -1;
+}
+}
 }



[2/2] phoenix git commit: PHOENIX-5013 Increase timeout for Tephra discovery service

2018-11-10 Thread jamestaylor
PHOENIX-5013 Increase timeout for Tephra discovery service


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/169270da
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/169270da
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/169270da

Branch: refs/heads/4.x-HBase-1.3
Commit: 169270daa894628f3dacf2957ef6cfc8a99d2f6a
Parents: d1efd66
Author: James Taylor 
Authored: Sat Nov 10 11:07:02 2018 -0800
Committer: James Taylor 
Committed: Sat Nov 10 11:07:02 2018 -0800

--
 .../apache/phoenix/query/QueryServicesTestImpl.java   |  6 +++---
 .../test/java/org/apache/phoenix/util/TestUtil.java   | 14 ++
 2 files changed, 17 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/169270da/phoenix-core/src/test/java/org/apache/phoenix/query/QueryServicesTestImpl.java
--
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 841abb6..49fb8e8 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
@@ -25,8 +25,8 @@ import 
org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec;
 import org.apache.phoenix.transaction.OmidTransactionProvider;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
 import org.apache.tephra.TxConstants;
-import org.apache.twill.internal.utils.Networks;
 
 
 /**
@@ -129,12 +129,12 @@ public final class QueryServicesTestImpl extends 
BaseQueryServicesImpl {
 .set(TxConstants.Manager.CFG_DO_PERSIST, false)
 .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_BIND_PORT, 
Networks.getRandomPort())
+.set(TxConstants.Service.CFG_DATA_TX_BIND_PORT, 
TestUtil.getRandomPort())
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, 
Files.createTempDir().getAbsolutePath())
 .set(TxConstants.Manager.CFG_TX_TIMEOUT, 
DEFAULT_TXN_TIMEOUT_SECONDS)
 .set(TxConstants.Manager.CFG_TX_SNAPSHOT_INTERVAL, 5L)
 // setup default test configs for Omid
-.set(OmidTransactionProvider.OMID_TSO_PORT, 
Networks.getRandomPort())
+.set(OmidTransactionProvider.OMID_TSO_PORT, 
TestUtil.getRandomPort())
 ;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/169270da/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
--
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 f0a26b9..f3faa0c 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
@@ -36,6 +36,7 @@ import static org.junit.Assert.fail;
 import java.io.File;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.net.ServerSocket;
 import java.sql.Connection;
 import java.sql.Date;
 import java.sql.DriverManager;
@@ -1105,4 +1106,17 @@ public class TestUtil {
 }
 return filteredData;
 }
+
+/**
+ * Find a random free port in localhost for binding.
+ * @return A port number or -1 for failure.
+ */
+public static int getRandomPort() {
+try (ServerSocket socket = new ServerSocket(0)) {
+socket.setReuseAddress(true);
+return socket.getLocalPort();
+} catch (IOException e) {
+return -1;
+}
+}
 }