svn commit: r28553 - in /dev/phoenix: apache-phoenix-4.14.1-HBase-0.98-rc0/ apache-phoenix-4.14.1-HBase-1.1-rc0/ apache-phoenix-4.14.1-HBase-1.2-rc0/ apache-phoenix-4.14.1-HBase-1.3-rc0/ apache-phoeni

2018-08-03 Thread vincentpoon
Author: vincentpoon
Date: Sat Aug  4 03:43:43 2018
New Revision: 28553

Log:
Rename Apache Phoenix v4.14.1 rc0


Added:
dev/phoenix/apache-phoenix-4.14.1-HBase-0.98-rc0/
  - copied from r28552, dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/
dev/phoenix/apache-phoenix-4.14.1-HBase-1.1-rc0/
  - copied from r28552, dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/
dev/phoenix/apache-phoenix-4.14.1-HBase-1.2-rc0/
  - copied from r28552, dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/
dev/phoenix/apache-phoenix-4.14.1-HBase-1.3-rc0/
  - copied from r28552, dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/
dev/phoenix/apache-phoenix-4.14.1-HBase-1.4-rc0/
  - copied from r28552, dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/
Removed:
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/



svn commit: r28551 - in /dev/phoenix: apache-phoenix-v4.14.1-HBase-1.1-rc0/ apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/ apache-phoenix-v4.14.1-HBase-1.1-rc0/src/ apache-phoenix-v4.14.1-HBase-1.2-rc0/ ap

2018-08-03 Thread vincentpoon
Author: vincentpoon
Date: Sat Aug  4 02:39:05 2018
New Revision: 28551

Log:
Phoenix 4.14.1 rc0


Added:
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/src/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/src/apache-phoenix-4.14.1-HBase-1.1-src.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/src/apache-phoenix-4.14.1-HBase-1.1-src.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/src/apache-phoenix-4.14.1-HBase-1.1-src.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/src/apache-phoenix-4.14.1-HBase-1.1-src.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/bin/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/bin/apache-phoenix-4.14.1-HBase-1.2-bin.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/bin/apache-phoenix-4.14.1-HBase-1.2-bin.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/bin/apache-phoenix-4.14.1-HBase-1.2-bin.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/bin/apache-phoenix-4.14.1-HBase-1.2-bin.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/src/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/src/apache-phoenix-4.14.1-HBase-1.2-src.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/src/apache-phoenix-4.14.1-HBase-1.2-src.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/src/apache-phoenix-4.14.1-HBase-1.2-src.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.2-rc0/src/apache-phoenix-4.14.1-HBase-1.2-src.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/bin/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/bin/apache-phoenix-4.14.1-HBase-1.3-bin.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/bin/apache-phoenix-4.14.1-HBase-1.3-bin.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/bin/apache-phoenix-4.14.1-HBase-1.3-bin.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/bin/apache-phoenix-4.14.1-HBase-1.3-bin.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/src/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/src/apache-phoenix-4.14.1-HBase-1.3-src.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/src/apache-phoenix-4.14.1-HBase-1.3-src.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/src/apache-phoenix-4.14.1-HBase-1.3-src.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.3-rc0/src/apache-phoenix-4.14.1-HBase-1.3-src.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/bin/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/bin/apache-phoenix-4.14.1-HBase-1.4-bin.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/bin/apache-phoenix-4.14.1-HBase-1.4-bin.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/bin/apache-phoenix-4.14.1-HBase-1.4-bin.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/bin/apache-phoenix-4.14.1-HBase-1.4-bin.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/src/

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/src/apache-phoenix-4.14.1-HBase-1.4-src.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/src/apache-phoenix-4.14.1-HBase-1.4-src.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/src/apache-phoenix-4.14.1-HBase-1.4-src.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-1.4-rc0/src/apache-phoenix-4.14.1-HBase-1.4-src.tar.gz.sha512

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz
--
svn:mime-type = application/x-gzip

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-1.1-rc0/bin/apache-phoenix-4.14.1-HBase-1.1-bin.tar.gz.asc
==
--- 

svn commit: r28550 - in /dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0: ./ bin/ src/

2018-08-03 Thread vincentpoon
Author: vincentpoon
Date: Sat Aug  4 00:00:33 2018
New Revision: 28550

Log:
Phoenix 4.14.1-HBase-0.98-rc0


Added:
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha512
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz
   (with props)

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz.asc

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz.sha256

dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz.sha512

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz
--
svn:mime-type = application/x-gzip

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.asc
==
--- 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.asc
 (added)
+++ 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.asc
 Sat Aug  4 00:00:33 2018
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEE90m5aAQqQVGalQ0vf/Hsy81xmeIFAltk1DgACgkQf/Hsy81x
+meKjUA/9ErZeVPamNFKJSCK/rMEeoofumx3i21ZDTuxS9QUrOvB8QgMIU9LPF7jw
+zunjWqrAlJKaRbSpxda2a78ZCC+/63qJsC+DQ99yMLvk5u1+7cAxJRFuuXEtglzE
+JOU1GlVOQ/Q6VNObuLnZ6QW+KtvI8E4hlP5UQV44GjromWotysm3kHIZU4Fpqivj
+/1E6g/Z0Aix7VixZrW3Vdx98VUnLv/g2ItX8NRpsFqugitv5L0pxHUpS9Jbjpstj
+eo15E/whHVJY2ZpmMCDTdJLhUV2vXcMVP7IWM+D+JsN5IttIP3ukdqOwICuxPwvg
+F8KN2PElVtBvIcJkZIavH2/9KaPgLEWioxU/aQCCnvVYO0dntqW8I4beocuJA4mw
+ChX0szkZhM7fyDssPb+4XgowMqlLtS37l4ZEu+NhWvB36GkRA14LH/JSRbUIhrht
+uOZimwj5RCpus1xCxkZujR+jGtmVcJMY/Fr4Htl2PWoYkJGxoiyFdhJWijYGZ2a/
+c/oWieu0E0SmIDeJizrFx/gwIzolXWMaEdO/pWXMKNX/u3XhMn0cD3TigMJB2ljA
+IJ63WTxAZq1c55emk890RCZ0RUkW17DDDwfXWl5W3hPzOa4aSvdvAUOsdxLijn40
+MXIjFxNRbuEc3UkSEbMvu+P2emq+nBv562FVPmyMWDJTLVJjimo=
+=kn+Y
+-END PGP SIGNATURE-

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha256
==
--- 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha256
 (added)
+++ 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha256
 Sat Aug  4 00:00:33 2018
@@ -0,0 +1 @@
+SHA256(apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz)= 
2749a4298a4cf8afbfa6548fba9e839188f940aca37786f718111c4d14b0df19

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha512
==
--- 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha512
 (added)
+++ 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/bin/apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz.sha512
 Sat Aug  4 00:00:33 2018
@@ -0,0 +1 @@
+SHA512(apache-phoenix-4.14.1-HBase-0.98-bin.tar.gz)= 
a19081d8e3df30d2767bbd83122b9e65ae5990c8e6505771a4f48103df662b43d27f1513cd9bf234d0ce16b52ee707dbdc90e9b059e3d1dbc430f08940d3

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz
--
svn:mime-type = application/x-gzip

Added: 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz.asc
==
--- 
dev/phoenix/apache-phoenix-v4.14.1-HBase-0.98-rc0/src/apache-phoenix-4.14.1-HBase-0.98-src.tar.gz.asc
 (added)
+++ 

[phoenix] Git Push Summary

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Tags:  refs/tags/v4.14.1-HBase-1.3-rc0 [created] 3e99cee2c


[phoenix] Git Push Summary

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Tags:  refs/tags/v4.14.1-HBase-1.4-rc0 [created] 393d699cd


phoenix git commit: Set version to 4.14.1-HBase-1.4 for release

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.4 110a5f6aa -> 52893c240


Set version to 4.14.1-HBase-1.4 for release


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

Branch: refs/heads/4.14-HBase-1.4
Commit: 52893c240e4f24e2bfac0834d35205f866c16ed8
Parents: 110a5f6
Author: Vincent Poon 
Authored: Fri Aug 3 18:22:09 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 18:22:09 2018 -0400

--
 phoenix-assembly/pom.xml   | 2 +-
 phoenix-client/pom.xml | 2 +-
 phoenix-core/pom.xml   | 2 +-
 phoenix-flume/pom.xml  | 2 +-
 phoenix-hive/pom.xml   | 2 +-
 phoenix-kafka/pom.xml  | 2 +-
 phoenix-load-balancer/pom.xml  | 2 +-
 phoenix-pherf/pom.xml  | 2 +-
 phoenix-pig/pom.xml| 2 +-
 phoenix-queryserver-client/pom.xml | 2 +-
 phoenix-queryserver/pom.xml| 2 +-
 phoenix-server/pom.xml | 2 +-
 phoenix-spark/pom.xml  | 2 +-
 phoenix-tracing-webapp/pom.xml | 2 +-
 pom.xml| 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 9850420..4c02f9b 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.4
+4.14.1-HBase-1.4
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 56cdfbf..a99194c 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.4
+4.14.1-HBase-1.4
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 9e9fed9..e539163 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.4
+4.14.1-HBase-1.4
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 6da777a..e3fb61e 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.4
+4.14.1-HBase-1.4
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-hive/pom.xml
--
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index 6bb4f02..9006020 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.4
+4.14.1-HBase-1.4
   
   phoenix-hive
   Phoenix - Hive

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-kafka/pom.xml
--
diff --git a/phoenix-kafka/pom.xml b/phoenix-kafka/pom.xml
index b104cfb..83aa35a 100644
--- a/phoenix-kafka/pom.xml
+++ b/phoenix-kafka/pom.xml
@@ -26,7 +26,7 @@

org.apache.phoenix
phoenix
-   4.14.0-HBase-1.4
+   4.14.1-HBase-1.4

phoenix-kafka
Phoenix - Kafka

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-load-balancer/pom.xml
--
diff --git a/phoenix-load-balancer/pom.xml b/phoenix-load-balancer/pom.xml
index 388f66f..59376b3 100644
--- a/phoenix-load-balancer/pom.xml
+++ b/phoenix-load-balancer/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.4
+4.14.1-HBase-1.4
   
   phoenix-load-balancer
   Phoenix Load Balancer

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52893c24/phoenix-pherf/pom.xml
--
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 81fe4bd..ec8d028 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml

[3/3] phoenix git commit: PHOENIX-4818 Fix RAT check for missing licenses

2018-08-03 Thread vincentpoon
PHOENIX-4818 Fix RAT check for missing licenses


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

Branch: refs/heads/4.14-HBase-1.4
Commit: 110a5f6aa3a26f4155419259e7e42655b374a8d8
Parents: 4c9d7f9
Author: Vincent Poon 
Authored: Sun Jul 22 14:19:15 2018 -0700
Committer: Vincent Poon 
Committed: Fri Aug 3 18:20:29 2018 -0400

--
 .../apache/phoenix/query/ConnectionCachingIT.java  | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/110a5f6a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
index b2ef052..d1dda04 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
@@ -1,3 +1,20 @@
+/*
+ * 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.query;
 
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;



[2/3] phoenix git commit: PHOENIX-4797 file not found or file exist exception when create global index use -snapshot option

2018-08-03 Thread vincentpoon
PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


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

Branch: refs/heads/4.14-HBase-1.4
Commit: 4c9d7f9fcda01cf6f167d0a075193d5c9f4b70c8
Parents: 4eac3ae
Author: 492066199 <492066...@qq.com>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Vincent Poon 
Committed: Fri Aug 3 18:19:32 2018 -0400

--
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c9d7f9f/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index df60339..016d3be 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -39,6 +39,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.UUID;
 
 public class TableSnapshotResultIterator implements ResultIterator {
 
@@ -65,7 +66,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
 this.scan = scan;
 this.scanMetricsHolder = scanMetricsHolder;
 this.scanIterator = UNINITIALIZED_SCANNER;
-this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+UUID.randomUUID().toString());
 this.snapshotName = configuration.get(
 PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
 this.rootDir = FSUtils.getRootDir(configuration);



[1/3] phoenix git commit: PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace table name, webapp path, column names) and traceserver.py

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.4 [created] 110a5f6aa


PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace 
table name, webapp path, column names) and traceserver.py

Closes #311

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-1.4
Commit: 4eac3ae72a92da24eedeeae0ac010aa505a9c7ea
Parents: bc4ca79
Author: Vitaly Monastyrev 
Authored: Tue Jul 24 12:14:12 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 18:19:18 2018 -0400

--
 bin/traceserver.py  |  6 +-
 .../apache/phoenix/tracingwebapp/http/Main.java | 13 +--
 .../tracingwebapp/http/TraceServlet.java| 87 +++-
 3 files changed, 62 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4eac3ae7/bin/traceserver.py
--
diff --git a/bin/traceserver.py b/bin/traceserver.py
index 665099e..62e168c 100755
--- a/bin/traceserver.py
+++ b/bin/traceserver.py
@@ -116,8 +116,10 @@ else:
 
 #" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " 
+ \
 #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s $PHOENIX_OPTS ' + \
-'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s  ' + \
+'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + \
+phoenix_utils.phoenix_client_jar + os.pathsep + 
phoenix_utils.phoenix_queryserver_jar + \
+os.pathsep + phoenix_utils.hadoop_classpath + \
 " -Dproc_phoenixtraceserver" + \
 " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, 
"log4j.properties") + \
 " -Dpsql.root.logger=%(root_logger)s" + \

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4eac3ae7/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
index 5875fc1..249f8e6 100755
--- 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
+++ 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
@@ -47,6 +47,7 @@ public final class Main extends Configured implements Tool {
 public static final String TRACE_SERVER_HTTP_JETTY_HOME_KEY =
 "phoenix.traceserver.http.home";
 public static final String DEFAULT_HTTP_HOME = "/";
+public static final String DEFAULT_WEBAPP_DIR_LOCATION = "src/main/webapp";
 
 public static void main(String[] args) throws Exception {
 int ret = ToolRunner.run(HBaseConfiguration.create(), new Main(), 
args);
@@ -62,15 +63,17 @@ public final class Main extends Configured implements Tool {
 final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY,
 DEFAULT_HTTP_HOME);
 //setting up the embedded server
-ProtectionDomain domain = Main.class.getProtectionDomain();
-URL location = domain.getCodeSource().getLocation();
-String webappDirLocation = location.toString().split("target")[0] 
+"src/main/webapp";
 Server server = new Server(port);
 WebAppContext root = new WebAppContext();
 
+URL webAppDir = 
Thread.currentThread().getContextClassLoader().getResource(DEFAULT_WEBAPP_DIR_LOCATION);
+if (webAppDir == null) {
+throw new RuntimeException(String.format("No %s directory was 
found into the JAR file", DEFAULT_WEBAPP_DIR_LOCATION));
+}
+
 root.setContextPath(home);
-root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
-root.setResourceBase(webappDirLocation);
+root.setDescriptor(DEFAULT_WEBAPP_DIR_LOCATION + "/WEB-INF/web.xml");
+root.setResourceBase(webAppDir.toURI().toString());
 root.setParentLoaderPriority(true);
 server.setHandler(root);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4eac3ae7/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
 

phoenix git commit: Set version to 4.14.1-HBase-0.98 for release

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-0.98 76f242aec -> bd21df151


Set version to 4.14.1-HBase-0.98 for release


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

Branch: refs/heads/4.14-HBase-0.98
Commit: bd21df151c7b0634fda6ee1789f96a980eaf7c83
Parents: 76f242a
Author: Vincent Poon 
Authored: Fri Aug 3 18:12:22 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 18:12:22 2018 -0400

--
 phoenix-assembly/pom.xml   | 2 +-
 phoenix-client/pom.xml | 2 +-
 phoenix-core/pom.xml   | 2 +-
 phoenix-flume/pom.xml  | 2 +-
 phoenix-hive/pom.xml   | 2 +-
 phoenix-kafka/pom.xml  | 2 +-
 phoenix-load-balancer/pom.xml  | 2 +-
 phoenix-pherf/pom.xml  | 2 +-
 phoenix-pig/pom.xml| 2 +-
 phoenix-queryserver-client/pom.xml | 2 +-
 phoenix-queryserver/pom.xml| 2 +-
 phoenix-server/pom.xml | 2 +-
 phoenix-spark/pom.xml  | 2 +-
 phoenix-tracing-webapp/pom.xml | 2 +-
 pom.xml| 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index e940ffb..fd4b371 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-0.98
+4.14.1-HBase-0.98
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index d4560c0..30e3ba9 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-0.98
+4.14.1-HBase-0.98
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index e86749d..ffc8933 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-0.98
+4.14.1-HBase-0.98
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index b8503b7..c964916 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-0.98
+4.14.1-HBase-0.98
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-hive/pom.xml
--
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index 0a7a361..da1c7ce 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-0.98
+4.14.1-HBase-0.98
   
   phoenix-hive
   Phoenix - Hive

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-kafka/pom.xml
--
diff --git a/phoenix-kafka/pom.xml b/phoenix-kafka/pom.xml
index 8233df8..b69562a 100644
--- a/phoenix-kafka/pom.xml
+++ b/phoenix-kafka/pom.xml
@@ -26,7 +26,7 @@

org.apache.phoenix
phoenix
-   4.14.0-HBase-0.98
+   4.14.1-HBase-0.98

phoenix-kafka
Phoenix - Kafka

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-load-balancer/pom.xml
--
diff --git a/phoenix-load-balancer/pom.xml b/phoenix-load-balancer/pom.xml
index 2422e17..90a7bda 100644
--- a/phoenix-load-balancer/pom.xml
+++ b/phoenix-load-balancer/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-0.98
+4.14.1-HBase-0.98
   
   phoenix-load-balancer
   Phoenix Load Balancer

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bd21df15/phoenix-pherf/pom.xml
--
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index c50d256..985a51b 100644
--- a/phoenix-pherf/pom.xml
+++ 

[phoenix] Git Push Summary

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Tags:  refs/tags/v4.14.1-HBase-0.98-rc0 [created] c29b682b3


phoenix git commit: Set version to 4.14.1-HBase-1.1 for release

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.1 106286cb4 -> 172b7883e


Set version to 4.14.1-HBase-1.1 for release


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

Branch: refs/heads/4.14-HBase-1.1
Commit: 172b7883e127bec89d8aac22564940eeff069147
Parents: 106286c
Author: Vincent Poon 
Authored: Fri Aug 3 17:56:18 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 17:56:18 2018 -0400

--
 phoenix-assembly/pom.xml   | 2 +-
 phoenix-client/pom.xml | 2 +-
 phoenix-core/pom.xml   | 2 +-
 phoenix-flume/pom.xml  | 2 +-
 phoenix-hive/pom.xml   | 2 +-
 phoenix-kafka/pom.xml  | 2 +-
 phoenix-load-balancer/pom.xml  | 2 +-
 phoenix-pherf/pom.xml  | 2 +-
 phoenix-pig/pom.xml| 2 +-
 phoenix-queryserver-client/pom.xml | 2 +-
 phoenix-queryserver/pom.xml| 2 +-
 phoenix-server/pom.xml | 2 +-
 phoenix-spark/pom.xml  | 2 +-
 phoenix-tracing-webapp/pom.xml | 2 +-
 pom.xml| 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index a73d20a..1f335db 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.1
+4.14.1-HBase-1.1
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 7a75d71..e4c4a5e 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.1
+4.14.1-HBase-1.1
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 1b0f5cd..c09157f 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.1
+4.14.1-HBase-1.1
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 413ae31..77d7649 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.1
+4.14.1-HBase-1.1
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-hive/pom.xml
--
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index a92b1ba..604ce1d 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.1
+4.14.1-HBase-1.1
   
   phoenix-hive
   Phoenix - Hive

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-kafka/pom.xml
--
diff --git a/phoenix-kafka/pom.xml b/phoenix-kafka/pom.xml
index f95f34a..69608dd 100644
--- a/phoenix-kafka/pom.xml
+++ b/phoenix-kafka/pom.xml
@@ -26,7 +26,7 @@

org.apache.phoenix
phoenix
-   4.14.0-HBase-1.1
+   4.14.1-HBase-1.1

phoenix-kafka
Phoenix - Kafka

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-load-balancer/pom.xml
--
diff --git a/phoenix-load-balancer/pom.xml b/phoenix-load-balancer/pom.xml
index 53c71d6..5342df0 100644
--- a/phoenix-load-balancer/pom.xml
+++ b/phoenix-load-balancer/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.1
+4.14.1-HBase-1.1
   
   phoenix-load-balancer
   Phoenix Load Balancer

http://git-wip-us.apache.org/repos/asf/phoenix/blob/172b7883/phoenix-pherf/pom.xml
--
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 0d1de35..33f30ac 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml

[phoenix] Git Push Summary

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Tags:  refs/tags/v4.14.1-HBase-1.1-rc0 [created] 4ed3e1459


[2/2] phoenix git commit: Set version to 4.14.1-HBase-1.2 for release

2018-08-03 Thread vincentpoon
Set version to 4.14.1-HBase-1.2 for release


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

Branch: refs/heads/4.14-HBase-1.2
Commit: 4b9b2a3a8dd1061b2b0a6da3c9b2d2436b1de6b7
Parents: 6840035
Author: Vincent Poon 
Authored: Fri Aug 3 17:38:44 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 17:38:44 2018 -0400

--
 phoenix-assembly/pom.xml   | 2 +-
 phoenix-client/pom.xml | 2 +-
 phoenix-core/pom.xml   | 2 +-
 phoenix-flume/pom.xml  | 2 +-
 phoenix-hive/pom.xml   | 2 +-
 phoenix-kafka/pom.xml  | 2 +-
 phoenix-load-balancer/pom.xml  | 2 +-
 phoenix-pherf/pom.xml  | 2 +-
 phoenix-pig/pom.xml| 2 +-
 phoenix-queryserver-client/pom.xml | 2 +-
 phoenix-queryserver/pom.xml| 2 +-
 phoenix-server/pom.xml | 2 +-
 phoenix-spark/pom.xml  | 2 +-
 phoenix-tracing-webapp/pom.xml | 2 +-
 pom.xml| 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index b08a8a9..d8ddf4a 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.2
+4.14.1-HBase-1.2
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 96e5e09..dd858da 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.2
+4.14.1-HBase-1.2
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index be6d828..b48e4fd 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.2
+4.14.1-HBase-1.2
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index bf1d521..0fe653d 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.2
+4.14.1-HBase-1.2
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-hive/pom.xml
--
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index c806333..cbf371a 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.2
+4.14.1-HBase-1.2
   
   phoenix-hive
   Phoenix - Hive

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-kafka/pom.xml
--
diff --git a/phoenix-kafka/pom.xml b/phoenix-kafka/pom.xml
index a1d51e9..7418c8b 100644
--- a/phoenix-kafka/pom.xml
+++ b/phoenix-kafka/pom.xml
@@ -26,7 +26,7 @@

org.apache.phoenix
phoenix
-   4.14.0-HBase-1.2
+   4.14.1-HBase-1.2

phoenix-kafka
Phoenix - Kafka

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-load-balancer/pom.xml
--
diff --git a/phoenix-load-balancer/pom.xml b/phoenix-load-balancer/pom.xml
index 5d592e2..828e42d 100644
--- a/phoenix-load-balancer/pom.xml
+++ b/phoenix-load-balancer/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.2
+4.14.1-HBase-1.2
   
   phoenix-load-balancer
   Phoenix Load Balancer

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b9b2a3a/phoenix-pherf/pom.xml
--
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 522c4b0..92e08e9 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -15,7 +15,7 @@

org.apache.phoenix
phoenix
-

[1/2] phoenix git commit: PHOENIX-4818 Fix RAT check for missing licenses

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.2 75e0305e9 -> 4b9b2a3a8


PHOENIX-4818 Fix RAT check for missing licenses


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

Branch: refs/heads/4.14-HBase-1.2
Commit: 684003541375cc447a9e0ffe02ef73abf1ea5dd8
Parents: 75e0305
Author: Vincent Poon 
Authored: Sun Jul 22 14:19:15 2018 -0700
Committer: Vincent Poon 
Committed: Fri Aug 3 17:38:23 2018 -0400

--
 .../apache/phoenix/query/ConnectionCachingIT.java  | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/68400354/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
index b2ef052..d1dda04 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
@@ -1,3 +1,20 @@
+/*
+ * 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.query;
 
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;



[phoenix] Git Push Summary

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Tags:  refs/tags/v4.14.1-HBase-1.2-rc0 [created] 3386e3174


[2/2] phoenix git commit: Set version to 4.14.1-HBase-1.3 for release

2018-08-03 Thread vincentpoon
Set version to 4.14.1-HBase-1.3 for release


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 210fefb39d30cbe0fb3ace4ec10d743be756f943
Parents: ad065a8
Author: Vincent Poon 
Authored: Fri Aug 3 16:51:07 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 16:51:07 2018 -0400

--
 phoenix-assembly/pom.xml   | 2 +-
 phoenix-client/pom.xml | 2 +-
 phoenix-core/pom.xml   | 2 +-
 phoenix-flume/pom.xml  | 2 +-
 phoenix-hive/pom.xml   | 2 +-
 phoenix-kafka/pom.xml  | 2 +-
 phoenix-load-balancer/pom.xml  | 2 +-
 phoenix-pherf/pom.xml  | 2 +-
 phoenix-pig/pom.xml| 2 +-
 phoenix-queryserver-client/pom.xml | 2 +-
 phoenix-queryserver/pom.xml| 2 +-
 phoenix-server/pom.xml | 2 +-
 phoenix-spark/pom.xml  | 2 +-
 phoenix-tracing-webapp/pom.xml | 2 +-
 pom.xml| 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index f11645a..08735c4 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.3
+4.14.1-HBase-1.3
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index c8fb6aa..53ffc6a 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.3
+4.14.1-HBase-1.3
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index aa59b72..2b6bddb 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.3
+4.14.1-HBase-1.3
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 3b537ee..cdd4627 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.3
+4.14.1-HBase-1.3
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-hive/pom.xml
--
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index 1eeff3b..341dc4e 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.3
+4.14.1-HBase-1.3
   
   phoenix-hive
   Phoenix - Hive

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-kafka/pom.xml
--
diff --git a/phoenix-kafka/pom.xml b/phoenix-kafka/pom.xml
index 4584d24..9dd0c0e 100644
--- a/phoenix-kafka/pom.xml
+++ b/phoenix-kafka/pom.xml
@@ -26,7 +26,7 @@

org.apache.phoenix
phoenix
-   4.14.0-HBase-1.3
+   4.14.1-HBase-1.3

phoenix-kafka
Phoenix - Kafka

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-load-balancer/pom.xml
--
diff --git a/phoenix-load-balancer/pom.xml b/phoenix-load-balancer/pom.xml
index 7cffb58..b91244d 100644
--- a/phoenix-load-balancer/pom.xml
+++ b/phoenix-load-balancer/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-HBase-1.3
+4.14.1-HBase-1.3
   
   phoenix-load-balancer
   Phoenix Load Balancer

http://git-wip-us.apache.org/repos/asf/phoenix/blob/210fefb3/phoenix-pherf/pom.xml
--
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index ab2d471..74d9e89 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -15,7 +15,7 @@

org.apache.phoenix
phoenix
-

[1/2] phoenix git commit: PHOENIX-4818 Fix RAT check for missing licenses

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.3 221acfa8d -> 210fefb39


PHOENIX-4818 Fix RAT check for missing licenses


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

Branch: refs/heads/4.14-HBase-1.3
Commit: ad065a86f933ebd9a59c5dfab1b550499fe54d95
Parents: 221acfa
Author: Vincent Poon 
Authored: Sun Jul 22 14:19:15 2018 -0700
Committer: Vincent Poon 
Committed: Fri Aug 3 16:50:22 2018 -0400

--
 .../apache/phoenix/query/ConnectionCachingIT.java  | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ad065a86/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
index b2ef052..d1dda04 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
@@ -1,3 +1,20 @@
+/*
+ * 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.query;
 
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;



svn commit: r28539 - /dev/phoenix/KEYS

2018-08-03 Thread vincentpoon
Author: vincentpoon
Date: Fri Aug  3 21:06:25 2018
New Revision: 28539

Log:
Add Vincent Poon (CODE SIGNING KEY)

Modified:
dev/phoenix/KEYS

Modified: dev/phoenix/KEYS
==
--- dev/phoenix/KEYS (original)
+++ dev/phoenix/KEYS Fri Aug  3 21:06:25 2018
@@ -589,3 +589,62 @@ mE6f5bevE4Bock2Ee72bg391F7sf/bFXAouOiUgy
 hP9muXjqvjO7SxxLReObjt/gs3HtjFUnJzTX/TlAaMq9
 =rPAq
 -END PGP PUBLIC KEY BLOCK-
+pub   rsa4096 2018-07-21 [SC]
+  F749B968042A41519A950D2F7FF1ECCBCD7199E2
+uid   [ultimate] Vincent Poon (CODE SIGNING KEY) 

+sig 37FF1ECCBCD7199E2 2018-07-21  Vincent Poon (CODE SIGNING KEY) 

+sub   rsa4096 2018-07-21 [E]
+sig  7FF1ECCBCD7199E2 2018-07-21  Vincent Poon (CODE SIGNING KEY) 

+
+-BEGIN PGP PUBLIC KEY BLOCK-
+
+mQINBFtTpQMBEADsgyr5412jz5nW7UEcVZbdxqsiw9fF9q7w2YnA9wvFg4xIx+Yx
+csRPy+gdw2oefHd5VCdNH3RcSqHxPA3FleDdWHwtpyH/avWUSouQRk9OPPGSO2i+
+6jtu50upCBVr+wJDMnPTe/JIpxuv2CQ21Gmb96UgEE2qQyTZE9aqerxtdlwGzI/S
+YYTM7JR4W8DPavVkRJpvJ3eDQBMcO/+0d8VQH1P6QtWImcdx2fhx00O5eS6nhnMr
+JMNPwd0TVt2L6wWexPH2O/MQLDjS6zg2iY36tZpg2C8UokDgMETdzlVcgNe8jb3A
+6q5gJLemF2DcZQ/5xkSCQKbtBaHd9JPPDcyQFZOfMvdsdtaYd52kUiNqWKe2c3KN
+ehMvrHIFBPjQV7NoyLZcXbzjUG2lB2X6/FExOOmg1Dm+sa8Adpd9RoKlChlZ1Wz/
+NMYEWqp9P32HOz/EEECFeufub7ANhW+MFBx7U9TDKbbsjp0/tJ+OWcPFut8zW8aY
+YKAriEiLmzdWncBDfEvCkRNFD/99QTXyI+Gb35QGC1sBmrqMSFLD1Kh0FN9G/Irb
+LxR5velabSVcKkYxs1tRINrx9n6+w4vtwrFzXwLRvBsV4vVmE9bdhhF10TBdA8r3
+7jlJ2Q/iMC8lXSjwys1wfmT7kDz2d2vX9qnL96uJreQoL53t5RFLvJ0CJQARAQAB
+tDhWaW5jZW50IFBvb24gKENPREUgU0lHTklORyBLRVkpIDx2aW5jZW50cG9vbkBh
+cGFjaGUub3JnPokCTgQTAQoAOBYhBPdJuWgEKkFRmpUNL3/x7MvNcZniBQJbU6UD
+AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEH/x7MvNcZnin8MP/1Q2OkmM
+He1ykGgAuvYqpzbXKLGxrI7rJsEG1b2rB6eOIYlrx5VMqVLFLV9lM6yxY5MQeTZv
+DrqPWr8Zaa2ssttVanTmSzNqIj7mKk1MyMlCmDcAxiwVcAKFrwD49qQgGdwKUzLb
+AVcF84eRuSsMTD3fja5wdRYNKuhvbJeOe6o9eUTduYu/q0bScaG40/2xNKTvHnQE
+WpGpgFJ12r93muIl7baPbShvf7Nhb+pes9uifPulpfsK2eaZ8vgLNCMEVDuJZTtj
+bMzyI1vY55NWs9FsKKnj09VRSymYEnzS/5rVeTQ4C2GrrwYowx3X69HWNPPZMSBr
+h+5p4rwK4WlhL49fQc8zrJeTsnEBJE481Nv4T8b7qzrKLS/EX4BLG0q14KNQvlfu
+bFUTAarHlI1trt5xVVCv334vuj+aPV/FK2MBNHL5L/o9PRluBM18xvlVBDKZoQLu
+C+HaOyEyHpyxG7u4VetsNLQZP8CgUEWRMnlO5Gelbw0fqePXcngAnc0enRVYkBGo
+9ewzaz3ya/UHy+cCRpxvkr55uEDdMLd+XfL/eId7GFteKT4rzbZZXTiP7UH4v/+u
+ed/HQ2X33lwTwYbZlYK6m+H/71e184bm+WpaS191s6cIy4UljfJfzmiGdq4A/Mic
+FvmLpp7Y+mBobVFJvrHHcJYgt27v1I62mJtIuQINBFtTpQMBEAC4TtZyBrYUOudV
+8n6aBuO0XvuhvFF4lkuOmIlR76r6oj6nmHz0bpX78jTuvueVGXMWBg3iaagoppk8
+1xPcK6il73Wc9e1NLY2JnvdqoZ2Y/AB2GePDobftkv/NAmYgBx8xc+lPRSElV0YG
+288fCfQ3R2QelPzr677Y2kyDBoXzDBRhkjLlrtadkdLUymJCGudxlvNIoOSNV6Wo
+U/rfRZLJX9vFPoP3oN1rL2D/vOefBTiI9FCMevoZFsiK5/RyCNiz4cqkGGLezyBh
+1CMp2zbWV2iqIwiQpEgj/Fd0OwBdMX5JdiB+X5h+JUC3Lt7Be+i8kdfIh7CFaqoB
+CbH24+BoWWhjgMvz0bgAUVL4hXBmpddn+NGXHBBcaM3GFC6GGT/+csXe8mAu/1b5
+jwWO5hg4qtcvbexydA4bnncJhF9vyYwSzJQDyfsIhZyvLzT/BZCQLDVgtMjdVhP0
+UJjku1UYeqa6tzbJ6Qml4wHlkdMD6K8BMUIIcH1ATFWAgHrp5hf+rlZzlFssHaeq
+KbfkQHvxFIoFdKoZjmHnxlDewecb4JDorB/4RFDvg5Oh51VzsMyVB7cMRw/MRSSS
+3tpbEuIK02qUE4oYTpRVd4Y7gs9TuUCpY6/2Ct8svZv4thnSHJoj5wilCVErNBI4
+v0sZg1ZV+fm+9TE0IVTGQuRTpWMv4wARAQABiQI2BBgBCgAgFiEE90m5aAQqQVGa
+lQ0vf/Hsy81xmeIFAltTpQMCGwwACgkQf/Hsy81xmeIUAxAAp0vy9b17Bem8yuLs
+Y4fXMPglNsxgK/6Aw2gAKyq1w8wqH4Wd9TFlS7dt9XL/RILRS6FHU0AXILRHkYRc
+P0N8aBG29z9IE81TESJSytv8QzeuJxlaYe57iZcb9AnFL+ysQuCKKivhQ7EBx33P
+/Ragz+77Lxciukuq8ZQVJU650y2sVal1KSW9n85equPLlRkwlraMg3fp9vzw9188
+TIYKUjf86MJlGudQW1B8nJIbF97K8EMDki+WelEBGxOCfXxZwUqYRSPsqXYKmYoC
+F9zWA6oiKga5TpD7lNojJCol2+bzXuPwFMqQAGZp8zbTQfDYNbl3EgqsYmxJHO/w
+e4+x4IY4OoKh5lDtOGsrFnqKXJ2vvZBGDZ/Hom1a50rcwv2W5S9yjU+7AB898Wx+
+WzztQ2W4JTh38og1X3Kx+PcahbHYj+IlipwYbnh/7ea55U9plI1TWlCmukIwZsNY
+gVUB06oemQiiQVA8v2Q2yEwItlQdey6enYgiQxMHqs/P8PN92nPtO37EDhRuP+G6
+PIhgnAndAr32ZDjWXidjDcS4asR+9RDKJ+lVJ6Dgl3KIADW246V1jm8m/Zi5FwMj
+8po3Bo1o6pZjp+ZAUVGWXtA9HKYIoal3r1Sh+d0DlyRY+fq0vk63AoApEdA8m2w+
+YJ+l5z2VdaPLR4VfFvty7PGe2H0=
+=gf+H
+-END PGP PUBLIC KEY BLOCK-




[19/50] [abbrv] phoenix git commit: PHOENIX-4744 Reduce parallelism in integration test runs

2018-08-03 Thread vincentpoon
PHOENIX-4744 Reduce parallelism in integration test runs


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 9066ce39508efcb5eda118012b82ad3b4e7bdc46
Parents: d7533f7
Author: James Taylor 
Authored: Fri May 18 08:50:38 2018 -0700
Committer: James Taylor 
Committed: Fri May 18 17:07:17 2018 -0700

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9066ce39/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 96eb1ac..95654b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,7 +122,7 @@
 
 
 8
-8
+4
 false
 false
 



[40/50] [abbrv] phoenix git commit: PHOENIX-4789 Exception when setting TTL on Tephra transactional table

2018-08-03 Thread vincentpoon
PHOENIX-4789 Exception when setting TTL on Tephra transactional table


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

Branch: refs/heads/4.14-HBase-1.3
Commit: a9170b232b839ee2441982adda49d9a034e22d44
Parents: a0ef661
Author: James Taylor 
Authored: Mon Jun 18 15:00:02 2018 +0200
Committer: James Taylor 
Committed: Mon Jun 18 15:01:38 2018 +0200

--
 .../org/apache/phoenix/tx/TransactionIT.java| 30 
 .../query/ConnectionQueryServicesImpl.java  |  3 ++
 2 files changed, 33 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9170b23/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
index c0ec6b8..12c3b7a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/TransactionIT.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.io.IOException;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
@@ -38,6 +39,9 @@ import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.TableNotFoundException;
+import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
 import org.apache.phoenix.exception.SQLExceptionCode;
@@ -54,6 +58,7 @@ import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.StringUtil;
 import org.apache.phoenix.util.TestUtil;
+import org.apache.tephra.TxConstants;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -370,4 +375,29 @@ public class TransactionIT  extends 
ParallelStatsDisabledIT {
 conn.close();
 }
 }
+
+private static void assertTTL(Admin admin, String tableName, int ttl) 
throws TableNotFoundException, IOException {
+HTableDescriptor tableDesc = 
admin.getTableDescriptor(TableName.valueOf(tableName));
+for (HColumnDescriptor colDesc : tableDesc.getFamilies()) {
+
assertEquals(ttl,Integer.parseInt(colDesc.getValue(TxConstants.PROPERTY_TTL)));
+
assertEquals(HColumnDescriptor.DEFAULT_TTL,colDesc.getTimeToLive());
+}
+}
+
+@Test
+public void testSetTTL() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+TransactionFactory.Provider txProvider = 
TransactionFactory.Provider.valueOf(this.txProvider);
+try (Connection conn = DriverManager.getConnection(getUrl(), props); 
Admin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
+String tableName = generateUniqueName();
+conn.createStatement().execute("CREATE TABLE " + tableName + 
+"(K VARCHAR PRIMARY KEY) 
TRANSACTIONAL=true,TRANSACTION_PROVIDER='" + txProvider + "',TTL=100");
+assertTTL(admin, tableName, 100);
+tableName = generateUniqueName();
+conn.createStatement().execute("CREATE TABLE " + tableName + 
+"(K VARCHAR PRIMARY KEY) 
TRANSACTIONAL=true,TRANSACTION_PROVIDER='" + txProvider + "'");
+conn.createStatement().execute("ALTER TABLE " + tableName + " SET 
TTL=" + 200);
+assertTTL(admin, tableName, 200);
+}
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9170b23/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
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 63a598f..71d4b3d 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
@@ -2234,6 +2234,8 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 Map props = entry.getValue();
 if (props == null) {
  

[24/50] [abbrv] phoenix git commit: PHOENIX-4728 ARRAY_APPEND and ARRAY_REMOVE should work with null column value (Xavier Jodoin)

2018-08-03 Thread vincentpoon
PHOENIX-4728 ARRAY_APPEND and ARRAY_REMOVE should work with null column value 
(Xavier Jodoin)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: ffc380aad453497020109b855b2668bb026fe5cf
Parents: 81f8875
Author: James Taylor 
Authored: Fri May 25 09:36:41 2018 -0700
Committer: James Taylor 
Committed: Fri May 25 09:36:41 2018 -0700

--
 .../phoenix/end2end/ArrayAppendFunctionIT.java  | 38 
 .../apache/phoenix/compile/UpsertCompiler.java  |  2 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ffc380aa/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
index caa17fe..7962a7a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
@@ -132,6 +132,24 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
 }
 
 @Test
+public void testUpsertEmptyArrayModification() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+String tableName = initTables(conn);
+
+ResultSet rs;
+String[] strings = new String[]{"34567"};
+Array array = conn.createArrayOf("VARCHAR", strings);
+
+conn.createStatement().execute("UPSERT INTO " + tableName + " 
(region_name,nullVarChar) SELECT region_name,ARRAY_APPEND(nullVarChar,'34567') 
FROM " + tableName);
+conn.commit();
+
+rs = conn.createStatement().executeQuery("SELECT nullVarChar FROM " + 
tableName + " LIMIT 1");
+assertTrue(rs.next());
+assertEquals(array, rs.getArray(1));
+assertFalse(rs.next());
+}
+
+@Test
 public void testArrayAppendFunctionVarchar() throws Exception {
 Connection conn = DriverManager.getConnection(getUrl());
 String tableName = initTables(conn);
@@ -147,6 +165,26 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
 assertEquals(array, rs.getArray(1));
 assertFalse(rs.next());
 }
+
+@Test
+public void testUpsertArrayAppendFunctionVarchar() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+String tableName = initTables(conn);
+
+conn.createStatement().execute("UPSERT INTO " + tableName + " 
(region_name,varchars) SELECT region_name,ARRAY_APPEND(varchars,'34567') as 
varchars FROM " + tableName+ " WHERE region_name = 'SF Bay Area'");
+conn.commit();
+
+ResultSet rs;
+rs = conn.createStatement().executeQuery("SELECT varchars FROM " + 
tableName + " WHERE region_name = 'SF Bay Area'");
+assertTrue(rs.next());
+
+String[] strings = new String[]{"2345", "46345", "23234", "34567"};
+
+Array array = conn.createArrayOf("VARCHAR", strings);
+
+assertEquals(array, rs.getArray(1));
+assertFalse(rs.next());
+}
 
 @Test
 public void testArrayAppendFunctionInteger() throws Exception {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ffc380aa/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
index 30f0c18..c3cfa10 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
@@ -549,7 +549,7 @@ public class UpsertCompiler {
 select = SelectStatement.create(select, hint);
 // Pass scan through if same table in upsert and select so that 
projection is computed correctly
 // Use optimizer to choose the best plan
-QueryCompiler compiler = new QueryCompiler(statement, select, 
selectResolver, targetColumns, parallelIteratorFactoryToBe, new 
SequenceManager(statement), false, false, null);
+QueryCompiler compiler = new QueryCompiler(statement, select, 
selectResolver, targetColumns, parallelIteratorFactoryToBe, new 
SequenceManager(statement), true, false, null);
 queryPlanToBe = compiler.compile();
 // This is 

[29/50] [abbrv] phoenix git commit: PHOENIX-4762 Performance regression with transactional immutable indexes

2018-08-03 Thread vincentpoon
PHOENIX-4762 Performance regression with transactional immutable indexes


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

Branch: refs/heads/4.14-HBase-1.3
Commit: f3119320b6d263252a790c6a5cd96dce5a714ed6
Parents: 24af104
Author: James Taylor 
Authored: Fri Jun 1 09:03:21 2018 -0700
Committer: James Taylor 
Committed: Fri Jun 1 09:03:21 2018 -0700

--
 .../apache/phoenix/execute/MutationState.java   | 701 ++-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../transaction/OmidTransactionContext.java |   6 +
 .../transaction/PhoenixTransactionContext.java  |   6 +
 .../transaction/TephraTransactionContext.java   |  16 +
 .../java/org/apache/phoenix/util/IndexUtil.java |  28 -
 6 files changed, 385 insertions(+), 374 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3119320/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
index 52e490e..2e795b1 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
@@ -38,10 +38,9 @@ import javax.annotation.Nonnull;
 import javax.annotation.concurrent.Immutable;
 
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.phoenix.util.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Delete;
-import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Pair;
@@ -83,7 +82,6 @@ import org.apache.phoenix.schema.PMetaData;
 import org.apache.phoenix.schema.PName;
 import org.apache.phoenix.schema.PRow;
 import org.apache.phoenix.schema.PTable;
-import org.apache.phoenix.schema.PTable.IndexType;
 import org.apache.phoenix.schema.PTableRef;
 import org.apache.phoenix.schema.PTableType;
 import org.apache.phoenix.schema.RowKeySchema;
@@ -98,6 +96,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 import org.apache.phoenix.transaction.TransactionFactory.Provider;
 import org.apache.phoenix.util.ByteUtil;
 import org.apache.phoenix.util.IndexUtil;
+import org.apache.phoenix.util.KeyValueUtil;
 import org.apache.phoenix.util.LogUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.SQLCloseable;
@@ -116,9 +115,7 @@ import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 
 /**
- * 
  * Tracks the uncommitted state
- *
  */
 public class MutationState implements SQLCloseable {
 private static final Logger logger = 
LoggerFactory.getLogger(MutationState.class);
@@ -150,30 +147,34 @@ public class MutationState implements SQLCloseable {
 this(maxSize, maxSizeBytes, connection, false, null);
 }
 
-public MutationState(long maxSize, long maxSizeBytes, PhoenixConnection 
connection, PhoenixTransactionContext txContext) {
+public MutationState(long maxSize, long maxSizeBytes, PhoenixConnection 
connection,
+PhoenixTransactionContext txContext) {
 this(maxSize, maxSizeBytes, connection, false, txContext);
 }
 
 public MutationState(MutationState mutationState) {
-this(mutationState.maxSize,  mutationState.maxSizeBytes, 
mutationState.connection, true, mutationState.getPhoenixTransactionContext());
+this(mutationState.maxSize, mutationState.maxSizeBytes, 
mutationState.connection, true, mutationState
+.getPhoenixTransactionContext());
 }
 
 public MutationState(long maxSize, long maxSizeBytes, PhoenixConnection 
connection, long sizeOffset) {
 this(maxSize, maxSizeBytes, connection, false, null, sizeOffset);
 }
 
-private MutationState(long maxSize, long maxSizeBytes, PhoenixConnection 
connection, boolean subTask, PhoenixTransactionContext txContext) {
+private MutationState(long maxSize, long maxSizeBytes, PhoenixConnection 
connection, boolean subTask,
+PhoenixTransactionContext txContext) {
 this(maxSize, maxSizeBytes, connection, subTask, txContext, 0);
 }
 
-private MutationState(long maxSize, long maxSizeBytes, PhoenixConnection 
connection, boolean subTask, PhoenixTransactionContext txContext, long 
sizeOffset) {
-this(maxSize, maxSizeBytes, connection, 

[39/50] [abbrv] phoenix git commit: PHOENIX-4786 Reduce log level to debug when logging new aggregate row key found and added results for scan ordered queries(Rajeshbabu)

2018-08-03 Thread vincentpoon
PHOENIX-4786 Reduce log level to debug when logging new aggregate row key found 
and added results for scan ordered queries(Rajeshbabu)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: a0ef6613dfde647ac9b680744b4628dd2423c33f
Parents: 6f4a48f
Author: Rajeshbabu Chintaguntla 
Authored: Fri Jun 15 15:40:51 2018 -0700
Committer: Rajeshbabu Chintaguntla 
Committed: Fri Jun 15 15:40:51 2018 -0700

--
 .../phoenix/coprocessor/GroupedAggregateRegionObserver.java  | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a0ef6613/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java
index 86ab275..aefe916 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java
@@ -534,14 +534,6 @@ public class GroupedAggregateRegionObserver extends 
BaseScannerRegionObserver {
 currentKey.getLength(), SINGLE_COLUMN_FAMILY, 
SINGLE_COLUMN,
 AGG_TIMESTAMP, value, 0, value.length);
 results.add(keyValue);
-if (logger.isInfoEnabled()) {
-logger.info(LogUtil.addCustomAnnotations("Adding new 
aggregate row: "
-+ keyValue
-+ ",for current key "
-+ Bytes.toStringBinary(currentKey.get(), 
currentKey.getOffset(),
-currentKey.getLength()) + ", aggregated 
values: "
-+ Arrays.asList(rowAggregators), 
ScanUtil.getCustomAnnotations(scan)));
-}
 // If we're at an aggregation boundary, reset the
 // aggregators and
 // aggregate with the current result (which is not a part 
of



[42/50] [abbrv] phoenix git commit: PHOENIX-4790 Simplify check for client side delete

2018-08-03 Thread vincentpoon
PHOENIX-4790 Simplify check for client side delete


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 6918b0dfba81f1da21b51965a91269115da67acc
Parents: 5771eb2
Author: James Taylor 
Authored: Tue Jun 19 16:33:21 2018 +0200
Committer: James Taylor 
Committed: Wed Jul 11 07:30:55 2018 -0700

--
 .../apache/phoenix/compile/DeleteCompiler.java  | 24 
 1 file changed, 5 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6918b0df/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 5f9c76c..78b2db9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -46,7 +46,6 @@ import org.apache.phoenix.execute.AggregatePlan;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.execute.MutationState.MultiRowMutationState;
 import org.apache.phoenix.execute.MutationState.RowMutationState;
-import org.apache.phoenix.filter.SkipScanFilter;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
@@ -481,6 +480,7 @@ public class DeleteCompiler {
 projectedColumns.add(column);
 aliasedNodes.add(FACTORY.aliasedNode(null, FACTORY.column(null, 
'"' + column.getName().getString() + '"', null)));
 }
+boolean noQueryReqd = true;
 // Project all non PK indexed columns so that we can do the proper 
index maintenance
 for (PTable index : table.getIndexes()) {
 IndexMaintainer maintainer = index.getIndexMaintainer(table, 
connection);
@@ -492,6 +492,8 @@ public class DeleteCompiler {
 boolean hasNoColumnFamilies = 
table.getColumnFamilies().isEmpty();
 PColumn column = hasNoColumnFamilies ? 
table.getColumnForColumnName(columnName) : 
table.getColumnFamily(familyName).getPColumnForColumnName(columnName);
 if(!projectedColumns.contains(column)) {
+// We must run a query if any index contains a non pk 
column
+noQueryReqd = false;
 projectedColumns.add(column);
 aliasedNodes.add(FACTORY.aliasedNode(null, 
FACTORY.column(hasNoColumnFamilies ? null : TableName.create(null, familyName), 
'"' + columnName + '"', null)));
 }
@@ -511,7 +513,7 @@ public class DeleteCompiler {
 select = StatementNormalizer.normalize(transformedSelect, 
resolverToBe);
 }
 final boolean hasPreOrPostProcessing = hasPreProcessing || 
hasPostProcessing;
-boolean noQueryReqd = !hasPreOrPostProcessing;
+noQueryReqd &= !hasPreOrPostProcessing;
 // No limit and no sub queries, joins, etc in where clause
 // Can't run on same server for transactional data, as we need the row 
keys for the data
 // that is being upserted for conflict detection purposes.
@@ -550,24 +552,8 @@ public class DeleteCompiler {
 }
 
 runOnServer &= queryPlans.get(0).getTableRef().getTable().getType() != 
PTableType.INDEX;
-
-// We need to have all indexed columns available in all immutable 
indexes in order
-// to generate the delete markers from the query. We also cannot have 
any filters
-// except for our SkipScanFilter for point lookups.
-// A simple check of the non existence of a where clause in the parse 
node is not sufficient, as the where clause
-// may have been optimized out. Instead, we check that there's a 
single SkipScanFilter
-// If we can generate a plan for every index, that means all the 
required columns are available in every index,
-// hence we can drive the delete from any of the plans.
-noQueryReqd &= queryPlans.size() == 1 + clientSideIndexes.size();
-int queryPlanIndex = 0;
-while (noQueryReqd && queryPlanIndex < queryPlans.size()) {
-QueryPlan plan = queryPlans.get(queryPlanIndex++);
-StatementContext context = plan.getContext();
-noQueryReqd &= (!context.getScan().hasFilter()
-|| context.getScan().getFilter() instanceof 

[13/50] [abbrv] phoenix git commit: PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG(addendum)

2018-08-03 Thread vincentpoon
PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG(addendum)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: d51353a4cb45b3f0b448eedc921c6a2ca27208a7
Parents: 5b982f8
Author: Ankit Singhal 
Authored: Wed May 16 17:22:26 2018 -0700
Committer: Ankit Singhal 
Committed: Wed May 16 17:22:26 2018 -0700

--
 .../phoenix/monitoring/PhoenixMetricsIT.java  |  7 +++
 .../apache/phoenix/compile/StatementContext.java  |  4 ++--
 .../org/apache/phoenix/execute/MutationState.java |  4 ++--
 .../phoenix/monitoring/CombinableMetric.java  |  9 +
 .../phoenix/monitoring/CombinableMetricImpl.java  | 14 +++---
 .../org/apache/phoenix/monitoring/MetricUtil.java |  4 ++--
 .../phoenix/monitoring/MutationMetricQueue.java   | 18 ++
 .../phoenix/monitoring/OverAllQueryMetrics.java   | 14 +++---
 .../phoenix/monitoring/ReadMetricQueue.java   | 14 ++
 .../phoenix/monitoring/ScanMetricsHolder.java |  4 ++--
 .../phoenix/monitoring/SpoolingMetricsHolder.java |  2 +-
 .../monitoring/TaskExecutionMetricsHolder.java|  2 +-
 .../iterate/SpoolingResultIteratorTest.java   |  2 +-
 13 files changed, 57 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d51353a4/phoenix-core/src/it/java/org/apache/phoenix/monitoring/PhoenixMetricsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/monitoring/PhoenixMetricsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/monitoring/PhoenixMetricsIT.java
index 73cdf0a..f13391f 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/monitoring/PhoenixMetricsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/monitoring/PhoenixMetricsIT.java
@@ -101,7 +101,6 @@ public class PhoenixMetricsIT extends 
BaseUniqueNamesOwnClusterIT {
 props.put(QueryServices.COLLECT_REQUEST_LEVEL_METRICS, 
String.valueOf(true));
 // disable renewing leases as this will force spooling to happen.
 props.put(QueryServices.RENEW_LEASE_ENABLED, String.valueOf(false));
-props.put(QueryServices.LOG_LEVEL, LogLevel.DEBUG.toString());
 setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 // need the non-test driver for some tests that check number of 
hconnections, etc.
 DriverManager.registerDriver(PhoenixDriver.INSTANCE);
@@ -700,7 +699,7 @@ public class PhoenixMetricsIT extends 
BaseUniqueNamesOwnClusterIT {
 
 private void changeInternalStateForTesting(PhoenixResultSet rs) {
 // get and set the internal state for testing purposes.
-ReadMetricQueue testMetricsQueue = new 
TestReadMetricsQueue(LogLevel.DEBUG);
+ReadMetricQueue testMetricsQueue = new 
TestReadMetricsQueue(LogLevel.OFF,true);
 StatementContext ctx = (StatementContext)Whitebox.getInternalState(rs, 
"context");
 Whitebox.setInternalState(ctx, "readMetricsQueue", testMetricsQueue);
 Whitebox.setInternalState(rs, "readMetricsQueue", testMetricsQueue);
@@ -766,8 +765,8 @@ public class PhoenixMetricsIT extends 
BaseUniqueNamesOwnClusterIT {
 
 private class TestReadMetricsQueue extends ReadMetricQueue {
 
-public TestReadMetricsQueue(LogLevel connectionLogLevel) {
-super(connectionLogLevel);
+public TestReadMetricsQueue(LogLevel connectionLogLevel, boolean 
isRequestMetricsEnabled) {
+super(isRequestMetricsEnabled, connectionLogLevel);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d51353a4/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
index 4358ee3..fe60bb9 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
@@ -135,8 +135,8 @@ public class StatementContext {
 this.dataColumns = this.currentTable == null ? Collections. emptyMap() : Maps
 . newLinkedHashMap();
 this.subqueryResults = Maps. newHashMap();
-this.readMetricsQueue = new ReadMetricQueue(connection.getLogLevel());
-this.overAllQueryMetrics = new 
OverAllQueryMetrics(connection.getLogLevel());
+this.readMetricsQueue = new 

[22/50] [abbrv] phoenix git commit: PHOENIX-4745 Update Tephra version to 0.14.0-incubating

2018-08-03 Thread vincentpoon
PHOENIX-4745 Update Tephra version to 0.14.0-incubating


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

Branch: refs/heads/4.14-HBase-1.3
Commit: f3e49f38e91a00d94e7142739ecfea7fa38dd841
Parents: eb62c20
Author: James Taylor 
Authored: Thu May 24 16:10:52 2018 -0700
Committer: James Taylor 
Committed: Thu May 24 16:52:53 2018 -0700

--
 .../java/org/apache/phoenix/query/QueryServicesOptions.java | 5 -
 pom.xml | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3e49f38/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
index d708785..307c5dd 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
@@ -117,6 +117,7 @@ import org.apache.phoenix.trace.util.Tracing;
 import org.apache.phoenix.transaction.TransactionFactory;
 import org.apache.phoenix.util.DateUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.tephra.TxConstants;
 
 
 
@@ -440,7 +441,9 @@ public class QueryServicesOptions {
 .setIfUnset(UPLOAD_BINARY_DATA_TYPE_ENCODING, 
DEFAULT_UPLOAD_BINARY_DATA_TYPE_ENCODING)
 .setIfUnset(PHOENIX_ACLS_ENABLED,  DEFAULT_PHOENIX_ACLS_ENABLED)
 .setIfUnset(LOG_LEVEL,  DEFAULT_LOGGING_LEVEL)
-.setIfUnset(LOG_SAMPLE_RATE,  DEFAULT_LOG_SAMPLE_RATE);
+.setIfUnset(LOG_SAMPLE_RATE,  DEFAULT_LOG_SAMPLE_RATE)
+.setIfUnset(TxConstants.TX_PRE_014_CHANGESET_KEY, 
Boolean.FALSE.toString())
+;
 // HBase sets this to 1, so we reset it to something more appropriate.
 // Hopefully HBase will change this, because we can't know if a user 
set
 // it to 1, so we'll change it.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3e49f38/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 95654b0..76726f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,7 @@
 2.1.2
 1.10.0
 8.1.7.v20120910
-0.13.0-incubating
+0.14.0-incubating
 2.0.2
 2.11.8
 2.11



[26/50] [abbrv] phoenix git commit: PHOENIX-4749 Allow impersonation when SPNEGO is disabled

2018-08-03 Thread vincentpoon
PHOENIX-4749 Allow impersonation when SPNEGO is disabled

Client impersonation is no longer tied to SPNEGO auth.

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-1.3
Commit: e2212e2abbe2fd5dd04a10ac0b3a064dc1c9c2f5
Parents: 7eaac1c
Author: Alex Araujo 
Authored: Wed May 23 10:28:48 2018 -0500
Committer: Josh Elser 
Committed: Fri May 25 17:32:43 2018 -0400

--
 .../phoenix/queryserver/server/QueryServer.java | 90 +++-
 .../server/QueryServerConfigurationTest.java| 72 
 2 files changed, 121 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e2212e2a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
--
diff --git 
a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
 
b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
index 8436086..e3f0f52 100644
--- 
a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
+++ 
b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
@@ -54,6 +54,7 @@ import org.apache.phoenix.queryserver.register.Registry;
 import org.apache.phoenix.util.InstanceResolver;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.lang.management.RuntimeMXBean;
 import java.net.InetAddress;
@@ -197,7 +198,7 @@ public final class QueryServer extends Configured 
implements Tool, Runnable {
   
QueryServicesOptions.DEFAULT_QUERY_SERVER_DISABLE_KERBEROS_LOGIN);
 
   // handle secure cluster credentials
-  if (isKerberos && !disableSpnego && !disableLogin) {
+  if (isKerberos && !disableLogin) {
 hostname = Strings.domainNamePointerToHostName(DNS.getDefaultHost(
 getConf().get(QueryServices.QUERY_SERVER_DNS_INTERFACE_ATTRIB, 
"default"),
 getConf().get(QueryServices.QUERY_SERVER_DNS_NAMESERVER_ATTRIB, 
"default")));
@@ -230,47 +231,9 @@ public final class QueryServer extends Configured 
implements Tool, Runnable {
   final HttpServer.Builder builder = new 
HttpServer.Builder().withPort(port)
   .withHandler(service, getSerialization(getConf()));
 
-  // Enable SPNEGO and Impersonation when using Kerberos
+  // Enable client auth when using Kerberos auth for HBase
   if (isKerberos) {
-UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
-LOG.debug("Current user is " + ugi);
-if (!ugi.hasKerberosCredentials()) {
-  ugi = UserGroupInformation.getLoginUser();
-  LOG.debug("Current user does not have Kerberos credentials, using 
instead " + ugi);
-}
-
-// Make sure the proxyuser configuration is up to date
-ProxyUsers.refreshSuperUserGroupsConfiguration(getConf());
-
-String keytabPath = 
getConf().get(QueryServices.QUERY_SERVER_KEYTAB_FILENAME_ATTRIB);
-File keytab = new File(keytabPath);
-String httpKeytabPath = 
getConf().get(QueryServices.QUERY_SERVER_HTTP_KEYTAB_FILENAME_ATTRIB, null);
-String httpPrincipal = 
getConf().get(QueryServices.QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB, null);
-// Backwards compat for a configuration key change
-if (httpPrincipal == null) {
-  httpPrincipal = 
getConf().get(QueryServices.QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB_LEGACY, 
null);
-}
-File httpKeytab = null;
-if (null != httpKeytabPath)
-  httpKeytab = new File(httpKeytabPath);
-
-String realmsString = 
getConf().get(QueryServices.QUERY_SERVER_KERBEROS_ALLOWED_REALMS, null);
-String[] additionalAllowedRealms = null;
-if (null != realmsString) {
-additionalAllowedRealms = StringUtils.split(realmsString, ',');
-}
-
-// Enable SPNEGO and impersonation (through standard Hadoop 
configuration means)
-if ((null != httpKeytabPath) && (null != httpPrincipal))
-  builder.withSpnego(httpPrincipal, additionalAllowedRealms)
-  .withAutomaticLogin(httpKeytab)
-  .withImpersonation(new PhoenixDoAsCallback(ugi, getConf()));
-else
-  builder.withSpnego(ugi.getUserName(), additionalAllowedRealms)
-  .withAutomaticLogin(keytab)
-  .withImpersonation(new PhoenixDoAsCallback(ugi, getConf()));
-
-
+configureClientAuthentication(builder, disableSpnego);
   }
 

[46/50] [abbrv] phoenix git commit: PHOENIX-4790 Addendum to check that query is a point lookup for delete not to run query

2018-08-03 Thread vincentpoon
PHOENIX-4790 Addendum to check that query is a point lookup for delete not to 
run query


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

Branch: refs/heads/4.14-HBase-1.3
Commit: ad8867522bc13f5013f3af6202dca3c8ac5dd4d7
Parents: dac9dc4
Author: James Taylor 
Authored: Wed Jul 11 22:01:14 2018 -0700
Committer: James Taylor 
Committed: Wed Jul 11 22:03:11 2018 -0700

--
 .../src/main/java/org/apache/phoenix/compile/DeleteCompiler.java  | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ad886752/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 78b2db9..a214c24 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -541,6 +541,9 @@ public class DeleteCompiler {
 Iterator iterator = queryPlans.iterator();
 while (iterator.hasNext()) {
 QueryPlan plan = iterator.next();
+// Must be a point lookup in order to not run a query since
+// we have to have the full key be enumerated.
+noQueryReqd &= plan.getContext().getScanRanges().isPointLookup();
 if (plan.getTableRef().getTable().getIndexType() == 
IndexType.LOCAL) {
 if (!plan.getContext().getDataColumns().isEmpty()) {
 iterator.remove();



[34/50] [abbrv] phoenix git commit: PHOENIX-4773 Move HTable rollback wrapper into Tephra TAL method

2018-08-03 Thread vincentpoon
PHOENIX-4773 Move HTable rollback wrapper into Tephra TAL method


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 59237384eed97d08201d027fb4060de9440fd45a
Parents: a91f34d
Author: James Taylor 
Authored: Mon Jun 4 20:27:36 2018 -0700
Committer: James Taylor 
Committed: Tue Jun 5 22:03:11 2018 -0700

--
 .../apache/phoenix/cache/ServerCacheClient.java |  21 +-
 .../apache/phoenix/execute/HashJoinPlan.java|   7 +-
 .../apache/phoenix/execute/MutationState.java   | 190 ++-
 .../PhoenixTxIndexMutationGenerator.java|  42 
 .../phoenix/index/IndexMetaDataCacheClient.java |  67 ++-
 .../apache/phoenix/join/HashCacheClient.java|   5 +-
 .../transaction/OmidTransactionContext.java |   3 +-
 .../transaction/PhoenixTransactionContext.java  |   5 +-
 .../transaction/TephraTransactionContext.java   |  91 -
 .../java/org/apache/phoenix/util/IndexUtil.java |   8 +
 10 files changed, 230 insertions(+), 209 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/59237384/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
index 68de747..5e284bd 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
@@ -70,7 +70,6 @@ import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.schema.PTable;
 import org.apache.phoenix.schema.PTable.IndexType;
-import org.apache.phoenix.schema.TableRef;
 import org.apache.phoenix.util.Closeables;
 import org.apache.phoenix.util.SQLCloseable;
 import org.apache.phoenix.util.SQLCloseables;
@@ -90,7 +89,7 @@ public class ServerCacheClient {
 private static final Random RANDOM = new Random();
public static final String HASH_JOIN_SERVER_CACHE_RESEND_PER_SERVER = 
"hash.join.server.cache.resend.per.server";
 private final PhoenixConnection connection;
-private final Map cacheUsingTableRefMap = new 
ConcurrentHashMap();
+private final Map cacheUsingTableMap = new 
ConcurrentHashMap();
 
 /**
  * Construct client used to create a serialized cached snapshot of a table 
and send it to each region server
@@ -220,12 +219,12 @@ public class ServerCacheClient {
 }
 
 public ServerCache addServerCache(ScanRanges keyRanges, final 
ImmutableBytesWritable cachePtr, final byte[] txState,
-final ServerCacheFactory cacheFactory, final TableRef 
cacheUsingTableRef) throws SQLException {
-return addServerCache(keyRanges, cachePtr, txState, cacheFactory, 
cacheUsingTableRef, false);
+final ServerCacheFactory cacheFactory, final PTable 
cacheUsingTable) throws SQLException {
+return addServerCache(keyRanges, cachePtr, txState, cacheFactory, 
cacheUsingTable, false);
 }
 
 public ServerCache addServerCache(ScanRanges keyRanges, final 
ImmutableBytesWritable cachePtr, final byte[] txState,
-final ServerCacheFactory cacheFactory, final TableRef 
cacheUsingTableRef, boolean storeCacheOnClient)
+final ServerCacheFactory cacheFactory, final PTable 
cacheUsingTable, boolean storeCacheOnClient)
 throws SQLException {
 ConnectionQueryServices services = connection.getQueryServices();
 List closeables = new ArrayList();
@@ -241,7 +240,6 @@ public class ServerCacheClient {
 ExecutorService executor = services.getExecutor();
 List> futures = Collections.emptyList();
 try {
-final PTable cacheUsingTable = cacheUsingTableRef.getTable();
 List locations = 
services.getAllTableRegions(cacheUsingTable.getPhysicalName().getBytes());
 int nRegions = locations.size();
 // Size these based on worst case
@@ -258,7 +256,7 @@ public class ServerCacheClient {
 servers.add(entry);
 if (LOG.isDebugEnabled()) 
{LOG.debug(addCustomAnnotations("Adding cache entry to be sent for " + entry, 
connection));}
 final byte[] key = 
getKeyInRegion(entry.getRegionInfo().getStartKey());
-final HTableInterface htable = 
services.getTable(cacheUsingTableRef.getTable().getPhysicalName().getBytes());
+final HTableInterface htable = 

[30/50] [abbrv] phoenix git commit: PHOENIX-4768 Re-enable testCompactUpdatesStats and testCompactUpdatesStatsWithMinStatsUpdateFreq of StatsCollectorIT

2018-08-03 Thread vincentpoon
PHOENIX-4768 Re-enable testCompactUpdatesStats and 
testCompactUpdatesStatsWithMinStatsUpdateFreq of StatsCollectorIT


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 2f67e9f9d5f6008c08df3ff0328c10599e8878e2
Parents: f311932
Author: Ankit Singhal 
Authored: Fri Jun 1 14:42:00 2018 -0700
Committer: Ankit Singhal 
Committed: Fri Jun 1 14:42:00 2018 -0700

--
 .../org/apache/phoenix/schema/stats/StatsCollectorIT.java | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2f67e9f9/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
index 09d28f8..5436311 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
@@ -68,7 +68,6 @@ import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.TestUtil;
 import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -404,13 +403,11 @@ public abstract class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
 }
 
 @Test
-@Ignore //TODO remove this once  
https://issues.apache.org/jira/browse/TEPHRA-208 is fixed
 public void testCompactUpdatesStats() throws Exception {
 testCompactUpdatesStats(0, fullTableName);
 }
 
 @Test
-@Ignore //TODO remove this once  
https://issues.apache.org/jira/browse/TEPHRA-208 is fixed
 public void testCompactUpdatesStatsWithMinStatsUpdateFreq() throws 
Exception {
 
testCompactUpdatesStats(QueryServicesOptions.DEFAULT_STATS_UPDATE_FREQ_MS, 
fullTableName);
 }
@@ -463,7 +460,7 @@ public abstract class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
 Scan scan = new Scan();
 scan.setRaw(true);
 PhoenixConnection phxConn = conn.unwrap(PhoenixConnection.class);
-try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(tableName))) {
+try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(physicalTableName))) {
 ResultScanner scanner = htable.getScanner(scan);
 Result result;
 while ((result = scanner.next())!=null) {
@@ -476,7 +473,7 @@ public abstract class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
 scan = new Scan();
 scan.setRaw(true);
 phxConn = conn.unwrap(PhoenixConnection.class);
-try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(tableName))) {
+try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(physicalTableName))) {
 ResultScanner scanner = htable.getScanner(scan);
 Result result;
 while ((result = scanner.next())!=null) {



[25/50] [abbrv] phoenix git commit: PHOENIX-1567 Publish Phoenix-Client & Phoenix-Server jars into Maven Repo

2018-08-03 Thread vincentpoon
PHOENIX-1567 Publish Phoenix-Client & Phoenix-Server jars into Maven Repo


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 7eaac1caa5c04801c39548403c758a68bfa278c7
Parents: ffc380a
Author: Ankit Singhal 
Authored: Fri May 25 11:32:02 2018 -0700
Committer: Ankit Singhal 
Committed: Fri May 25 11:32:02 2018 -0700

--
 phoenix-client/pom.xml | 1 +
 phoenix-server/pom.xml | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7eaac1ca/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2c60fc6..c8fb6aa 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -81,6 +81,7 @@
 
 
   ${basedir}/target/phoenix-${project.version}-client.jar
+ ${basedir}/pom.xml
 
   
   

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7eaac1ca/phoenix-server/pom.xml
--
diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml
index dcda799..f5ba7f7 100644
--- a/phoenix-server/pom.xml
+++ b/phoenix-server/pom.xml
@@ -85,6 +85,7 @@
 
 
   ${basedir}/target/phoenix-${project.version}-server.jar
+ ${basedir}/pom.xml
 
   
 



[35/50] [abbrv] phoenix git commit: PHOENIX-4774 Disable doclint in 1.8+ JDKs

2018-08-03 Thread vincentpoon
PHOENIX-4774 Disable doclint in 1.8+ JDKs


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 4e7d88b17f5fd70bc1dcf242bccdc8db013ae5ce
Parents: 5923738
Author: Alex Araujo 
Authored: Tue Jun 5 11:20:17 2018 -0700
Committer: Vincent Poon 
Committed: Wed Jun 6 11:19:19 2018 -0700

--
 pom.xml | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4e7d88b1/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 76726f4..859157d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -408,6 +408,9 @@
   
   
 
+
+  ${javadoc.opts}
+
   
 
   
@@ -962,6 +965,16 @@
   
 
   
+
+
+  java8-doclint-disabled
+  
+[1.8,)
+  
+  
+-Xdoclint:none
+  
+
 
 
   release



[33/50] [abbrv] phoenix git commit: PHOENIX-4758 Validate that HADOOP_CONF_DIR is not set for HiveMRIT

2018-08-03 Thread vincentpoon
PHOENIX-4758 Validate that HADOOP_CONF_DIR is not set for HiveMRIT


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

Branch: refs/heads/4.14-HBase-1.3
Commit: a91f34dc17673f43121fe3f2701154f03bba7021
Parents: c27c68c
Author: Josh Elser 
Authored: Tue May 29 14:14:04 2018 -0400
Committer: Josh Elser 
Committed: Mon Jun 4 12:41:16 2018 -0400

--
 .../src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a91f34dc/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
--
diff --git 
a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java 
b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
index 644ff24..4bc5a7d 100644
--- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
+++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
@@ -18,6 +18,10 @@
 
 package org.apache.phoenix.hive;
 
+import static org.junit.Assert.fail;
+
+import java.util.Map;
+
 import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
@@ -28,6 +32,10 @@ public class HiveMapReduceIT extends HivePhoenixStoreIT {
 
 @BeforeClass
 public static void setUpBeforeClass() throws Exception {
+final String hadoopConfDir = System.getenv("HADOOP_CONF_DIR");
+if (hadoopConfDir != null && hadoopConfDir.length() != 0) {
+fail("HADOOP_CONF_DIR is non-empty in the current shell 
environment which will very likely cause this test to fail.");
+}
 setup(HiveTestUtil.MiniClusterType.mr);
 }
 }



[28/50] [abbrv] phoenix git commit: PHOENIX-4762 Performance regression with transactional immutable indexes

2018-08-03 Thread vincentpoon
http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3119320/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
index f3ad42f..751945a 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/transaction/PhoenixTransactionContext.java
@@ -108,6 +108,11 @@ public interface PhoenixTransactionContext {
 public HTableInterface getTransactionalTable(HTableInterface htable, 
boolean isImmutable) {
 return null;
 }
+
+@Override
+public HTableInterface getTransactionalTableWriter(HTableInterface 
htable, PTable table) {
+return null;
+}
 };
 /**
  * 
@@ -225,4 +230,5 @@ public interface PhoenixTransactionContext {
 public PhoenixTransactionContext 
newTransactionContext(PhoenixTransactionContext contex, boolean subTask);
 
 public HTableInterface getTransactionalTable(HTableInterface htable, 
boolean isImmutable);
+public HTableInterface getTransactionalTableWriter(HTableInterface htable, 
PTable table);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3119320/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
index 8b16210..bc33cff 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/transaction/TephraTransactionContext.java
@@ -397,5 +397,21 @@ public class TephraTransactionContext implements 
PhoenixTransactionContext {
 this.addTransactionAware(transactionAwareHTable);
 return transactionAwareHTable;
 }
+
+@Override
+public HTableInterface getTransactionalTableWriter(HTableInterface htable, 
PTable table) {
+boolean isIndex = table.getType() == PTableType.INDEX;
+TransactionAwareHTable transactionAwareHTable = new 
TransactionAwareHTable(htable, table.isImmutableRows() || isIndex ? 
TxConstants.ConflictDetection.NONE : TxConstants.ConflictDetection.ROW);
+// Don't add immutable indexes (those are the only ones that would 
participate
+// during a commit), as we don't need conflict detection for these.
+if (isIndex) {
+transactionAwareHTable.startTx(getTransaction());
+} else {
+// Even for immutable, we need to do this so that an abort has the 
state
+// necessary to generate the rows to delete.
+this.addTransactionAware(transactionAwareHTable);
+}
+return transactionAwareHTable;
+}
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3119320/phoenix-core/src/main/java/org/apache/phoenix/util/IndexUtil.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/IndexUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/IndexUtil.java
index 7e280f4..78a68d2 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/IndexUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/IndexUtil.java
@@ -42,7 +42,6 @@ import org.apache.hadoop.hbase.HRegionLocation;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.HTableInterface;
@@ -116,7 +115,6 @@ import org.apache.phoenix.schema.types.PDecimal;
 import org.apache.phoenix.schema.types.PLong;
 import org.apache.phoenix.schema.types.PVarbinary;
 import org.apache.phoenix.schema.types.PVarchar;
-import org.apache.phoenix.transaction.PhoenixTransactionContext;
 
 import com.google.common.collect.Lists;
 
@@ -269,32 +267,6 @@ public class IndexUtil {
 .getLength()) == 0);
 }
 
-public static List generateDeleteIndexData(final PTable table, 
PTable index,
-List dataMutations, ImmutableBytesWritable ptr, final 
KeyValueBuilder kvBuilder, PhoenixConnection connection)
-throws SQLException {
-try {
-IndexMaintainer maintainer = index.getIndexMaintainer(table, 
connection);
-List indexMutations = 
Lists.newArrayListWithExpectedSize(dataMutations.size());
-for (final 

[48/50] [abbrv] phoenix git commit: PHOENIX-4809 Only cache PhoenixConnections when lease renewal is on

2018-08-03 Thread vincentpoon
PHOENIX-4809 Only cache PhoenixConnections when lease renewal is on

Lease renewal is the only mechanism under which connections are removed
from the connectionQueue. Calling close() on a connection doesn't proactively
remove it from the instance of ConnectionQueryServicesImpl.


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

Branch: refs/heads/4.14-HBase-1.3
Commit: b9fc468e5710b7cc47ee086c231f435014c04c7e
Parents: c729db0
Author: Josh Elser 
Authored: Wed Jul 11 17:02:46 2018 -0400
Committer: Josh Elser 
Committed: Thu Jul 12 12:50:19 2018 -0400

--
 .../phoenix/query/ConnectionCachingIT.java  | 87 
 .../query/ConnectionQueryServicesImpl.java  | 11 ++-
 2 files changed, 97 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b9fc468e/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
new file mode 100644
index 000..b2ef052
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/query/ConnectionCachingIT.java
@@ -0,0 +1,87 @@
+package org.apache.phoenix.query;
+
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.ref.WeakReference;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.Arrays;
+import java.util.Properties;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.apache.phoenix.end2end.ParallelStatsEnabledIT;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.query.ConnectionQueryServices;
+import org.apache.phoenix.query.ConnectionQueryServicesImpl;
+import org.apache.phoenix.query.DelegateConnectionQueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
+import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RunWith(Parameterized.class)
+public class ConnectionCachingIT extends ParallelStatsEnabledIT {
+  private static final Logger LOG = 
LoggerFactory.getLogger(ConnectionCachingIT.class);
+
+  @Parameters(name= "phoenix.scanner.lease.renew.enabled={0}")
+  public static Iterable data() {
+return Arrays.asList("true", "false");
+  }
+
+  private String leaseRenewal;
+
+  public ConnectionCachingIT(String leaseRenewalValue) {
+this.leaseRenewal = leaseRenewalValue;
+  }
+
+  @Test
+  public void test() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+props.put("phoenix.scanner.lease.renew.enabled", leaseRenewal);
+
+// The test driver works correctly, the real one doesn't.
+String url = getUrl();
+url = url.replace(";" + PhoenixRuntime.PHOENIX_TEST_DRIVER_URL_PARAM, "");
+LOG.info("URL to use is: {}", url);
+
+Connection conn = DriverManager.getConnection(url, props);
+long before = getNumCachedConnections(conn);
+for (int i = 0; i < 10_000; i++) {
+  Connection c = DriverManager.getConnection(url, props);
+  c.close();
+}
+
Thread.sleep(QueryServicesOptions.DEFAULT_RUN_RENEW_LEASE_FREQUENCY_INTERVAL_MILLISECONDS
 / 2);
+long after = getNumCachedConnections(conn);
+for (int i = 0; i < 6; i++) {
+  LOG.info("Found {} connections cached", after);
+  if (after <= before) {
+break;
+  }
+  
Thread.sleep(QueryServicesOptions.DEFAULT_RUN_RENEW_LEASE_FREQUENCY_INTERVAL_MILLISECONDS
 / 2);
+  after = getNumCachedConnections(conn);
+}
+assertTrue("Saw " + before + " connections, but ended with " + after, 
after <= before);
+  }
+
+  long getNumCachedConnections(Connection conn) throws Exception {
+PhoenixConnection pConn = conn.unwrap(PhoenixConnection.class);
+ConnectionQueryServices cqs = pConn.getQueryServices();
+// For whatever reason, we sometimes get a delegate here, and sometimes 
the real thing.
+if (cqs instanceof DelegateConnectionQueryServices) {
+  cqs = ((DelegateConnectionQueryServices) cqs).getDelegate();
+}
+assertTrue("ConnectionQueryServices was a " + cqs.getClass(), cqs 
instanceof ConnectionQueryServicesImpl);
+ConnectionQueryServicesImpl cqsi = (ConnectionQueryServicesImpl) cqs;
+long cachedConnections = 0L;
+for 

[50/50] [abbrv] phoenix git commit: Revert "PHOENIX-4790 Simplify check for client side delete"

2018-08-03 Thread vincentpoon
Revert "PHOENIX-4790 Simplify check for client side delete"

This reverts commit 6918b0dfba81f1da21b51965a91269115da67acc.


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 4cab4c270e91b48b4ebd19487986cfd864e02476
Parents: e95fb21
Author: James Taylor 
Authored: Thu Jul 12 19:57:14 2018 -0700
Committer: James Taylor 
Committed: Thu Jul 12 19:57:14 2018 -0700

--
 .../apache/phoenix/compile/DeleteCompiler.java  | 24 
 1 file changed, 19 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4cab4c27/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 78b2db9..5f9c76c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -46,6 +46,7 @@ import org.apache.phoenix.execute.AggregatePlan;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.execute.MutationState.MultiRowMutationState;
 import org.apache.phoenix.execute.MutationState.RowMutationState;
+import org.apache.phoenix.filter.SkipScanFilter;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
@@ -480,7 +481,6 @@ public class DeleteCompiler {
 projectedColumns.add(column);
 aliasedNodes.add(FACTORY.aliasedNode(null, FACTORY.column(null, 
'"' + column.getName().getString() + '"', null)));
 }
-boolean noQueryReqd = true;
 // Project all non PK indexed columns so that we can do the proper 
index maintenance
 for (PTable index : table.getIndexes()) {
 IndexMaintainer maintainer = index.getIndexMaintainer(table, 
connection);
@@ -492,8 +492,6 @@ public class DeleteCompiler {
 boolean hasNoColumnFamilies = 
table.getColumnFamilies().isEmpty();
 PColumn column = hasNoColumnFamilies ? 
table.getColumnForColumnName(columnName) : 
table.getColumnFamily(familyName).getPColumnForColumnName(columnName);
 if(!projectedColumns.contains(column)) {
-// We must run a query if any index contains a non pk 
column
-noQueryReqd = false;
 projectedColumns.add(column);
 aliasedNodes.add(FACTORY.aliasedNode(null, 
FACTORY.column(hasNoColumnFamilies ? null : TableName.create(null, familyName), 
'"' + columnName + '"', null)));
 }
@@ -513,7 +511,7 @@ public class DeleteCompiler {
 select = StatementNormalizer.normalize(transformedSelect, 
resolverToBe);
 }
 final boolean hasPreOrPostProcessing = hasPreProcessing || 
hasPostProcessing;
-noQueryReqd &= !hasPreOrPostProcessing;
+boolean noQueryReqd = !hasPreOrPostProcessing;
 // No limit and no sub queries, joins, etc in where clause
 // Can't run on same server for transactional data, as we need the row 
keys for the data
 // that is being upserted for conflict detection purposes.
@@ -552,8 +550,24 @@ public class DeleteCompiler {
 }
 
 runOnServer &= queryPlans.get(0).getTableRef().getTable().getType() != 
PTableType.INDEX;
-
+
+// We need to have all indexed columns available in all immutable 
indexes in order
+// to generate the delete markers from the query. We also cannot have 
any filters
+// except for our SkipScanFilter for point lookups.
+// A simple check of the non existence of a where clause in the parse 
node is not sufficient, as the where clause
+// may have been optimized out. Instead, we check that there's a 
single SkipScanFilter
+// If we can generate a plan for every index, that means all the 
required columns are available in every index,
+// hence we can drive the delete from any of the plans.
 noQueryReqd &= queryPlans.size() == 1 + clientSideIndexes.size();
+int queryPlanIndex = 0;
+while (noQueryReqd && queryPlanIndex < queryPlans.size()) {
+QueryPlan plan = queryPlans.get(queryPlanIndex++);
+StatementContext context = plan.getContext();
+noQueryReqd &= (!context.getScan().hasFilter()
+ 

[43/50] [abbrv] phoenix git commit: PHOENIX-3383 Comparison between descending row keys used in RVC is reverse

2018-08-03 Thread vincentpoon
http://git-wip-us.apache.org/repos/asf/phoenix/blob/dac9dc40/phoenix-core/src/main/java/org/apache/phoenix/execute/PhoenixTxIndexMutationGenerator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/PhoenixTxIndexMutationGenerator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/PhoenixTxIndexMutationGenerator.java
index a7b5687..877c939 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/PhoenixTxIndexMutationGenerator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/PhoenixTxIndexMutationGenerator.java
@@ -177,7 +177,7 @@ public class PhoenixTxIndexMutationGenerator {
 
 // Project empty key value column
 scan.addColumn(indexMaintainers.get(0).getDataEmptyKeyValueCF(), 
emptyKeyValueQualifier);
-ScanRanges scanRanges = 
ScanRanges.create(SchemaUtil.VAR_BINARY_SCHEMA, 
Collections.singletonList(keys), ScanUtil.SINGLE_COLUMN_SLOT_SPAN, 
KeyRange.EVERYTHING_RANGE, null, true, -1);
+ScanRanges scanRanges = 
ScanRanges.create(SchemaUtil.VAR_BINARY_SCHEMA, 
Collections.singletonList(keys), ScanUtil.SINGLE_COLUMN_SLOT_SPAN, null, true, 
-1);
 scanRanges.initializeScan(scan);
 Table txTable = 
indexMetaData.getTransactionContext().getTransactionalTable(htable, 
isImmutable);
 // For rollback, we need to see all versions, including

http://git-wip-us.apache.org/repos/asf/phoenix/blob/dac9dc40/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FunctionExpression.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FunctionExpression.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FunctionExpression.java
index b45706a..bc9fa9f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FunctionExpression.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FunctionExpression.java
@@ -30,7 +30,15 @@ import org.apache.phoenix.expression.Expression;
  * @since 0.1
  */
 public abstract class FunctionExpression extends BaseCompoundExpression {
-public enum OrderPreserving {NO, YES_IF_LAST, YES};
+public enum OrderPreserving {NO, YES_IF_LAST, YES;
+
+public OrderPreserving combine(OrderPreserving that) {
+if (that == null) {
+return this;
+}
+return OrderPreserving.values()[Math.min(this.ordinal(), 
that.ordinal())];
+}};
+
 public FunctionExpression() {
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/dac9dc40/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InvertFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InvertFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InvertFunction.java
index 3615cbe..8ef5914 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InvertFunction.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/InvertFunction.java
@@ -96,7 +96,24 @@ public class InvertFunction extends ScalarFunction {
 @Override
 public KeyRange getKeyRange(CompareOp op, Expression rhs) {
 KeyRange range = childPart.getKeyRange(op, rhs);
-return range.invert();
+byte[] lower = range.getLowerRange();
+if (!range.lowerUnbound()) {
+lower = SortOrder.invert(lower, 0, lower.length);
+}
+byte[] upper;
+if (range.isSingleKey()) {
+upper = lower;
+} else {
+upper = range.getUpperRange();
+if (!range.upperUnbound()) {
+upper = SortOrder.invert(upper, 0, upper.length);
+}
+}
+range = KeyRange.getKeyRange(lower, range.isLowerInclusive(), 
upper, range.isUpperInclusive());
+if (getColumn().getSortOrder() == SortOrder.DESC) {
+range = range.invert();
+}
+return range;
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/dac9dc40/phoenix-core/src/main/java/org/apache/phoenix/expression/function/PrefixFunction.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/PrefixFunction.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/PrefixFunction.java
index cb98e28..ff3e74d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/PrefixFunction.java
+++ 

[27/50] [abbrv] phoenix git commit: PHOENIX-4759 During restart RS that hosts SYSTEM.CATALOG table may get stuck

2018-08-03 Thread vincentpoon
PHOENIX-4759 During restart RS that hosts SYSTEM.CATALOG table may get stuck


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 24af1040591e088a9b4722ae825762d331d102c2
Parents: e2212e2
Author: Sergey Soldatov 
Authored: Thu May 31 12:07:29 2018 -0700
Committer: ss77892 
Committed: Thu May 31 12:58:36 2018 -0700

--
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  6 +++---
 .../phoenix/coprocessor/MetaDataProtocol.java  | 16 +++-
 .../apache/phoenix/exception/SQLExceptionCode.java |  6 +++---
 .../index/write/ParallelWriterIndexCommitter.java  |  4 ++--
 .../TrackingParallelWriterIndexCommitter.java  |  4 ++--
 .../phoenix/index/PhoenixTransactionalIndexer.java |  4 ++--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  | 17 +
 .../phoenix/query/ConnectionQueryServicesImpl.java |  4 ++--
 .../org/apache/phoenix/schema/MetaDataClient.java  |  4 ++--
 .../java/org/apache/phoenix/util/ScanUtil.java |  3 +--
 10 files changed, 33 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/24af1040/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
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 ff62c92..5e2e4df 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
@@ -946,12 +946,12 @@ public class MetaDataEndpointImpl extends 
MetaDataProtocol implements Coprocesso
 .getValueArray()[indexStateKv.getValueOffset()]);
 // If client is not yet up to 4.12, then translate PENDING_ACTIVE to 
ACTIVE (as would have been
 // the value in those versions) since the client won't have this index 
state in its enum.
-if (indexState == PIndexState.PENDING_ACTIVE && clientVersion < 
PhoenixDatabaseMetaData.MIN_PENDING_ACTIVE_INDEX) {
+if (indexState == PIndexState.PENDING_ACTIVE && clientVersion < 
MetaDataProtocol.MIN_PENDING_ACTIVE_INDEX) {
 indexState = PIndexState.ACTIVE;
 }
 // If client is not yet up to 4.14, then translate PENDING_DISABLE to 
DISABLE
 // since the client won't have this index state in its enum.
-if (indexState == PIndexState.PENDING_DISABLE && clientVersion < 
PhoenixDatabaseMetaData.MIN_PENDING_DISABLE_INDEX) {
+if (indexState == PIndexState.PENDING_DISABLE && clientVersion < 
MetaDataProtocol.MIN_PENDING_DISABLE_INDEX) {
 // note: for older clients, we have to rely on the rebuilder to 
transition PENDING_DISABLE -> DISABLE
 indexState = PIndexState.DISABLE;
 }
@@ -3687,7 +3687,7 @@ public class MetaDataEndpointImpl extends 
MetaDataProtocol implements Coprocesso
 GetVersionResponse.Builder builder = GetVersionResponse.newBuilder();
 Configuration config = env.getConfiguration();
 if (isTablesMappingEnabled
-&& 
PhoenixDatabaseMetaData.MIN_NAMESPACE_MAPPED_PHOENIX_VERSION > 
request.getClientVersion()) {
+&& MetaDataProtocol.MIN_NAMESPACE_MAPPED_PHOENIX_VERSION > 
request.getClientVersion()) {
 logger.error("Old client is not compatible when" + " system tables 
are upgraded to map to namespace");
 ProtobufUtil.setControllerException(controller,
 ServerUtil.createIOException(

http://git-wip-us.apache.org/repos/asf/phoenix/blob/24af1040/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 62b701d..883f96d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -93,7 +93,21 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0 = 
MIN_TABLE_TIMESTAMP + 28;
 // MIN_SYSTEM_TABLE_TIMESTAMP needs to be set to the max of all the 
MIN_SYSTEM_TABLE_TIMESTAMP_* constants
 public static final long MIN_SYSTEM_TABLE_TIMESTAMP = 

[36/50] [abbrv] phoenix git commit: PHOENIX-4544 Update statistics inconsistent behavior

2018-08-03 Thread vincentpoon
PHOENIX-4544 Update statistics inconsistent behavior


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

Branch: refs/heads/4.14-HBase-1.3
Commit: fef7aa9e1d8281753e39d2a7e5b4932ebf102cc7
Parents: 4e7d88b
Author: Ankit Singhal 
Authored: Thu Jun 7 11:22:56 2018 -0700
Committer: Ankit Singhal 
Committed: Thu Jun 7 11:22:56 2018 -0700

--
 .../StatisticsCollectionRunTrackerIT.java   | 32 --
 .../UngroupedAggregateRegionObserver.java   |  4 +-
 .../apache/phoenix/schema/MetaDataClient.java   | 10 -
 .../stats/StatisticsCollectionRunTracker.java   | 45 +---
 .../java/org/apache/phoenix/util/ByteUtil.java  | 16 ++-
 5 files changed, 85 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/fef7aa9e/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
index cf475f9..a643383 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
@@ -25,6 +25,8 @@ import static org.junit.Assert.assertTrue;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 
 import org.apache.hadoop.conf.Configuration;
@@ -61,12 +63,15 @@ public class StatisticsCollectionRunTrackerIT extends 
ParallelStatsEnabledIT {
 StatisticsCollectionRunTracker tracker =
 StatisticsCollectionRunTracker.getInstance(new 
Configuration());
 // assert that the region wasn't added to the tracker
-assertTrue(tracker.addUpdateStatsCommandRegion(regionInfo));
+assertTrue(tracker.addUpdateStatsCommandRegion(regionInfo, new 
HashSet(Arrays.asList(Bytes.toBytes("0");
+assertTrue(tracker.addUpdateStatsCommandRegion(regionInfo, new 
HashSet(Arrays.asList(Bytes.toBytes("L#0");
 // assert that removing the region from the tracker works
-assertTrue(tracker.removeUpdateStatsCommandRegion(regionInfo));
+assertTrue(tracker.removeUpdateStatsCommandRegion(regionInfo, new 
HashSet(Arrays.asList(Bytes.toBytes("0");
+assertTrue(tracker.removeUpdateStatsCommandRegion(regionInfo, new 
HashSet(Arrays.asList(Bytes.toBytes("L#0");
 runUpdateStats(tableName);
 // assert that after update stats is complete, tracker isn't tracking 
the region any more
-assertFalse(tracker.removeUpdateStatsCommandRegion(regionInfo));
+assertFalse(tracker.removeUpdateStatsCommandRegion(regionInfo, new 
HashSet(Arrays.asList(Bytes.toBytes("0");
+assertFalse(tracker.removeUpdateStatsCommandRegion(regionInfo, new 
HashSet(Arrays.asList(Bytes.toBytes("L#0");;
 }
 
 @Test
@@ -103,25 +108,27 @@ public class StatisticsCollectionRunTrackerIT extends 
ParallelStatsEnabledIT {
 HRegionInfo regionInfo = createTableAndGetRegion(tableName);
 // simulate stats collection via major compaction by marking the 
region as compacting in the tracker
 markRegionAsCompacting(regionInfo);
-Assert.assertEquals("Row count didn't match", 
COMPACTION_UPDATE_STATS_ROW_COUNT, runUpdateStats(tableName));
-StatisticsCollectionRunTracker tracker =
+// there will be no update for local index and a table , so checking 2 
* COMPACTION_UPDATE_STATS_ROW_COUNT
+Assert.assertEquals("Row count didn't match", 
COMPACTION_UPDATE_STATS_ROW_COUNT * 2, runUpdateStats(tableName));
 StatisticsCollectionRunTracker.getInstance(new 
Configuration());
 // assert that the tracker state was cleared.
-assertFalse(tracker.removeUpdateStatsCommandRegion(regionInfo));
+HashSet familyMap = new 
HashSet(Arrays.asList(Bytes.toBytes("0")));
+assertFalse(tracker.removeUpdateStatsCommandRegion(regionInfo, 
familyMap));
 }
 
 @Test
 public void testUpdateStatsPreventsAnotherUpdateStatsFromRunning() throws 
Exception {
 String tableName = fullTableName;
 HRegionInfo regionInfo = createTableAndGetRegion(tableName);
-markRunningUpdateStats(regionInfo);
-Assert.assertEquals("Row count didn't match", 
CONCURRENT_UPDATE_STATS_ROW_COUNT,
-

[15/50] [abbrv] phoenix git commit: PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG(addendum 2)

2018-08-03 Thread vincentpoon
PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG(addendum 2)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 2015345a023f0adb59174443ec1328bb1399f11b
Parents: 52432db
Author: James Taylor 
Authored: Wed May 16 21:37:02 2018 -0700
Committer: James Taylor 
Committed: Wed May 16 21:37:02 2018 -0700

--
 .../src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2015345a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
index 1160f4e..460b22f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
@@ -59,9 +59,9 @@ public class QueryWithLimitIT extends 
BaseUniqueNamesOwnClusterIT {
 // Must update config before starting server
 props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(50));
 props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
-props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
-props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when deleting 
sequences
+props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when creatomg 
sequence table
 props.put(QueryServices.THREAD_POOL_SIZE_ATTRIB, Integer.toString(4));
+props.put(QueryServices.LOG_SALT_BUCKETS_ATTRIB, Integer.toString(0)); 
// Prevents RejectedExecutionException when creating log table
 setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
 



[47/50] [abbrv] phoenix git commit: PHOENIX-4805 Move Avatica version to 1.12 for PQS

2018-08-03 Thread vincentpoon
PHOENIX-4805 Move Avatica version to 1.12 for PQS


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

Branch: refs/heads/4.14-HBase-1.3
Commit: c729db032d299f26370e8f9c366fccd3bcfc0973
Parents: ad88675
Author: Karan Mehta 
Authored: Fri Jul 6 13:35:52 2018 -0700
Committer: Karan Mehta 
Committed: Thu Jul 12 09:46:56 2018 -0700

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c729db03/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 859157d..7e74e63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,7 +98,7 @@
 
 1.6
 2.1.2
-1.10.0
+1.12.0
 8.1.7.v20120910
 0.14.0-incubating
 2.0.2



[2/2] phoenix git commit: PHOENIX-4797 file not found or file exist exception when create global index use -snapshot option

2018-08-03 Thread vincentpoon
PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 221acfa8d3cf3e424958797146837318ef0ba5f6
Parents: 1813ec8
Author: 492066199 <492066...@qq.com>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Vincent Poon 
Committed: Fri Aug 3 16:40:23 2018 -0400

--
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/221acfa8/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index df60339..016d3be 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -39,6 +39,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.UUID;
 
 public class TableSnapshotResultIterator implements ResultIterator {
 
@@ -65,7 +66,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
 this.scan = scan;
 this.scanMetricsHolder = scanMetricsHolder;
 this.scanIterator = UNINITIALIZED_SCANNER;
-this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+UUID.randomUUID().toString());
 this.snapshotName = configuration.get(
 PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
 this.rootDir = FSUtils.getRootDir(configuration);



[1/2] phoenix git commit: PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace table name, webapp path, column names) and traceserver.py

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.3 4cab4c270 -> 221acfa8d


PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace 
table name, webapp path, column names) and traceserver.py

Closes #311

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 1813ec8d87b3d456d89419caa84b5f530977cb0e
Parents: 4cab4c2
Author: Vitaly Monastyrev 
Authored: Tue Jul 24 12:14:12 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 16:40:19 2018 -0400

--
 bin/traceserver.py  |  6 +-
 .../apache/phoenix/tracingwebapp/http/Main.java | 13 +--
 .../tracingwebapp/http/TraceServlet.java| 87 +++-
 3 files changed, 62 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1813ec8d/bin/traceserver.py
--
diff --git a/bin/traceserver.py b/bin/traceserver.py
index 665099e..62e168c 100755
--- a/bin/traceserver.py
+++ b/bin/traceserver.py
@@ -116,8 +116,10 @@ else:
 
 #" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " 
+ \
 #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s $PHOENIX_OPTS ' + \
-'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s  ' + \
+'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + \
+phoenix_utils.phoenix_client_jar + os.pathsep + 
phoenix_utils.phoenix_queryserver_jar + \
+os.pathsep + phoenix_utils.hadoop_classpath + \
 " -Dproc_phoenixtraceserver" + \
 " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, 
"log4j.properties") + \
 " -Dpsql.root.logger=%(root_logger)s" + \

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1813ec8d/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
index 5875fc1..249f8e6 100755
--- 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
+++ 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
@@ -47,6 +47,7 @@ public final class Main extends Configured implements Tool {
 public static final String TRACE_SERVER_HTTP_JETTY_HOME_KEY =
 "phoenix.traceserver.http.home";
 public static final String DEFAULT_HTTP_HOME = "/";
+public static final String DEFAULT_WEBAPP_DIR_LOCATION = "src/main/webapp";
 
 public static void main(String[] args) throws Exception {
 int ret = ToolRunner.run(HBaseConfiguration.create(), new Main(), 
args);
@@ -62,15 +63,17 @@ public final class Main extends Configured implements Tool {
 final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY,
 DEFAULT_HTTP_HOME);
 //setting up the embedded server
-ProtectionDomain domain = Main.class.getProtectionDomain();
-URL location = domain.getCodeSource().getLocation();
-String webappDirLocation = location.toString().split("target")[0] 
+"src/main/webapp";
 Server server = new Server(port);
 WebAppContext root = new WebAppContext();
 
+URL webAppDir = 
Thread.currentThread().getContextClassLoader().getResource(DEFAULT_WEBAPP_DIR_LOCATION);
+if (webAppDir == null) {
+throw new RuntimeException(String.format("No %s directory was 
found into the JAR file", DEFAULT_WEBAPP_DIR_LOCATION));
+}
+
 root.setContextPath(home);
-root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
-root.setResourceBase(webappDirLocation);
+root.setDescriptor(DEFAULT_WEBAPP_DIR_LOCATION + "/WEB-INF/web.xml");
+root.setResourceBase(webAppDir.toURI().toString());
 root.setParentLoaderPriority(true);
 server.setHandler(root);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1813ec8d/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
 

[21/50] [abbrv] phoenix git commit: PHOENIX-4706 Remove bundling dependencies into phoenix-core

2018-08-03 Thread vincentpoon
PHOENIX-4706 Remove bundling dependencies into phoenix-core


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

Branch: refs/heads/4.14-HBase-1.3
Commit: eb62c20408f0aadaec3da5e495812d7fc3cb2638
Parents: b116500
Author: Josh Elser 
Authored: Mon May 7 20:01:35 2018 -0700
Committer: Josh Elser 
Committed: Mon May 21 17:32:46 2018 -0400

--
 phoenix-core/pom.xml | 28 
 1 file changed, 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eb62c204/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index bf2f3d6..aa59b72 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -170,34 +170,6 @@
 
   
   
-
-maven-assembly-plugin
-
-  
-core
-package
-
-  single
-
-
-  false
-  phoenix
-  
-true
-
-  true
-  
true
-  
true
-
-  
-  
-src/build/phoenix-core.xml
-  
-
-  
-  
-  
-  
 org.apache.maven.plugins
 maven-failsafe-plugin
   



[20/50] [abbrv] phoenix git commit: PHOENIX-4692 ArrayIndexOutOfBoundsException in ScanRanges.intersectScan

2018-08-03 Thread vincentpoon
PHOENIX-4692 ArrayIndexOutOfBoundsException in ScanRanges.intersectScan


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

Branch: refs/heads/4.14-HBase-1.3
Commit: b1165008230e212cfec1e52d86c6945176ad1d60
Parents: 9066ce3
Author: maryannxue 
Authored: Mon May 21 10:10:23 2018 -0700
Committer: maryannxue 
Committed: Mon May 21 10:10:23 2018 -0700

--
 .../apache/phoenix/end2end/SkipScanQueryIT.java | 21 
 .../apache/phoenix/compile/WhereCompiler.java   | 12 +--
 .../apache/phoenix/execute/BaseQueryPlan.java   |  2 +-
 .../apache/phoenix/execute/HashJoinPlan.java|  5 -
 4 files changed, 32 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b1165008/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java
index d98bbe2..fb0b568 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java
@@ -563,4 +563,25 @@ public class SkipScanQueryIT extends 
ParallelStatsDisabledIT {
 assertFalse(rs.next());
 }
 }
+
+@Test
+public void testSkipScanJoinOptimization() throws Exception {
+try (Connection conn = DriverManager.getConnection(getUrl())) {
+String tableName = generateUniqueName();
+String viewName = generateUniqueName();
+String idxName = "IDX_" + tableName;
+conn.setAutoCommit(true);
+conn.createStatement().execute(
+"create table " + tableName + " (PK1 INTEGER NOT NULL, PK2 
INTEGER NOT NULL, " +
+" ID1 INTEGER, ID2 INTEGER CONSTRAINT PK PRIMARY 
KEY(PK1 , PK2))SALT_BUCKETS = 4");
+conn.createStatement().execute("upsert into " + tableName + " 
values (1,1,1,1)");
+conn.createStatement().execute("upsert into " + tableName + " 
values (2,2,2,2)");
+conn.createStatement().execute("upsert into " + tableName + " 
values (2,3,1,2)");
+conn.createStatement().execute("create view " + viewName + " as 
select * from " +
+tableName + " where PK1 in (1,2)");
+conn.createStatement().execute("create index " + idxName + " on " 
+ viewName + " (ID1)");
+ResultSet rs = conn.createStatement().executeQuery("select /*+ 
INDEX(" + viewName + " " + idxName + ") */ * from " + viewName + " where ID1 = 
1 ");
+assertTrue(rs.next());
+}
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b1165008/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java
index 2cf5857..832b1f0 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java
@@ -105,9 +105,9 @@ public class WhereCompiler {
  * @throws AmbiguousColumnException if an unaliased column name is 
ambiguous across multiple tables
  */
 public static Expression compile(StatementContext context, 
FilterableStatement statement, ParseNode viewWhere, Set 
subqueryNodes) throws SQLException {
-return compile(context, statement, viewWhere, 
Collections.emptyList(), false, subqueryNodes);
+return compile(context, statement, viewWhere, 
Collections.emptyList(), subqueryNodes);
 }
-
+
 /**
  * Optimize scan ranges by applying dynamically generated filter 
expressions.
  * @param context the shared context during query compilation
@@ -118,7 +118,7 @@ public class WhereCompiler {
  * @throws ColumnNotFoundException if column name could not be resolved
  * @throws AmbiguousColumnException if an unaliased column name is 
ambiguous across multiple tables
  */
-public static Expression compile(StatementContext context, 
FilterableStatement statement, ParseNode viewWhere, List 
dynamicFilters, boolean hashJoinOptimization, Set 
subqueryNodes) throws SQLException {
+public static Expression compile(StatementContext context, 
FilterableStatement statement, ParseNode viewWhere, List 
dynamicFilters, Set subqueryNodes) throws SQLException {
 

[45/50] [abbrv] phoenix git commit: PHOENIX-3383 Comparison between descending row keys used in RVC is reverse

2018-08-03 Thread vincentpoon
PHOENIX-3383 Comparison between descending row keys used in RVC is reverse


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

Branch: refs/heads/4.14-HBase-1.3
Commit: dac9dc40803436360c35e15d147f12a5b51d4eab
Parents: 6918b0d
Author: James Taylor 
Authored: Thu Jul 5 21:38:28 2018 -0700
Committer: James Taylor 
Committed: Wed Jul 11 07:32:05 2018 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java |   12 +-
 .../org/apache/phoenix/compile/KeyPart.java |2 -
 .../org/apache/phoenix/compile/ScanRanges.java  |   77 +-
 .../apache/phoenix/compile/WhereOptimizer.java  | 1304 +-
 .../PhoenixTxIndexMutationGenerator.java|2 +-
 .../expression/function/FunctionExpression.java |   10 +-
 .../expression/function/InvertFunction.java |   19 +-
 .../expression/function/PrefixFunction.java |6 +-
 .../expression/function/RTrimFunction.java  |6 +-
 .../function/RoundDateExpression.java   |   22 +-
 .../function/RoundDecimalExpression.java|7 +-
 .../phoenix/iterate/BaseResultIterators.java|4 +-
 .../apache/phoenix/iterate/ExplainTable.java|   10 -
 .../java/org/apache/phoenix/query/KeyRange.java |   28 +-
 .../org/apache/phoenix/schema/RowKeySchema.java |   78 ++
 .../phoenix/compile/QueryCompilerTest.java  |2 +-
 .../phoenix/compile/QueryOptimizerTest.java |5 +-
 .../TenantSpecificViewIndexCompileTest.java |8 +-
 .../phoenix/compile/WhereOptimizerTest.java |  359 -
 .../RoundFloorCeilExpressionsTest.java  |   59 +-
 .../apache/phoenix/query/KeyRangeClipTest.java  |2 +-
 .../org/apache/phoenix/query/QueryPlanTest.java |8 +-
 .../apache/phoenix/schema/RowKeySchemaTest.java |   48 +
 23 files changed, 1567 insertions(+), 511 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/dac9dc40/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index 9109c12..04272fa 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -372,9 +372,6 @@ public class QueryMoreIT extends ParallelStatsDisabledIT {
 }
 }
 
-// FIXME: this repros PHOENIX-3382, but turned up two more issues:
-// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
-// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
 @Test
 public void testRVCOnDescWithLeadingPKEquality() throws Exception {
 final Connection conn = DriverManager.getConnection(getUrl());
@@ -398,14 +395,11 @@ public class QueryMoreIT extends ParallelStatsDisabledIT {
 conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
 conn.commit();
 
-// FIXME: PHOENIX-3383
-// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
-// but because we're matching a descending key, our comparison has to 
be switched.
 try (Statement stmt = conn.createStatement()) {
 final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
 "FROM " + fullTableName + "\n" + 
 "WHERE organization_id = 'org1'\n" + 
-"AND (score, entity_id) > (2, '04')\n" + 
+"AND (score, entity_id) < (2, '04')\n" + 
 "ORDER BY score DESC, entity_id DESC\n" + 
 "LIMIT 3");
 assertTrue(rs.next());
@@ -416,13 +410,11 @@ public class QueryMoreIT extends ParallelStatsDisabledIT {
 assertEquals(1.0, rs.getDouble(2), 0.001);
 assertFalse(rs.next());
 }
-// FIXME: PHOENIX-3384
-// It should not be necessary to specify organization_id in this query
 try (Statement stmt = conn.createStatement()) {
 final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
 "FROM " + fullTableName + "\n" + 
 "WHERE organization_id = 'org1'\n" + 
-"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"AND (organization_id, score, entity_id) < ('org1', 2, 
'04')\n" + 
 "ORDER BY score DESC, entity_id DESC\n" + 
 "LIMIT 3");
 assertTrue(rs.next());


[32/50] [abbrv] phoenix git commit: Revert "PHOENIX-4768 Re-enable testCompactUpdatesStats and testCompactUpdatesStatsWithMinStatsUpdateFreq of StatsCollectorIT"

2018-08-03 Thread vincentpoon
Revert "PHOENIX-4768 Re-enable testCompactUpdatesStats and 
testCompactUpdatesStatsWithMinStatsUpdateFreq of StatsCollectorIT"

This reverts commit 2f67e9f9d5f6008c08df3ff0328c10599e8878e2.


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

Branch: refs/heads/4.14-HBase-1.3
Commit: c27c68cf1e183d450cf21c20f3994e3192479e46
Parents: 190ff84
Author: James Taylor 
Authored: Sun Jun 3 15:42:56 2018 -0700
Committer: James Taylor 
Committed: Sun Jun 3 15:42:56 2018 -0700

--
 .../org/apache/phoenix/schema/stats/StatsCollectorIT.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c27c68cf/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
index 5436311..09d28f8 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/schema/stats/StatsCollectorIT.java
@@ -68,6 +68,7 @@ import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.TestUtil;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -403,11 +404,13 @@ public abstract class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
 }
 
 @Test
+@Ignore //TODO remove this once  
https://issues.apache.org/jira/browse/TEPHRA-208 is fixed
 public void testCompactUpdatesStats() throws Exception {
 testCompactUpdatesStats(0, fullTableName);
 }
 
 @Test
+@Ignore //TODO remove this once  
https://issues.apache.org/jira/browse/TEPHRA-208 is fixed
 public void testCompactUpdatesStatsWithMinStatsUpdateFreq() throws 
Exception {
 
testCompactUpdatesStats(QueryServicesOptions.DEFAULT_STATS_UPDATE_FREQ_MS, 
fullTableName);
 }
@@ -460,7 +463,7 @@ public abstract class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
 Scan scan = new Scan();
 scan.setRaw(true);
 PhoenixConnection phxConn = conn.unwrap(PhoenixConnection.class);
-try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(physicalTableName))) {
+try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(tableName))) {
 ResultScanner scanner = htable.getScanner(scan);
 Result result;
 while ((result = scanner.next())!=null) {
@@ -473,7 +476,7 @@ public abstract class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
 scan = new Scan();
 scan.setRaw(true);
 phxConn = conn.unwrap(PhoenixConnection.class);
-try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(physicalTableName))) {
+try (HTableInterface htable = 
phxConn.getQueryServices().getTable(Bytes.toBytes(tableName))) {
 ResultScanner scanner = htable.getScanner(scan);
 Result result;
 while ((result = scanner.next())!=null) {



[41/50] [abbrv] phoenix git commit: PHOENIX-4785 Unable to write to table if index is made active during retry

2018-08-03 Thread vincentpoon
PHOENIX-4785 Unable to write to table if index is made active during retry


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 5771eb213feca0e50c9f3542b5118e44b7816f3e
Parents: a9170b2
Author: Ankit Singhal 
Authored: Thu Jun 21 16:11:41 2018 -0700
Committer: Ankit Singhal 
Committed: Thu Jun 21 16:11:41 2018 -0700

--
 .../end2end/index/MutableIndexFailureIT.java| 128 ++-
 .../MutableIndexFailureWithNamespaceIT.java |  80 
 .../coprocessor/MetaDataEndpointImpl.java   |  30 +
 .../index/PhoenixIndexFailurePolicy.java|  71 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   2 +-
 5 files changed, 276 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5771eb21/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
index dfbaf3f..8f88513 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
@@ -28,10 +28,16 @@ import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
 
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
@@ -104,10 +110,10 @@ public class MutableIndexFailureIT extends BaseTest {
 private final boolean throwIndexWriteFailure;
 private String schema = generateUniqueName();
 private List exceptions = Lists.newArrayList();
-private static RegionCoprocessorEnvironment 
indexRebuildTaskRegionEnvironment;
-private static final int forwardOverlapMs = 1000;
-private static final int disableTimestampThresholdMs = 1;
-private static final int numRpcRetries = 2;
+protected static RegionCoprocessorEnvironment 
indexRebuildTaskRegionEnvironment;
+protected static final int forwardOverlapMs = 1000;
+protected static final int disableTimestampThresholdMs = 1;
+protected static final int numRpcRetries = 2;
 
 public MutableIndexFailureIT(boolean transactional, boolean localIndex, 
boolean isNamespaceMapped, Boolean disableIndexOnWriteFailure, boolean 
failRebuildTask, Boolean throwIndexWriteFailure) {
 this.transactional = transactional;
@@ -127,6 +133,23 @@ public class MutableIndexFailureIT extends BaseTest {
 
 @BeforeClass
 public static void doSetup() throws Exception {
+Map serverProps = getServerProps();
+Map clientProps = Maps.newHashMapWithExpectedSize(2);
+clientProps.put(HConstants.HBASE_CLIENT_RETRIES_NUMBER, "2");
+NUM_SLAVES_BASE = 4;
+setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), 
new ReadOnlyProps(clientProps.entrySet().iterator()));
+indexRebuildTaskRegionEnvironment =
+(RegionCoprocessorEnvironment) getUtility()
+.getRSForFirstRegionInTable(
+
PhoenixDatabaseMetaData.SYSTEM_CATALOG_HBASE_TABLE_NAME)
+
.getOnlineRegions(PhoenixDatabaseMetaData.SYSTEM_CATALOG_HBASE_TABLE_NAME)
+.get(0).getCoprocessorHost()
+
.findCoprocessorEnvironment(MetaDataRegionObserver.class.getName());
+MetaDataRegionObserver.initRebuildIndexConnectionProps(
+indexRebuildTaskRegionEnvironment.getConfiguration());
+}
+
+protected static Map getServerProps(){
 Map serverProps = Maps.newHashMapWithExpectedSize(10);
 serverProps.put("hbase.coprocessor.region.classes", 
FailingRegionObserver.class.getName());
 serverProps.put(HConstants.HBASE_RPC_TIMEOUT_KEY, "1");
@@ -142,19 +165,7 @@ public class MutableIndexFailureIT extends BaseTest {
  * because we want to control it's execution ourselves
  */
 serverProps.put(QueryServices.INDEX_REBUILD_TASK_INITIAL_DELAY, 
Long.toString(Long.MAX_VALUE));
-Map clientProps 

[03/50] [abbrv] phoenix git commit: Fix PhoenixMRJobSubmitter submits duplicate MR jobs for an index build from indexTool

2018-08-03 Thread vincentpoon
Fix PhoenixMRJobSubmitter submits duplicate MR jobs for an index build from 
indexTool


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 5dc873dd250d83b66b36d6a883531dac78e1dced
Parents: c27418b
Author: Xu Cang 
Authored: Mon May 7 16:21:46 2018 -0700
Committer: Thomas D'Silva 
Committed: Thu May 10 15:38:17 2018 -0700

--
 .../phoenix/mapreduce/index/IndexTool.java  |  6 ++--
 .../index/automation/PhoenixAsyncIndex.java |  2 +-
 .../index/automation/PhoenixMRJobSubmitter.java |  2 +-
 .../index/automated/MRJobSubmitterTest.java | 30 +++-
 4 files changed, 28 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5dc873dd/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
index 671e4cf..e3aa729 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
@@ -123,7 +123,7 @@ public class IndexTool extends Configured implements Tool {
 private static final Option SNAPSHOT_OPTION = new Option("snap", 
"snapshot", false,
 "If specified, uses Snapshots for async index building (optional)");
 private static final Option HELP_OPTION = new Option("h", "help", false, 
"Help");
-public static final String INDEX_JOB_NAME_TEMPLATE = "PHOENIX_%s_INDX_%s";
+public static final String INDEX_JOB_NAME_TEMPLATE = 
"PHOENIX_%s.%s_INDX_%s";
 
 private Options getOptions() {
 final Options options = new Options();
@@ -373,9 +373,9 @@ public class IndexTool extends Configured implements Tool {
 PhoenixRuntime.generateColumnInfo(connection, qIndexTable, 
indexColumns);
 ColumnInfoToStringEncoderDecoder.encode(configuration, 
columnMetadataList);
 fs = outputPath.getFileSystem(configuration);
-fs.delete(outputPath, true);   
+fs.delete(outputPath, true);
  
-final String jobName = String.format(INDEX_JOB_NAME_TEMPLATE, 
pdataTable.getName().toString(), indexTable);
+final String jobName = String.format(INDEX_JOB_NAME_TEMPLATE, 
schemaName, dataTable, indexTable);
 final Job job = Job.getInstance(configuration, jobName);
 job.setJarByClass(IndexTool.class);
 job.setMapOutputKeyClass(ImmutableBytesWritable.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5dc873dd/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixAsyncIndex.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixAsyncIndex.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixAsyncIndex.java
index 3e88cd0..a61e49a 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixAsyncIndex.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixAsyncIndex.java
@@ -59,7 +59,7 @@ public class PhoenixAsyncIndex {
 }
 
 public String getJobName() {
-return String.format(IndexTool.INDEX_JOB_NAME_TEMPLATE, dataTableName, 
tableName);
+return String.format(IndexTool.INDEX_JOB_NAME_TEMPLATE, tableSchem, 
dataTableName, tableName);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5dc873dd/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixMRJobSubmitter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixMRJobSubmitter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixMRJobSubmitter.java
index d86802a..3e20bd2 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixMRJobSubmitter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/automation/PhoenixMRJobSubmitter.java
@@ -216,7 +216,7 @@ public class PhoenixMRJobSubmitter {
 
indexInfo.setTableSchem(rs.getString(PhoenixDatabaseMetaData.TABLE_SCHEM));
 
indexInfo.setTableName(rs.getString(PhoenixDatabaseMetaData.TABLE_NAME));
 

[07/50] [abbrv] phoenix git commit: Revert "PHOENIX-4726 save index build timestamp -- for SYNC case only"

2018-08-03 Thread vincentpoon
Revert "PHOENIX-4726 save index build timestamp -- for SYNC case only"

This reverts commit 7ebba49d000bb221a8de45e70b4c0afb3b9355a3.


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 09d0b3a5fd2bffd5dc9a54a84b71e92686fecea7
Parents: 7ebba49
Author: Vincent Poon 
Authored: Mon May 14 10:25:16 2018 -0700
Committer: Vincent Poon 
Committed: Mon May 14 10:25:16 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  |  1 -
 .../org/apache/phoenix/schema/MetaDataClient.java  | 17 -
 2 files changed, 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/09d0b3a5/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 2e12ca2..55de772 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -316,7 +316,6 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public static final String ASYNC_CREATED_DATE = "ASYNC_CREATED_DATE";
 public static final String SEQUENCE_TABLE_TYPE = SYSTEM_SEQUENCE_TABLE;
 
-public static final String SYNC_INDEX_CREATED_DATE = 
"SYNC_INDEX_CREATED_DATE";
 public static final String SYSTEM_MUTEX_TABLE_NAME = "MUTEX";
 public static final String SYSTEM_MUTEX_NAME = 
SchemaUtil.getTableName(QueryConstants.SYSTEM_SCHEMA_NAME, 
SYSTEM_MUTEX_TABLE_NAME);
 public static final TableName SYSTEM_MUTEX_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_MUTEX_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/09d0b3a5/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 20ac732..009289b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -74,7 +74,6 @@ import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.RETURN_TYPE;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SALT_BUCKETS;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SORT_ORDER;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.STORE_NULLS;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYNC_INDEX_CREATED_DATE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_FUNCTION_TABLE;
@@ -264,14 +263,6 @@ public class MetaDataClient {
 TABLE_NAME + "," +
 ASYNC_CREATED_DATE + " " + PDate.INSTANCE.getSqlTypeName() 
+
 ") VALUES (?, ?, ?, ?)";
-
-private static final String SET_INDEX_SYNC_CREATED_DATE =
-"UPSERT INTO " + SYSTEM_CATALOG_SCHEMA + ".\"" + 
SYSTEM_CATALOG_TABLE + "\"( " +
-TENANT_ID + "," +
-TABLE_SCHEM + "," +
-TABLE_NAME + "," +
-SYNC_INDEX_CREATED_DATE + " " + 
PDate.INSTANCE.getSqlTypeName() +
-") VALUES (?, ?, ?, ?)";
 private static final String CREATE_TABLE =
 "UPSERT INTO " + SYSTEM_CATALOG_SCHEMA + ".\"" + 
SYSTEM_CATALOG_TABLE + "\"( " +
 TENANT_ID + "," +
@@ -2687,14 +2678,6 @@ public class MetaDataClient {
 setAsync.setString(3, tableName);
 setAsync.setDate(4, asyncCreatedDate);
 setAsync.execute();
-} else {
-Date syncCreatedDate = new 
Date(EnvironmentEdgeManager.currentTimeMillis());
-PreparedStatement setSync = 
connection.prepareStatement(SET_INDEX_SYNC_CREATED_DATE);
-setSync.setString(1, tenantIdStr);
-setSync.setString(2, schemaName);
-setSync.setString(3, tableName);
-setSync.setDate(4, syncCreatedDate);
-setSync.execute();
 }
 

[12/50] [abbrv] phoenix git commit: PHOENIX-4737 Use position as column qualifier for APPEND_ONLY_SCHEMA

2018-08-03 Thread vincentpoon
PHOENIX-4737 Use position as column qualifier for APPEND_ONLY_SCHEMA


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

Branch: refs/heads/4.14-HBase-1.3
Commit: a72aad3369789129196cf180da7e757a71034fcb
Parents: f73f98c
Author: James Taylor 
Authored: Sun May 13 17:36:21 2018 -0700
Committer: James Taylor 
Committed: Mon May 14 21:53:35 2018 -0700

--
 .../end2end/ColumnEncodedBytesPropIT.java   | 60 
 .../coprocessor/MetaDataEndpointImpl.java   |  9 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 11 ++--
 3 files changed, 75 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a72aad33/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedBytesPropIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedBytesPropIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedBytesPropIT.java
index 3b129f5..c85ff6e 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedBytesPropIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedBytesPropIT.java
@@ -17,22 +17,29 @@
  */
 package org.apache.phoenix.end2end;
 
+import static 
org.apache.phoenix.query.QueryConstants.ENCODED_CQ_COUNTER_INITIAL_VALUE;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
+import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryConstants;
+import org.apache.phoenix.schema.PColumn;
 import org.apache.phoenix.schema.PTable;
 import org.apache.phoenix.schema.PTable.QualifierEncodingScheme;
 import org.apache.phoenix.schema.PTableKey;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
 import org.junit.Test;
@@ -109,4 +116,57 @@ public class ColumnEncodedBytesPropIT extends 
ParallelStatsDisabledIT {
 } 
}

+@Test
+public void testAppendOnlySchema() throws SQLException {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String dataTableFullName = SchemaUtil.getTableName("", 
generateUniqueName());
+String view1 = SchemaUtil.getTableName("", generateUniqueName());
+String view2 = SchemaUtil.getTableName("", generateUniqueName());
+try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
+Statement stmt = conn.createStatement();
+stmt.execute("CREATE IMMUTABLE TABLE  " + dataTableFullName +
+"  (id varchar not null, v1 varchar " + 
+"  CONSTRAINT pk PRIMARY KEY (id)) COLUMN_ENCODED_BYTES=2, 
APPEND_ONLY_SCHEMA=true, UPDATE_CACHE_FREQUENCY=NEVER");
+stmt.execute("ALTER TABLE  " + dataTableFullName + "  ADD v2 
varchar");
+
+stmt.execute("CREATE VIEW  " + view1 + "(v3 varchar, v4 varchar)" +
+"  AS SELECT * FROM " + dataTableFullName + " WHERE 
v1='a'");
+stmt.execute("CREATE VIEW  " + view2 + "(v3 bigint, v4 integer)" +
+"  AS SELECT * FROM " + dataTableFullName + " WHERE 
v1='b'");
+PTable v1 = PhoenixRuntime.getTable(conn, view1);
+PTable v2 = PhoenixRuntime.getTable(conn, view1);
+assertEquals(v1.getColumns().size(), v2.getColumns().size());
+for (int i = 1; i < v1.getColumns().size(); i++) {
+PColumn c1 = v1.getColumns().get(i);
+PColumn c2 = v2.getColumns().get(i);
+assertEquals(ENCODED_CQ_COUNTER_INITIAL_VALUE + i - 
Math.abs(Short.MIN_VALUE), Bytes.toShort(c1.getColumnQualifierBytes()));
+assertEquals(ENCODED_CQ_COUNTER_INITIAL_VALUE + i - 
Math.abs(Short.MIN_VALUE), Bytes.toShort(c2.getColumnQualifierBytes()));
+}
+
+// add one more column to confirm disallowed now
+try {
+stmt.execute("ALTER TABLE  " + dataTableFullName + "  ADD v5 
varchar");
+fail();
+}
+catch (SQLException e) {
+

[01/50] [abbrv] phoenix git commit: PHOENIX-4733 NPE while running sql through file using psql [Forced Update!]

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.3 f5ce8f7d6 -> 4cab4c270 (forced update)


PHOENIX-4733 NPE while running sql through file using psql


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 7f916652298da0a7e4bca9c29a96f01000636e57
Parents: cc0de5d
Author: Ankit Singhal 
Authored: Wed May 9 14:11:29 2018 -0700
Committer: Ankit Singhal 
Committed: Wed May 9 14:11:29 2018 -0700

--
 .../org/apache/phoenix/log/QueryLoggerUtil.java | 24 ++--
 1 file changed, 17 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7f916652/phoenix-core/src/main/java/org/apache/phoenix/log/QueryLoggerUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/log/QueryLoggerUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/log/QueryLoggerUtil.java
index 2f22931..d5c4878 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/log/QueryLoggerUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/log/QueryLoggerUtil.java
@@ -30,10 +30,14 @@ import com.google.common.collect.ImmutableMap.Builder;
 
 public class QueryLoggerUtil {
 
-public static void logInitialDetails(QueryLogger queryLogger, PName 
tenantId,
-ConnectionQueryServices queryServices, String query, long 
startTime, List bindParameters) {
-queryLogger.log(QueryLogState.STARTED,
-getInitialDetails(tenantId, queryServices, query, startTime, 
bindParameters));
+public static void logInitialDetails(QueryLogger queryLogger, PName 
tenantId, ConnectionQueryServices queryServices,
+String query, long startTime, List bindParameters) {
+try {
+queryLogger.log(QueryLogState.STARTED,
+getInitialDetails(tenantId, queryServices, query, 
startTime, bindParameters));
+} catch (Exception e) {
+// Ignore for now
+}
 
 }
 
@@ -46,15 +50,21 @@ public class QueryLoggerUtil {
 } catch (UnknownHostException e) {
 clientIP = "UnknownHost";
 }
-queryLogBuilder.put(QueryLogInfo.CLIENT_IP_I, clientIP);
-queryLogBuilder.put(QueryLogInfo.QUERY_I, query);
+
+if (clientIP != null) {
+queryLogBuilder.put(QueryLogInfo.CLIENT_IP_I, clientIP);
+}
+if (query != null) {
+queryLogBuilder.put(QueryLogInfo.QUERY_I, query);
+}
 queryLogBuilder.put(QueryLogInfo.START_TIME_I, startTime);
 if (bindParameters != null) {
-queryLogBuilder.put(QueryLogInfo.BIND_PARAMETERS_I, 
StringUtils.join(bindParameters,","));
+queryLogBuilder.put(QueryLogInfo.BIND_PARAMETERS_I, 
StringUtils.join(bindParameters, ","));
 }
 if (tenantId != null) {
 queryLogBuilder.put(QueryLogInfo.TENANT_ID_I, 
tenantId.getString());
 }
+
 queryLogBuilder.put(QueryLogInfo.USER_I, queryServices.getUserName() 
!= null ? queryServices.getUserName()
 : queryServices.getUser().getShortName());
 return queryLogBuilder.build();



[05/50] [abbrv] phoenix git commit: PHOENIX-4685 Properly handle connection caching for Phoenix inside RegionServers-addendum(Rajeshbabu)

2018-08-03 Thread vincentpoon
PHOENIX-4685 Properly handle connection caching for Phoenix inside 
RegionServers-addendum(Rajeshbabu)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 39b92bf9e8d9cae46b1fa230d91ac04a8e49e629
Parents: 72fa874
Author: Rajeshbabu Chintaguntla 
Authored: Fri May 11 23:20:52 2018 +0530
Committer: Rajeshbabu Chintaguntla 
Committed: Fri May 11 23:20:52 2018 +0530

--
 .../src/main/java/org/apache/phoenix/util/ServerUtil.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/39b92bf9/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
index 9190373..891839a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
@@ -346,8 +346,8 @@ public class ServerUtil {
 ClusterConnection connection = null;
 if((connection = connections.get(connectionType)) == null) {
 synchronized (CoprocessorHConnectionTableFactory.class) {
-if(connections.get(connectionType) == null) {
-connection = new CoprocessorHConnection(conf, server);
+if((connection = connections.get(connectionType)) == null) 
{
+connection = new 
CoprocessorHConnection(getTypeSpecificConfiguration(connectionType, conf), 
server);
 connections.put(connectionType, connection);
 return connection;
 }
@@ -405,7 +405,7 @@ public class ServerUtil {
 }
 
 public static Configuration 
getIndexWriterConfigurationWithCustomThreads(Configuration conf) {
-Configuration clonedConfig = PropertiesUtil.cloneConfig(conf);
+Configuration clonedConfig = getIndexWriterConnection(conf);
 setHTableThreads(clonedConfig);
 return clonedConfig;
 }



[49/50] [abbrv] phoenix git commit: Revert "PHOENIX-4790 Addendum to check that query is a point lookup for delete not to run query"

2018-08-03 Thread vincentpoon
Revert "PHOENIX-4790 Addendum to check that query is a point lookup for delete 
not to run query"

This reverts commit ad8867522bc13f5013f3af6202dca3c8ac5dd4d7.


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

Branch: refs/heads/4.14-HBase-1.3
Commit: e95fb2190541857ede83db9ca29698ff47503cd8
Parents: b9fc468
Author: James Taylor 
Authored: Thu Jul 12 19:56:46 2018 -0700
Committer: James Taylor 
Committed: Thu Jul 12 19:56:46 2018 -0700

--
 .../src/main/java/org/apache/phoenix/compile/DeleteCompiler.java  | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e95fb219/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index a214c24..78b2db9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -541,9 +541,6 @@ public class DeleteCompiler {
 Iterator iterator = queryPlans.iterator();
 while (iterator.hasNext()) {
 QueryPlan plan = iterator.next();
-// Must be a point lookup in order to not run a query since
-// we have to have the full key be enumerated.
-noQueryReqd &= plan.getContext().getScanRanges().isPointLookup();
 if (plan.getTableRef().getTable().getIndexType() == 
IndexType.LOCAL) {
 if (!plan.getContext().getDataColumns().isEmpty()) {
 iterator.remove();



[09/50] [abbrv] phoenix git commit: PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG

2018-08-03 Thread vincentpoon
http://git-wip-us.apache.org/repos/asf/phoenix/blob/f73f98c7/phoenix-core/src/main/java/org/apache/phoenix/monitoring/MutationMetricQueue.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/MutationMetricQueue.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/MutationMetricQueue.java
index 3de2be1..1256f5c 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/MutationMetricQueue.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/MutationMetricQueue.java
@@ -27,6 +27,8 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.apache.phoenix.log.LogLevel;
+
 /**
  * Queue that tracks various writes/mutations related phoenix request metrics.
  */
@@ -81,12 +83,16 @@ public class MutationMetricQueue {
  * Class that holds together the various metrics associated with mutations.
  */
 public static class MutationMetric {
-private final CombinableMetric numMutations = new 
CombinableMetricImpl(MUTATION_BATCH_SIZE);
-private final CombinableMetric mutationsSizeBytes = new 
CombinableMetricImpl(MUTATION_BYTES);
-private final CombinableMetric totalCommitTimeForMutations = new 
CombinableMetricImpl(MUTATION_COMMIT_TIME);
-private final CombinableMetric numFailedMutations = new 
CombinableMetricImpl(MUTATION_BATCH_FAILED_SIZE);
-
-public MutationMetric(long numMutations, long mutationsSizeBytes, long 
commitTimeForMutations, long numFailedMutations) {
+private final CombinableMetric numMutations;;
+private final CombinableMetric mutationsSizeBytes;
+private final CombinableMetric totalCommitTimeForMutations;
+private final CombinableMetric numFailedMutations;
+
+public MutationMetric(LogLevel connectionLogLevel, long numMutations, 
long mutationsSizeBytes, long commitTimeForMutations, long numFailedMutations) {
+this.numMutations = 
MetricUtil.getCombinableMetric(connectionLogLevel,MUTATION_BATCH_SIZE);
+this.mutationsSizeBytes 
=MetricUtil.getCombinableMetric(connectionLogLevel,MUTATION_BYTES);
+this.totalCommitTimeForMutations 
=MetricUtil.getCombinableMetric(connectionLogLevel,MUTATION_COMMIT_TIME);
+this.numFailedMutations = 
MetricUtil.getCombinableMetric(connectionLogLevel,MUTATION_BATCH_FAILED_SIZE);
 this.numMutations.change(numMutations);
 this.mutationsSizeBytes.change(mutationsSizeBytes);
 this.totalCommitTimeForMutations.change(commitTimeForMutations);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f73f98c7/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java
index b995267..3121ecd 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java
@@ -27,7 +27,7 @@ import static 
org.apache.phoenix.monitoring.MetricType.WALL_CLOCK_TIME_MS;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.phoenix.monitoring.CombinableMetric.NoOpRequestMetric;
+import org.apache.phoenix.log.LogLevel;
 
 /**
  * Class that represents the overall metrics associated with a query being 
executed by the phoenix.
@@ -42,16 +42,15 @@ public class OverAllQueryMetrics {
 private final CombinableMetric queryFailed;
 private final CombinableMetric cacheRefreshedDueToSplits;
 
-public OverAllQueryMetrics(boolean isMetricsEnabled) {
-queryWatch = new MetricsStopWatch(isMetricsEnabled);
-resultSetWatch = new MetricsStopWatch(isMetricsEnabled);
-numParallelScans = isMetricsEnabled ? new 
CombinableMetricImpl(NUM_PARALLEL_SCANS) : NoOpRequestMetric.INSTANCE;
-wallClockTimeMS = isMetricsEnabled ? new 
CombinableMetricImpl(WALL_CLOCK_TIME_MS) : NoOpRequestMetric.INSTANCE;
-resultSetTimeMS = isMetricsEnabled ? new 
CombinableMetricImpl(RESULT_SET_TIME_MS) : NoOpRequestMetric.INSTANCE;
-queryTimedOut = isMetricsEnabled ? new 
CombinableMetricImpl(QUERY_TIMEOUT_COUNTER) : NoOpRequestMetric.INSTANCE;
-queryFailed = isMetricsEnabled ? new 
CombinableMetricImpl(QUERY_FAILED_COUNTER) : NoOpRequestMetric.INSTANCE;
-cacheRefreshedDueToSplits = isMetricsEnabled ? new 
CombinableMetricImpl(CACHE_REFRESH_SPLITS_COUNTER)
-: NoOpRequestMetric.INSTANCE;
+public OverAllQueryMetrics(LogLevel connectionLogLevel) {
+queryWatch = new 
MetricsStopWatch(WALL_CLOCK_TIME_MS.isLoggingEnabled(connectionLogLevel));
+resultSetWatch = new 

[31/50] [abbrv] phoenix git commit: PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite

2018-08-03 Thread vincentpoon
PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 190ff8401a4b155ccf5a849aced0e1cbade92445
Parents: 2f67e9f
Author: Ankit Singhal 
Authored: Fri Jun 1 14:42:27 2018 -0700
Committer: Ankit Singhal 
Committed: Fri Jun 1 14:42:27 2018 -0700

--
 .../apache/phoenix/end2end/SystemCatalogIT.java | 23 +---
 1 file changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/190ff840/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java
index 7b6a543..6f49518 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java
@@ -18,7 +18,6 @@
 package org.apache.phoenix.end2end;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
@@ -26,14 +25,18 @@ import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.RegionLocator;
+import org.apache.phoenix.query.BaseTest;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.junit.After;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
-public class SystemCatalogIT {
+@Category(NeedsOwnMiniClusterTest.class)
+public class SystemCatalogIT extends BaseTest {
 private HBaseTestingUtility testUtil = null;
 
 @After
@@ -57,13 +60,17 @@ public class SystemCatalogIT {
 TableName systemCatalog = TableName.valueOf("SYSTEM.CATALOG");
 RegionLocator rl = 
testUtil.getConnection().getRegionLocator(systemCatalog);
 assertEquals(rl.getAllRegionLocations().size(), 1);
+try {
+// now attempt to split SYSTEM.CATALOG
+testUtil.getHBaseAdmin().split(systemCatalog);
 
-// now attempt to split SYSTEM.CATALOG
-testUtil.getHBaseAdmin().split(systemCatalog);
-
-// make sure the split finishes (there's no synchronous splitting 
before HBase 2.x)
-testUtil.getHBaseAdmin().disableTable(systemCatalog);
-testUtil.getHBaseAdmin().enableTable(systemCatalog);
+// make sure the split finishes (there's no synchronous splitting 
before HBase 2.x)
+testUtil.getHBaseAdmin().disableTable(systemCatalog);
+testUtil.getHBaseAdmin().enableTable(systemCatalog);
+} catch (DoNotRetryIOException e) {
+// table is not splittable
+assert (e.getMessage().contains("NOT splittable"));
+}
 
 // test again... Must still be exactly one region.
 rl = testUtil.getConnection().getRegionLocator(systemCatalog);



[11/50] [abbrv] phoenix git commit: PHOENIX-3163 Split during global index creation may cause ERROR 201 error (addendum)

2018-08-03 Thread vincentpoon
PHOENIX-3163 Split during global index creation may cause ERROR 201 error 
(addendum)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 5b982f83a1b7f8663d01bdb24353f547b969b91d
Parents: a72aad3
Author: James Taylor 
Authored: Mon May 14 21:50:30 2018 -0700
Committer: James Taylor 
Committed: Mon May 14 21:53:35 2018 -0700

--
 .../main/java/org/apache/phoenix/iterate/TableResultIterator.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5b982f83/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
index 8c80c28..06f612a 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
@@ -226,6 +226,8 @@ public class TableResultIterator implements ResultIterator {
 }
 }
 lastTuple = scanIterator.next();
+} else {
+throw e;
 }
 }
 }



[16/50] [abbrv] phoenix git commit: PHOENIX-4724 Efficient Equi-Depth histogram for streaming data

2018-08-03 Thread vincentpoon
PHOENIX-4724 Efficient Equi-Depth histogram for streaming data


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 5935edd71873f9ec766ffe35000e96d2e48d
Parents: 2015345
Author: Vincent Poon 
Authored: Thu May 3 17:07:27 2018 -0700
Committer: Vincent Poon 
Committed: Fri May 18 10:41:30 2018 -0700

--
 .../phoenix/util/EquiDepthStreamHistogram.java  | 453 +++
 .../util/EquiDepthStreamHistogramTest.java  | 303 +
 2 files changed, 756 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5935edd7/phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java
new file mode 100644
index 000..7649933
--- /dev/null
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java
@@ -0,0 +1,453 @@
+/**
+ * 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.util;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+/**
+ * Equi-Depth histogram based on 
http://web.cs.ucla.edu/~zaniolo/papers/Histogram-EDBT2011-CamReady.pdf,
+ * but without the sliding window - we assume a single window over the entire 
data set.
+ *
+ * Used to generate the bucket boundaries of a histogram where each bucket has 
the same # of items.
+ * This is useful, for example, for pre-splitting an index table, by feeding 
in data from the indexed column.
+ * Works on streaming data - the histogram is dynamically updated for each new 
value.
+ *
+ * Add values by calling addValue(), then at the end computeBuckets() can be 
called to get
+ * the buckets with their bounds.
+ *
+ * Average time complexity: O(log(B x p) + (B x p)/T) = nearly constant
+ * B = number of buckets, p = expansion factor constant, T = # of values
+ *
+ * Space complexity: different from paper since here we keep the blocked bars 
but don't have expiration,
+ *  comes out to basically O(log(T))
+ */
+public class EquiDepthStreamHistogram {
+private static final Log LOG = 
LogFactory.getLog(EquiDepthStreamHistogram.class);
+
+// used in maxSize calculation for each bar
+private static final double MAX_COEF = 1.7;
+// higher expansion factor = better accuracy and worse performance
+private static final short DEFAULT_EXPANSION_FACTOR = 7;
+private int numBuckets;
+private int maxBars;
+@VisibleForTesting
+long totalCount; // number of values - i.e. count across all bars
+@VisibleForTesting
+List bars;
+
+/**
+ * Create a new histogram
+ * @param numBuckets number of buckets, which can be used to get the splits
+ */
+public EquiDepthStreamHistogram(int numBuckets) {
+this(numBuckets, DEFAULT_EXPANSION_FACTOR);
+}
+
+/**
+ * @param numBuckets number of buckets
+ * @param expansionFactor number of bars = expansionFactor * numBuckets
+ * The more bars, the better the accuracy, at the cost of worse performance
+ */
+public EquiDepthStreamHistogram(int numBuckets, int expansionFactor) {
+this.numBuckets = numBuckets;
+this.maxBars = numBuckets * expansionFactor;
+this.bars = new ArrayList<>(maxBars);
+}
+
+/**
+ * Add a new value to the histogram, updating the count for the 
appropriate bucket
+ * @param 

[38/50] [abbrv] phoenix git commit: PHOENIX-4776 Remove creation of .md5 files from dev/make_rc.sh

2018-08-03 Thread vincentpoon
PHOENIX-4776 Remove creation of .md5 files from dev/make_rc.sh


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 6f4a48fe7dca31599f113a75a25ebabcd1eeed55
Parents: 7a7172a
Author: Pedro Boado 
Authored: Mon Jun 11 23:35:56 2018 +0100
Committer: Pedro Boado 
Committed: Mon Jun 11 23:39:57 2018 +0100

--
 dev/make_rc.sh | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6f4a48fe/dev/make_rc.sh
--
diff --git a/dev/make_rc.sh b/dev/make_rc.sh
index 47439d3..f6cd06c 100755
--- a/dev/make_rc.sh
+++ b/dev/make_rc.sh
@@ -106,13 +106,11 @@ function_sign() {
   # if on MAC OS
   if [[ "$OSTYPE" == "darwin"* ]]; then
 gpg2 --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar;
-openssl md5 $phoenix_tar > $phoenix_tar.md5;
 openssl dgst -sha512 $phoenix_tar > $phoenix_tar.sha512;
 openssl dgst -sha256 $phoenix_tar >> $phoenix_tar.sha256;
   # all other OS
   else
 gpg --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar;
-md5sum -b $phoenix_tar > $phoenix_tar.md5;
 sha512sum -b $phoenix_tar > $phoenix_tar.sha512;
 sha256sum -b $phoenix_tar >> $phoenix_tar.sha256;
   fi



[08/50] [abbrv] phoenix git commit: PHOENIX-4726 save sync index build start timestamp

2018-08-03 Thread vincentpoon
PHOENIX-4726 save sync index build start timestamp


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

Branch: refs/heads/4.14-HBase-1.3
Commit: d175c646562c7b3e5e944a81cab38157dc385915
Parents: 09d0b3a
Author: Xu Cang 
Authored: Mon May 7 14:25:42 2018 -0700
Committer: Vincent Poon 
Committed: Mon May 14 10:25:24 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  |  1 +
 .../org/apache/phoenix/schema/MetaDataClient.java  | 17 +
 2 files changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d175c646/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 55de772..2e12ca2 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -316,6 +316,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public static final String ASYNC_CREATED_DATE = "ASYNC_CREATED_DATE";
 public static final String SEQUENCE_TABLE_TYPE = SYSTEM_SEQUENCE_TABLE;
 
+public static final String SYNC_INDEX_CREATED_DATE = 
"SYNC_INDEX_CREATED_DATE";
 public static final String SYSTEM_MUTEX_TABLE_NAME = "MUTEX";
 public static final String SYSTEM_MUTEX_NAME = 
SchemaUtil.getTableName(QueryConstants.SYSTEM_SCHEMA_NAME, 
SYSTEM_MUTEX_TABLE_NAME);
 public static final TableName SYSTEM_MUTEX_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_MUTEX_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d175c646/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 009289b..20ac732 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -74,6 +74,7 @@ import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.RETURN_TYPE;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SALT_BUCKETS;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SORT_ORDER;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.STORE_NULLS;
+import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYNC_INDEX_CREATED_DATE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_FUNCTION_TABLE;
@@ -263,6 +264,14 @@ public class MetaDataClient {
 TABLE_NAME + "," +
 ASYNC_CREATED_DATE + " " + PDate.INSTANCE.getSqlTypeName() 
+
 ") VALUES (?, ?, ?, ?)";
+
+private static final String SET_INDEX_SYNC_CREATED_DATE =
+"UPSERT INTO " + SYSTEM_CATALOG_SCHEMA + ".\"" + 
SYSTEM_CATALOG_TABLE + "\"( " +
+TENANT_ID + "," +
+TABLE_SCHEM + "," +
+TABLE_NAME + "," +
+SYNC_INDEX_CREATED_DATE + " " + 
PDate.INSTANCE.getSqlTypeName() +
+") VALUES (?, ?, ?, ?)";
 private static final String CREATE_TABLE =
 "UPSERT INTO " + SYSTEM_CATALOG_SCHEMA + ".\"" + 
SYSTEM_CATALOG_TABLE + "\"( " +
 TENANT_ID + "," +
@@ -2678,6 +2687,14 @@ public class MetaDataClient {
 setAsync.setString(3, tableName);
 setAsync.setDate(4, asyncCreatedDate);
 setAsync.execute();
+} else {
+Date syncCreatedDate = new 
Date(EnvironmentEdgeManager.currentTimeMillis());
+PreparedStatement setSync = 
connection.prepareStatement(SET_INDEX_SYNC_CREATED_DATE);
+setSync.setString(1, tenantIdStr);
+setSync.setString(2, schemaName);
+setSync.setString(3, tableName);
+setSync.setDate(4, syncCreatedDate);
+setSync.execute();
 }
 
tableMetaData.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond());
 connection.rollback();



[37/50] [abbrv] phoenix git commit: PHOENIX-4772 phoenix.sequence.saltBuckets is not honoured

2018-08-03 Thread vincentpoon
PHOENIX-4772 phoenix.sequence.saltBuckets is not honoured


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 7a7172a4b8d2bce115ad7ceb11888379456ada83
Parents: fef7aa9
Author: Ankit Singhal 
Authored: Thu Jun 7 11:23:16 2018 -0700
Committer: Ankit Singhal 
Committed: Thu Jun 7 11:23:16 2018 -0700

--
 .../org/apache/phoenix/end2end/SequenceIT.java  |  57 +-
 .../phoenix/end2end/SequencePointInTimeIT.java  | 112 +++
 .../query/ConnectionQueryServicesImpl.java  |  13 ++-
 .../query/ConnectionlessQueryServicesImpl.java  |   7 +-
 .../apache/phoenix/query/QueryConstants.java|   2 +
 .../org/apache/phoenix/schema/Sequence.java |   6 +-
 6 files changed, 139 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a7172a4/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceIT.java
index 4cc9628..b76cc4e 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceIT.java
@@ -18,6 +18,8 @@
 
 package org.apache.phoenix.end2end;
 
+import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
+import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TYPE_SEQUENCE;
 import static 
org.apache.phoenix.query.QueryServicesTestImpl.DEFAULT_SEQUENCE_CACHE_SIZE;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
@@ -38,6 +40,7 @@ import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesTestImpl;
 import org.apache.phoenix.schema.SchemaNotFoundException;
 import org.apache.phoenix.schema.SequenceAlreadyExistsException;
 import org.apache.phoenix.schema.SequenceNotFoundException;
@@ -202,6 +205,8 @@ public class SequenceIT extends ParallelStatsDisabledIT {
 String schemaName = getSchemaName(sequenceName);
 
 conn.createStatement().execute("CREATE SEQUENCE " + sequenceName + " 
START WITH 2 INCREMENT BY 4");
+int bucketNum = PhoenixRuntime.getTableNoCache(conn, 
SYSTEM_CATALOG_SCHEMA + "." + TYPE_SEQUENCE).getBucketNum();
+assertEquals("Salt bucket for SYSTEM.SEQUENCE should be test 
default",bucketNum , QueryServicesTestImpl.DEFAULT_SEQUENCE_TABLE_SALT_BUCKETS);
 String query = "SELECT sequence_schema, sequence_name, current_value, 
increment_by FROM \"SYSTEM\".\"SEQUENCE\" WHERE sequence_name='" + 
sequenceNameWithoutSchema + "'";
 ResultSet rs = conn.prepareStatement(query).executeQuery();
 assertTrue(rs.next());
@@ -1406,56 +1411,4 @@ public class SequenceIT extends ParallelStatsDisabledIT {
return tableName.substring(tableName.indexOf(".") + 1, 
tableName.length());
 }
 
-@Test
-public void testPointInTimeSequence() throws Exception {
-String seqName = generateSequenceNameWithSchema(); 
-Properties scnProps = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-scnProps.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(EnvironmentEdgeManager.currentTimeMillis()));
-Connection beforeSeqConn = DriverManager.getConnection(getUrl(), 
scnProps);
-
-ResultSet rs;
-Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(getUrl(), props);
-conn.createStatement().execute("CREATE SEQUENCE " + seqName + "");
-
-try {
-beforeSeqConn.createStatement().executeQuery("SELECT next value 
for " + seqName);
-fail();
-} catch (SequenceNotFoundException e) {
-beforeSeqConn.close();
-}
-
-scnProps.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(EnvironmentEdgeManager.currentTimeMillis()));
-Connection afterSeqConn = DriverManager.getConnection(getUrl(), 
scnProps);
-
-rs = conn.createStatement().executeQuery("SELECT next value for " + 
seqName);
-assertTrue(rs.next());
-assertEquals(1, rs.getInt(1));
-rs = conn.createStatement().executeQuery("SELECT next value for " + 
seqName);
-assertTrue(rs.next());
-assertEquals(2, rs.getInt(1));
-
-

[17/50] [abbrv] phoenix git commit: PHOENIX-4704 Presplit index tables when building asynchronously

2018-08-03 Thread vincentpoon
PHOENIX-4704 Presplit index tables when building asynchronously


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 52304092f5876ab9c1086e954f2c5b0ba875a03e
Parents: 5935edd
Author: Vincent Poon 
Authored: Fri May 18 11:22:26 2018 -0700
Committer: Vincent Poon 
Committed: Fri May 18 16:43:23 2018 -0700

--
 .../org/apache/phoenix/end2end/IndexToolIT.java | 106 +-
 .../phoenix/mapreduce/index/IndexTool.java  | 142 ++-
 2 files changed, 242 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/52304092/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java
--
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 afb6d72..a120aaa 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
@@ -21,12 +21,15 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -34,8 +37,16 @@ import java.util.Properties;
 import java.util.UUID;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.RegionScanner;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.mapreduce.index.IndexTool;
-import org.apache.phoenix.query.BaseTest;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -54,7 +65,7 @@ import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
 @Category(NeedsOwnMiniClusterTest.class)
-public class IndexToolIT extends BaseTest {
+public class IndexToolIT extends ParallelStatsEnabledIT {
 
 private final boolean localIndex;
 private final boolean transactional;
@@ -85,7 +96,7 @@ public class IndexToolIT extends BaseTest {
 }
 
 @BeforeClass
-public static void doSetup() throws Exception {
+public static void setup() throws Exception {
 Map serverProps = Maps.newHashMapWithExpectedSize(2);
 serverProps.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB,
 QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS);
@@ -249,6 +260,86 @@ public class IndexToolIT extends BaseTest {
 }
 }
 
+/**
+ * Test presplitting an index table
+ */
+@Test
+public void testSplitIndex() throws Exception {
+if (localIndex) return; // can't split local indexes
+String schemaName = generateUniqueName();
+String dataTableName = generateUniqueName();
+String dataTableFullName = SchemaUtil.getTableName(schemaName, 
dataTableName);
+final TableName dataTN = TableName.valueOf(dataTableFullName);
+String indexTableName = generateUniqueName();
+String indexTableFullName = SchemaUtil.getTableName(schemaName, 
indexTableName);
+TableName indexTN = TableName.valueOf(indexTableFullName);
+try (Connection conn =
+DriverManager.getConnection(getUrl(), 
PropertiesUtil.deepCopy(TEST_PROPERTIES));
+HBaseAdmin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
+String dataDDL =
+"CREATE TABLE " + dataTableFullName + "(\n"
++ "ID VARCHAR NOT NULL PRIMARY KEY,\n"
++ "\"info\".CAR_NUM VARCHAR(18) NULL,\n"
++ "\"test\".CAR_NUM VARCHAR(18) NULL,\n"
++ "\"info\".CAP_DATE VARCHAR NULL,\n" + 
"\"info\".ORG_ID BIGINT NULL,\n"
++ "\"info\".ORG_NAME VARCHAR(255) NULL\n" + ") 
COLUMN_ENCODED_BYTES = 0";

[44/50] [abbrv] phoenix git commit: PHOENIX-3383 Comparison between descending row keys used in RVC is reverse

2018-08-03 Thread vincentpoon
http://git-wip-us.apache.org/repos/asf/phoenix/blob/dac9dc40/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
index 87f00e4..a5287cb 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.compile;
 
-import static java.util.Collections.singletonList;
-
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -27,10 +25,14 @@ import java.util.Comparator;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
 import java.util.Set;
 
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.expression.AndExpression;
 import org.apache.phoenix.expression.BaseExpression;
 import 
org.apache.phoenix.expression.BaseExpression.ExpressionComparabilityWrapper;
@@ -61,7 +63,6 @@ import org.apache.phoenix.schema.PTable;
 import org.apache.phoenix.schema.RowKeySchema;
 import org.apache.phoenix.schema.SaltingUtil;
 import org.apache.phoenix.schema.SortOrder;
-import org.apache.phoenix.schema.ValueSchema.Field;
 import org.apache.phoenix.schema.tuple.Tuple;
 import org.apache.phoenix.schema.types.PChar;
 import org.apache.phoenix.schema.types.PDataType;
@@ -74,8 +75,11 @@ import org.apache.phoenix.util.SchemaUtil;
 
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 
+import edu.umd.cs.findbugs.annotations.NonNull;
+
 
 /**
  *
@@ -115,6 +119,7 @@ public class WhereOptimizer {
RowKeySchema schema = table.getRowKeySchema();
boolean isMultiTenant = tenantId != null && table.isMultiTenant();
boolean isSharedIndex = table.getViewIndexId() != null;
+   ImmutableBytesWritable ptr = context.getTempPtr();

if (isMultiTenant) {
 tenantIdBytes = ScanUtil.getTenantIdBytes(schema, isSalted, 
tenantId, isSharedIndex);
@@ -158,31 +163,13 @@ public class WhereOptimizer {
 
 int pkPos = 0;
 int nPKColumns = table.getPKColumns().size();
-int[] slotSpan = new int[nPKColumns];
+int[] slotSpanArray = new int[nPKColumns];
 List> cnf = 
Lists.newArrayListWithExpectedSize(schema.getMaxFields());
-KeyRange minMaxRange = keySlots.getMinMaxRange();
-if (minMaxRange == null) {
-minMaxRange = KeyRange.EVERYTHING_RANGE;
-}
-boolean hasMinMaxRange = (minMaxRange != KeyRange.EVERYTHING_RANGE);
-int minMaxRangeOffset = 0;
-byte[] minMaxRangePrefix = null;
 boolean hasViewIndex = table.getViewIndexId() != null;
-if (hasMinMaxRange) {
-int minMaxRangeSize = (isSalted ? SaltingUtil.NUM_SALTING_BYTES : 
0)
-+ (isMultiTenant ? tenantIdBytes.length + 1 : 0)
-+ (hasViewIndex ? 
MetaDataUtil.getViewIndexIdDataType().getByteSize() : 0);
-minMaxRangePrefix = new byte[minMaxRangeSize];
-}
-
-Iterator iterator = keySlots.iterator();
+Iterator iterator = 
keySlots.getSlots().iterator();
 // Add placeholder for salt byte ranges
 if (isSalted) {
 cnf.add(SALT_PLACEHOLDER);
-if (hasMinMaxRange) {
-   System.arraycopy(SALT_PLACEHOLDER.get(0).getLowerRange(), 
0, minMaxRangePrefix, minMaxRangeOffset, SaltingUtil.NUM_SALTING_BYTES);
-   minMaxRangeOffset += SaltingUtil.NUM_SALTING_BYTES;
-}
 // Increment the pkPos, as the salt column is in the row schema
 // Do not increment the iterator, though, as there will never be
 // an expression in the keySlots for the salt column
@@ -194,35 +181,17 @@ public class WhereOptimizer {
 if (hasViewIndex) {
 byte[] viewIndexBytes = 
MetaDataUtil.getViewIndexIdDataType().toBytes(table.getViewIndexId());
 KeyRange indexIdKeyRange = KeyRange.getKeyRange(viewIndexBytes);
-cnf.add(singletonList(indexIdKeyRange));
-if (hasMinMaxRange) {
-System.arraycopy(viewIndexBytes, 0, minMaxRangePrefix, 
minMaxRangeOffset, viewIndexBytes.length);
-minMaxRangeOffset += viewIndexBytes.length;
-}
+cnf.add(Collections.singletonList(indexIdKeyRange));
 pkPos++;
 }
 
 // Add tenant data isolation for 

[10/50] [abbrv] phoenix git commit: PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG

2018-08-03 Thread vincentpoon
PHOENIX-4701 Write client-side metrics asynchronously to SYSTEM.LOG


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

Branch: refs/heads/4.14-HBase-1.3
Commit: f73f98c7a77fbe7e41930fc23b9fa3850fc0d260
Parents: d175c64
Author: Ankit Singhal 
Authored: Mon May 14 13:37:53 2018 -0700
Committer: Ankit Singhal 
Committed: Mon May 14 13:37:53 2018 -0700

--
 bin/hbase-site.xml  |   4 +
 .../apache/phoenix/end2end/QueryLoggerIT.java   |  76 ++
 .../phoenix/monitoring/PhoenixMetricsIT.java|  28 ++--
 .../phoenix/compile/StatementContext.java   |   4 +-
 .../apache/phoenix/execute/MutationState.java   |   4 +-
 .../phoenix/iterate/ChunkedResultIterator.java  |   2 +-
 .../phoenix/iterate/ParallelIterators.java  |   3 +-
 .../apache/phoenix/iterate/SerialIterators.java |   3 +-
 .../apache/phoenix/jdbc/PhoenixConnection.java  |  10 +-
 .../apache/phoenix/jdbc/PhoenixResultSet.java   |  54 ---
 .../apache/phoenix/jdbc/PhoenixStatement.java   |  21 ++-
 .../java/org/apache/phoenix/log/LogLevel.java   |   2 +-
 .../java/org/apache/phoenix/log/LogWriter.java  |   6 +-
 .../org/apache/phoenix/log/QueryLogInfo.java|  38 +++--
 .../org/apache/phoenix/log/QueryLogState.java   |  22 ---
 .../org/apache/phoenix/log/QueryLogger.java |  74 +++---
 .../org/apache/phoenix/log/QueryLoggerUtil.java |  62 
 .../org/apache/phoenix/log/QueryStatus.java |  22 +++
 .../org/apache/phoenix/log/RingBufferEvent.java |  38 +++--
 .../phoenix/log/RingBufferEventTranslator.java  |  21 ++-
 .../org/apache/phoenix/log/TableLogWriter.java  | 144 +++
 .../phoenix/mapreduce/PhoenixRecordReader.java  |  13 +-
 .../phoenix/monitoring/MemoryMetricsHolder.java |   1 -
 .../apache/phoenix/monitoring/MetricType.java   | 123 ++--
 .../apache/phoenix/monitoring/MetricUtil.java   |  30 
 .../phoenix/monitoring/MutationMetricQueue.java |  18 ++-
 .../phoenix/monitoring/OverAllQueryMetrics.java |  21 ++-
 .../phoenix/monitoring/ReadMetricQueue.java |  27 ++--
 .../phoenix/monitoring/ScanMetricsHolder.java   |   9 +-
 .../monitoring/SpoolingMetricsHolder.java   |   3 +-
 .../monitoring/TaskExecutionMetricsHolder.java  |   4 +-
 .../query/ConnectionQueryServicesImpl.java  |   7 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   7 +-
 .../apache/phoenix/query/QueryConstants.java| 124 ++--
 .../org/apache/phoenix/query/QueryServices.java |   1 +
 .../phoenix/query/QueryServicesOptions.java |   1 +
 .../apache/phoenix/schema/MetaDataClient.java   |   2 +-
 .../java/org/apache/phoenix/util/QueryUtil.java |   7 +-
 .../org/apache/phoenix/util/SchemaUtil.java |   4 +
 .../iterate/SpoolingResultIteratorTest.java |   7 +-
 .../hive/mapreduce/PhoenixRecordReader.java |   3 +-
 41 files changed, 570 insertions(+), 480 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f73f98c7/bin/hbase-site.xml
--
diff --git a/bin/hbase-site.xml b/bin/hbase-site.xml
index 0ab9fd8..2f360e2 100644
--- a/bin/hbase-site.xml
+++ b/bin/hbase-site.xml
@@ -24,4 +24,8 @@
 hbase.regionserver.wal.codec
 org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
   
+  
+phoenix.log.level
+DEBUG
+  
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f73f98c7/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryLoggerIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryLoggerIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryLoggerIT.java
index 940ba6f..618d7d9 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryLoggerIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryLoggerIT.java
@@ -31,7 +31,6 @@ import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.START_TIME;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_LOG_TABLE;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TENANT_ID;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TOTAL_EXECUTION_TIME;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.USER;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -53,8 +52,10 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixDriver;
 import org.apache.phoenix.jdbc.PhoenixResultSet;
 import 

[23/50] [abbrv] phoenix git commit: PHOENIX-2715 Query Log (addendum 2)

2018-08-03 Thread vincentpoon
PHOENIX-2715 Query Log (addendum 2)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 81f887584e3e4c86e487e0c3ed8f4729b1283f1f
Parents: f3e49f3
Author: Ankit Singhal 
Authored: Thu May 24 22:35:16 2018 -0700
Committer: Ankit Singhal 
Committed: Thu May 24 22:35:16 2018 -0700

--
 bin/hbase-site.xml | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/81f88758/bin/hbase-site.xml
--
diff --git a/bin/hbase-site.xml b/bin/hbase-site.xml
index 2f360e2..0ab9fd8 100644
--- a/bin/hbase-site.xml
+++ b/bin/hbase-site.xml
@@ -24,8 +24,4 @@
 hbase.regionserver.wal.codec
 org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
   
-  
-phoenix.log.level
-DEBUG
-  
 



[14/50] [abbrv] phoenix git commit: PHOENIX-4685 Properly handle connection caching for Phoenix inside RegionServers(addendum) (James Taylor)

2018-08-03 Thread vincentpoon
PHOENIX-4685 Properly handle connection caching for Phoenix inside 
RegionServers(addendum) (James Taylor)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 52432db457303583105c8b74375e5415327d7975
Parents: d51353a
Author: Ankit Singhal 
Authored: Wed May 16 17:37:36 2018 -0700
Committer: Ankit Singhal 
Committed: Wed May 16 17:37:36 2018 -0700

--
 .../org/apache/phoenix/util/ServerUtil.java | 23 +++-
 .../java/org/apache/phoenix/query/BaseTest.java | 13 +++
 2 files changed, 26 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/52432db4/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
index 891839a..09701c5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
@@ -31,8 +31,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.annotation.concurrent.GuardedBy;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -43,15 +41,14 @@ import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.CoprocessorHConnection;
-import org.apache.hadoop.hbase.client.HConnection;
 import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.HTablePool;
 import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
 import 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerIndexRpcControllerFactory;
-import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.coprocessor.HashJoinCacheNotFoundException;
@@ -318,8 +315,8 @@ public class ServerUtil {
 }
 
 @Override
-public synchronized void shutdown() {
-// We need not close the cached connections as they are shared 
across the server.
+public void shutdown() {
+ConnectionFactory.shutdown();
 }
 
 @Override
@@ -342,6 +339,20 @@ public class ServerUtil {
 private static Map connections =
 new ConcurrentHashMap();
 
+public static void shutdown() {
+synchronized (CoprocessorHConnectionTableFactory.class) {
+for (ClusterConnection connection : connections.values()) {
+try {
+connection.close();
+} catch (IOException e) {
+LOG.warn("Unable to close coprocessor connection", e);
+}
+}
+connections.clear();
+}
+}
+
+
 public static ClusterConnection getConnection(final ConnectionType 
connectionType, final Configuration conf, final HRegionServer server) throws 
IOException {
 ClusterConnection connection = null;
 if((connection = connections.get(connectionType)) == null) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52432db4/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 0ea63e7..f49d291 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -137,6 +137,7 @@ import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
+import org.apache.phoenix.util.ServerUtil.ConnectionFactory;
 import org.junit.ClassRule;
 import org.junit.rules.TemporaryFolder;
 import org.slf4j.Logger;
@@ -477,10 

[18/50] [abbrv] phoenix git commit: PHOENIX-4742 DistinctPrefixFilter potentially seeks to lesser key when descending or null value

2018-08-03 Thread vincentpoon
PHOENIX-4742 DistinctPrefixFilter potentially seeks to lesser key when 
descending or null value


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

Branch: refs/heads/4.14-HBase-1.3
Commit: d7533f70212ec9cdb664b8f7d6d3814e3ec6e7f5
Parents: 5230409
Author: James Taylor 
Authored: Fri May 18 08:46:38 2018 -0700
Committer: James Taylor 
Committed: Fri May 18 17:07:03 2018 -0700

--
 .../org/apache/phoenix/end2end/OrderByIT.java   | 45 +---
 .../GroupedAggregateRegionObserver.java |  4 +-
 .../phoenix/filter/DistinctPrefixFilter.java| 31 ++
 .../apache/phoenix/filter/SkipScanFilter.java   |  4 +-
 .../org/apache/phoenix/schema/RowKeySchema.java | 20 +
 5 files changed, 61 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d7533f70/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
index 9d6a450..578a3af 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
@@ -27,10 +27,10 @@ import static org.apache.phoenix.util.TestUtil.ROW7;
 import static org.apache.phoenix.util.TestUtil.ROW8;
 import static org.apache.phoenix.util.TestUtil.ROW9;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.apache.phoenix.util.TestUtil.assertResultSet;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.apache.phoenix.util.TestUtil.assertResultSet;
 
 import java.sql.Connection;
 import java.sql.Date;
@@ -663,7 +663,6 @@ public class OrderByIT extends ParallelStatsDisabledIT {
 conn = DriverManager.getConnection(getUrl(), props);
 
 String tableName=generateUniqueName();
-conn.createStatement().execute("DROP TABLE if exists "+tableName);
 String sql="CREATE TABLE "+tableName+" ( "+
 "ORGANIZATION_ID VARCHAR,"+
 "CONTAINER_ID VARCHAR,"+
@@ -871,26 +870,25 @@ public class OrderByIT extends ParallelStatsDisabledIT {
 }
 
 @Test
-public void testOrderByReverseOptimizationBug3491() throws Exception {
+public void testOrderByReverseOptimization() throws Exception {
 for(boolean salted: new boolean[]{true,false}) {
-doTestOrderByReverseOptimizationBug3491(salted,true,true,true);
-doTestOrderByReverseOptimizationBug3491(salted,true,true,false);
-doTestOrderByReverseOptimizationBug3491(salted,true,false,true);
-doTestOrderByReverseOptimizationBug3491(salted,true,false,false);
-doTestOrderByReverseOptimizationBug3491(salted,false,true,true);
-doTestOrderByReverseOptimizationBug3491(salted,false,true,false);
-doTestOrderByReverseOptimizationBug3491(salted,false,false,true);
-doTestOrderByReverseOptimizationBug3491(salted,false,false,false);
+doTestOrderByReverseOptimization(salted,true,true,true);
+doTestOrderByReverseOptimization(salted,true,true,false);
+doTestOrderByReverseOptimization(salted,true,false,true);
+doTestOrderByReverseOptimization(salted,true,false,false);
+doTestOrderByReverseOptimization(salted,false,true,true);
+doTestOrderByReverseOptimization(salted,false,true,false);
+doTestOrderByReverseOptimization(salted,false,false,true);
+doTestOrderByReverseOptimization(salted,false,false,false);
 }
 }
 
-private void doTestOrderByReverseOptimizationBug3491(boolean 
salted,boolean desc1,boolean desc2,boolean desc3) throws Exception {
+private void doTestOrderByReverseOptimization(boolean salted,boolean 
desc1,boolean desc2,boolean desc3) throws Exception {
 Connection conn = null;
 try {
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 conn = DriverManager.getConnection(getUrl(), props);
 String tableName=generateUniqueName();
-conn.createStatement().execute("DROP TABLE if exists "+tableName);
 String sql="CREATE TABLE "+tableName+" ( "+
 "ORGANIZATION_ID INTEGER NOT NULL,"+
 "CONTAINER_ID INTEGER NOT NULL,"+
@@ -965,26 +963,25 @@ public class OrderByIT extends ParallelStatsDisabledIT {
 }
 
 

[04/50] [abbrv] phoenix git commit: PHOENIX-4734 SQL Query with an RVC expression lexographically higher than all values in an OR clause causes query to blow up

2018-08-03 Thread vincentpoon
PHOENIX-4734 SQL Query with an RVC expression lexographically higher than all 
values in an OR clause causes query to blow up


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 72fa8749eb443b6fb9cb6436b06891642eff0440
Parents: 5dc873d
Author: Thomas D'Silva 
Authored: Thu May 10 16:30:36 2018 -0700
Committer: Thomas D'Silva 
Committed: Fri May 11 09:33:35 2018 -0700

--
 .../phoenix/end2end/RowValueConstructorIT.java  | 120 +++
 .../org/apache/phoenix/compile/ScanRanges.java  |   5 +
 2 files changed, 125 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/72fa8749/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
index df7603a..fb04261 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
@@ -48,6 +48,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Timestamp;
+import java.util.List;
 import java.util.Properties;
 
 import org.apache.phoenix.util.DateUtil;
@@ -57,6 +58,9 @@ import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.SchemaUtil;
 import org.junit.Test;
 
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
+
 
 public class RowValueConstructorIT extends ParallelStatsDisabledIT {
 
@@ -1646,4 +1650,120 @@ public class RowValueConstructorIT extends 
ParallelStatsDisabledIT {
 assertEquals("value", rs.getString(3));
 assertFalse(rs.next());
 }
+
+@Test
+/**
+ * Verifies that a query with a RVC expression lexographically higher than 
all values in an OR
+ * clause causes query works see PHOENIX-4734
+ */
+public void testRVCWithAndClause() throws Exception {
+final int numItemsInClause = 5;
+Properties tenantProps = new Properties();
+tenantProps.setProperty(PhoenixRuntime.TENANT_ID_ATTRIB, "tenant1");
+String fullTableName = SchemaUtil.getTableName("S", "T_" + 
generateUniqueName());
+String fullViewName = SchemaUtil.getTableName("S", "V_" + 
generateUniqueName());
+try (Connection tenantConn = DriverManager.getConnection(getUrl(), 
tenantProps)) {
+tenantConn.setAutoCommit(false);
+createBaseTableAndTenantView(tenantConn, fullTableName, 
fullViewName);
+loadDataIntoTenantView(tenantConn, fullViewName);
+List objectIdsList =
+selectObjectIdsForInClause(tenantConn, fullViewName, 
numItemsInClause);
+StringBuilder querySb = generateQueryToTest(numItemsInClause, 
fullViewName);
+PreparedStatement ps = 
tenantConn.prepareStatement(querySb.toString());
+int numbBindVarsSet = 0;
+String objectId = null;
+for (int i = 0; i < numItemsInClause; i++) {
+objectId = objectIdsList.get(i);
+ps.setString((i + 1), objectId);
+numbBindVarsSet++;
+}
+assertEquals(numItemsInClause, numbBindVarsSet);
+assertEquals("v1000", objectId);
+ps.setString(numItemsInClause + 1, "z00");
+ps.setString(numItemsInClause + 2, "v1000"); // This value must 
match or be
+ // lexographically 
higher than the highest
+ // value in the IN 
clause
+// Query should execute and return 0 results
+ResultSet rs = ps.executeQuery();
+assertFalse(
+"Query should return no results as IN clause and RVC clause 
are disjoint sets",
+rs.next());
+}
+}
+
+private StringBuilder generateQueryToTest(int numItemsInClause, String 
fullViewName) {
+StringBuilder querySb =
+new StringBuilder("SELECT OBJECT_ID,OBJECT_DATA2,OBJECT_DATA 
FROM " + fullViewName);
+querySb.append(" WHERE ((");
+List orClauses = Lists.newArrayList();
+for (int i = 1; i < (numItemsInClause + 1); i++) {
+orClauses.add("OBJECT_ID = ?");
+}
+querySb.append(Joiner.on(" OR ").join(orClauses));
+querySb.append(") AND (KEY_PREFIX,OBJECT_ID) >  (?,?)) ORDER BY 

[02/50] [abbrv] phoenix git commit: PHOENIX-3163 Split during global index creation may cause ERROR 201 error (Sergey Soldatov)

2018-08-03 Thread vincentpoon
PHOENIX-3163 Split during global index creation may cause ERROR 201 error 
(Sergey Soldatov)


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

Branch: refs/heads/4.14-HBase-1.3
Commit: c27418b3089bd92f2056ef208eeca153b7779b7b
Parents: 7f91665
Author: James Taylor 
Authored: Thu May 10 12:31:58 2018 -0700
Committer: James Taylor 
Committed: Thu May 10 13:14:01 2018 -0700

--
 .../phoenix/compile/StatementContext.java   |  9 +++
 .../apache/phoenix/compile/UpsertCompiler.java  |  1 +
 .../phoenix/iterate/TableResultIterator.java| 71 +++-
 3 files changed, 50 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c27418b3/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
index 3e5c8f2..3ea5dd5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/StatementContext.java
@@ -85,6 +85,7 @@ public class StatementContext {
 private final ReadMetricQueue readMetricsQueue;
 private final OverAllQueryMetrics overAllQueryMetrics;
 private QueryLogger queryLogger;
+private boolean isClientSideUpsertSelect;
 
 public StatementContext(PhoenixStatement statement) {
 this(statement, new Scan());
@@ -316,5 +317,13 @@ public class StatementContext {
 public QueryLogger getQueryLogger() {
 return queryLogger;
 }
+
+public boolean isClientSideUpsertSelect() {
+return isClientSideUpsertSelect;
+}
+
+public void setClientSideUpsertSelect(boolean isClientSideUpsertSelect) {
+this.isClientSideUpsertSelect = isClientSideUpsertSelect;
+}
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c27418b3/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
index 22119a3..30f0c18 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
@@ -1252,6 +1252,7 @@ public class UpsertCompiler {
 this.useServerTimestamp = useServerTimestamp;
 this.maxSize = maxSize;
 this.maxSizeBytes = maxSizeBytes;
+queryPlan.getContext().setClientSideUpsertSelect(true);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c27418b3/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
index f6902cc..8c80c28 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.cache.ServerCacheClient;
 import org.apache.phoenix.cache.ServerCacheClient.ServerCache;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.coprocessor.HashJoinCacheNotFoundException;
@@ -92,7 +91,7 @@ public class TableResultIterator implements ResultIterator {
 
 @GuardedBy("renewLeaseLock")
 private long renewLeaseTime = 0;
-
+
 private final Lock renewLeaseLock = new ReentrantLock();
 
 private int retry;
@@ -114,12 +113,12 @@ public class TableResultIterator implements 
ResultIterator {
 public static enum RenewLeaseStatus {
 RENEWED, NOT_RENEWED, CLOSED, UNINITIALIZED, THRESHOLD_NOT_REACHED, 
LOCK_NOT_ACQUIRED, NOT_SUPPORTED
 };
-
+
 public TableResultIterator(MutationState mutationState, Scan scan, 
ScanMetricsHolder scanMetricsHolder,
 long renewLeaseThreshold, QueryPlan plan, ParallelScanGrouper 
scanGrouper) throws SQLException {
 this(mutationState, scan, scanMetricsHolder, renewLeaseThreshold, 

[06/50] [abbrv] phoenix git commit: PHOENIX-4726 save index build timestamp -- for SYNC case only

2018-08-03 Thread vincentpoon
PHOENIX-4726 save index build timestamp -- for SYNC case only


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 7ebba49d000bb221a8de45e70b4c0afb3b9355a3
Parents: 39b92bf
Author: Vincent Poon 
Authored: Mon May 14 10:10:32 2018 -0700
Committer: Vincent Poon 
Committed: Mon May 14 10:11:48 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  |  1 +
 .../org/apache/phoenix/schema/MetaDataClient.java  | 17 +
 2 files changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7ebba49d/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 55de772..2e12ca2 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -316,6 +316,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public static final String ASYNC_CREATED_DATE = "ASYNC_CREATED_DATE";
 public static final String SEQUENCE_TABLE_TYPE = SYSTEM_SEQUENCE_TABLE;
 
+public static final String SYNC_INDEX_CREATED_DATE = 
"SYNC_INDEX_CREATED_DATE";
 public static final String SYSTEM_MUTEX_TABLE_NAME = "MUTEX";
 public static final String SYSTEM_MUTEX_NAME = 
SchemaUtil.getTableName(QueryConstants.SYSTEM_SCHEMA_NAME, 
SYSTEM_MUTEX_TABLE_NAME);
 public static final TableName SYSTEM_MUTEX_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_MUTEX_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7ebba49d/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 009289b..20ac732 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -74,6 +74,7 @@ import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.RETURN_TYPE;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SALT_BUCKETS;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SORT_ORDER;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.STORE_NULLS;
+import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYNC_INDEX_CREATED_DATE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_FUNCTION_TABLE;
@@ -263,6 +264,14 @@ public class MetaDataClient {
 TABLE_NAME + "," +
 ASYNC_CREATED_DATE + " " + PDate.INSTANCE.getSqlTypeName() 
+
 ") VALUES (?, ?, ?, ?)";
+
+private static final String SET_INDEX_SYNC_CREATED_DATE =
+"UPSERT INTO " + SYSTEM_CATALOG_SCHEMA + ".\"" + 
SYSTEM_CATALOG_TABLE + "\"( " +
+TENANT_ID + "," +
+TABLE_SCHEM + "," +
+TABLE_NAME + "," +
+SYNC_INDEX_CREATED_DATE + " " + 
PDate.INSTANCE.getSqlTypeName() +
+") VALUES (?, ?, ?, ?)";
 private static final String CREATE_TABLE =
 "UPSERT INTO " + SYSTEM_CATALOG_SCHEMA + ".\"" + 
SYSTEM_CATALOG_TABLE + "\"( " +
 TENANT_ID + "," +
@@ -2678,6 +2687,14 @@ public class MetaDataClient {
 setAsync.setString(3, tableName);
 setAsync.setDate(4, asyncCreatedDate);
 setAsync.execute();
+} else {
+Date syncCreatedDate = new 
Date(EnvironmentEdgeManager.currentTimeMillis());
+PreparedStatement setSync = 
connection.prepareStatement(SET_INDEX_SYNC_CREATED_DATE);
+setSync.setString(1, tenantIdStr);
+setSync.setString(2, schemaName);
+setSync.setString(3, tableName);
+setSync.setDate(4, syncCreatedDate);
+setSync.execute();
 }
 
tableMetaData.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond());
 connection.rollback();



[1/2] phoenix git commit: PHOENIX-4797 file not found or file exist exception when create global index use -snapshot option

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-0.98 fe06cacc1 -> 76f242aec


PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


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

Branch: refs/heads/4.14-HBase-0.98
Commit: 95b579948127ae857fbffede47a0ab7a0b7c42c2
Parents: fe06cac
Author: 492066199 <492066...@qq.com>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Vincent Poon 
Committed: Fri Aug 3 11:17:34 2018 -0400

--
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/95b57994/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index 891a1f7..29e5cdd 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -42,6 +42,7 @@ import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.UUID;
 
 public class TableSnapshotResultIterator implements ResultIterator {
 
@@ -68,7 +69,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
 this.scan = scan;
 this.scanMetrics = scanMetrics;
 this.scanIterator = UNINITIALIZED_SCANNER;
-this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+UUID.randomUUID().toString());
 this.snapshotName = configuration.get(
 PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
 this.rootDir = FSUtils.getRootDir(configuration);



[2/2] phoenix git commit: PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace table name, webapp path, column names) and traceserver.py

2018-08-03 Thread vincentpoon
PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace 
table name, webapp path, column names) and traceserver.py

Closes #311

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-0.98
Commit: 76f242aec8d86d8374b80ba845b09e0252fb7efd
Parents: 95b5799
Author: Vitaly Monastyrev 
Authored: Tue Jul 24 12:14:12 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 11:17:37 2018 -0400

--
 bin/traceserver.py  |  6 +-
 .../apache/phoenix/tracingwebapp/http/Main.java | 13 +--
 .../tracingwebapp/http/TraceServlet.java| 87 +++-
 3 files changed, 62 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/76f242ae/bin/traceserver.py
--
diff --git a/bin/traceserver.py b/bin/traceserver.py
index 665099e..62e168c 100755
--- a/bin/traceserver.py
+++ b/bin/traceserver.py
@@ -116,8 +116,10 @@ else:
 
 #" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " 
+ \
 #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s $PHOENIX_OPTS ' + \
-'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s  ' + \
+'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + \
+phoenix_utils.phoenix_client_jar + os.pathsep + 
phoenix_utils.phoenix_queryserver_jar + \
+os.pathsep + phoenix_utils.hadoop_classpath + \
 " -Dproc_phoenixtraceserver" + \
 " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, 
"log4j.properties") + \
 " -Dpsql.root.logger=%(root_logger)s" + \

http://git-wip-us.apache.org/repos/asf/phoenix/blob/76f242ae/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
index 5875fc1..249f8e6 100755
--- 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
+++ 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
@@ -47,6 +47,7 @@ public final class Main extends Configured implements Tool {
 public static final String TRACE_SERVER_HTTP_JETTY_HOME_KEY =
 "phoenix.traceserver.http.home";
 public static final String DEFAULT_HTTP_HOME = "/";
+public static final String DEFAULT_WEBAPP_DIR_LOCATION = "src/main/webapp";
 
 public static void main(String[] args) throws Exception {
 int ret = ToolRunner.run(HBaseConfiguration.create(), new Main(), 
args);
@@ -62,15 +63,17 @@ public final class Main extends Configured implements Tool {
 final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY,
 DEFAULT_HTTP_HOME);
 //setting up the embedded server
-ProtectionDomain domain = Main.class.getProtectionDomain();
-URL location = domain.getCodeSource().getLocation();
-String webappDirLocation = location.toString().split("target")[0] 
+"src/main/webapp";
 Server server = new Server(port);
 WebAppContext root = new WebAppContext();
 
+URL webAppDir = 
Thread.currentThread().getContextClassLoader().getResource(DEFAULT_WEBAPP_DIR_LOCATION);
+if (webAppDir == null) {
+throw new RuntimeException(String.format("No %s directory was 
found into the JAR file", DEFAULT_WEBAPP_DIR_LOCATION));
+}
+
 root.setContextPath(home);
-root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
-root.setResourceBase(webappDirLocation);
+root.setDescriptor(DEFAULT_WEBAPP_DIR_LOCATION + "/WEB-INF/web.xml");
+root.setResourceBase(webAppDir.toURI().toString());
 root.setParentLoaderPriority(true);
 server.setHandler(root);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/76f242ae/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
 

[2/2] phoenix git commit: PHOENIX-4797 file not found or file exist exception when create global index use -snapshot option

2018-08-03 Thread vincentpoon
PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


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

Branch: refs/heads/4.14-HBase-1.1
Commit: 106286cb492e0e6908ad0327adf9ba247d1a83d8
Parents: c8d46e0
Author: 492066199 <492066...@qq.com>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Vincent Poon 
Committed: Fri Aug 3 11:17:05 2018 -0400

--
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/106286cb/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index 1936ccb..ca8abb9 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -43,6 +43,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.UUID;
 
 public class TableSnapshotResultIterator implements ResultIterator {
 
@@ -69,7 +70,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
 this.scan = scan;
 this.scanMetricsHolder = scanMetricsHolder;
 this.scanIterator = UNINITIALIZED_SCANNER;
-this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+UUID.randomUUID().toString());
 this.snapshotName = configuration.get(
 PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
 this.rootDir = FSUtils.getRootDir(configuration);



[1/2] phoenix git commit: PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace table name, webapp path, column names) and traceserver.py

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.1 0c3aa09fc -> 106286cb4


PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace 
table name, webapp path, column names) and traceserver.py

Closes #311

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-1.1
Commit: c8d46e0cc95228c7b2fc39227f186e71b915815d
Parents: 0c3aa09
Author: Vitaly Monastyrev 
Authored: Tue Jul 24 12:14:12 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 11:17:01 2018 -0400

--
 bin/traceserver.py  |  6 +-
 .../apache/phoenix/tracingwebapp/http/Main.java | 13 +--
 .../tracingwebapp/http/TraceServlet.java| 87 +++-
 3 files changed, 62 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c8d46e0c/bin/traceserver.py
--
diff --git a/bin/traceserver.py b/bin/traceserver.py
index 665099e..62e168c 100755
--- a/bin/traceserver.py
+++ b/bin/traceserver.py
@@ -116,8 +116,10 @@ else:
 
 #" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " 
+ \
 #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s $PHOENIX_OPTS ' + \
-'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s  ' + \
+'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + \
+phoenix_utils.phoenix_client_jar + os.pathsep + 
phoenix_utils.phoenix_queryserver_jar + \
+os.pathsep + phoenix_utils.hadoop_classpath + \
 " -Dproc_phoenixtraceserver" + \
 " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, 
"log4j.properties") + \
 " -Dpsql.root.logger=%(root_logger)s" + \

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c8d46e0c/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
index 5875fc1..249f8e6 100755
--- 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
+++ 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
@@ -47,6 +47,7 @@ public final class Main extends Configured implements Tool {
 public static final String TRACE_SERVER_HTTP_JETTY_HOME_KEY =
 "phoenix.traceserver.http.home";
 public static final String DEFAULT_HTTP_HOME = "/";
+public static final String DEFAULT_WEBAPP_DIR_LOCATION = "src/main/webapp";
 
 public static void main(String[] args) throws Exception {
 int ret = ToolRunner.run(HBaseConfiguration.create(), new Main(), 
args);
@@ -62,15 +63,17 @@ public final class Main extends Configured implements Tool {
 final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY,
 DEFAULT_HTTP_HOME);
 //setting up the embedded server
-ProtectionDomain domain = Main.class.getProtectionDomain();
-URL location = domain.getCodeSource().getLocation();
-String webappDirLocation = location.toString().split("target")[0] 
+"src/main/webapp";
 Server server = new Server(port);
 WebAppContext root = new WebAppContext();
 
+URL webAppDir = 
Thread.currentThread().getContextClassLoader().getResource(DEFAULT_WEBAPP_DIR_LOCATION);
+if (webAppDir == null) {
+throw new RuntimeException(String.format("No %s directory was 
found into the JAR file", DEFAULT_WEBAPP_DIR_LOCATION));
+}
+
 root.setContextPath(home);
-root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
-root.setResourceBase(webappDirLocation);
+root.setDescriptor(DEFAULT_WEBAPP_DIR_LOCATION + "/WEB-INF/web.xml");
+root.setResourceBase(webAppDir.toURI().toString());
 root.setParentLoaderPriority(true);
 server.setHandler(root);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c8d46e0c/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
 

phoenix git commit: PHOENIX-4797 file not found or file exist exception when create global index use -snapshot option

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.2 f0f8b9fc1 -> 75e0305e9


PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


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

Branch: refs/heads/4.14-HBase-1.2
Commit: 75e0305e99831e6011a3de613faeaa3c391dbda3
Parents: f0f8b9f
Author: 492066199 <492066...@qq.com>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Vincent Poon 
Committed: Fri Aug 3 10:49:45 2018 -0400

--
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/75e0305e/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index df60339..016d3be 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -39,6 +39,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.UUID;
 
 public class TableSnapshotResultIterator implements ResultIterator {
 
@@ -65,7 +66,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
 this.scan = scan;
 this.scanMetricsHolder = scanMetricsHolder;
 this.scanIterator = UNINITIALIZED_SCANNER;
-this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+UUID.randomUUID().toString());
 this.snapshotName = configuration.get(
 PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
 this.rootDir = FSUtils.getRootDir(configuration);



phoenix git commit: PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace table name, webapp path, column names) and traceserver.py

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.2 766248ba9 -> f0f8b9fc1


PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace 
table name, webapp path, column names) and traceserver.py

Closes #311

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-1.2
Commit: f0f8b9fc13e36092bb841c2b4a25a77186d3e297
Parents: 766248b
Author: Vitaly Monastyrev 
Authored: Tue Jul 24 12:14:12 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 10:45:09 2018 -0400

--
 bin/traceserver.py  |  6 +-
 .../apache/phoenix/tracingwebapp/http/Main.java | 13 +--
 .../tracingwebapp/http/TraceServlet.java| 87 +++-
 3 files changed, 62 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f0f8b9fc/bin/traceserver.py
--
diff --git a/bin/traceserver.py b/bin/traceserver.py
index 665099e..62e168c 100755
--- a/bin/traceserver.py
+++ b/bin/traceserver.py
@@ -116,8 +116,10 @@ else:
 
 #" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " 
+ \
 #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s $PHOENIX_OPTS ' + \
-'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s  ' + \
+'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + \
+phoenix_utils.phoenix_client_jar + os.pathsep + 
phoenix_utils.phoenix_queryserver_jar + \
+os.pathsep + phoenix_utils.hadoop_classpath + \
 " -Dproc_phoenixtraceserver" + \
 " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, 
"log4j.properties") + \
 " -Dpsql.root.logger=%(root_logger)s" + \

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f0f8b9fc/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
index 5875fc1..249f8e6 100755
--- 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
+++ 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
@@ -47,6 +47,7 @@ public final class Main extends Configured implements Tool {
 public static final String TRACE_SERVER_HTTP_JETTY_HOME_KEY =
 "phoenix.traceserver.http.home";
 public static final String DEFAULT_HTTP_HOME = "/";
+public static final String DEFAULT_WEBAPP_DIR_LOCATION = "src/main/webapp";
 
 public static void main(String[] args) throws Exception {
 int ret = ToolRunner.run(HBaseConfiguration.create(), new Main(), 
args);
@@ -62,15 +63,17 @@ public final class Main extends Configured implements Tool {
 final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY,
 DEFAULT_HTTP_HOME);
 //setting up the embedded server
-ProtectionDomain domain = Main.class.getProtectionDomain();
-URL location = domain.getCodeSource().getLocation();
-String webappDirLocation = location.toString().split("target")[0] 
+"src/main/webapp";
 Server server = new Server(port);
 WebAppContext root = new WebAppContext();
 
+URL webAppDir = 
Thread.currentThread().getContextClassLoader().getResource(DEFAULT_WEBAPP_DIR_LOCATION);
+if (webAppDir == null) {
+throw new RuntimeException(String.format("No %s directory was 
found into the JAR file", DEFAULT_WEBAPP_DIR_LOCATION));
+}
+
 root.setContextPath(home);
-root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
-root.setResourceBase(webappDirLocation);
+root.setDescriptor(DEFAULT_WEBAPP_DIR_LOCATION + "/WEB-INF/web.xml");
+root.setResourceBase(webAppDir.toURI().toString());
 root.setParentLoaderPriority(true);
 server.setHandler(root);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f0f8b9fc/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
 

phoenix git commit: PHOENIX-4797 file not found or file exist exception when create global index use -snapshot option

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.3 82ec54fd6 -> f5ce8f7d6


PHOENIX-4797 file not found or file exist exception when create global index 
use -snapshot option


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

Branch: refs/heads/4.14-HBase-1.3
Commit: f5ce8f7d61895f7d9dabd13469d07a6dfd176ba4
Parents: 82ec54f
Author: 492066199 <492066...@qq.com>
Authored: Fri Jul 6 10:45:38 2018 +0800
Committer: Vincent Poon 
Committed: Fri Aug 3 10:44:53 2018 -0400

--
 .../org/apache/phoenix/iterate/TableSnapshotResultIterator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5ce8f7d/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
index df60339..016d3be 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java
@@ -39,6 +39,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.UUID;
 
 public class TableSnapshotResultIterator implements ResultIterator {
 
@@ -65,7 +66,8 @@ public class TableSnapshotResultIterator implements 
ResultIterator {
 this.scan = scan;
 this.scanMetricsHolder = scanMetricsHolder;
 this.scanIterator = UNINITIALIZED_SCANNER;
-this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
+this.restoreDir = new 
Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY),
+UUID.randomUUID().toString());
 this.snapshotName = configuration.get(
 PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY);
 this.rootDir = FSUtils.getRootDir(configuration);



phoenix git commit: PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace table name, webapp path, column names) and traceserver.py

2018-08-03 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.14-HBase-1.3 766248ba9 -> 82ec54fd6


PHOENIX-4817 Fixed Phoenix Tracing Web Application (fixed check null, trace 
table name, webapp path, column names) and traceserver.py

Closes #311

Signed-off-by: Josh Elser 


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

Branch: refs/heads/4.14-HBase-1.3
Commit: 82ec54fd682b31199082cb3098dcbde92ef8ff5e
Parents: 766248b
Author: Vitaly Monastyrev 
Authored: Tue Jul 24 12:14:12 2018 -0400
Committer: Vincent Poon 
Committed: Fri Aug 3 10:41:23 2018 -0400

--
 bin/traceserver.py  |  6 +-
 .../apache/phoenix/tracingwebapp/http/Main.java | 13 +--
 .../tracingwebapp/http/TraceServlet.java| 87 +++-
 3 files changed, 62 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ec54fd/bin/traceserver.py
--
diff --git a/bin/traceserver.py b/bin/traceserver.py
index 665099e..62e168c 100755
--- a/bin/traceserver.py
+++ b/bin/traceserver.py
@@ -116,8 +116,10 @@ else:
 
 #" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " 
+ \
 #" -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 
-XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \
-java_cmd = '%(java)s $PHOENIX_OPTS ' + \
-'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
+java_cmd = '%(java)s  ' + \
+'-cp ' + hbase_config_path + os.pathsep + 
phoenix_utils.phoenix_traceserver_jar + os.pathsep + \
+phoenix_utils.phoenix_client_jar + os.pathsep + 
phoenix_utils.phoenix_queryserver_jar + \
+os.pathsep + phoenix_utils.hadoop_classpath + \
 " -Dproc_phoenixtraceserver" + \
 " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, 
"log4j.properties") + \
 " -Dpsql.root.logger=%(root_logger)s" + \

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ec54fd/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
index 5875fc1..249f8e6 100755
--- 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
+++ 
b/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/Main.java
@@ -47,6 +47,7 @@ public final class Main extends Configured implements Tool {
 public static final String TRACE_SERVER_HTTP_JETTY_HOME_KEY =
 "phoenix.traceserver.http.home";
 public static final String DEFAULT_HTTP_HOME = "/";
+public static final String DEFAULT_WEBAPP_DIR_LOCATION = "src/main/webapp";
 
 public static void main(String[] args) throws Exception {
 int ret = ToolRunner.run(HBaseConfiguration.create(), new Main(), 
args);
@@ -62,15 +63,17 @@ public final class Main extends Configured implements Tool {
 final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY,
 DEFAULT_HTTP_HOME);
 //setting up the embedded server
-ProtectionDomain domain = Main.class.getProtectionDomain();
-URL location = domain.getCodeSource().getLocation();
-String webappDirLocation = location.toString().split("target")[0] 
+"src/main/webapp";
 Server server = new Server(port);
 WebAppContext root = new WebAppContext();
 
+URL webAppDir = 
Thread.currentThread().getContextClassLoader().getResource(DEFAULT_WEBAPP_DIR_LOCATION);
+if (webAppDir == null) {
+throw new RuntimeException(String.format("No %s directory was 
found into the JAR file", DEFAULT_WEBAPP_DIR_LOCATION));
+}
+
 root.setContextPath(home);
-root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
-root.setResourceBase(webappDirLocation);
+root.setDescriptor(DEFAULT_WEBAPP_DIR_LOCATION + "/WEB-INF/web.xml");
+root.setResourceBase(webAppDir.toURI().toString());
 root.setParentLoaderPriority(true);
 server.setHandler(root);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ec54fd/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
--
diff --git 
a/phoenix-tracing-webapp/src/main/java/org/apache/phoenix/tracingwebapp/http/TraceServlet.java
 

Build failed in Jenkins: Phoenix Compile Compatibility with HBase #716

2018-08-03 Thread Apache Jenkins Server
See 


--
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H35 (ubuntu xenial) in workspace 

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins2422253942624681623.sh
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 386523
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 6
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 10240
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
physical id : 0
physical id : 1
MemTotal:   98985932 kB
MemFree:23337960 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 48G 0   48G   0% /dev
tmpfs   9.5G  106M  9.4G   2% /run
/dev/sda1   364G  303G   44G  88% /
tmpfs48G 0   48G   0% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs48G 0   48G   0% /sys/fs/cgroup
tmpfs   9.5G 0  9.5G   0% /run/user/910
tmpfs   9.5G 0  9.5G   0% /run/user/2393
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
apache-maven-3.2.1
apache-maven-3.2.5
apache-maven-3.3.3
apache-maven-3.3.9
apache-maven-3.5.0
apache-maven-3.5.2
apache-maven-3.5.4
latest
latest2
latest3


===
Verifying compile level compatibility with HBase 0.98 with Phoenix 
4.x-HBase-0.98
===

Cloning into 'hbase'...
Switched to a new branch '0.98'
Branch 0.98 set up to track remote branch 0.98 from origin.
[ERROR] Plugin org.codehaus.mojo:findbugs-maven-plugin:2.5.2 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor for 
org.codehaus.mojo:findbugs-maven-plugin:jar:2.5.2: Could not transfer artifact 
org.codehaus.mojo:findbugs-maven-plugin:pom:2.5.2 from/to central 
(https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version 
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Build step 'Execute shell' marked build as failure