svn commit: r25809 - in /release/incubator/hawq: 2.0.0.0-incubating/ 2.1.0.0-incubating/ 2.2.0.0-incubating/

2018-03-18 Thread yjin
Author: yjin
Date: Mon Mar 19 03:56:31 2018
New Revision: 25809

Log:
HAWQ-1596. delete old releases from mirroring system

Removed:
release/incubator/hawq/2.0.0.0-incubating/
release/incubator/hawq/2.1.0.0-incubating/
release/incubator/hawq/2.2.0.0-incubating/



incubator-hawq-site git commit: HAWQ-1596. delete old releases from mirroring system

2018-03-18 Thread yjin
Repository: incubator-hawq-site
Updated Branches:
  refs/heads/asf-site 7f9fadb8c -> 147646e1a


HAWQ-1596. delete old releases from mirroring system


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/commit/147646e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/tree/147646e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/diff/147646e1

Branch: refs/heads/asf-site
Commit: 147646e1a2a0fb07afb0ed3b41e7bb6a6a3de8c4
Parents: 7f9fadb
Author: Yi 
Authored: Mon Mar 19 14:05:12 2018 +1100
Committer: Yi 
Committed: Mon Mar 19 14:05:12 2018 +1100

--
 index.html | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/blob/147646e1/index.html
--
diff --git a/index.html b/index.html
index 151e7ab..4877dfa 100644
--- a/index.html
+++ b/index.html
@@ -353,21 +353,21 @@
 
 
   
-http://apache.org/dyn/closer.cgi/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz";
 class="type">Binary
+https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz";
 class="type">Binary
 
   Version 2.2.0.0 |
-  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
-  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.md5";>MD5
+  https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.md5";>MD5
 
   
   
-http://apache.org/dyn/closer.cgi/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz";
 class="type">Source
+https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.2.0.0 |
-  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
-  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.md5";>MD5
+  https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  https://archive.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.md5";>MD5
 
   
 
@@ -392,12 +392,12 @@
 
 
   
-http://apache.org/dyn/closer.cgi/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz";
 class="type">Source
+https://archive.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.1.0.0 |
-  https://www.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.asc";>PGP
 |
-  https://www.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  https://www.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.md5";>MD5
+  https://archive.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://archive.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  https://archive.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.md5";>MD5
 
   
 
@@ -422,12 +422,12 @@
 
 
   
-http://apache.org/dyn/closer.cgi/incubator/hawq/2.0.0.0-incubating/apache-hawq-src-2.0.0.0-incubating.tar.gz";
 class="t

incubator-hawq-site git commit: HAWQ-1595. use HTTPS for KEYS, sigs and hashes

2018-03-18 Thread yjin
Repository: incubator-hawq-site
Updated Branches:
  refs/heads/asf-site 828576250 -> 7f9fadb8c


HAWQ-1595. use HTTPS for KEYS, sigs and hashes


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/commit/7f9fadb8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/tree/7f9fadb8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/diff/7f9fadb8

Branch: refs/heads/asf-site
Commit: 7f9fadb8ce5548b0e0b80c2d900a4b990198a75d
Parents: 8285762
Author: Yi 
Authored: Mon Mar 19 13:52:48 2018 +1100
Committer: Yi 
Committed: Mon Mar 19 13:52:48 2018 +1100

--
 index.html | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/blob/7f9fadb8/index.html
--
diff --git a/index.html b/index.html
index 7f87714..151e7ab 100644
--- a/index.html
+++ b/index.html
@@ -322,16 +322,16 @@
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz";
 class="type">Binary
 
   Version 2.3.0.0 |
-  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256";>SHA-256
+  https://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256";>SHA-256
 
   
   
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.3.0.0 |
-  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256";>SHA-256
+  https://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256";>SHA-256
 
   
 
@@ -356,18 +356,18 @@
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz";
 class="type">Binary
 
   Version 2.2.0.0 |
-  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.md5";>MD5
+  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.md5";>MD5
 
   
   
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.2.0.0 |
-  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.md5";>MD5
+  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
+  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  https://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.md5";>MD5
 
   
 
@@ -395,9 +395,9 @@
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.1.0.0

incubator-hawq-site git commit: Update download page to reflect Apache HAWQ 2.3.0.0-incubating release

2018-03-18 Thread yjin
Repository: incubator-hawq-site
Updated Branches:
  refs/heads/asf-site bfcc79a5d -> 828576250


Update download page to reflect Apache HAWQ 2.3.0.0-incubating release


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/commit/82857625
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/tree/82857625
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/diff/82857625

Branch: refs/heads/asf-site
Commit: 828576250852db1f42611449fa2d1eebaf0f6aff
Parents: bfcc79a
Author: Yi 
Authored: Mon Mar 19 13:22:30 2018 +1100
Committer: Yi 
Committed: Mon Mar 19 13:22:30 2018 +1100

--
 index.html | 56 +++-
 1 file changed, 43 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq-site/blob/82857625/index.html
--
diff --git a/index.html b/index.html
index c5731f1..7f87714 100644
--- a/index.html
+++ b/index.html
@@ -86,7 +86,7 @@
   
 
   
-DOWNLOAD2.2.0.0 (July 12, 2017)
+DOWNLOAD2.3.0.0 (March 18, 2018)
   
 
 
@@ -310,6 +310,36 @@
   
 
   
+Download HAWQ® 2.3.0.0-incubating
+  
+
+  
+
+  
+  
+
+  
+http://apache.org/dyn/closer.cgi/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz";
 class="type">Binary
+
+  Version 2.3.0.0 |
+  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc";>PGP
 |
+  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256";>SHA-256
+
+  
+  
+http://apache.org/dyn/closer.cgi/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz";
 class="type">Source
+
+  Version 2.3.0.0 |
+  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc";>PGP
 |
+  http://www.apache.org/dist/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256";>SHA-256
+
+  
+
+  
+
+  
+
+  
 Download HAWQ® 2.2.0.0-incubating
   
 
@@ -326,18 +356,18 @@
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz";
 class="type">Binary
 
   Version 2.2.0.0 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.md5";>MD5
+  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
+  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz.md5";>MD5
 
   
   
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.2.0.0 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.md5";>MD5
+  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.asc";>PGP
 |
+  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.sha256";>SHA-256
 |
+  http://www.apache.org/dist/incubator/hawq/2.2.0.0-incubating/apache-hawq-src-2.2.0.0-incubating.tar.gz.md5";>MD5
 
   
 
@@ -365,9 +395,9 @@
 http://apache.org/dyn/closer.cgi/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz";
 class="type">Source
 
   Version 2.1.0.0 |
-  http://www-eu.apache.org/dist/incubator/hawq/2.1.0.0-incubating/apache-hawq-src-2.1.0.0-incubating.tar.gz.asc";>PGP
 |
-  http://www-eu.apac

svn commit: r25805 - /release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256

2018-03-17 Thread yjin
Author: yjin
Date: Sun Mar 18 01:06:39 2018
New Revision: 25805

Log:
update trivial content in apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256

Modified:

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256

Modified: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256
==
--- 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256
 (original)
+++ 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256
 Sun Mar 18 01:06:39 2018
@@ -1 +1 @@
-b475f2d38b5a291058c3c7cac14abf16ae566ff5e083f46e4d8cf2fb1aaff054  
./apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz
+b475f2d38b5a291058c3c7cac14abf16ae566ff5e083f46e4d8cf2fb1aaff054  
apache-hawq-rpm-2.3.0.0-incubating.tar.gz




svn commit: r25804 - /release/incubator/hawq/2.3.0.0-incubating/

2018-03-17 Thread yjin
Author: yjin
Date: Sat Mar 17 23:59:35 2018
New Revision: 25804

Log:
adding 2.3.0.0-incubating release artifacts

Added:
release/incubator/hawq/2.3.0.0-incubating/

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz
   (with props)

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz
   (with props)

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc

release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256

Added: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc
==
--- 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc
 (added)
+++ 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.asc
 Sat Mar 17 23:59:35 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCgAdFiEEQbAHcHXf2vz4CZqRzmD5DRMzCSoFAlqU0s0ACgkQzmD5DRMz
+CSqoIgf9Fyl7RALmQ4JFY82Lq2TPUNHr4aHj1tm9jUl71NOejInhqmTcqytfIVwG
+4fFlFE3JmZnUSJSW86xTMVE52vR+cj/oHDYEfCnXqNh2FlHYzADSAoI6cOTZRhi4
+C6ynZIiqHuMxWoawY9r6A2ZJ+ftqykSsCpkPU769gozFy+tfRX4MCLBUK1L2brTd
++uxWAI3yVz39qzXp+Fr+AXgv1JaE+UuPOgYnCFYxFa7UwbjPp/kSiPO6N66TZfhn
+YIwPVhB3Z85XB8wV6S6zJ/XzbM53hu1ghhj/xLWdjG7MfJvCBmQ+UVjywUHR6FAU
+g6wVvIg0r6NjrEsv5VBjohvevJcPOw==
+=HEi5
+-END PGP SIGNATURE-

Added: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256
==
--- 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256
 (added)
+++ 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-rpm-2.3.0.0-incubating.tar.gz.sha256
 Sat Mar 17 23:59:35 2018
@@ -0,0 +1 @@
+b475f2d38b5a291058c3c7cac14abf16ae566ff5e083f46e4d8cf2fb1aaff054  
./apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz

Added: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
==
--- 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
 (added)
+++ 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
 Sat Mar 17 23:59:35 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCgAdFiEEQbAHcHXf2vz4CZqRzmD5DRMzCSoFAlqU0fUACgkQzmD5DRMz
+CSpPlQf+JwWAin9yvVH7GdGi+hIf0s47ivMFAPWEtSZdZLxaV+vzRqvYUgT6yU2f
+U36p9cPaGcF07ypBEwJ9o89HXJc8Preadr8LcDWmEmdeyWztFS6NAqac3j0zzkcD
+3Vjgu1NS3is5SgycKmANZ5RfgGEWF/3AJQuFekP/FaH5BGzYd/pW/kFuekd5KBa0
++1tdlTe3gBlk2Ht/qGmCN0mHyB7RylWLCKIPB+zuNYLupuD6tA512THmMESKAdF5
+zuH272rrhUVEU+oaqRK2xofZ8E8L9TUawQNiziPL2qosPZQrPo2PVFu0UdYTZPxa
+myU7RZcmMj4NM3H9Uy9rRhIFPZbsJw==
+=omTN
+-END PGP SIGNATURE-

Added: 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256
==
--- 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256
 (added)
+++ 
release/incubator/hawq/2.3.0.0-incubating/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256
 Sat Mar 17 23:59:35 2018
@@ -0,0 +1 @@
+2c3f0dde69afdf3434e8e34bba5342f873f885c3a30fc5f1ccb003aac5218776  
apache-hawq-src-2.3.0.0-incubating.tar.gz




[incubator-hawq] Git Push Summary

2018-03-17 Thread yjin
Repository: incubator-hawq
Updated Tags:  refs/tags/rel/v2.3.0.0 [created] da028ac78


svn commit: r25574 - in /dev/incubator/hawq/2.3.0.0-incubating.RC2: apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.md5 apache-hawq-src-2.3.0.0-incubating.tar.gz.md5

2018-03-07 Thread yjin
Author: yjin
Date: Wed Mar  7 22:37:43 2018
New Revision: 25574

Log:
remove 2.3.0.0-incubating RC2 candidate md5 files

Removed:

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.md5

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.md5



svn commit: r25290 - /dev/incubator/hawq/2.3.0.0-incubating.RC2/

2018-02-26 Thread yjin
Author: yjin
Date: Tue Feb 27 04:16:08 2018
New Revision: 25290

Log:
adding 2.3.0.0-incubating RC2 candidate release artifacts

Added:
dev/incubator/hawq/2.3.0.0-incubating.RC2/

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz
   (with props)

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.asc

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.md5

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.sha256

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz
   (with props)

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.md5

dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.asc
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.asc
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.asc
 Tue Feb 27 04:16:08 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCgAdFiEEQbAHcHXf2vz4CZqRzmD5DRMzCSoFAlqU0s0ACgkQzmD5DRMz
+CSqoIgf9Fyl7RALmQ4JFY82Lq2TPUNHr4aHj1tm9jUl71NOejInhqmTcqytfIVwG
+4fFlFE3JmZnUSJSW86xTMVE52vR+cj/oHDYEfCnXqNh2FlHYzADSAoI6cOTZRhi4
+C6ynZIiqHuMxWoawY9r6A2ZJ+ftqykSsCpkPU769gozFy+tfRX4MCLBUK1L2brTd
++uxWAI3yVz39qzXp+Fr+AXgv1JaE+UuPOgYnCFYxFa7UwbjPp/kSiPO6N66TZfhn
+YIwPVhB3Z85XB8wV6S6zJ/XzbM53hu1ghhj/xLWdjG7MfJvCBmQ+UVjywUHR6FAU
+g6wVvIg0r6NjrEsv5VBjohvevJcPOw==
+=HEi5
+-END PGP SIGNATURE-

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.md5
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.md5
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.md5
 Tue Feb 27 04:16:08 2018
@@ -0,0 +1 @@
+MD5 (./apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz) = 
d242d67ed45a30946137046500d6324f

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.sha256
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.sha256
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz.sha256
 Tue Feb 27 04:16:08 2018
@@ -0,0 +1 @@
+b475f2d38b5a291058c3c7cac14abf16ae566ff5e083f46e4d8cf2fb1aaff054  
./apache-hawq-rpm-2.3.0.0-incubating-rc2.tar.gz

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
 Tue Feb 27 04:16:08 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCgAdFiEEQbAHcHXf2vz4CZqRzmD5DRMzCSoFAlqU0fUACgkQzmD5DRMz
+CSpPlQf+JwWAin9yvVH7GdGi+hIf0s47ivMFAPWEtSZdZLxaV+vzRqvYUgT6yU2f
+U36p9cPaGcF07ypBEwJ9o89HXJc8Preadr8LcDWmEmdeyWztFS6NAqac3j0zzkcD
+3Vjgu1NS3is5SgycKmANZ5RfgGEWF/3AJQuFekP/FaH5BGzYd/pW/kFuekd5KBa0
++1tdlTe3gBlk2Ht/qGmCN0mHyB7RylWLCKIPB+zuNYLupuD6tA512THmMESKAdF5
+zuH272rrhUVEU+oaqRK2xofZ8E8L9TUawQNiziPL2qosPZQrPo2PVFu0UdYTZPxa
+myU7RZcmMj4NM3H9Uy9rRhIFPZbsJw==
+=omTN
+-END PGP SIGNATURE-

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0-incubating.tar.gz.md5
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC2/apache-hawq-src-2.3.0.0

[incubator-hawq] Git Push Summary

2018-02-26 Thread yjin
Repository: incubator-hawq
Updated Tags:  refs/tags/2.3.0.0-incubating-rc2 [created] 1db96dae2


[2/2] incubator-hawq git commit: HAWQ-1590. bump hawq version to 2.3 in contrib/hawq-ambari-plugin/build.properties for Apache HAWQ 2.3.0.0-incubating Release

2018-02-25 Thread yjin
HAWQ-1590. bump hawq version to 2.3 in 
contrib/hawq-ambari-plugin/build.properties for Apache HAWQ 2.3.0.0-incubating 
Release


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

Branch: refs/heads/2.3.0.0-incubating
Commit: a6335c65d194ddcdf55d243f0ce44a1b7e0aa6b3
Parents: cd56988
Author: Ruilong Huo 
Authored: Wed Feb 21 10:34:01 2018 +0800
Committer: Yi 
Committed: Sun Feb 25 23:25:24 2018 +1100

--
 contrib/hawq-ambari-plugin/build.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a6335c65/contrib/hawq-ambari-plugin/build.properties
--
diff --git a/contrib/hawq-ambari-plugin/build.properties 
b/contrib/hawq-ambari-plugin/build.properties
index 6df37f7..e9b092f 100644
--- a/contrib/hawq-ambari-plugin/build.properties
+++ b/contrib/hawq-ambari-plugin/build.properties
@@ -1,4 +1,4 @@
-hawq.release.version=2.2.0
+hawq.release.version=2.3.0
 hawq.common.services.version=2.0.0
 pxf.release.version=3.2.1
 pxf.common.services.version=3.0.0



[1/2] incubator-hawq git commit: HAWQ-1589. bump hawq version to 2.3 in pom.xml for Apache HAWQ 2.3.0.0-incubating Release

2018-02-25 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/2.3.0.0-incubating 66afff2ce -> a6335c65d


HAWQ-1589. bump hawq version to 2.3 in pom.xml for Apache HAWQ 
2.3.0.0-incubating Release


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

Branch: refs/heads/2.3.0.0-incubating
Commit: cd56988de1f49a25b1a742aa1068da350449d488
Parents: 66afff2
Author: Ruilong Huo 
Authored: Tue Feb 20 21:09:54 2018 +0800
Committer: Yi 
Committed: Sun Feb 25 23:25:14 2018 +1100

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cd56988d/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 9803532..cafa56a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
  
   org.apache.hawq
   hawq
-  2.2
+  2.3
   pom
 
 



svn commit: r25150 - /dev/incubator/hawq/2.3.0.0-incubating.RC1/

2018-02-19 Thread yjin
Author: yjin
Date: Tue Feb 20 00:21:48 2018
New Revision: 25150

Log:
adding 2.3.0.0-incubating RC1 candidate release artifacts

Added:
dev/incubator/hawq/2.3.0.0-incubating.RC1/

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz
   (with props)

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.asc

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.md5

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.sha256

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz
   (with props)

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.md5

dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.sha256

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.asc
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.asc
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.asc
 Tue Feb 20 00:21:48 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCgAdFiEEQbAHcHXf2vz4CZqRzmD5DRMzCSoFAlqLYJ8ACgkQzmD5DRMz
+CSo28wf9GnRed/HPgI+9UvoEDDDqUGzzDYMVJKn9ajtZiESANWl+wrbue6V5jyqi
+0YahNhq7CH75t5shUOsffwLyfjbY6UARmuF3WoiAKXHNFsUg5yS5JkKac4tCMQsX
+FSNKH1IOXFk82FqL2UqFN53awM0FXb64CHU+axQpZKQVXk8Pk350CGgklEoHYSPv
+3lbOmQG0dc28jZ4ixwgK0hO656IMgomnCxTYM8GV7WmAtO8yBywLkme8QhAV8ykL
+j4nisaznHdWC+/TEZtVFv1ZzP89qNpIt3GHNYkmc+Z5qAX7ql/WzyGQQ7yosFAff
+kHwokBbres1wvIHa8ZCYTjSqqNukRA==
+=osdZ
+-END PGP SIGNATURE-

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.md5
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.md5
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.md5
 Tue Feb 20 00:21:48 2018
@@ -0,0 +1 @@
+MD5 (apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz) = 
480cb6a2772690742d2cca4d2c35ffda

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.sha256
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.sha256
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz.sha256
 Tue Feb 20 00:21:48 2018
@@ -0,0 +1 @@
+897291ad35e327aaae0f910a7ab09f0b6cdbdad104f4dd974912193daafe4e6f  
apache-hawq-rpm-2.3.0.0-incubating-rc1.tar.gz

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
 (added)
+++ 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.asc
 Tue Feb 20 00:21:48 2018
@@ -0,0 +1,11 @@
+-BEGIN PGP SIGNATURE-
+
+iQEzBAABCgAdFiEEQbAHcHXf2vz4CZqRzmD5DRMzCSoFAlqDUsAACgkQzmD5DRMz
+CSqffgf+LRKCnwgi9YFKNFWFG3vLcSvN+QYosTsFRkQMioPcx8VOK2C5AjHJApmz
+BAm86tkwDLZerz5lhjciv94zInQS7sm4TEVYg0/KyoX/K733z/lupqQDLKUNzs7W
+Zhb8Jed9U4SoSdEH+/iC/cXi1FoQAml5K8YQqkFa5HER+sIVt4RJgKM2fEBcKM0R
+Zy0UFmaSnwVW3Cc70FiSeV5ogOw032v5v90VyC7KfDrj8uVwCyRrYw10qBwBX9Hp
+z9nL66LxD1CEhG2ziq4MlbeKg0NSxCYle7nNZbAu+emft0jduLCrhSdA7a+tuD4J
+H/gXvUT2vRakVzAwdRYS9alKY5kByA==
+=hlsM
+-END PGP SIGNATURE-

Added: 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0-incubating.tar.gz.md5
==
--- 
dev/incubator/hawq/2.3.0.0-incubating.RC1/apache-hawq-src-2.3.0.0

[incubator-hawq] Git Push Summary

2018-02-13 Thread yjin
Repository: incubator-hawq
Updated Tags:  refs/tags/2.3.0.0-incubating-rc1 [created] c3b98b9a0


[2/2] incubator-hawq git commit: HAWQ-1587. Fix metadata parameters handling in PXF

2018-02-12 Thread yjin
HAWQ-1587. Fix metadata parameters handling in PXF


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/66afff2c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/66afff2c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/66afff2c

Branch: refs/heads/2.3.0.0-incubating
Commit: 66afff2ce3c2e70d6ba7681788794654fa5ca61b
Parents: 3612c9a
Author: shivzone 
Authored: Tue Feb 13 11:07:08 2018 +1100
Committer: shivzone 
Committed: Tue Feb 13 11:07:08 2018 +1100

--
 .../java/org/apache/hawq/pxf/service/utilities/ProtocolData.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/66afff2c/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
--
diff --git 
a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
 
b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
index 39926ed..227e987 100644
--- 
a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
+++ 
b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
@@ -178,7 +178,7 @@ public class ProtocolData extends InputData {
 requestParametersMap = paramsMap;
 profile = profileString;
 setProfilePlugins();
-metadata = getProperty("METADATA");
+metadata = getUserProperty("METADATA");
 
 parseSecurityProperties();
 }



[1/2] incubator-hawq git commit: HAWQ-1036. Implement user impersonation in PXF

2018-02-12 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/2.3.0.0-incubating 5d5fee1cc -> 66afff2ce


HAWQ-1036. Implement user impersonation in PXF


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/3612c9a3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/3612c9a3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/3612c9a3

Branch: refs/heads/2.3.0.0-incubating
Commit: 3612c9a35752fd3f199d65e9a3261d8c2fd79062
Parents: 5d5fee1
Author: Alexander Denissov 
Authored: Tue Feb 13 11:05:10 2018 +1100
Committer: Alexander Denissov 
Committed: Tue Feb 13 11:05:10 2018 +1100

--
 pxf/build.gradle|   8 +-
 pxf/gradle/profiles/gpdb.properties |   1 +
 .../src/configs/tomcat/bin/setenv.sh|  11 +-
 .../service/rest/ServletLifecycleListener.java  |  63 --
 .../service/servlet/SecurityServletFilter.java  | 114 +++
 .../servlet/ServletLifecycleListener.java   |  63 ++
 .../pxf/service/utilities/ProtocolData.java |  35 --
 .../hawq/pxf/service/utilities/SecureLogin.java |  21 +++-
 pxf/pxf-service/src/main/webapp/WEB-INF/web.xml |  10 +-
 pxf/pxf-service/src/scripts/pxf-env.sh  |   3 +
 pxf/pxf-service/src/scripts/pxf-service |   3 +-
 .../pxf/service/BridgeOutputBuilderTest.java|   1 +
 .../pxf/service/utilities/ProtocolDataTest.java |  31 -
 .../pxf/service/utilities/SecureLoginTest.java  |  65 +++
 14 files changed, 346 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3612c9a3/pxf/build.gradle
--
diff --git a/pxf/build.gradle b/pxf/build.gradle
index 127de0d..1ed42bf 100644
--- a/pxf/build.gradle
+++ b/pxf/build.gradle
@@ -196,12 +196,14 @@ project('pxf-service') {
 apply plugin: 'war'
 tasks.war {
 archiveName = 'pxf.war'
+filter(ReplaceTokens, tokens: ['pxfProtocolVersion': 
project.pxfProtocolVersion])
 processResources {
 filesMatching('**/pxf-*') {
 details ->
 details.exclude()
 }
 }
+
 }
 dependencies {
 compile(project(':pxf-api'))
@@ -269,7 +271,8 @@ project('pxf-service') {
 tokens: ['pxfLogDir' :  databaseProperties.pxfLogDir,
  'pxfRunDir' :  databaseProperties.pxfRunDir,
  'pxfPortNum':  databaseProperties.pxfPortNum,
- 'pxfDefaultUser': 
(databaseProperties.pxfDefaultUser == null ? "" : 
databaseProperties.pxfDefaultUser)])
+ 'pxfDefaultUser': 
(databaseProperties.pxfDefaultUser == null ? "" : 
databaseProperties.pxfDefaultUser),
+ 'pxfDefaultUserImpersonation': 
(databaseProperties.pxfDefaultUserImpersonation == null ? "" : 
databaseProperties.pxfDefaultUserImpersonation)])
 into "/etc/pxf-${project.version}/conf"
 }
 
@@ -645,7 +648,8 @@ task install(type: Copy, dependsOn: [subprojects.build, 
tomcatGet]) {
 tokens: ['pxfLogDir' : databaseProperties.pxfLogDir,
  'pxfRunDir' : databaseProperties.pxfRunDir,
  'pxfPortNum': databaseProperties.pxfPortNum,
- 'pxfDefaultUser': (databaseProperties.pxfDefaultUser 
== null ? "" : databaseProperties.pxfDefaultUser)]) into 'conf'
+ 'pxfDefaultUser': (databaseProperties.pxfDefaultUser 
== null ? "" : databaseProperties.pxfDefaultUser),
+ 'pxfDefaultUserImpersonation': 
(databaseProperties.pxfDefaultUserImpersonation == null ? "" : 
databaseProperties.pxfDefaultUserImpersonation)]) into 'conf'
 }
 from("pxf-service/src/configs/tomcat") { into 'tomcat-templates' }
 from("pxf-service/src/configs/templates") { into 'conf-templates' }

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3612c9a3/pxf/gradle/profiles/gpdb.properties
--
diff --git a/pxf/gradle/profiles/gpdb.properties 
b/pxf/gradle/profiles/gpdb.properties
index 91775a3..efcbd0c 100644
--- a/pxf/gradle/profiles/gpdb.properties
+++ b/pxf/gradle/profiles/gpdb.properties
@@ -18,3 +18,4 @@
 pxfLogDir=${PXF_HOME}/logs
 pxfRunDir=${PXF_HOME}/run
 pxfPortNum=5888
+pxfDefaultUserImpersonation=true

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3612c9a3/pxf/pxf-service/src/configs/tomcat/bin/setenv.sh
--
diff --git a/pxf/pxf-service/src/configs/tomcat/bin/setenv.sh 
b/pxf/pxf-service/src/configs/tomcat/bi

[2/2] incubator-hawq git commit: HAWQ-1586. Update version from 2.2.0.0 to 2.3.0.0

2018-02-08 Thread yjin
HAWQ-1586. Update version from 2.2.0.0 to 2.3.0.0


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

Branch: refs/heads/2.3.0.0-incubating
Commit: 5d5fee1cc9eabb456c03676f8491990aab1b929e
Parents: 060ca66
Author: Yi 
Authored: Thu Feb 8 19:04:41 2018 +1100
Committer: Yi 
Committed: Thu Feb 8 19:04:41 2018 +1100

--
 contrib/hawq-ambari-plugin/build.properties | 2 +-
 contrib/hawq-ambari-plugin/pom.xml  | 2 +-
 getversion  | 2 +-
 ranger-plugin/admin-plugin/pom.xml  | 2 +-
 ranger-plugin/integration/admin/pom.xml | 2 +-
 ranger-plugin/integration/pom.xml   | 2 +-
 ranger-plugin/integration/service/pom.xml   | 2 +-
 ranger-plugin/pom.xml   | 2 +-
 ranger-plugin/service/pom.xml   | 2 +-
 tools/bin/gppylib/data/2.3.json | 10458 +
 10 files changed, 10467 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/contrib/hawq-ambari-plugin/build.properties
--
diff --git a/contrib/hawq-ambari-plugin/build.properties 
b/contrib/hawq-ambari-plugin/build.properties
index 1cd6645..6df37f7 100644
--- a/contrib/hawq-ambari-plugin/build.properties
+++ b/contrib/hawq-ambari-plugin/build.properties
@@ -4,5 +4,5 @@ pxf.release.version=3.2.1
 pxf.common.services.version=3.0.0
 hawq.repo.prefix=hawq
 hawq.addons.repo.prefix=hawq-add-ons
-repository.version=2.2.0.0
+repository.version=2.3.0.0
 default.stack=HDP-2.5

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/contrib/hawq-ambari-plugin/pom.xml
--
diff --git a/contrib/hawq-ambari-plugin/pom.xml 
b/contrib/hawq-ambari-plugin/pom.xml
index ad55e84..94dd440 100644
--- a/contrib/hawq-ambari-plugin/pom.xml
+++ b/contrib/hawq-ambari-plugin/pom.xml
@@ -21,7 +21,7 @@
   4.0.0
   org.apache.hawq
   hawq-ambari-plugin
-  2.2.0.0
+  2.3.0.0
   hawq-ambari-plugin
   http://maven.apache.org
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/getversion
--
diff --git a/getversion b/getversion
index 8527657..081299c 100755
--- a/getversion
+++ b/getversion
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-GP_VERSION="2.2.0.0-incubating"
+GP_VERSION="2.3.0.0-incubating"
 
 GP_BUILDNUMBER=dev
 if [ -f BUILD_NUMBER ] ; then

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/ranger-plugin/admin-plugin/pom.xml
--
diff --git a/ranger-plugin/admin-plugin/pom.xml 
b/ranger-plugin/admin-plugin/pom.xml
index e4460e1..19a10ec 100644
--- a/ranger-plugin/admin-plugin/pom.xml
+++ b/ranger-plugin/admin-plugin/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.hawq
 ranger-plugin
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/ranger-plugin/integration/admin/pom.xml
--
diff --git a/ranger-plugin/integration/admin/pom.xml 
b/ranger-plugin/integration/admin/pom.xml
index 3544c6f..152e4da 100644
--- a/ranger-plugin/integration/admin/pom.xml
+++ b/ranger-plugin/integration/admin/pom.xml
@@ -29,7 +29,7 @@
 
 org.apache.hawq
 ranger-plugin-integration
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/ranger-plugin/integration/pom.xml
--
diff --git a/ranger-plugin/integration/pom.xml 
b/ranger-plugin/integration/pom.xml
index c2f144f..fb5eff3 100644
--- a/ranger-plugin/integration/pom.xml
+++ b/ranger-plugin/integration/pom.xml
@@ -29,7 +29,7 @@
 
 org.apache.hawq
 ranger-plugin
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/ranger-plugin/integration/service/pom.xml
--
diff --git a/ranger-plugin/integration/service/pom.xml 
b/ranger-plugin/integration/service/pom.xml
index aac8027..6616a29 100644
--- a/ranger-plugin/integration/service/pom.xml
+++ b/ranger-plugin/integration/service/pom.xml
@@ -29,7 +29,7 @@
 
 org.apache.hawq
 ranger-plugin-integration
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apa

[1/2] incubator-hawq git commit: HAWQ-1586. Update version from 2.2.0.0 to 2.3.0.0

2018-02-08 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/2.3.0.0-incubating 060ca66d2 -> 5d5fee1cc


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5d5fee1c/tools/bin/gppylib/data/2.3.json
--
diff --git a/tools/bin/gppylib/data/2.3.json b/tools/bin/gppylib/data/2.3.json
new file mode 100644
index 000..e62b59d
--- /dev/null
+++ b/tools/bin/gppylib/data/2.3.json
@@ -0,0 +1,10458 @@
+{
+   "__comment" : "Generated by tidycat.pl version 34 on Mon Mar 27 14:07:18 
2017 CATALOG_VERSION_NO=201507221",
+   "__info" : {
+  "CATALOG_VERSION_NO" : "201507221"
+   },
+   "gp_configuration" : {
+  "CamelCaseRelationId" : "GpConfigurationRelationId",
+  "colh" : {
+ "content" : "int2",
+ "datadir" : "text",
+ "dbid" : "int2",
+ "definedprimary" : "bool",
+ "hostname" : "NameData",
+ "isprimary" : "bool",
+ "port" : "int4",
+ "valid" : "bool"
+  },
+  "cols" : [
+ {
+"colname" : "content",
+"ctype" : "int2",
+"precomment" : "\n**TK_BLANK_LINE**",
+"sqltype" : "smallint"
+ },
+ {
+"colname" : "definedprimary",
+"ctype" : "bool",
+"sqltype" : "boolean"
+ },
+ {
+"colname" : "dbid",
+"ctype" : "int2",
+"sqltype" : "smallint"
+ },
+ {
+"colname" : "isprimary",
+"ctype" : "bool",
+"sqltype" : "boolean"
+ },
+ {
+"colname" : "valid",
+"ctype" : "bool",
+"sqltype" : "boolean"
+ },
+ {
+"colname" : "hostname",
+"ctype" : "NameData",
+"sqltype" : "name"
+ },
+ {
+"colname" : "port",
+"ctype" : "int4",
+"sqltype" : "integer"
+ },
+ {
+"colname" : "datadir",
+"ctype" : "text",
+"sqltype" : "text"
+ }
+  ],
+  "filename" : "gp_configuration.h",
+  "indexes" : [
+ {
+"CamelCaseIndexId" : "GpConfigurationContentDefinedprimaryIndexId",
+"cols" : [
+   [
+  "content",
+  "int2_ops"
+   ],
+   [
+  "definedprimary",
+  "bool_ops"
+   ]
+],
+"indexid" : "6101",
+"unique" : "1",
+"with" : {
+   "indexid" : "6101"
+}
+ },
+ {
+"CamelCaseIndexId" : "GpConfigurationDbidIndexId",
+"cols" : [
+   [
+  "dbid",
+  "int2_ops"
+   ]
+],
+"indexid" : "6102",
+"unique" : "1",
+"with" : {
+   "indexid" : "6102"
+}
+ }
+  ],
+  "relid_comment_tag" : "/* relation id: 5000 - gp_configuration */\n",
+  "tabdef_text" : "\n   CREATE TABLE gp_configuration\n   with 
(shared=true, oid=false, relid=5000, content=MASTER_ONLY)\n   (\n   content 
smallint,\n   definedprimary  boolean,\n   dbidsmallint,\n   
isprimary   boolean,\n   valid   boolean,\n   hostname
name,\n   portinteger,\n   datadir text\n   )",
+  "with" : {
+ "bootstrap" : 0,
+ "camelcase" : "GpConfiguration",
+ "content" : "MASTER_ONLY",
+ "oid" : "",
+ "relid" : "5000",
+ "shared" : "1",
+ "text" : "with (shared=true, oid=false, relid=5000, 
content=MASTER_ONLY)"
+  }
+   },
+   "gp_configuration_history" : {
+  "CamelCaseRelationId" : "GpConfigHistoryRelationId",
+  "UppercaseReltypeOid" : "GP_CONFIGURATION_HISTORY_RELTYPE_OID",
+  "colh" : {
+ "description" : "text",
+ "hostname" : "text",
+ "registration_order" : "int4",
+ "time" : "timestamptz"
+  },
+  "cols" : [
+ {
+"colname" : "time",
+"ctype" : "timestamptz",
+"precomment" : "\n**TK_BLANK_LINE**",
+"sqltype" : "timestamp_with_time_zone"
+ },
+ {
+"colname" : "registration_order",
+"ctype" : "int4",
+"sqltype" : "integer"
+ },
+ {
+"colname" : "hostname",
+"ctype" : "text",
+"sqltype" : "text"
+ },
+ {
+"colname" : "description",
+"ctype" : "text",
+"sqltype" : "text"
+ }
+  ],
+  "filename" : "gp_configuration.h",
+  "relid_comment_tag" : "/* relation id: 5006 - gp_configuration_history 
*/\n",
+  "tabdef_text" : "\n   CREATE TABLE gp_configuration_history\n   with 
(camelcase=GpConfigHistory, shared=true, oid=false, relid=5006, 
reltype_oi

[2/2] incubator-hawq git commit: HAWQ-1586. Update version from 2.2.0.0 to 2.3.0.0

2018-02-08 Thread yjin
HAWQ-1586. Update version from 2.2.0.0 to 2.3.0.0


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

Branch: refs/heads/master
Commit: a05faa2aa11413003f2a71b63c3fbb97e82998ea
Parents: 060ca66
Author: Yi 
Authored: Thu Feb 8 19:03:55 2018 +1100
Committer: Yi 
Committed: Thu Feb 8 19:03:55 2018 +1100

--
 contrib/hawq-ambari-plugin/build.properties | 2 +-
 contrib/hawq-ambari-plugin/pom.xml  | 2 +-
 getversion  | 2 +-
 ranger-plugin/admin-plugin/pom.xml  | 2 +-
 ranger-plugin/integration/admin/pom.xml | 2 +-
 ranger-plugin/integration/pom.xml   | 2 +-
 ranger-plugin/integration/service/pom.xml   | 2 +-
 ranger-plugin/pom.xml   | 2 +-
 ranger-plugin/service/pom.xml   | 2 +-
 tools/bin/gppylib/data/2.3.json | 10458 +
 10 files changed, 10467 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/contrib/hawq-ambari-plugin/build.properties
--
diff --git a/contrib/hawq-ambari-plugin/build.properties 
b/contrib/hawq-ambari-plugin/build.properties
index 1cd6645..6df37f7 100644
--- a/contrib/hawq-ambari-plugin/build.properties
+++ b/contrib/hawq-ambari-plugin/build.properties
@@ -4,5 +4,5 @@ pxf.release.version=3.2.1
 pxf.common.services.version=3.0.0
 hawq.repo.prefix=hawq
 hawq.addons.repo.prefix=hawq-add-ons
-repository.version=2.2.0.0
+repository.version=2.3.0.0
 default.stack=HDP-2.5

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/contrib/hawq-ambari-plugin/pom.xml
--
diff --git a/contrib/hawq-ambari-plugin/pom.xml 
b/contrib/hawq-ambari-plugin/pom.xml
index ad55e84..94dd440 100644
--- a/contrib/hawq-ambari-plugin/pom.xml
+++ b/contrib/hawq-ambari-plugin/pom.xml
@@ -21,7 +21,7 @@
   4.0.0
   org.apache.hawq
   hawq-ambari-plugin
-  2.2.0.0
+  2.3.0.0
   hawq-ambari-plugin
   http://maven.apache.org
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/getversion
--
diff --git a/getversion b/getversion
index 8527657..081299c 100755
--- a/getversion
+++ b/getversion
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-GP_VERSION="2.2.0.0-incubating"
+GP_VERSION="2.3.0.0-incubating"
 
 GP_BUILDNUMBER=dev
 if [ -f BUILD_NUMBER ] ; then

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/ranger-plugin/admin-plugin/pom.xml
--
diff --git a/ranger-plugin/admin-plugin/pom.xml 
b/ranger-plugin/admin-plugin/pom.xml
index e4460e1..19a10ec 100644
--- a/ranger-plugin/admin-plugin/pom.xml
+++ b/ranger-plugin/admin-plugin/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.hawq
 ranger-plugin
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/ranger-plugin/integration/admin/pom.xml
--
diff --git a/ranger-plugin/integration/admin/pom.xml 
b/ranger-plugin/integration/admin/pom.xml
index 3544c6f..152e4da 100644
--- a/ranger-plugin/integration/admin/pom.xml
+++ b/ranger-plugin/integration/admin/pom.xml
@@ -29,7 +29,7 @@
 
 org.apache.hawq
 ranger-plugin-integration
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/ranger-plugin/integration/pom.xml
--
diff --git a/ranger-plugin/integration/pom.xml 
b/ranger-plugin/integration/pom.xml
index c2f144f..fb5eff3 100644
--- a/ranger-plugin/integration/pom.xml
+++ b/ranger-plugin/integration/pom.xml
@@ -29,7 +29,7 @@
 
 org.apache.hawq
 ranger-plugin
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/ranger-plugin/integration/service/pom.xml
--
diff --git a/ranger-plugin/integration/service/pom.xml 
b/ranger-plugin/integration/service/pom.xml
index aac8027..6616a29 100644
--- a/ranger-plugin/integration/service/pom.xml
+++ b/ranger-plugin/integration/service/pom.xml
@@ -29,7 +29,7 @@
 
 org.apache.hawq
 ranger-plugin-integration
-2.2.0.0
+2.3.0.0
 ..
 
 

http://git-wip-us.apache.org/repo

[1/2] incubator-hawq git commit: HAWQ-1586. Update version from 2.2.0.0 to 2.3.0.0

2018-02-08 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 060ca66d2 -> a05faa2aa


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a05faa2a/tools/bin/gppylib/data/2.3.json
--
diff --git a/tools/bin/gppylib/data/2.3.json b/tools/bin/gppylib/data/2.3.json
new file mode 100644
index 000..e62b59d
--- /dev/null
+++ b/tools/bin/gppylib/data/2.3.json
@@ -0,0 +1,10458 @@
+{
+   "__comment" : "Generated by tidycat.pl version 34 on Mon Mar 27 14:07:18 
2017 CATALOG_VERSION_NO=201507221",
+   "__info" : {
+  "CATALOG_VERSION_NO" : "201507221"
+   },
+   "gp_configuration" : {
+  "CamelCaseRelationId" : "GpConfigurationRelationId",
+  "colh" : {
+ "content" : "int2",
+ "datadir" : "text",
+ "dbid" : "int2",
+ "definedprimary" : "bool",
+ "hostname" : "NameData",
+ "isprimary" : "bool",
+ "port" : "int4",
+ "valid" : "bool"
+  },
+  "cols" : [
+ {
+"colname" : "content",
+"ctype" : "int2",
+"precomment" : "\n**TK_BLANK_LINE**",
+"sqltype" : "smallint"
+ },
+ {
+"colname" : "definedprimary",
+"ctype" : "bool",
+"sqltype" : "boolean"
+ },
+ {
+"colname" : "dbid",
+"ctype" : "int2",
+"sqltype" : "smallint"
+ },
+ {
+"colname" : "isprimary",
+"ctype" : "bool",
+"sqltype" : "boolean"
+ },
+ {
+"colname" : "valid",
+"ctype" : "bool",
+"sqltype" : "boolean"
+ },
+ {
+"colname" : "hostname",
+"ctype" : "NameData",
+"sqltype" : "name"
+ },
+ {
+"colname" : "port",
+"ctype" : "int4",
+"sqltype" : "integer"
+ },
+ {
+"colname" : "datadir",
+"ctype" : "text",
+"sqltype" : "text"
+ }
+  ],
+  "filename" : "gp_configuration.h",
+  "indexes" : [
+ {
+"CamelCaseIndexId" : "GpConfigurationContentDefinedprimaryIndexId",
+"cols" : [
+   [
+  "content",
+  "int2_ops"
+   ],
+   [
+  "definedprimary",
+  "bool_ops"
+   ]
+],
+"indexid" : "6101",
+"unique" : "1",
+"with" : {
+   "indexid" : "6101"
+}
+ },
+ {
+"CamelCaseIndexId" : "GpConfigurationDbidIndexId",
+"cols" : [
+   [
+  "dbid",
+  "int2_ops"
+   ]
+],
+"indexid" : "6102",
+"unique" : "1",
+"with" : {
+   "indexid" : "6102"
+}
+ }
+  ],
+  "relid_comment_tag" : "/* relation id: 5000 - gp_configuration */\n",
+  "tabdef_text" : "\n   CREATE TABLE gp_configuration\n   with 
(shared=true, oid=false, relid=5000, content=MASTER_ONLY)\n   (\n   content 
smallint,\n   definedprimary  boolean,\n   dbidsmallint,\n   
isprimary   boolean,\n   valid   boolean,\n   hostname
name,\n   portinteger,\n   datadir text\n   )",
+  "with" : {
+ "bootstrap" : 0,
+ "camelcase" : "GpConfiguration",
+ "content" : "MASTER_ONLY",
+ "oid" : "",
+ "relid" : "5000",
+ "shared" : "1",
+ "text" : "with (shared=true, oid=false, relid=5000, 
content=MASTER_ONLY)"
+  }
+   },
+   "gp_configuration_history" : {
+  "CamelCaseRelationId" : "GpConfigHistoryRelationId",
+  "UppercaseReltypeOid" : "GP_CONFIGURATION_HISTORY_RELTYPE_OID",
+  "colh" : {
+ "description" : "text",
+ "hostname" : "text",
+ "registration_order" : "int4",
+ "time" : "timestamptz"
+  },
+  "cols" : [
+ {
+"colname" : "time",
+"ctype" : "timestamptz",
+"precomment" : "\n**TK_BLANK_LINE**",
+"sqltype" : "timestamp_with_time_zone"
+ },
+ {
+"colname" : "registration_order",
+"ctype" : "int4",
+"sqltype" : "integer"
+ },
+ {
+"colname" : "hostname",
+"ctype" : "text",
+"sqltype" : "text"
+ },
+ {
+"colname" : "description",
+"ctype" : "text",
+"sqltype" : "text"
+ }
+  ],
+  "filename" : "gp_configuration.h",
+  "relid_comment_tag" : "/* relation id: 5006 - gp_configuration_history 
*/\n",
+  "tabdef_text" : "\n   CREATE TABLE gp_configuration_history\n   with 
(camelcase=GpConfigHistory, shared=true, oid=false, relid=5006, 
reltype_oid=6434, cont

[incubator-hawq] Git Push Summary

2018-02-07 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/2.3.0.0-incubating [created] 060ca66d2


svn commit: r24779 - /dev/incubator/hawq/KEYS

2018-02-06 Thread yjin
Author: yjin
Date: Wed Feb  7 06:44:48 2018
New Revision: 24779

Log:
Add Yi Jin (CODE SIGNING KEY) info

Modified:
dev/incubator/hawq/KEYS

Modified: dev/incubator/hawq/KEYS
==
--- dev/incubator/hawq/KEYS (original)
+++ dev/incubator/hawq/KEYS Wed Feb  7 06:44:48 2018
@@ -530,3 +530,40 @@ p+VBc/GNsUAdvg9+WO5Vz/6gJLzSNVXWt6R4z+ks
 mC6PDOREjWhops5Iyl0=
 =2o5o
 -END PGP PUBLIC KEY BLOCK-
+pub   rsa2048 2018-02-05 [SC] [expires: 2020-02-05]
+  41B0077075DFDAFCF8099A91CE60F90D1333092A
+uid   [ultimate] Yi Jin 
+sig 3CE60F90D1333092A 2018-02-05  Yi Jin 
+sub   rsa2048 2018-02-05 [E] [expires: 2020-02-05]
+sig  CE60F90D1333092A 2018-02-05  Yi Jin 
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+
+mQENBFp46n0BCAC6brpmQVHnz57zwI8JudksDAdJemHYfW/2frR513qFmiWVwCF4
+k6Ue/R0Iflt7Jhg6lUjU4/qf2w4ZuFSiqhwEvilT2p6plVX9MmQodxcCG5lHRyWa
+VM+lViscplIjZWC0Gs11vE5SKElL2CXlmCTUNkCY6473tW7GqsckrjfcO7crBmDF
+3QHVe04E/0yzeVzxSUpvSK0J1z21TcbQkBz7Ok0bfM6WyJZyXyyvpWtHBAxqzgAx
+JH/IuQmoyOPNU1DkhxRmN1huEQyaOVt79+uVUkO06g7WQKABOqByTqxudD35PU0e
+lElWopi5PaJc/csVOo0hE7F03OQS0KPwMphtABEBAAG0GFlpIEppbiA8eWppbkBh
+cGFjaGUub3JnPokBVAQTAQoAPhYhBEGwB3B139r8+Amakc5g+Q0TMwkqBQJaeOp9
+AhsDBQkDwmcABQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEM5g+Q0TMwkq4ukH
+/iJlm87VT2QmWc4FWl3hjewOvd9blS3cnY72ZRofSgfSV5wvhXFRV3M5bDd9ixe1
+f/fJHwWsk1OugnElZburZa3Y+v812lT8O0UrqGLioxS6gJ8J81VOF74DlP4BPfaS
+9orbmV1+/ajzouNH1/GapR/02XnqR/lGWvQmMKfKSEpKyR8B+qDrg1iih9sEUZOC
+pr1rBcjzXxR+Wz7NkAT+ngTVyAjNr0nWC1cz2tpyNXihedTprjgV+vybfj3R2AwV
+xFq1iMM7efjBaI0qp8oL7+scCfXRHWmVZd7VhCnWFhP0OyO1JnXeh12shLhpUVNV
+HhdP6yFYZ5JsplKjx1BhqXG5AQ0EWnjqfQEIAKfnEfkp4HT7JtXqLa253XmQ4zuS
+K/K9ys+Ok+Yng05EXvh1a8bS4k8ST/6OUGHqMHwvA8rh16H1aTB/GIYAGnvyV+0Q
+cDtYOMrsfnCgNrU+8ypbqcFrYcD1l0DQ3ufY7SHsv2M2vEFVKXzixJ0DS2JqRGvA
+YDUz/0nN95kdGrS+lDIzQ8MZh7h7LCBAN5rH8BDoWMf6ZtMUvRL9y7kestL2LQ+j
+q6kDiryfKhxGpYpcnatzUNRxxyBklaWDPWh1YKqCc8AZM9j1yYqZusjUOln7YSVD
+OrXloHtiRXtNx7f6TFLc8q30eeTu+M9tSPh4NhBVbsRNd9YrlVeQrgICrVEAEQEA
+AYkBPAQYAQoAJhYhBEGwB3B139r8+Amakc5g+Q0TMwkqBQJaeOp9AhsMBQkDwmcA
+AAoJEM5g+Q0TMwkq8H4H/2fiuTt/DOZJM8NcgWyZSsIJpnZpzJw6AatQVm6NJ3BG
+t7pv/z6aMdLLzU6JC7Fp0/zEDJE4FSxCOp3YtY15Ik++MeKoWoFBn3lOUbLDNYPR
+Df916Z2uwNEHuBQZzC7uwVSt87VfwKWTOXPTQwkxaMpoXxAqXSGGKgO5VFJ8DaH2
+IpVFMyCh689XfBQjNTt0AyRyIKuTtWgK4qQl2VMWfRvC2DUzGggRPhkQGIydgeWK
+Pdv+Ddb2LjvEYIH/oWZGjBsMOx8M0QUoO5KbRCmkTgqnKOxG9mbvK1Ums07Se4fS
+c1rHYu/uJgdTVj5v4Ta/2LJ1oQAKV/xnCDIvySxUUNw=
+=xFjC
+-END PGP PUBLIC KEY BLOCK-




svn commit: r24777 - /release/incubator/hawq/KEYS

2018-02-06 Thread yjin
Author: yjin
Date: Wed Feb  7 06:43:51 2018
New Revision: 24777

Log:
Add Yi Jin (CODE SIGNING KEY) info

Modified:
release/incubator/hawq/KEYS

Modified: release/incubator/hawq/KEYS
==
--- release/incubator/hawq/KEYS (original)
+++ release/incubator/hawq/KEYS Wed Feb  7 06:43:51 2018
@@ -530,3 +530,40 @@ p+VBc/GNsUAdvg9+WO5Vz/6gJLzSNVXWt6R4z+ks
 mC6PDOREjWhops5Iyl0=
 =2o5o
 -END PGP PUBLIC KEY BLOCK-
+pub   rsa2048 2018-02-05 [SC] [expires: 2020-02-05]
+  41B0077075DFDAFCF8099A91CE60F90D1333092A
+uid   [ultimate] Yi Jin 
+sig 3CE60F90D1333092A 2018-02-05  Yi Jin 
+sub   rsa2048 2018-02-05 [E] [expires: 2020-02-05]
+sig  CE60F90D1333092A 2018-02-05  Yi Jin 
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+
+mQENBFp46n0BCAC6brpmQVHnz57zwI8JudksDAdJemHYfW/2frR513qFmiWVwCF4
+k6Ue/R0Iflt7Jhg6lUjU4/qf2w4ZuFSiqhwEvilT2p6plVX9MmQodxcCG5lHRyWa
+VM+lViscplIjZWC0Gs11vE5SKElL2CXlmCTUNkCY6473tW7GqsckrjfcO7crBmDF
+3QHVe04E/0yzeVzxSUpvSK0J1z21TcbQkBz7Ok0bfM6WyJZyXyyvpWtHBAxqzgAx
+JH/IuQmoyOPNU1DkhxRmN1huEQyaOVt79+uVUkO06g7WQKABOqByTqxudD35PU0e
+lElWopi5PaJc/csVOo0hE7F03OQS0KPwMphtABEBAAG0GFlpIEppbiA8eWppbkBh
+cGFjaGUub3JnPokBVAQTAQoAPhYhBEGwB3B139r8+Amakc5g+Q0TMwkqBQJaeOp9
+AhsDBQkDwmcABQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEM5g+Q0TMwkq4ukH
+/iJlm87VT2QmWc4FWl3hjewOvd9blS3cnY72ZRofSgfSV5wvhXFRV3M5bDd9ixe1
+f/fJHwWsk1OugnElZburZa3Y+v812lT8O0UrqGLioxS6gJ8J81VOF74DlP4BPfaS
+9orbmV1+/ajzouNH1/GapR/02XnqR/lGWvQmMKfKSEpKyR8B+qDrg1iih9sEUZOC
+pr1rBcjzXxR+Wz7NkAT+ngTVyAjNr0nWC1cz2tpyNXihedTprjgV+vybfj3R2AwV
+xFq1iMM7efjBaI0qp8oL7+scCfXRHWmVZd7VhCnWFhP0OyO1JnXeh12shLhpUVNV
+HhdP6yFYZ5JsplKjx1BhqXG5AQ0EWnjqfQEIAKfnEfkp4HT7JtXqLa253XmQ4zuS
+K/K9ys+Ok+Yng05EXvh1a8bS4k8ST/6OUGHqMHwvA8rh16H1aTB/GIYAGnvyV+0Q
+cDtYOMrsfnCgNrU+8ypbqcFrYcD1l0DQ3ufY7SHsv2M2vEFVKXzixJ0DS2JqRGvA
+YDUz/0nN95kdGrS+lDIzQ8MZh7h7LCBAN5rH8BDoWMf6ZtMUvRL9y7kestL2LQ+j
+q6kDiryfKhxGpYpcnatzUNRxxyBklaWDPWh1YKqCc8AZM9j1yYqZusjUOln7YSVD
+OrXloHtiRXtNx7f6TFLc8q30eeTu+M9tSPh4NhBVbsRNd9YrlVeQrgICrVEAEQEA
+AYkBPAQYAQoAJhYhBEGwB3B139r8+Amakc5g+Q0TMwkqBQJaeOp9AhsMBQkDwmcA
+AAoJEM5g+Q0TMwkq8H4H/2fiuTt/DOZJM8NcgWyZSsIJpnZpzJw6AatQVm6NJ3BG
+t7pv/z6aMdLLzU6JC7Fp0/zEDJE4FSxCOp3YtY15Ik++MeKoWoFBn3lOUbLDNYPR
+Df916Z2uwNEHuBQZzC7uwVSt87VfwKWTOXPTQwkxaMpoXxAqXSGGKgO5VFJ8DaH2
+IpVFMyCh689XfBQjNTt0AyRyIKuTtWgK4qQl2VMWfRvC2DUzGggRPhkQGIydgeWK
+Pdv+Ddb2LjvEYIH/oWZGjBsMOx8M0QUoO5KbRCmkTgqnKOxG9mbvK1Ums07Se4fS
+c1rHYu/uJgdTVj5v4Ta/2LJ1oQAKV/xnCDIvySxUUNw=
+=xFjC
+-END PGP PUBLIC KEY BLOCK-




incubator-hawq git commit: HAWQ-1530. Illegally killing a JDBC select query causes locking problems

2017-11-07 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 9312de04a -> 1aafa0c88


HAWQ-1530. Illegally killing a JDBC select query causes locking problems


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1aafa0c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1aafa0c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1aafa0c8

Branch: refs/heads/master
Commit: 1aafa0c88ca8529e1b12ca2a84c692d20cc9e211
Parents: 9312de0
Author: Yi 
Authored: Wed Nov 8 16:02:54 2017 +1100
Committer: Yi 
Committed: Wed Nov 8 16:02:54 2017 +1100

--
 src/backend/cdb/dispatcher.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1aafa0c8/src/backend/cdb/dispatcher.c
--
diff --git a/src/backend/cdb/dispatcher.c b/src/backend/cdb/dispatcher.c
index 634c52a..6322871 100644
--- a/src/backend/cdb/dispatcher.c
+++ b/src/backend/cdb/dispatcher.c
@@ -59,6 +59,7 @@
 #include "tcop/pquery.h"   /* PortalGetResource */
 
 #include "resourcemanager/communication/rmcomm_QD2RM.h"
+#include "storage/ipc.h"
 
 /* Define and structure */
 typedef struct DispatchTask
@@ -1414,9 +1415,12 @@ dispatch_cleanup(DispatchData *data)
if (dispatcher_is_state_error(data))
{
/* We cannot unbind executors until we retrieve error message! 
*/
-   dispatch_throw_error(data);
-   Assert(false);
-   return; /* should not hit */
+   if (!proc_exit_inprogress) {
+   dispatch_throw_error(data);
+   Assert(false);
+   return; /* should not hit */
+   }
+
}

dispatch_end_env(data);



incubator-hawq git commit: HAWQ-1310. Reformat resource_negotiator().

2017-08-11 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 31aeb4a11 -> 09cf75bbf


HAWQ-1310. Reformat resource_negotiator().


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

Branch: refs/heads/master
Commit: 09cf75bbf4a807015b95f2318dec19914ca4dc45
Parents: 31aeb4a
Author: amyrazz44 
Authored: Fri Aug 11 22:31:46 2017 +1000
Committer: Yi 
Committed: Fri Aug 11 22:31:46 2017 +1000

--
 src/backend/optimizer/plan/planner.c | 432 ++
 1 file changed, 200 insertions(+), 232 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/09cf75bb/src/backend/optimizer/plan/planner.c
--
diff --git a/src/backend/optimizer/plan/planner.c 
b/src/backend/optimizer/plan/planner.c
index 2f1fb5d..a90a093 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -438,256 +438,224 @@ PlannedStmt *refineCachedPlan(PlannedStmt * plannedstmt,
  *
  */
 
-PlannedStmt * 
-planner(Query *parse, int cursorOptions,
-   ParamListInfo boundParams, QueryResourceLife resourceLife)
-{
-   PlannedStmt *result = NULL;
-   instr_time  starttime, endtime;
-   ResourceNegotiatorResult *ppResult = (ResourceNegotiatorResult *) 
palloc(sizeof(ResourceNegotiatorResult));
-   SplitAllocResult initResult = {NULL, NIL, 0, NIL, NULL};
-   ppResult->saResult = initResult;
-   ppResult->stmt = NULL;
-   static int plannerLevel = 0;
-   bool resourceNegotiateDone = false;
-   QueryResource *savedQueryResource = GetActiveQueryResource();
-   SetActiveRelType(NIL);
-
-   bool isDispatchParallel = false;
-   /*
-* Before doing the true query optimization, we first run a 
resource_negotiator to give
-* us some sense of the complexity of the query, and allocate the 
appropriate
-* resource to run this query. After gaining the resource, we can 
perform the
-* actual optimization.
-*/
-   increase_planning_depth();
-
-   plannerLevel++;
-   if (!resourceNegotiateDone)
-   {
- PG_TRY();
- {
-  START_MEMORY_ACCOUNT(MemoryAccounting_CreateAccount(0, 
MEMORY_OWNER_TYPE_Resource_Negotiator));
-  {
-resource_negotiator(parse, cursorOptions, boundParams, resourceLife, 
&ppResult);
-
-   decrease_planning_depth();
-
-   if(ppResult->stmt && ppResult->stmt->planTree)
-   {
-   isDispatchParallel = ppResult->stmt->planTree->dispatch 
== DISPATCH_PARALLEL;
-   }
-  }
-  END_MEMORY_ACCOUNT();
- }
- PG_CATCH();
- {
-   decrease_planning_depth();
+PlannedStmt *
+planner(Query *parse, int cursorOptions, ParamListInfo boundParams, 
QueryResourceLife resourceLife) {
+PlannedStmt *result = NULL;
+instr_time starttime, endtime;
+ResourceNegotiatorResult *ppResult = (ResourceNegotiatorResult *) 
palloc(sizeof(ResourceNegotiatorResult));
+SplitAllocResult initResult = { NULL, NIL, 0, NIL, NULL };
+ppResult->saResult = initResult;
+ppResult->stmt = NULL;
+static int plannerLevel = 0;
+bool resourceNegotiateDone = false;
+QueryResource *savedQueryResource = GetActiveQueryResource();
+SetActiveRelType(NIL);
+
+bool isDispatchParallel = false;
+/*
+ * Before doing the true query optimization, we first run a 
resource_negotiator to give
+ * us some sense of the complexity of the query, and allocate the 
appropriate
+ * resource to run this query. After gaining the resource, we can perform 
the
+ * actual optimization.
+ */
+increase_planning_depth();
 
-   if ((ppResult != NULL))
-   {
- pfree(ppResult);
- ppResult = NULL;
-   }
-   plannerLevel = 0;
-   PG_RE_THROW();
- }
- PG_END_TRY();
-   }
-   SetActiveRelType(NIL);
-   if (plannerLevel >= 1)
-   {
- resourceNegotiateDone = true;
- gp_segments_for_planner = ppResult->saResult.planner_segments;
- if (ppResult->saResult.resource)
- {
-   SetActiveQueryResource(ppResult->saResult.resource);
-   SetActiveRelType(ppResult->saResult.relsType);
- }
-   }
+plannerLevel++;
+if (!resourceNegotiateDone) {
+PG_TRY();
+{
+START_MEMORY_ACCOUNT(MemoryAccounting_CreateAccount(0, 
MEMORY_OWNER_TYPE_Resou

incubator-hawq git commit: HAWQ-1498. Segments keep open file descriptors for deleted files

2017-08-11 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master c0cd47c3d -> 31aeb4a11


HAWQ-1498. Segments keep open file descriptors for deleted files


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/31aeb4a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/31aeb4a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/31aeb4a1

Branch: refs/heads/master
Commit: 31aeb4a11c14571051a39c2144a6eeb8d43a1606
Parents: c0cd47c
Author: Yi 
Authored: Fri Aug 11 22:03:33 2017 +1000
Committer: Yi 
Committed: Fri Aug 11 22:03:33 2017 +1000

--
 src/backend/cdb/cdbpersistentfilesysobj.c |   3 +
 src/backend/storage/file/fd.c | 171 +++--
 src/include/storage/fd.h  |   1 +
 3 files changed, 139 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/31aeb4a1/src/backend/cdb/cdbpersistentfilesysobj.c
--
diff --git a/src/backend/cdb/cdbpersistentfilesysobj.c 
b/src/backend/cdb/cdbpersistentfilesysobj.c
index 77ae62c..8667fd6 100644
--- a/src/backend/cdb/cdbpersistentfilesysobj.c
+++ b/src/backend/cdb/cdbpersistentfilesysobj.c
@@ -2129,6 +2129,9 @@ void PersistentFileSysObj_EndXactDrop(
ignoreNonExistence,
Debug_persistent_print,

Persistent_DebugPrintLevel());
+
+   // clean up alive connections that are used for deleting hdfs objects
+   cleanup_hdfs_handlers_for_dropping();
 }
 
 void PersistentFileSysObj_UpdateRelationBufpoolKind(

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/31aeb4a1/src/backend/storage/file/fd.c
--
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 4ec458e..2366318 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -228,6 +228,7 @@ typedef struct
  * hash table of hdfs file systems, key = hdfs:/:, value = hdfsFS
  */
 static HTAB * HdfsFsTable = NULL;
+static HTAB * HdfsFsTable4Drop = NULL;
 static MemoryContext HdfsGlobalContext = NULL;
 #define EXPECTED_MAX_HDFS_CONNECTIONS 10
 
@@ -298,7 +299,7 @@ static void CleanupTempFiles(bool isProcExit);
 static void RemovePgTempFilesInDir(const char *tmpdirname);
 static bool HasTempFilePrefix(char * fileName);
 
-static hdfsFS HdfsGetConnection(const char * path);
+static hdfsFS HdfsGetConnection(const char * path, bool isForDrop);
 static bool HdfsBasicOpenFile(FileName fileName, int fileFlags, int fileMode,
  char **hProtocol, 
hdfsFS *fs, hdfsFile *hFile);
 static const char * ConvertToUnixPath(const char * fileName, char * buffer,
@@ -1793,7 +1794,7 @@ AllocateDir(const char *dirname)
return NULL;
if (ConvertToUnixPath(dirname, unixpath, sizeof(unixpath)) == 
NULL)
return NULL;
-   if ((fs = HdfsGetConnection(dirname)) == NULL)
+   if ((fs = HdfsGetConnection(dirname, false)) == NULL)
return NULL;
/* TODO: add to filesystem! */
if ((info = hdfsListDirectory(fs, unixpath, &num)) == NULL)
@@ -2005,15 +2006,66 @@ void
 cleanup_filesystem_handler(void)
 {
HASH_SEQ_STATUS status;
+   HASH_SEQ_STATUS status4drop;
struct FsEntry *entry;
char *protocol;
 
-   if (NULL == HdfsFsTable)
+   if (NULL == HdfsFsTable && NULL == HdfsFsTable4Drop)
return;
 
-   hash_seq_init(&status, HdfsFsTable);
+   if (NULL != HdfsFsTable) {
+   hash_seq_init(&status, HdfsFsTable);
 
-   while (NULL != (entry = hash_seq_search(&status)))
+   while (NULL != (entry = hash_seq_search(&status)))
+   {
+   if (HdfsParsePath(entry->host, &protocol, NULL, NULL, 
NULL) || NULL == protocol)
+   {
+   elog(WARNING, "cannot get protocol for host: 
%s", entry->host);
+   continue;
+   }
+
+   if (entry->fs)
+   HdfsDisconnect(protocol, entry->fs);
+   pfree(protocol);
+   }
+   hash_destroy(HdfsFsTable);
+   HdfsFsTable = NULL;
+   }
+
+   if (NULL != HdfsFsTable4Drop) {
+   hash_seq_init(&status4drop, HdfsFsTable4Drop);
+
+   while (NULL != (entry = hash_seq_search(&status4drop)))
+   {
+   if (HdfsParseP

incubator-hawq git commit: HAWQ-1439. tolerate system time being changed to earlier point when checking resource context timeout

2017-04-26 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 97ace9cf8 -> e082d3adb


HAWQ-1439. tolerate system time being changed to earlier point when checking 
resource context timeout


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

Branch: refs/heads/master
Commit: e082d3adbb89a9e5ccb341da324ea9514cff5a35
Parents: 97ace9c
Author: Yi 
Authored: Thu Apr 27 12:09:25 2017 +1000
Committer: Yi 
Committed: Thu Apr 27 12:09:25 2017 +1000

--
 .../resourcemanager/utils/network_utils.c   | 21 +---
 1 file changed, 18 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e082d3ad/src/backend/resourcemanager/utils/network_utils.c
--
diff --git a/src/backend/resourcemanager/utils/network_utils.c 
b/src/backend/resourcemanager/utils/network_utils.c
index fbfe0a9..78a29cb 100644
--- a/src/backend/resourcemanager/utils/network_utils.c
+++ b/src/backend/resourcemanager/utils/network_utils.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include "storage/ipc.h"
 
 #include "dynrm.h"
 /*
@@ -41,9 +42,23 @@ static void cleanupSocketConnectionPool(int code, Datum arg);
 
 uint64_t gettime_microsec(void)
 {
-static struct timeval t;
-gettimeofday(&t,NULL);
-return 100ULL * t.tv_sec + t.tv_usec;
+   struct timeval newTime;
+   int status = 1;
+   uint64_t t = 0;
+
+#if HAVE_LIBRT
+   struct timespec ts;
+   status = clock_gettime(CLOCK_MONOTONIC, &ts);
+   newTime.tv_sec = ts.tv_sec;
+   newTime.tv_usec = ts.tv_nsec / 1000;
+#endif
+
+   if (status != 0)
+   {
+   gettimeofday(&newTime, NULL);
+   }
+   t = ((uint64_t)newTime.tv_sec) * USECS_PER_SECOND + newTime.tv_usec;
+   return t;
 }
 
 int getHostIPV4AddressesByHostNameAsString(MCTYPE  context,



incubator-hawq git commit: HAWQ-1433. ALTER RESOURCE QUEUE DDL does not check the format of attribute MEMORY_CLUSTER_LIMIT and CORE_CLUSTER_LIMIT

2017-04-24 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master b8e6afd12 -> 97ace9cf8


HAWQ-1433. ALTER RESOURCE QUEUE DDL does not check the format of attribute 
MEMORY_CLUSTER_LIMIT and CORE_CLUSTER_LIMIT


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/97ace9cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/97ace9cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/97ace9cf

Branch: refs/heads/master
Commit: 97ace9cf88432163eea5e91db55edc8a13d78496
Parents: b8e6afd
Author: stanlyxiang 
Authored: Mon Apr 24 20:01:40 2017 +1000
Committer: Yi 
Committed: Mon Apr 24 20:01:40 2017 +1000

--
 src/backend/resourcemanager/resqueuemanager.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/97ace9cf/src/backend/resourcemanager/resqueuemanager.c
--
diff --git a/src/backend/resourcemanager/resqueuemanager.c 
b/src/backend/resourcemanager/resqueuemanager.c
index 3d3e46a..1834c58 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -484,9 +484,13 @@ int parseResourceQueueAttributes( List 
*attributes,
}
else
{
-   memlimit_value = true;
-   res = SimpleStringToStorageSizeMB(attrvalue,
-   
  (uint32_t *) &(queue->ClusterMemoryMB));
+   res = RESQUEMGR_WRONG_RES_QUOTA_EXP;
+   snprintf(errorbuf, errorbufsize,
+   "%s format \'%s\' is invalid, 
only support percentage now.",
+   loadcatalog ?
+   
RSQTBLAttrNames[RSQ_TBL_ATTR_MEMORY_LIMIT_CLUSTER] :
+   
RSQDDLAttrNames[RSQ_DDL_ATTR_MEMORY_LIMIT_CLUSTER],
+   attrvalue->Str);
}
break;
 
@@ -501,8 +505,13 @@ int parseResourceQueueAttributes( List 
*attributes,
}
else
{
-   corelimit_value = true;
-   res = SimpleStringToDouble(attrvalue, 
&(queue->ClusterVCore));
+   res = RESQUEMGR_WRONG_RES_QUOTA_EXP;
+   snprintf(errorbuf, errorbufsize,
+   "%s format \'%s\' is invalid, 
only support percentage now.",
+   loadcatalog ?
+   
RSQTBLAttrNames[RSQ_TBL_ATTR_CORE_LIMIT_CLUSTER] :
+   
RSQDDLAttrNames[RSQ_DDL_ATTR_CORE_LIMIT_CLUSTER],
+   attrvalue->Str);
}
break;
 



incubator-hawq git commit: HAWQ-1400. Add a small sleeping period in feature test utility before dropping test database

2017-03-22 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master c89b3e2ca -> 3fae12336


HAWQ-1400. Add a small sleeping period in feature test utility before dropping 
test database


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

Branch: refs/heads/master
Commit: 3fae12336c7af816a9efbeb02830725f12bc6f7a
Parents: c89b3e2
Author: Yi 
Authored: Thu Mar 23 13:44:08 2017 +1100
Committer: Yi 
Committed: Thu Mar 23 13:44:08 2017 +1100

--
 src/test/feature/lib/sql_util.cpp | 14 ++
 1 file changed, 14 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3fae1233/src/test/feature/lib/sql_util.cpp
--
diff --git a/src/test/feature/lib/sql_util.cpp 
b/src/test/feature/lib/sql_util.cpp
index 9bb3613..07071f4 100644
--- a/src/test/feature/lib/sql_util.cpp
+++ b/src/test/feature/lib/sql_util.cpp
@@ -71,6 +71,20 @@ SQLUtility::SQLUtility(SQLUtilityMode mode)
 
 SQLUtility::~SQLUtility() {
   if (!test_info->result()->Failed()) {
+
+   
//--
+   // This is a temporary work around to sleep a short time window in 
order to
+   // wait for the quit of query dispatcher processes. Because each query
+   // dispatcher has one resource heart-beat thread to be joined before the
+   // exit, in worst case, that thread will sleep 100ms and consequently 
check
+   // the switch variable to complete the exiting logic. This may causes 
the
+   // error reporting that the database is still accessed by other users, 
when
+   // user drops database once finished using database.
+   //
+   // When we have that exit logic improved, we can remove this logic.
+   
//--
+
+usleep(20);
 if (schemaName != HAWQ_DEFAULT_SCHEMA) {
   exec("DROP SCHEMA " + schemaName + " CASCADE");
 }



incubator-hawq git commit: HAWQ-1315. Function validateResourcePoolStatus() in resourcepool.c is logging the wrong information

2017-02-15 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 103373b7f -> d55014dba


HAWQ-1315. Function validateResourcePoolStatus() in resourcepool.c is logging 
the wrong information


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

Branch: refs/heads/master
Commit: d55014dba9026e77be7c315c6884c227130e4b7f
Parents: 103373b
Author: amyrazz44 
Authored: Wed Feb 15 13:32:13 2017 +0800
Committer: Yi 
Committed: Wed Feb 15 22:45:09 2017 +1100

--
 src/backend/resourcemanager/resourcepool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d55014db/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 9485dbf..c8355d5 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -4143,8 +4143,8 @@ void validateResourcePoolStatus(bool refquemgr)
  "pool (%d MB, %lf CORE), maximum 
capacity (%d MB, %d CORE)",
  totalallocmem,
  totalalloccore,
- core,
- mem);
+ mem,
+ core);
}
 
/*



incubator-hawq git commit: HAWQ-1321. failNames wrongly uses memory context to build message when ANALYZE failed

2017-02-13 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 1c36c28c8 -> 256c0668c


HAWQ-1321. failNames wrongly uses memory context to build message when ANALYZE 
failed


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/256c0668
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/256c0668
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/256c0668

Branch: refs/heads/master
Commit: 256c0668c94137565c24dc2057fbe3282187165c
Parents: 1c36c28
Author: Yi 
Authored: Tue Feb 14 09:43:16 2017 +1100
Committer: Yi 
Committed: Tue Feb 14 09:43:16 2017 +1100

--
 src/backend/commands/analyze.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/256c0668/src/backend/commands/analyze.c
--
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index ae869da..65d9bd3 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -309,8 +309,6 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int 
preferred_seg_num)
int successCount = 0, failCount = 0;
StringInfoData  failNames;
 
-   initStringInfo(&failNames);
-
/**
 * Ensure that an ANALYZE is requested.
 */
@@ -362,6 +360,7 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int 
preferred_seg_num)
 
MemoryContextSwitchTo(analyzeStatementContext);
 
+   initStringInfo(&failNames);
 
/*
 * This is a per relation context.
@@ -678,8 +677,12 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int 
preferred_seg_num)
  
RelationGetRelationName(candidateRelation),
  
edata->message);
failCount += 1;
+
+   /* failNames uses 
memory from statement level context */
+   
MemoryContextSwitchTo(analyzeStatementContext);

appendStringInfo(&failNames, "%s", failCount == 1 ? "(" : ", ");

appendStringInfo(&failNames, "%s", RelationGetRelationName(candidateRelation));
+   
MemoryContextSwitchTo(oldcontext);
 
/* rollback this 
table's sub-transaction */

RollbackAndReleaseCurrentSubTransaction();



incubator-hawq git commit: HAWQ-1285. resource manager outputs uninitialized string as host name

2017-01-22 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 5da0476a1 -> d2608dec4


HAWQ-1285. resource manager outputs uninitialized string as host name


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

Branch: refs/heads/master
Commit: d2608dec4df52297b883e16893f2fda75242264c
Parents: 5da0476
Author: Yi 
Authored: Mon Jan 23 15:25:39 2017 +1100
Committer: Yi 
Committed: Mon Jan 23 15:25:39 2017 +1100

--
 src/backend/resourcemanager/resourcepool.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d2608dec/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 755a4ab..db52a54 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -4697,10 +4697,10 @@ void adjustSegmentStatGRMCapacity(SegStat segstat)
if ( oldmemorymb != segstat->GRMTotalMemoryMB ||
 oldcore != segstat->GRMTotalCore )
{
-   elog(LOG, "Resource manager adjusts segment %s original 
global resource "
- "manager resource capacity from (%d 
MB, %d CORE) to "
- "(%d MB, %d CORE)",
- 
GET_SEGINFO_HOSTNAME(&(segstat->Info)),
+   elog(LOG, "resource manager adjusts segment %s resource 
capacity "
+ "from (%d MB, %d CORE) to (%d MB, %d 
CORE) from the "
+ "cluster report of global resource 
manager",
+ 
GET_SEGINFO_GRMHOSTNAME(&(segstat->Info)),
  oldmemorymb,
  oldcore,
  segstat->GRMTotalMemoryMB,



incubator-hawq git commit: HAWQ-1258. Segment resource manager does not switch back when it cannot resolve standby host name

2017-01-11 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master ad7187348 -> 2a7c20f2b


HAWQ-1258. Segment resource manager does not switch back when it cannot resolve 
standby host name


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

Branch: refs/heads/master
Commit: 2a7c20f2b5eff1563d3f2a7c8f7504bec2099bd3
Parents: ad71873
Author: Yi 
Authored: Wed Jan 11 19:40:08 2017 +1100
Committer: Yi 
Committed: Wed Jan 11 19:40:08 2017 +1100

--
 .../resourcemanager/communication/rmcomm_RMSEG2RM.c  | 10 ++
 src/backend/resourcemanager/include/dynrm.h  |  2 ++
 src/backend/resourcemanager/resourcemanager_RMSEG.c  | 11 +++
 src/backend/utils/misc/guc.c |  2 +-
 4 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2a7c20f2/src/backend/resourcemanager/communication/rmcomm_RMSEG2RM.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RMSEG2RM.c 
b/src/backend/resourcemanager/communication/rmcomm_RMSEG2RM.c
index 92946c8..4c93f78 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RMSEG2RM.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RMSEG2RM.c
@@ -107,8 +107,10 @@ int sendIMAlive(int  *errorcode,
if ( res != FUNC_RETURN_OK )
{
rm_pfree(AsyncCommContext, context);
-   elog(WARNING, "Fail to register asynchronous connection for 
sending "
- "IMAlive message. %d", res);
+   elog(LOG, "failed to register asynchronous connection for 
sending "
+ "IMAlive message. %d", res);
+   /* Always switch if fail to register connection here. */
+   switchIMAliveSendingTarget();
return res;
}
 
@@ -140,7 +142,7 @@ void receivedIMAliveResponse(AsyncCommMessageHandlerContext 
 context,
 buffersize != sizeof(RPCResponseIMAliveData) ) {
elog(WARNING, "Segment's resource manager received wrong 
response for "
  "heart-beat request.");
-   DRMGlobalInstance->SendToStandby = 
!DRMGlobalInstance->SendToStandby;
+   switchIMAliveSendingTarget();
}
else
{
@@ -165,7 +167,7 @@ void sentIMAliveError(AsyncCommMessageHandlerContext 
context)
else
elog(WARNING, "Segment's resource manager sending IMAlive 
message "
  "switches from master to standby");
-   DRMGlobalInstance->SendToStandby = !DRMGlobalInstance->SendToStandby;
+   switchIMAliveSendingTarget();
 }
 
 void sentIMAliveCleanUp(AsyncCommMessageHandlerContext context)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2a7c20f2/src/backend/resourcemanager/include/dynrm.h
--
diff --git a/src/backend/resourcemanager/include/dynrm.h 
b/src/backend/resourcemanager/include/dynrm.h
index bd4a303..a6309c8 100644
--- a/src/backend/resourcemanager/include/dynrm.h
+++ b/src/backend/resourcemanager/include/dynrm.h
@@ -322,4 +322,6 @@ int  initializeSocketServer_RMSEG(void);
 int  MainHandlerLoop_RMSEG(void);
 
 void checkAndBuildFailedTmpDirList(void);
+
+void switchIMAliveTarget(void);
 #endif //DYNAMIC_RESOURCE_MANAGEMENT_H

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2a7c20f2/src/backend/resourcemanager/resourcemanager_RMSEG.c
--
diff --git a/src/backend/resourcemanager/resourcemanager_RMSEG.c 
b/src/backend/resourcemanager/resourcemanager_RMSEG.c
index f3042eb..f8afe5a 100644
--- a/src/backend/resourcemanager/resourcemanager_RMSEG.c
+++ b/src/backend/resourcemanager/resourcemanager_RMSEG.c
@@ -275,3 +275,14 @@ void checkAndBuildFailedTmpDirList(void)
  "directory, which costs " UINT64_FORMAT " us",
  endtime - starttime);
 }
+
+void switchIMAliveSendingTarget(void)
+{
+   /* We switch to standby server only when it is correctly set. */
+   if (pg_strcasecmp(standby_addr_host, "none") != 0)
+   {
+   DRMGlobalInstance->SendToStandby = 
!DRMGlobalInstance->SendToStandby;
+   elog(LOG, "segment will send heart-beat to %s from now on",
+ DRMGlobalInstance->SendToStandby ? "standby" 
: "master");
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2a7c20

incubator-hawq git commit: HAWQ-1242. hawq-site.xml default content has wrong guc variable names

2017-01-03 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 60f093372 -> 8d22582c7


HAWQ-1242. hawq-site.xml default content has wrong guc variable names


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/8d22582c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/8d22582c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/8d22582c

Branch: refs/heads/master
Commit: 8d22582c76309184cdb961abcd2b66f65e6bebb1
Parents: 60f0933
Author: Yi 
Authored: Wed Jan 4 14:10:09 2017 +1100
Committer: Yi 
Committed: Wed Jan 4 14:10:09 2017 +1100

--
 src/backend/utils/misc/guc.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8d22582c/src/backend/utils/misc/guc.c
--
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 00b9bad..dccd599 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -8195,7 +8195,7 @@ static struct config_string ConfigureNamesString[] =
   },
 
{
-   {"standby_address_host", PGC_POSTMASTER, PRESET_OPTIONS,
+   {"hawq_standby_address_host", PGC_POSTMASTER, PRESET_OPTIONS,
gettext_noop("standby server address hostname"),
NULL
},
@@ -8204,7 +8204,7 @@ static struct config_string ConfigureNamesString[] =
},
 
{
-   {"dfs_url", PGC_POSTMASTER, PRESET_OPTIONS,
+   {"hawq_dfs_url", PGC_POSTMASTER, PRESET_OPTIONS,
gettext_noop("hdfs url"),
NULL
},
@@ -8213,7 +8213,7 @@ static struct config_string ConfigureNamesString[] =
},
 
{
-   {"master_directory", PGC_POSTMASTER, PRESET_OPTIONS,
+   {"hawq_master_directory", PGC_POSTMASTER, PRESET_OPTIONS,
gettext_noop("master server data directory"),
NULL
},
@@ -8222,7 +8222,7 @@ static struct config_string ConfigureNamesString[] =
},
 
{
-   {"segment_directory", PGC_POSTMASTER, PRESET_OPTIONS,
+   {"hawq_segment_directory", PGC_POSTMASTER, PRESET_OPTIONS,
gettext_noop("segment data directory"),
NULL
},



incubator-hawq git commit: Revert "HAWQ-1242. hawq-site.xml default content has wrong guc variable names"

2016-12-29 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 61646cd55 -> 94239f5ed


Revert "HAWQ-1242. hawq-site.xml default content has wrong guc variable names"

This reverts commit 61646cd55fddb4ef3feafe9fd125763796d518c0.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/94239f5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/94239f5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/94239f5e

Branch: refs/heads/master
Commit: 94239f5ed5ecf39e1650ec4b5d348ec9a907edc9
Parents: 61646cd
Author: Yi 
Authored: Fri Dec 30 16:06:44 2016 +1100
Committer: Yi 
Committed: Fri Dec 30 16:06:44 2016 +1100

--
 src/backend/utils/misc/etc/hawq-site.xml  | 8 
 src/backend/utils/misc/etc/template-hawq-site.xml | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/94239f5e/src/backend/utils/misc/etc/hawq-site.xml
--
diff --git a/src/backend/utils/misc/etc/hawq-site.xml 
b/src/backend/utils/misc/etc/hawq-site.xml
index 012ccbf..b327ab4 100644
--- a/src/backend/utils/misc/etc/hawq-site.xml
+++ b/src/backend/utils/misc/etc/hawq-site.xml
@@ -33,7 +33,7 @@ under the License.

 

-   standby_address_host
+   hawq_standby_address_host
none
The host name of hawq standby master.

@@ -45,19 +45,19 @@ under the License.

 

-   dfs_url
+   hawq_dfs_url
localhost:8020/hawq_default
URL for accessing HDFS.

 

-   master_directory
+   hawq_master_directory
~/hawq-data-directory/masterdd
The directory of hawq master.

 

-   segment_directory
+   hawq_segment_directory
~/hawq-data-directory/segmentdd
The directory of hawq segment.
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/94239f5e/src/backend/utils/misc/etc/template-hawq-site.xml
--
diff --git a/src/backend/utils/misc/etc/template-hawq-site.xml 
b/src/backend/utils/misc/etc/template-hawq-site.xml
index 1901db3..cf6273a 100644
--- a/src/backend/utils/misc/etc/template-hawq-site.xml
+++ b/src/backend/utils/misc/etc/template-hawq-site.xml
@@ -33,7 +33,7 @@ under the License.

 

-   standby_address_host
+   hawq_standby_address_host
%standby.host%
The host name of hawq standby master.

@@ -45,19 +45,19 @@ under the License.

 

-   dfs_url
+   hawq_dfs_url
%namenode.host%:%namenode.port%/%hawq.file.space%
URL for accessing HDFS.

 

-   master_directory
+   hawq_master_directory
%master.directory%
The directory of hawq master.

 

-   segment_directory
+   hawq_segment_directory
%segment.directory%
The directory of hawq segment.
 



incubator-hawq git commit: HAWQ-1242. hawq-site.xml default content has wrong guc variable names

2016-12-29 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master e25fe8b42 -> 61646cd55


HAWQ-1242. hawq-site.xml default content has wrong guc variable names


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/61646cd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/61646cd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/61646cd5

Branch: refs/heads/master
Commit: 61646cd55fddb4ef3feafe9fd125763796d518c0
Parents: e25fe8b
Author: Yi 
Authored: Fri Dec 30 13:15:07 2016 +1100
Committer: Yi 
Committed: Fri Dec 30 13:15:07 2016 +1100

--
 src/backend/utils/misc/etc/hawq-site.xml  | 8 
 src/backend/utils/misc/etc/template-hawq-site.xml | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/61646cd5/src/backend/utils/misc/etc/hawq-site.xml
--
diff --git a/src/backend/utils/misc/etc/hawq-site.xml 
b/src/backend/utils/misc/etc/hawq-site.xml
index b327ab4..012ccbf 100644
--- a/src/backend/utils/misc/etc/hawq-site.xml
+++ b/src/backend/utils/misc/etc/hawq-site.xml
@@ -33,7 +33,7 @@ under the License.

 

-   hawq_standby_address_host
+   standby_address_host
none
The host name of hawq standby master.

@@ -45,19 +45,19 @@ under the License.

 

-   hawq_dfs_url
+   dfs_url
localhost:8020/hawq_default
URL for accessing HDFS.

 

-   hawq_master_directory
+   master_directory
~/hawq-data-directory/masterdd
The directory of hawq master.

 

-   hawq_segment_directory
+   segment_directory
~/hawq-data-directory/segmentdd
The directory of hawq segment.
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/61646cd5/src/backend/utils/misc/etc/template-hawq-site.xml
--
diff --git a/src/backend/utils/misc/etc/template-hawq-site.xml 
b/src/backend/utils/misc/etc/template-hawq-site.xml
index cf6273a..1901db3 100644
--- a/src/backend/utils/misc/etc/template-hawq-site.xml
+++ b/src/backend/utils/misc/etc/template-hawq-site.xml
@@ -33,7 +33,7 @@ under the License.

 

-   hawq_standby_address_host
+   standby_address_host
%standby.host%
The host name of hawq standby master.

@@ -45,19 +45,19 @@ under the License.

 

-   hawq_dfs_url
+   dfs_url
%namenode.host%:%namenode.port%/%hawq.file.space%
URL for accessing HDFS.

 

-   hawq_master_directory
+   master_directory
%master.directory%
The directory of hawq master.

 

-   hawq_segment_directory
+   segment_directory
%segment.directory%
The directory of hawq segment.
 



incubator-hawq git commit: HAWQ-1174. double type core counter of container set has precision issue

2016-11-28 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master cb3328d47 -> c80e4e35a


HAWQ-1174. double type core counter of container set has precision issue


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

Branch: refs/heads/master
Commit: c80e4e35a9a2c8fc834b3390a0b3bceaeb0e7675
Parents: cb3328d
Author: Yi 
Authored: Tue Nov 29 18:44:39 2016 +1100
Committer: Yi 
Committed: Tue Nov 29 18:44:39 2016 +1100

--
 src/backend/resourcemanager/include/resourcepool.h | 1 +
 src/backend/resourcemanager/resourcepool.c | 9 -
 src/backend/resourcemanager/resqueuemanager.c  | 4 
 3 files changed, 9 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c80e4e35/src/backend/resourcemanager/include/resourcepool.h
--
diff --git a/src/backend/resourcemanager/include/resourcepool.h 
b/src/backend/resourcemanager/include/resourcepool.h
index f23e77b..718e5fc 100644
--- a/src/backend/resourcemanager/include/resourcepool.h
+++ b/src/backend/resourcemanager/include/resourcepool.h
@@ -715,6 +715,7 @@ SimpStringPtr build_segment_status_description(SegStat 
segstat);
 #define EPSILON 1e-7
 #define IS_DOUBLE_ZERO(d)   (fabs(d) < EPSILON)
 #define IS_DOUBLE_EQ(x, y)  ((fabs((x) - (y))) <= (EPSILON))
+#define IS_DOUBLE_GE(x, y)  (((x) + EPSILON) >= (y))
 
 void validateResourcePoolStatus(bool refquemgr);
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c80e4e35/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 22bc0eb..ed91d8e 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3650,11 +3650,10 @@ void timeoutIdleGRMResourceToRBByRatio(int  
 ratioindex,
GRMContainer retcont = 
getGRMContainerSetContainerFirst(containerset);
 
if ( containerset->Available.MemoryMB >= retcont->MemoryMB &&
-containerset->Available.Core >= retcont->Core )
+IS_DOUBLE_GE(containerset->Available.Core, retcont->Core ) 
)
{
-
Assert(resource->Available.MemoryMB >= 
retcont->MemoryMB);
-   Assert(resource->Available.Core >= retcont->Core);
+   Assert(IS_DOUBLE_GE(resource->Available.Core, 
retcont->Core));
 
retcont = popGRMContainerSetContainerList(containerset);
 
@@ -3669,12 +3668,12 @@ void timeoutIdleGRMResourceToRBByRatio(int  
 ratioindex,
Assert( resource->Allocated.MemoryMB >= 0 );
Assert( resource->Allocated.Core >= 0  );
Assert( resource->Available.MemoryMB >= 0 );
-   Assert( resource->Available.Core >= 0  );
+   Assert( IS_DOUBLE_GE(resource->Available.Core, 0) );
 
Assert( containerset->Allocated.MemoryMB >= 0 );
Assert( containerset->Allocated.Core >= 0   );
Assert( containerset->Available.MemoryMB >= 0 );
-   Assert( containerset->Available.Core >= 0   );
+   Assert( IS_DOUBLE_GE(containerset->Available.Core, 0) );
 
reorderSegResourceAllocIndex(resource, ratio);
reorderSegResourceAvailIndex(resource, ratio);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c80e4e35/src/backend/resourcemanager/resqueuemanager.c
--
diff --git a/src/backend/resourcemanager/resqueuemanager.c 
b/src/backend/resourcemanager/resqueuemanager.c
index ca58507..d98c11c 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -3267,6 +3267,10 @@ void minusResourceBundleData(ResourceBundle detail, 
int32_t mem, double core)
 {
detail->MemoryMB -= mem;
detail->Core -= core;
+   if (IS_DOUBLE_EQ(detail->Core, 0)) {
+   // this setting is to avoid accumulating double precision 
problem
+   detail->Core = 0.0;
+   }
 }
 
 void resetResourceBundleDataByBundle(ResourceBundle detail, ResourceBundle 
source)



incubator-hawq git commit: HAWQ-834. Refactor goh_portals checkinstall cases using new test framework

2016-08-15 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master a5a2e6d13 -> 513388129


HAWQ-834. Refactor goh_portals checkinstall cases using new test framework


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

Branch: refs/heads/master
Commit: 513388129f2b60539f84e4dbc2f57a46b624c4bf
Parents: a5a2e6d
Author: Yi 
Authored: Tue Aug 16 11:49:17 2016 +1000
Committer: Yi 
Committed: Tue Aug 16 11:49:17 2016 +1000

--
 src/test/feature/query/ans/portal-basic.ans | 578 +++
 src/test/feature/query/sql/portal-basic.sql | 189 
 src/test/feature/query/test_portal.cpp  |  42 ++
 src/test/regress/expected/goh_portals.out   | 541 -
 src/test/regress/known_good_schedule|   1 -
 src/test/regress/sql/goh_portals.sql| 206 
 6 files changed, 809 insertions(+), 748 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/51338812/src/test/feature/query/ans/portal-basic.ans
--
diff --git a/src/test/feature/query/ans/portal-basic.ans 
b/src/test/feature/query/ans/portal-basic.ans
new file mode 100644
index 000..6778f33
--- /dev/null
+++ b/src/test/feature/query/ans/portal-basic.ans
@@ -0,0 +1,578 @@
+BEGIN;
+BEGIN
+DECLARE foo1 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo2 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo3 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo4 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo5 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo6 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo7 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo8 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo9 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo10 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo11 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo12 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo13 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo14 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo15 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo16 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo17 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo18 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo19 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo20 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo21 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo22 CURSOR FOR SELECT * FROM test2 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+DECLARE foo23 CURSOR FOR SELECT * FROM test1 ORDER BY 1,2,3,4;
+DECLARE CURSOR
+FETCH 1 in foo1;
+ a | b | c | d 
+---+---+---+---
+ 1 | 2 | 3 | 4
+(1 row)
+
+FETCH 2 in foo2;
+ a | b | c | d 
+---+---+---+---
+ 1 | 2 | 3 | 4
+ 2 | 4 | 6 | 8
+(2 rows)
+
+FETCH 3 in foo3;
+ a | b | c | d  
+---+---+---+
+ 1 | 2 | 3 |  4
+ 2 | 4 | 6 |  8
+ 3 | 6 | 9 | 12
+(3 rows)
+
+FETCH 4 in foo4;
+ a | b | c  | d  
+---+---++
+ 1 | 2 |  3 |  4
+ 2 | 4 |  6 |  8
+ 3 | 6 |  9 | 12
+ 4 | 8 | 12 | 16
+(4 rows)
+
+FETCH 5 in foo5;
+ a | b  | c  | d  
+---+++
+ 1 |  2 |  3 |  4
+ 2 |  4 |  6 |  8
+ 3 |  6 |  9 | 12
+ 4 |  8 | 12 | 16
+ 5 | 10 | 15 | 20
+(5 rows)
+
+FETCH 6 in foo6;
+ a | b  | c  | d  
+---+++
+ 1 |  2 |  3 |  4
+ 2 |  4 |  6 |  8
+ 3 |  6 |  9 | 12
+ 4 |  8 | 12 | 16
+ 5 | 10 | 15 | 20
+ 6 | 12 | 18 | 24
+(6 rows)
+
+FETCH 7 in foo7;
+ a | b  | c  | d  
+---+++
+ 1 |  2 |  3 |  4
+ 2 |  4 |  6 |  8
+ 3 |  6 |  9 | 12
+ 4 |  8 | 12 | 16
+ 5 | 10 | 15 | 20
+ 6 | 12 | 18 | 24
+ 7 | 14 | 21 | 28
+(7 rows)
+
+FETCH 8 in foo8;
+ a | b  | c  | d  
+---+++
+ 1 |  2 |  3 |  4
+ 2 |  4 |  6 |  8
+ 3 |  6 |  9 | 12
+ 4 |  8 | 12 | 16
+ 5 | 10 | 15 | 20
+ 6 | 12 | 18 | 24
+ 7 | 14 | 21 | 28
+ 8 | 16 | 24 | 32
+(8 rows)
+
+FETCH 9 in foo9;
+ a | b  | c  | d  
+---+++
+ 1 |  2 |  3 |  4
+ 2 |  4 |  6 |  8
+ 3 |  6 |  9 | 12
+ 4 |  8 | 12 | 16
+ 5 | 10 | 15 | 20
+ 6 | 12 | 18 | 24
+ 7 | 14 | 21 | 28
+ 8 | 16 | 24 | 32
+ 9 | 18 | 27 | 36
+(9 rows)
+
+FETCH 10 in foo10;
+ a  | b  | c  | d  
+++---

incubator-hawq git commit: HAWQ-899. Add feature test for nested null case with new test framework

2016-08-01 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 52fb7ab5a -> 83adc06ab


HAWQ-899. Add feature test for nested null case with new test framework


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/83adc06a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/83adc06a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/83adc06a

Branch: refs/heads/master
Commit: 83adc06abe5055a3edecf082d48b75a64659b87e
Parents: 52fb7ab
Author: YI JIN 
Authored: Tue Aug 2 10:37:29 2016 +1000
Committer: YI JIN 
Committed: Tue Aug 2 10:37:29 2016 +1000

--
 .../feature/query/test_nested_case_null.cpp | 37 
 src/test/regress/expected/nested_case_null.out  | 25 -
 src/test/regress/known_good_schedule|  1 -
 src/test/regress/sql/nested_case_null.sql   | 24 -
 4 files changed, 37 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/83adc06a/src/test/feature/query/test_nested_case_null.cpp
--
diff --git a/src/test/feature/query/test_nested_case_null.cpp 
b/src/test/feature/query/test_nested_case_null.cpp
new file mode 100644
index 000..3d5894f
--- /dev/null
+++ b/src/test/feature/query/test_nested_case_null.cpp
@@ -0,0 +1,37 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "lib/command.h"
+#include "lib/data_gen.h"
+#include "lib/hawq_config.h"
+#include "lib/sql_util.h"
+
+#include "gtest/gtest.h"
+
+class TestQueryNestedCaseNull : public ::testing::Test {
+ public:
+  TestQueryNestedCaseNull() {}
+  ~TestQueryNestedCaseNull() {}
+};
+
+TEST_F(TestQueryNestedCaseNull, Test1) {
+  hawq::test::SQLUtility util;
+
+  // prepare
+  util.execute("DROP TABLE IF EXISTS t CASCADE");
+
+  // test
+  util.execute("CREATE TABLE t(pid INT, wid INT, state CHARACTER 
VARYING(30))");
+  util.execute("INSERT INTO t VALUES(1,1)");
+  util.query("SELECT DECODE(DECODE(state, '', NULL, state), '-', NULL, state) 
AS state FROM t",
+ "|\n");
+
+  // cleanup
+  util.execute("DROP TABLE t");
+}

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/83adc06a/src/test/regress/expected/nested_case_null.out
--
diff --git a/src/test/regress/expected/nested_case_null.out 
b/src/test/regress/expected/nested_case_null.out
deleted file mode 100644
index 2374549..000
--- a/src/test/regress/expected/nested_case_null.out
+++ /dev/null
@@ -1,25 +0,0 @@

 Drop existing table

-DROP TABLE IF EXISTS t;

 Create new table t

-CREATE TABLE t(pid INT, wid INT, state CHARACTER VARYING(30));

 Insert a row and keep state as empty

-INSERT INTO t VALUES(1, 1);

 use nested decode

-SELECT DECODE(DECODE(state, '', NULL, state), '-', NULL, state) AS state FROM 
t;
- state 

- 
-(1 row)
-

 Drop table

-DROP TABLE t;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/83adc06a/src/test/regress/known_good_schedule
--
diff --git a/src/test/regress/known_good_schedule 
b/src/test/regress/known_good_schedule
index 8c9091f..51c1a6d 100755
--- a/src/test/regress/known_good_schedule
+++ b/src/test/regress/known_good_schedule
@@ -52,7 +52,6 @@ ignore: create_misc
 test: create_aggregate
 test: aggregate_with_groupingsets
 test: aggregates_null
-test: nested_case_null
 ignore: create_operator
 ignore: create_index
 ignore: drop_if_exists

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/83adc06a/src/test/regress/sql/nested_case_null.sql
--
diff --git a/src/test/regress/sql/nested_case_null.sql 
b/src/test/regress/sql/nested_case_null.sql
deleted file mode 100644
index e3f1d24..000
--- a/src/test/regress/sql/nested_case_null.sql
+++ /dev/null
@@ -1,24 +0,0 @@

 Drop existing table

-DROP TABLE IF EXISTS t;
-

 Create new table t

-CREATE TABLE t(pid INT, wid INT, state CHARACTER VARYING(30));
-

 Insert a row and keep state as empty

-INSERT INTO t VALUES(1, 1);
-

 use nested decode

-SELECT DECODE(DECODE(state, '', NULL, state), '-', NULL, state) AS state FROM 
t;
-

 Drop table

-DROP TABLE t;
\ No newline at end of file



incubator-hawq git commit: HAWQ-898. Revert copy checkinstall-good case as cases transactions and row_types need this to prepare data

2016-07-26 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master b59603125 -> 0bb0a2074


HAWQ-898. Revert copy checkinstall-good case as cases transactions and 
row_types need this to prepare data


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0bb0a207
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0bb0a207
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0bb0a207

Branch: refs/heads/master
Commit: 0bb0a207467ade1eb5d8b52a2465d23c1e803fda
Parents: b596031
Author: YI JIN 
Authored: Wed Jul 27 12:23:23 2016 +1000
Committer: YI JIN 
Committed: Wed Jul 27 12:23:23 2016 +1000

--
 src/test/regress/input/copy.source   | 224 ++
 src/test/regress/known_good_schedule |   1 +
 src/test/regress/output/copy.source  | 214 
 3 files changed, 439 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0bb0a207/src/test/regress/input/copy.source
--
diff --git a/src/test/regress/input/copy.source 
b/src/test/regress/input/copy.source
new file mode 100755
index 000..ccab99b
--- /dev/null
+++ b/src/test/regress/input/copy.source
@@ -0,0 +1,224 @@
+--
+-- COPY
+--
+-- CLASS POPULATION
+-- (any resemblance to real life is purely coincidental)
+--
+COPY aggtest FROM '@abs_srcdir@/data/agg.data';
+
+COPY onek FROM '@abs_srcdir@/data/onek.data';
+
+COPY onek TO '@abs_builddir@/results/onek.data';
+
+TRUNCATE onek;
+
+COPY onek FROM '@abs_builddir@/results/onek.data';
+
+COPY tenk1 FROM '@abs_srcdir@/data/tenk.data';
+
+COPY slow_emp4000 FROM '@abs_srcdir@/data/rect.data';
+
+COPY person FROM '@abs_srcdir@/data/person.data';
+
+COPY emp FROM '@abs_srcdir@/data/emp.data';
+
+COPY student FROM '@abs_srcdir@/data/student.data';
+
+COPY stud_emp FROM '@abs_srcdir@/data/stud_emp.data';
+
+COPY road FROM '@abs_srcdir@/data/streets.data';
+
+COPY real_city FROM '@abs_srcdir@/data/real_city.data';
+
+COPY hash_i4_heap FROM '@abs_srcdir@/data/hash.data';
+
+COPY hash_name_heap FROM '@abs_srcdir@/data/hash.data';
+
+COPY hash_txt_heap FROM '@abs_srcdir@/data/hash.data';
+
+COPY hash_f8_heap FROM '@abs_srcdir@/data/hash.data';
+
+-- the data in this file has a lot of duplicates in the index key
+-- fields, leading to long bucket chains and lots of table expansion.
+-- this is therefore a stress test of the bucket overflow code (unlike
+-- the data in hash.data, which has unique index keys).
+--
+-- COPY hash_ovfl_heap FROM '@abs_srcdir@/data/hashovfl.data';
+
+COPY bt_i4_heap FROM '@abs_srcdir@/data/desc.data';
+
+COPY bt_name_heap FROM '@abs_srcdir@/data/hash.data';
+
+COPY bt_txt_heap FROM '@abs_srcdir@/data/desc.data';
+
+COPY bt_f8_heap FROM '@abs_srcdir@/data/hash.data';
+
+COPY array_op_test FROM '@abs_srcdir@/data/array.data';
+
+COPY array_index_op_test FROM '@abs_srcdir@/data/array.data';
+
+--- test copying in CSV mode with various styles
+--- of embedded line ending characters
+
+create temp table copytest (
+   style   text,
+   testtext,
+   filler  int);
+
+insert into copytest values('DOS',E'abc\r\ndef',1);
+insert into copytest values('Unix',E'abc\ndef',2);
+insert into copytest values('Mac',E'abc\rdef',3);
+insert into copytest values(E'esc\\ape',E'a\\r\\\r\\\n\\nb',4);
+
+copy copytest to '@abs_builddir@/results/copytest.csv' csv;
+
+create temp table copytest2 (like copytest);
+
+copy copytest2 from '@abs_builddir@/results/copytest.csv' csv;
+
+select * from copytest except select * from copytest2 order by 1,2,3;
+
+truncate copytest2;
+
+--- same test but with an escape char different from quote char
+
+copy copytest to '@abs_builddir@/results/copytest.csv' csv quote  escape 
E'\\';
+
+copy copytest2 from '@abs_builddir@/results/copytest.csv' csv quote  
escape E'\\';
+
+select * from copytest except select * from copytest2 order by 1,2,3;
+
+
+-- test header line feature
+
+create temp table copytest3 (
+   c1 int, 
+   "col with , comma" text, 
+   "col with "" quote"  int) distributed by (c1);
+
+copy copytest3 from stdin csv header;
+this is just a line full of junk that would error out if parsed
+1,a,1
+2,b,2
+\.
+
+copy copytest3 to stdout csv header;
+-- copy with error table
+CREATE TABLE number (a INT) DISTRIBUTED BY (a);
+
+COPY number FROM STDIN LOG ERRORS INTO err_copy SEGMENT REJECT LIMIT 10 ROWS;
+these are invalid line should be insert into error table.
+a
+b
+c
+d
+e
+f
+g
+h
+\.
+
+select relname,filename,linenum,bytenum,errmsg,rawdata,rawbytes from err_copy 
order by linenum;
+select * from number; --should be empty
+\d err_copy
+
+DROP TABLE err_copy;
+
+COPY number FROM STDIN LOG ERRORS INTO err_copy SEGMENT REJECT LIMIT 10 ROWS;
+these are invalid line shou

[08/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/desc.data
--
diff --git a/src/test/feature/utility/data/desc.data 
b/src/test/feature/utility/data/desc.data
new file mode 100755
index 000..4ff1457
--- /dev/null
+++ b/src/test/feature/utility/data/desc.data
@@ -0,0 +1,1 @@
+   1227676208
+9998   1673273198
+9997   868304211
+9996   999647871
+9995   310717580
+9994   1600952573
+9993   1081719182
+9992   242349705
+9991   1831758177
+9990   463935293
+9989   2044302343
+9988   1923557716
+9987   1243580926
+9986   18212056
+9985   757774765
+9984   1995958541
+9983   677073243
+9982   1290996901
+9981   947110578
+9980   1807402518
+9979   1756582238
+9978   910567096
+9977   2071380026
+9976   924516791
+9975   780851952
+9974   1605398760
+9973   1596663587
+9972   126190
+9971   625318191
+9970   1416577811
+9969   1272626725
+9968   228028337
+9967   1362555617
+9966   1414835286
+9965   2065412336
+9964   68367875
+9963   1916678044
+9962   617783889
+9961   345531010
+9960   2055684109
+9959   1367838015
+9958   2026090287
+9957   1165782951
+9956   1395106032
+9955   1488622461
+9954   1614261512
+9953   1048847963
+9952   1017154373
+9951   1681898311
+9950   36543482
+9949   1883506140
+9948   832065446
+9947   129715143
+9946   465981266
+9945   1475336852
+9944   1666391160
+9943   980080569
+9942   180085775
+9941   2136801363
+9940   397289853
+9939   54022194
+9938   2005275087
+9937   310099649
+9936   1294187742
+9935   1645640890
+9934   1447628447
+9933   1870320513
+9932   2008477583
+9931   1397429521
+9930   466924371
+9929   889901157
+9928   2120215631
+9927   537467826
+9926   1699005087
+9925   346258069
+9924   471468088
+9923   2079846849
+9922   1012304481
+9921   1281131881
+9920   849832864
+9919   2054311986
+9918   1417524873
+9917   1504212242
+9916   610807631
+9915   1633384345
+9914   1295251077
+9913   1677073445
+9912   582790715
+9911   126063581
+9910   131526276
+9909   87190204
+9908   907318099
+9907   359634197
+9906   1009954849
+9905   1571350877
+9904   1784646955
+9903   50198926
+9902   1403396142
+9901   1118576425
+9900   1424697538
+9899   2076940193
+9898   1338379718
+9897   1773957562
+9896   65999738
+9895   1766641886
+9894   1481437235
+9893   1337819855
+9892   1230013984
+9891   1105476143
+9890   2011090655
+9889   1493104270
+9888   1443504355
+9887   1931624176
+9886   208961165
+9885   1081217833
+9884   1050593630
+9883   1169187495
+9882   1545547169
+9881   495600511
+9880   1366229130
+9879   1919375727
+9878   1224719003
+9877   1483450870
+9876   722470890
+9875   959755923
+9874   167954735
+9873   666070529
+9872   772985035
+9871   1473939597
+9870   1927680355
+9869   1798223624
+9868   2010940455
+9867   1719221479
+9866   292520326
+9865   875663531
+9864   536627902
+9863   375961092
+9862   1474212847
+9861   1884393362
+9860   1809455435
+9859   79466479
+9858   1284143105
+9857   362286522
+9856   881030546
+9855   1187257317
+9854   1683154312
+9853   554993119
+9852   1950442013
+9851   1773655090
+9850   1418365156
+9849   2030261908
+9848   1196904837
+9847   264963079
+9846   1315496134
+9845   56400360
+9844   186770888
+9843   841498786
+9842   885873822
+9841   1122245059
+9840   1610482790
+9839   208458876
+9838   1505703298
+9837   1135276924
+9836   1182593577
+9835   2064042882
+9834   1548934331
+9833   799718188
+9832   713989305
+9831   1394746368
+9830   600250256
+9829   1447168913
+9828   1345919581
+9827   96885788
+9826   826615858
+9825   326037427
+9824   1384298952
+9823   2056982869
+9822   1284111611
+9821   2067663753
+9820   576750253
+9819   1153402076
+9818   714765773
+9817   1140504476
+9816   78192191
+9815   473997348
+9814   1318010186
+9813   1212009477
+9812   1378499644
+9811   677414946
+9810   1764025409
+9809   475205866
+9808   1173348946
+9807   1589144064
+9806   1733826240
+9805   382875389
+9804   1350053577
+9803   154187963
+9802   199467931
+9801   1414304039
+9800   48826786
+9799   503364468
+9798   620553055
+9797   1019882154
+9796   860070484
+9795   917116636
+9794   1189409464
+9793   1464118846
+9792   1480232616
+9791   130709534
+9790   1352897980
+9789   1583729425
+9788   1075209885
+9787   240768425
+9786   1969977938
+9785   1013666362
+9784   1242981351
+9783   640595240
+9782   1595467716
+9781   903293778
+9780   1651549647
+9779   174881345
+9778   63273
+9777   790473557
+9776   239090487
+9775   1579638277
+9774   183407458
+9773   2083233185
+9772   105361177
+9771   1843587111
+9770   793750984
+9769   1176428280
+9768   1790777632
+9767   1850920067
+9766   1977956338
+9765   1543435285
+9764   1584367668
+9763   1058699929
+9762   111220866
+9761   2043986839
+9760   1202983297
+9759   1112129554
+9758   1761235135
+9757   61543522
+9756   1145270722
+9755   1329382697
+9754   1565682294
+9753   339687573
+9752   11365292

[09/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/array.data
--
diff --git a/src/test/feature/utility/data/array.data 
b/src/test/feature/utility/data/array.data
new file mode 100755
index 000..12a420f
--- /dev/null
+++ b/src/test/feature/utility/data/array.data
@@ -0,0 +1,100 @@
+1  {92,75,71,52,64,83} 
{44066,AA1059,AAA176,AAA48038}
+2  {3,6}   
{AA98232,79710,A69675,55798,A12793}
+3  {37,64,95,43,3,41,13,30,11,43}  
{AA48845,A75968,A95309,AAA54451,AA22292,AAA99836,A96617,AA17009,AA95246}
+4  {71,39,99,55,33,75,45}  
{A53663,AAA67062,AA64777,AAA99043,AAA91804,39557}
+5  {50,42,77,50,4} 
{A26540,AAA79710,AAA1205,AAA176,A95309,AAA46154,AA66777,A27249,AA64777,AAA70104}
+6  {39,35,5,94,17,92,60,32}
{AAA35875,23657}
+7  {12,51,88,64,8} 
{AA12591,A50407,67946}
+8  {60,84} 
{AAA81898,AA1059,81511,A961,31334,A64741,AA6416,AA32918,A50407}
+9  {56,52,35,27,80,44,81,22}   
{AAA73034,A7929,AAA66161,AA88409,39557,A27153,9523,AAA99000}
+10 {71,5,45}   
{AAA21658,21089,AAA54451,AA54141,AA28620,AAA21658,AAA74076,A27249}
+11 {41,86,74,48,22,74,47,50}   
{9523,37562,14047,AAA46154,41702,A764,A62737,39557}
+12 {17,99,18,52,91,72,0,43,96,23}  
{A33250,AAA85420,AAA33576}
+13 {3,52,34,23}{AA98232,49534,AAA21658}
+14 {78,57,19}  
{8857,AAA73034,81587,AAA68526,A75968,AA65909,A10012,AA65909}
+15 {17,14,16,63,67}{AA6416,AA646,A95309}
+16 {14,63,85,11}   {AA66777}
+17 {7,10,81,85}
{AA43678,AAA12144,AAA50956,AAA15356}
+18 {1} 
{AAA33576,A95309,64261,AAA59323,AA95246,55847,67946,AA64374}
+19 {52,82,17,74,23,46,69,51,75}
{A73084,A75968,14047,AAA80240,AAA1205,A68938}
+20 {72,89,70,51,54,37,8,49,79} {AA58494}
+21 {2,8,65,10,5,79,43} 
{A88852,AAA91804,A64669,1443,23657,A12179,A88852,31334,41303,AAA85420}
+22 {11,6,56,62,53,30}  {72908}
+23 {40,90,5,38,72,40,30,10,43,55}  
{A6053,AAA6119,AA44673,A764,AA17009,A17383,A70514,A33250,A95309,37562}
+24 {94,61,99,35,48}
{AAA50956,AAA15165,85070,AAA36627,A961,AA55219}
+25 {31,1,10,11,27,79,38}   {AA59334,45449}
+26 {71,10,9,69,75} 
{47735,AAA21462,A6897,AAA91804,A72121,AAA1205,A41597,8857,AAA15356,AA17009}
+27 {94}
{AA6416,A6053,AAA21462,AAA57334,AA12591,AA88409,A70254}
+28 {14,33,6,34,14} 
{AAA13198,69452,AAA82945,AAA12144,A72121,AA18601}
+29 {39,21} 
{A6897,AAA38885,85070,AAA70104,A66674,A62007,69452,AAA1242,1729,35194}
+30 {26,81,47,91,34}{AAA70104,AAA80240}
+31 {80,24,18,21,54}
{AAA13198,AAA70415,A27153,A53663,A50407,A68938}
+32 {58,79,82,80,67,75,98,10,41}
{AA61286,AAA54451,AAA87527,A96617,51533}
+33 {74,73} 
{A85417,AAA56483,A17383,A62159,52814,A85723,AA55796}
+34 {70,45} 
{AA71621,AA28620,AA55219,23648,AA22292,AAA1242}
+35 {23,40} 
{52814,48949,A34727,8857,AAA62179,AAA68526,AAA99836,50094,91194,A73084}
+36 {79,82,14,52,30,5,79}   
{A53663,55798,AAA89194,AA88409,AAA81326,A63050,33598}
+37 {53,11,81,39,3,78,58,64,74} 
{AAA17075,AAA66161,23648,AA10611}
+38  

[05/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/rect.data
--
diff --git a/src/test/feature/utility/data/rect.data 
b/src/test/feature/utility/data/rect.data
new file mode 100755
index 000..e32b6fe
--- /dev/null
+++ b/src/test/feature/utility/data/rect.data
@@ -0,0 +1,3378 @@
+(12699,9028,12654,8987)
+(22689,4680,22614,4626)
+(43263,47296,43217,47217)
+(6184,8397,6182,8379)
+(863,28537,788,28456)
+(33783,4733,33746,4693)
+(40456,47134,40426,47087)
+(45950,8153,45887,8060)
+(33433,36474,33399,36460)
+(41106,22017,41086,21962)
+(19214,36781,19179,36767)
+(11582,40823,11498,40737)
+(35565,5404,35546,5360)
+(26489,17387,26405,17356)
+(30874,13849,30796,13814)
+(38255,1619,38227,1593)
+(4445,32006,4405,31914)
+(3923,32921,3876,32913)
+(36054,39464,36032,39434)
+(46540,6780,46524,6758)
+(12184,45811,12118,45787)
+(13198,17090,13143,17051)
+(30939,44578,30865,44486)
+(12502,4939,12431,4902)
+(3250,1108,3169,1063)
+(34029,41240,33976,41180)
+(47057,44018,46967,43927)
+(699,10114,686,10058)
+(5925,26020,5845,25979)
+(9462,39388,9382,39388)
+(270,32616,226,32607)
+(3959,49145,3861,49115)
+(207,40886,179,40879)
+(48480,43312,48412,43233)
+(37183,37209,37161,37110)
+(13576,13505,13521,13487)
+(5877,1037,5818,1036)
+(6777,16694,6776,16692)
+(49362,13905,49299,13845)
+(29356,14606,29313,14562)
+(5492,6976,5441,6971)
+(288,49588,204,49571)
+(36698,37213,36682,37158)
+(718,41336,645,41272)
+(8725,23369,8660,2)
+(40115,9894,40025,9818)
+(40051,41181,40015,41153)
+(5739,1740,5715,1731)
+(25120,27935,25054,27876)
+(27475,46084,27447,46003)
+\N
+(33197,3252,33161,3245)
+(10892,15691,10869,15662)
+(39012,44712,38995,44640)
+(4506,6484,4458,6459)
+(13970,26316,13964,26236)
+(28009,28104,27968,28030)
+(5991,27613,5906,27607)
+(23649,6338,23610,6314)
+(25942,10008,25911,9928)
+(25651,29943,25590,29906)
+\N
+(24555,40334,24546,40330)
+(46870,43762,46789,43709)
+\N
+(20030,2752,19945,2687)
+(30758,26754,30718,26678)
+\N
+(4320,44673,4286,44625)
+\N
+(1011,15576,939,15574)
+(41936,40699,41854,40655)
+(20594,19002,20561,18995)
+(9388,41056,9325,41042)
+(34771,46693,34751,46645)
+(49398,46359,49332,46357)
+\N
+(23115,35380,23036,35306)
+(46305,34840,46283,34765)
+(16768,21692,16691,21647)
+(28695,3128,28654,3112)
+(22182,7107,22107,7074)
+(14567,1210,14468,1139)
+(14156,37139,14136,37119)
+(33500,38351,33477,38286)
+(39983,41981,39944,41954)
+(26773,20824,26719,20813)
+(42516,22947,42460,22932)
+(26127,10701,26044,10650)
+(17808,13803,17724,13710)
+(14913,49873,14849,49836)
+(37013,820,36955,736)
+(39071,1399,39022,1381)
+\N
+(9785,42546,9687,42540)
+(13423,14066,13354,14052)
+(3417,14558,3336,14478)
+(25212,46368,25128,46316)
+(10124,39848,10027,39820)
+(39722,39226,39656,39162)
+(6298,28101,6250,28076)
+(45852,5846,45809,5750)
+(48292,4885,48290,4841)
+(18905,4454,18894,4424)
+(18965,43474,18902,43444)
+(39843,28239,39761,28199)
+(18087,44660,18019,44632)
+(33886,10382,33794,10286)
+(38383,13163,38362,13092)
+(18861,25050,18842,24965)
+(29887,14326,29806,14274)
+(18733,11644,18698,11644)
+(5119,37952,5089,37950)
+(16191,34884,16149,34864)
+(29544,1104,29496,1062)
+(27740,41555,27701,41540)
+(4672,4087,4633,4060)
+(45441,38994,45377,38958)
+(3272,1176,3232,1146)
+(12820,26606,12790,26575)
+(30910,7590,30877,7512)
+(42476,39152,42377,39127)
+(6562,38490,6542,38447)
+(30046,20332,29988,20259)
+(40723,15950,40671,15949)
+(4945,46857,4908,46817)
+(47986,16882,47963,16877)
+(9842,22339,9805,22305)
+(29831,23169,29818,23122)
+(12322,34404,12250,34312)
+(22846,11091,22759,10992)
+(47627,2424,47603,2397)
+(18375,43632,18347,43577)
+(40441,974,40394,965)
+(34260,10573,34194,10522)
+(32914,9549,32828,9503)
+(49023,37827,48978,37799)
+(22183,10691,22111,10669)
+\N
+(38036,15828,38014,15759)
+(34604,16801,34508,16746)
+(26737,29997,26675,29976)
+(47375,40298,47293,40210)
+(771,2661,732,2649)
+(28514,25659,28504,25577)
+(13438,46494,13376,46455)
+(7187,17877,7125,17786)
+(49957,43390,49897,43384)
+(26543,20067,26482,20057)
+(16416,29803,16385,29724)
+(36353,7484,36286,7414)
+(26498,3377,26415,3358)
+(28990,32205,28936,32193)
+(45005,3842,45001,3816)
+(21672,23566,21603,23566)
+(33360,43465,33302,43429)
+\N
+(29884,9544,29838,9520)
+\N
+(5599,15012,5596,14930)
+(22396,21481,22344,21422)
+(24810,14955,24780,14887)
+(47114,18866,47081,18784)
+(39013,39245,38953,39237)
+(12863,40534,12803,40529)
+(351,37068,310,37019)
+\N
+(12916,34327,12891,34240)
+\N
+(49191,2694,49170,2628)
+(24127,38407,24050,38325)
+(3264,23053,3213,23007)
+(8172,30385,8144,30336)
+(19630,35716,19573,35640)
+(42554,5148,42521,5117)
+(42168,33453,42136,33426)
+(17732,32093,17666,32057)
+(1039,16626,1037,16587)
+(21287,7757,21265,7679)
+(47063,8260,47039,8225)
+(38645,16238,38561,16204)
+(18258,25358,18196,25341)
+(30458,1742,30458,1695)
+(35147,9273,35121,9233)
+(7670,16625,7642,16545)
+(49503,23432,49484,23383)
+(31089,23146,31062,23093)
+(47758,2734,47670

[04/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/streets.data
--
diff --git a/src/test/feature/utility/data/streets.data 
b/src/test/feature/utility/data/streets.data
new file mode 100755
index 000..935b045
--- /dev/null
+++ b/src/test/feature/utility/data/streets.data
@@ -0,0 +1,5124 @@
+A St   [(-122.0265,37.049),(-122.0271,37.045)]
+A St   [(-122.089,37.71),(-122.0886,37.711)]
+A St   [(-122.0985,37.671),(-122.0981,37.674)]
+A St   [(-122.0991,37.668),(-122.0988,37.669)]
+A St   
[(-122.103419,37.667),(-122.103439,37.667)]
+A St   
[(-122.103913,37.66632),(-122.104037,37.66611),(-122.104051,37.66609)]
+A St   
[(-122.106469,37.66446),(-122.1067,37.664)]
+A St   
[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]
+A St   
[(-122.1172,37.659),(-122.119506,37.65661)]
+Abbie St   
[(-121.867486,37.54243),(-121.868,37.545)]
+AcaciaAve  [(-122.2353,37.457),(-122.2344,37.461)]
+AcaciaAve  [(-122.2364,37.436),(-122.2364,37.443)]
+AcaciaAve  [(-122.2415,37.435),(-122.2407,37.437)]
+AcadiaCt   [(-121.9007,37.773),(-121.9016,37.768)]
+Acapulco  Way  [(-122.0517,37.91),(-122.0519,37.911)]
+Access Rd 162  [(-121.9469,37.993),(-121.9475,37.993)]
+Access Rd 25   [(-121.9283,37.894),(-121.9283,37.9)]
+Access Rd 29   [(-121.9339,37.854),(-121.9343,37.85)]
+Acton Cir  [(-122.2824,37.681),(-122.2824,37.688)]
+Ada   St   [(-122.2487,37.398),(-122.2496,37.401)]
+Ada   St   [(-122.2807,37.807),(-122.2797,37.811)]
+Adams Ave  [(-121.742,37.829),(-121.742,37.822)]
+Adams Ave  [(-122.1906,37.253),(-122.1893,37.272)]
+Adams St   [(-122.2349,37.542),(-122.2341,37.537)]
+Adams St   [(-122.2364,37.553),(-122.2357,37.548)]
+AdasonDr   [(-122.1315,37.016),(-122.1288,37.009)]
+Addison   St   [(-122.2735,37.705),(-122.2722,37.707)]
+Addison   St   [(-122.2856,37.688),(-122.2854,37.689)]
+Addison   St   [(-122.2874,37.686),(-122.2864,37.688)]
+Addison   Way  [(-121.9044,37.881),(-121.9044,37.889)]
+Addison   Way  [(-121.9044,37.895),(-121.9044,37.899)]
+Adelina Common 
[(-121.925847,37.29985),(-121.925765,37.29493)]
+Adeline   St   [(-122.2728,37.442),(-122.2725,37.451)]
+Adeline   St   [(-122.2785,37.291),(-122.2783,37.296)]
+AdelleSt   [(-121.7793,37.841),(-121.7797,37.849)]
+AdmiralityLane [(-122.2424,37.323),(-122.2429,37.318)]
+Adobe Dr   [(-122.0304,37.579),(-122.0278,37.592)]
+AdrianAve  [(-122.1019,37.389),(-122.1019,37.369)]
+Adriano   St   [(-122.032,37.663),(-122.0312,37.653)]
+Agate Ct   [(-121.801,37.653),(-121.8008,37.649)]
+Agena Cir  [(-122.0694,37.847),(-122.0696,37.839)]
+Agua Fria Creek
[(-121.909487,37.94485),(-121.910653,37.94809)]
+Agua Fria Creek
[(-121.9125,37.95367),(-121.9138,37.958)]
+Agua Fria Creek[(-121.9254,37.922),(-121.9281,37.889)]
+Agua Fria Creek[(-121.935,37.828),(-121.9356,37.826)]
+Agua Vista [(-122.0796,37.896),(-122.0792,37.896)]
+Agua VistaSt   [(-122.2089,37.839),(-122.2069,37.819)]
+AileenSt   [(-122.2612,37.42),(-122.2622,37.421)]
+Airport   Road [(-122.2085,37.147),(-122.2101,37.154)]
+Aladdin   Ave  [(-122.1532,37.088),(-122.1577,37.068)]
+Alameda   Ave  [(-122.2197,37.68),(-122.2192,37.68)]
+Alameda   Ave  [(-122.2555,37.689),(-122.2534,37.68)]
+Alameda   Ave  [(-122.2605,37.713),(-122.2588,37.704)]
+Alameda   Dr   [(-121.8756,37.746),(-121.8763,37.746)]
+Alameda   Road [(-122.2955,37.875),(-122.2963,37.871)]
+Alameda Belt Line Railroad [(-122.2586,37.769),(-122.2624,37.784)]
+Alameda Belt Line Railroad  

[02/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/tenk.data
--
diff --git a/src/test/feature/utility/data/tenk.data 
b/src/test/feature/utility/data/tenk.data
new file mode 100755
index 000..c9064c9
--- /dev/null
+++ b/src/test/feature/utility/data/tenk.data
@@ -0,0 +1,1 @@
+8800   0   0   0   0   0   0   800 800 3800
88000   1   MA  AA  xx
+1891   1   1   3   1   11  91  891 18911891
1891182 183 TU  BA  xx
+3420   2   0   0   0   0   20  420 14203420
342040  41  OB  CA  xx
+9850   3   0   2   0   10  50  850 18504850
9850100 101 WO  DA  xx
+7164   4   0   0   4   4   64  164 11642164
7164128 129 OP  EA  xx
+8009   5   1   1   9   9   9   9   9   3009
800918  19  BW  FA  xx
+5057   6   1   1   7   17  57  57  105757  
5057114 115 NM  GA  xx
+6701   7   1   1   1   1   1   701 701 1701
67012   3   TX  HA  xx
+4321   8   1   1   1   1   21  321 321 4321
432142  43  FK  IA  xx
+3043   9   1   3   3   3   43  43  10433043
304386  87  BN  JA  xx
+1314   10  0   2   4   14  14  314 13141314
131428  29  OY  KA  xx
+1504   11  0   0   4   4   4   504 15041504
15048   9   WF  LA  xx
+5222   12  0   2   2   2   22  222 1222222 
522244  45  WS  MA  xx
+6243   13  1   3   3   3   43  243 243 1243
624386  87  DG  NA  xx
+5471   14  1   3   1   11  71  471 1471471 
5471142 143 LC  OA  xx
+5006   15  0   2   6   6   6   6   10066   
500612  13  OK  PA  xx
+5387   16  1   3   7   7   87  387 1387387 
5387174 175 FZ  QA  xx
+5785   17  1   1   5   5   85  785 1785785 
5785170 171 NO  RA  xx
+6621   18  1   1   1   1   21  621 621 1621
662142  43  RU  SA  xx
+6969   19  1   1   9   9   69  969 969 1969
6969138 139 BI  TA  xx
+9460   20  0   0   0   0   60  460 14604460
9460120 121 WZ  UA  xx
+59 21  1   3   9   19  59  59  59  59  
59  118 119 HC  VA  xx
+8020   22  0   0   0   0   20  20  20  3020
802040  41  MW  WA  xx
+7695   23  1   3   5   15  95  695 16952695
7695190 191 ZJ  XA  xx
+3442   24  0   2   2   2   42  442 14423442
344284  85  KC  YA  xx
+5119   25  1   3   9   19  19  119 1119119 
511938  39  XO  ZA  xx
+64626  0   2   6   6   46  646 646 646 
646 92  93  WY  AB  xx
+9605   27  1   1   5   5   5   605 16054605
960510  11  LF  BB  xx
+26328  1   3   3   3   63  263 263 263 
263 126 127 DK  CB  xx
+3269   29  1   1   9   9   69  269 12693269
3269138 139 TV  DB  xx
+1839   30  1   3   9   19  39  839 18391839
183978  79  TS  EB  xx
+9144   31  0   0   4   4   44  144 11444144
914488  89  SN  FB  xx
+2513   32  1   1   3   13  13  513 513 2513
251326  27  RS  GB  xx
+8850   33  0   2   0   10  50  850 850 3850
8850100 101 KC  HB  xx
+23634  0   0   6   16  36  236 236 236 
236 72  73  CJ  IB  xx
+3162   35  0   2   2   2   62  162 11623162
3162124 125 QR  JB 

[07/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/hash.data
--
diff --git a/src/test/feature/utility/data/hash.data 
b/src/test/feature/utility/data/hash.data
new file mode 100755
index 000..97e9709
--- /dev/null
+++ b/src/test/feature/utility/data/hash.data
@@ -0,0 +1,1 @@
+0  1935401906
+1  1345971420
+2  656473370
+3  1269710788
+4  1156776517
+5  1289013296
+6  1415564928
+7  1937919553
+8  435456494
+9  66302641
+10 915852158
+11 1661301944
+12 961711400
+13 74070078
+14 2036973298
+15 843938989
+16 189351248
+17 1388679963
+18 556726251
+19 634715959
+20 1489080225
+21 649132105
+22 886008616
+23 1280154196
+24 2036166893
+25 846480997
+26 1102020422
+27 1533442662
+28 2060089600
+29 1212135685
+30 539384293
+31 1848007858
+32 410623457
+33 1195857664
+34 970234999
+35 1567399975
+36 337387312
+37 238316279
+38 1357835880
+39 772843806
+40 304618920
+41 126204390
+42 286662102
+43 1266330320
+44 200274468
+45 176151752
+46 2110269310
+47 389625717
+48 1564831715
+49 519511913
+50 1024341676
+51 906428292
+52 1168644018
+53 1910350293
+54 39098840
+55 1057327263
+56 609347642
+57 1141119263
+58 443286278
+59 521953594
+60 205771300
+61 982670571
+62 222477805
+63 616394758
+64 31044587
+65 1192712804
+66 36311085
+67 368431899
+68 1431029083
+69 1394146965
+70 1141275706
+71 1735648004
+72 1520351356
+73 1427937808
+74 854494676
+75 1720625824
+76 1604089561
+77 817280338
+78 2110251541
+79 1021437628
+80 1336792251
+81 987109570
+82 1927865921
+83 357952622
+84 749976215
+85 1966964761
+86 1415279885
+87 1359323857
+88 960600376
+89 1858566163
+90 1881277452
+91 1166371677
+92 693753087
+93 2103755257
+94 1782766435
+95 724797674
+96 1148984413
+97 1819077520
+98 1093229574
+99 432529848
+1001065740837
+10187021632
+10220694204
+103438608545
+1041514959440
+10587511
+10611750722
+107971565353
+1081692469219
+1092122002263
+1101993002982
+111881777823
+112961628185
+1131773385255
+1141239730445
+1151711604400
+1161592866368
+117507526682
+118923444610
+119405983097
+120218609198
+121657238414
+1221572354774
+123912362285
+124613510023
+1251207637561
+1261637159959
+1271762494436
+128879231433
+129582905885
+13047540636
+1311944972270
+132669927517
+13368234841
+134236097168
+13537403310
+136943423722
+137247847890
+1381008968663
+139488409293
+140222366505
+141854487997
+1421370187116
+1431183994691
+144480389604
+145462433913
+146748115443
+1472073255973
+148969960596
+1491671560053
+150331755422
+1511188569794
+152181314819
+1531904110196
+1542100932079
+155794824842
+156964264109
+1571590608390
+158409835630
+1591843495542
+16026030628
+161457376267
+1621640984164
+163695958145
+164525611108
+1651877081332
+166733361455
+1671469034830
+1682124929222
+1691742330119
+1701957444123
+171199812080
+172449334468
+1731180147592
+1741383806771
+175929724073
+1761642581505
+1772131922214
+178855496398
+179465058453
+1801655998620
+1811187251820
+1821653628247
+1831837313439
+184943878368
+1851607076678
+186484654634
+1871908142477
+1881050201421
+189894490264
+1901604154371
+1911076232049
+1921351866531
+1931097654887
+1941772190194
+1951877477639
+196827252572
+197358068002
+1981199028821
+199804698146
+2002100398121
+2011008989297
+2021004510226
+203402248941
+20441653241
+205240833349
+2061331973014
+2071684234746
+208225271916
+20939985764
+2101809552
+2111881270536
+2121227237584
+2131655437799
+2141571100327
+21523632304
+2161115030830
+2172055754961
+2181931774781
+21917748603
+220802761578
+2211388445504
+2221093980652
+2237144461
+224338616744
+225718687198
+2261884622101
+2271165869316
+2281076755200
+229936167274
+2301970567462
+2311029669673
+2321945156571
+233827594041
+2341431918615
+2351986809812
+2361068427390
+237616407981
+2381523560911
+2391293699306
+240656393746
+2411525370463
+2421027486194
+2431883631330
+2441033324614
+245451102874
+2461907263635
+247871796
+248359374187
+24916

[01/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master faf50470b -> b59603125


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/sql/copy-stdio.sql
--
diff --git a/src/test/feature/utility/sql/copy-stdio.sql 
b/src/test/feature/utility/sql/copy-stdio.sql
new file mode 100644
index 000..fce93ad
--- /dev/null
+++ b/src/test/feature/utility/sql/copy-stdio.sql
@@ -0,0 +1,131 @@
+create temp table copytest3 (
+   c1 int, 
+   "col with , comma" text, 
+   "col with "" quote"  int) distributed by (c1);
+
+copy copytest3 from stdin csv header;
+this is just a line full of junk that would error out if parsed
+1,a,1
+2,b,2
+\.
+
+copy copytest3 to stdout csv header;
+-- copy with error table
+CREATE TABLE number (a INT) DISTRIBUTED BY (a);
+
+COPY number FROM STDIN LOG ERRORS INTO err_copy SEGMENT REJECT LIMIT 10 ROWS;
+these are invalid line should be insert into error table.
+a
+b
+c
+d
+e
+f
+g
+h
+\.
+
+select relname,filename,linenum,bytenum,errmsg,rawdata,rawbytes from err_copy 
order by linenum;
+select * from number; --should be empty
+\d err_copy
+
+DROP TABLE err_copy;
+
+COPY number FROM STDIN LOG ERRORS INTO err_copy SEGMENT REJECT LIMIT 10 ROWS;
+these are invalid line should be insert into error table.
+a
+1
+b
+2
+c
+3
+d
+4
+e
+5
+f
+6
+g
+7
+h
+\.
+
+select relname,filename,linenum,bytenum,errmsg,rawdata,rawbytes from err_copy 
order by linenum;
+select count(*) from number; --should be 7
+DROP TABLE err_copy;
+
+TRUNCATE number;
+
+COPY number FROM STDIN LOG ERRORS INTO err_copy SEGMENT REJECT LIMIT 10 ROWS;
+these are invalid line should be insert into error table.
+a
+1
+b
+2
+c
+3
+d
+4
+e
+5
+f
+6
+g
+7
+h
+i
+\.
+
+select relname,filename,linenum,bytenum,errmsg,rawdata,rawbytes from err_copy 
order by linenum; -- should not exist
+select count(*) from number; --should be empty
+
+TRUNCATE number;
+CREATE TABLE err_copy (cmdtime timestamp with time zone, relname text, 
filename text, linenum integer, bytenum integer, errmsg text, rawdata text, 
rawbytes bytea) distributed randomly;
+
+COPY number FROM STDIN LOG ERRORS INTO err_copy SEGMENT REJECT LIMIT 10 ROWS;
+these are invalid line should be insert into error table.
+a
+1
+b
+2
+c
+3
+d
+4
+e
+5
+f
+6
+g
+7
+h
+\.
+
+select relname,filename,linenum,bytenum,errmsg,rawdata,rawbytes from err_copy 
order by linenum;
+select count(*) from number; --should be 7
+DROP TABLE err_copy;
+
+-- invalid error table schema
+TRUNCATE number;
+create table invalid_error_table1 (a int) distributed randomly;
+create table invalid_error_table3 (cmdtime timestamp with time zone, relname 
text, filename text, linenum integer, bytenum integer, errmsg text, rawdata 
text, rawbytes bytea)
+   distributed by (cmdtime);
+   
+COPY number FROM STDIN LOG ERRORS INTO invalid_error_table1 SEGMENT REJECT 
LIMIT 10 ROWS; -- should fail
+these are invalid line should be insert into error table.
+1
+\.
+
+;
+
+COPY number FROM STDIN LOG ERRORS INTO invalid_error_table3 SEGMENT REJECT 
LIMIT 10 ROWS; -- should fail
+these are invalid line should be insert into error table.
+1
+\.
+
+;
+
+DROP TABLE invalid_error_table1;
+DROP TABLE invalid_error_table3;
+
+DROP TABLE number;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/sql/gpcopy.sql
--
diff --git a/src/test/feature/utility/sql/gpcopy.sql 
b/src/test/feature/utility/sql/gpcopy.sql
new file mode 100644
index 000..6c48586
--- /dev/null
+++ b/src/test/feature/utility/sql/gpcopy.sql
@@ -0,0 +1,572 @@
+--
+-- This test suite tests COPY code that is unique to greenplum db. 
+--
+
+-- ##
+-- different distribution columns and distribution types
+-- ##
+
+CREATE TABLE copy_regression_hash1(a text, b text, c text) distributed by (b);
+CREATE TABLE copy_regression_hash2(a text, b text, c text) distributed by 
(a,c);
+CREATE TABLE copy_regression_hash3(a varchar, b int, c int, d text) 
distributed by (a,c,d);
+CREATE TABLE copy_regression_hash4(a int[], b text) distributed by (a);
+CREATE TABLE copy_regression_hash5(a text[][]) distributed by (a);
+CREATE TABLE copy_regression_hash6(a int[], b text[]) distributed by (a,b);
+CREATE TABLE copy_regression_hash7(a text,b text) distributed randomly;
+
+-- single key, not first
+
+COPY copy_regression_hash1 from stdin segment reject limit 10 rows;
+a data b data  c data
+\.
+COPY copy_regression_hash1(b,c,a) from stdin segment reject limit 10 rows;
+b data c data  a data
+\.
+SELECT * FROM copy_regression_hash1;
+
+-- two keys
+
+COPY copy_regression_hash2 from stdin;
+a data b data  c data
+\.
+COPY copy_regression_hash2(b,c,a) from stdin;
+b data c data  a data
+\.
+SELECT * FROM copy_regression_hash2;
+
+-- t

[10/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
HAWQ-898. Add feature test for COPY with new test framework.


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

Branch: refs/heads/master
Commit: b59603125b28a3ea2ce860feaf29bad9cb2fa0dd
Parents: faf5047
Author: YI JIN 
Authored: Tue Jul 26 22:05:58 2016 +1000
Committer: YI JIN 
Committed: Tue Jul 26 22:05:58 2016 +1000

--
 src/test/feature/UtilityCommand/ans/gpcopy.ans |   574 -
 src/test/feature/UtilityCommand/sql/gpcopy.sql |   572 -
 src/test/feature/UtilityCommand/test_cmd.cpp   |15 -
 src/test/feature/utility/ans/copy-stdio.ans|   165 +
 src/test/feature/utility/ans/gpcopy.ans|   574 +
 src/test/feature/utility/data/agg.data | 4 +
 src/test/feature/utility/data/array.data   |   100 +
 src/test/feature/utility/data/desc.data| 1 ++
 src/test/feature/utility/data/emp.data | 3 +
 src/test/feature/utility/data/hash.data| 1 ++
 src/test/feature/utility/data/onek.data|  1000 ++
 src/test/feature/utility/data/person.data  |50 +
 src/test/feature/utility/data/real_city.data   | 5 +
 src/test/feature/utility/data/rect.data|  3378 ++
 src/test/feature/utility/data/streets.data |  5124 +
 src/test/feature/utility/data/stud_emp.data| 3 +
 src/test/feature/utility/data/student.data | 2 +
 src/test/feature/utility/data/tenk.data| 1 ++
 src/test/feature/utility/sql/copy-stdio.sql|   131 +
 src/test/feature/utility/sql/gpcopy.sql|   572 +
 src/test/feature/utility/test_cmd.cpp  |15 +
 src/test/feature/utility/test_copy.cpp |   212 +
 src/test/regress/input/copy.source |   224 -
 src/test/regress/known_good_schedule   | 1 -
 src/test/regress/output/copy.source|   214 -
 25 files changed, 41338 insertions(+), 1600 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/UtilityCommand/ans/gpcopy.ans
--
diff --git a/src/test/feature/UtilityCommand/ans/gpcopy.ans 
b/src/test/feature/UtilityCommand/ans/gpcopy.ans
deleted file mode 100644
index c0efb23..000
--- a/src/test/feature/UtilityCommand/ans/gpcopy.ans
+++ /dev/null
@@ -1,574 +0,0 @@
--- start_ignore
-SET SEARCH_PATH=TestCommand_TestCOPY;
-SET
--- end_ignore
---
--- This test suite tests COPY code that is unique to greenplum db. 
---
--- ##
--- different distribution columns and distribution types
--- ##
-CREATE TABLE copy_regression_hash1(a text, b text, c text) distributed by (b);
-CREATE TABLE
-CREATE TABLE copy_regression_hash2(a text, b text, c text) distributed by 
(a,c);
-CREATE TABLE
-CREATE TABLE copy_regression_hash3(a varchar, b int, c int, d text) 
distributed by (a,c,d);
-CREATE TABLE
-CREATE TABLE copy_regression_hash4(a int[], b text) distributed by (a);
-CREATE TABLE
-CREATE TABLE copy_regression_hash5(a text[][]) distributed by (a);
-CREATE TABLE
-CREATE TABLE copy_regression_hash6(a int[], b text[]) distributed by (a,b);
-CREATE TABLE
-CREATE TABLE copy_regression_hash7(a text,b text) distributed randomly;
-CREATE TABLE
--- single key, not first
-COPY copy_regression_hash1 from stdin segment reject limit 10 rows;
-COPY copy_regression_hash1(b,c,a) from stdin segment reject limit 10 rows;
-SELECT * FROM copy_regression_hash1;
-   a|   b|   c
-++
- a data | b data | c data
- a data | b data | c data
-(2 rows)
-
--- two keys
-COPY copy_regression_hash2 from stdin;
-COPY copy_regression_hash2(b,c,a) from stdin;
-SELECT * FROM copy_regression_hash2;
-   a|   b|   c
-++
- a data | b data | c data
- a data | b data | c data
-(2 rows)
-
--- three keys
-COPY copy_regression_hash3 from stdin;
-COPY copy_regression_hash3(c,d,b,a) from stdin;
-COPY copy_regression_hash3(a,c) from stdin;
-COPY copy_regression_hash3(d) from stdin;
-SELECT * FROM copy_regression_hash3;
-   a| b | c |   d
-+---+---+
- a data | 2 | 3 | d data
- a data | 2 | 3 | d data
- a data |   | 3 | 
-|   |   | d data
-(4 rows)
-
--- hash on int array
-COPY copy_regression_hash4 from stdin;
-SELECT * FROM copy_regression_hash4 ORDER BY a;
-a | b  
---+
- {1,2,3,4,5}  | hashed on an integer array
- {10,20,30,40,50} | hashed on an integer array
-(2 rows)
-
--- has

[06/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/onek.data
--
diff --git a/src/test/feature/utility/data/onek.data 
b/src/test/feature/utility/data/onek.data
new file mode 100755
index 000..1605bbe
--- /dev/null
+++ b/src/test/feature/utility/data/onek.data
@@ -0,0 +1,1000 @@
+1470   1   3   7   7   7   47  147 147 
147 14  15  RF  AA  xx
+9311   1   3   1   11  1   31  131 431 
931 2   3   VJ  BA  xx
+7142   0   2   4   14  4   14  114 214 
714 8   9   MB  CA  xx
+7113   1   3   1   11  1   11  111 211 
711 2   3   JB  DA  xx
+8834   1   3   3   3   3   83  83  383 
883 6   7   ZH  EA  xx
+4395   1   3   9   19  9   39  39  439 
439 18  19  XQ  FA  xx
+6706   0   2   0   10  0   70  70  170 
670 0   1   UZ  GA  xx
+5437   1   3   3   3   3   43  143 43  
543 6   7   XU  HA  xx
+4258   1   1   5   5   5   25  25  425 
425 10  11  JQ  IA  xx
+8009   0   0   0   0   0   0   0   300 
800 0   1   UE  JA  xx
+48910  1   1   9   9   9   89  89  489 
489 18  19  VS  KA  xx
+49411  0   2   4   14  4   94  94  494 
494 8   9   AT  LA  xx
+88012  0   0   0   0   0   80  80  380 
880 0   1   WH  MA  xx
+61113  1   3   1   11  1   11  11  111 
611 2   3   NX  NA  xx
+22614  0   2   6   6   6   26  26  226 
226 12  13  SI  OA  xx
+77415  0   2   4   14  4   74  174 274 
774 8   9   UD  PA  xx
+29816  0   2   8   18  8   98  98  298 
298 16  17  ML  QA  xx
+68217  0   2   2   2   2   82  82  182 
682 4   5   GA  RA  xx
+86418  0   0   4   4   4   64  64  364 
864 8   9   GH  SA  xx
+18319  1   3   3   3   3   83  183 183 
183 6   7   BH  TA  xx
+88520  1   1   5   5   5   85  85  385 
885 10  11  BI  UA  xx
+99721  1   1   7   17  7   97  197 497 
997 14  15  JM  VA  xx
+96622  0   2   6   6   6   66  166 466 
966 12  13  EL  WA  xx
+38923  1   1   9   9   9   89  189 389 
389 18  19  ZO  XA  xx
+84624  0   2   6   6   6   46  46  346 
846 12  13  OG  YA  xx
+20625  0   2   6   6   6   6   6   206 
206 12  13  YH  ZA  xx
+23926  1   3   9   19  9   39  39  239 
239 18  19  FJ  AB  xx
+36527  1   1   5   5   5   65  165 365 
365 10  11  BO  BB  xx
+20428  0   0   4   4   4   4   4   204 
204 8   9   WH  CB  xx
+69029  0   2   0   10  0   90  90  190 
690 0   1   OA  DB  xx
+69 30  1   1   9   9   9   69  69  69  
69  18  19  RC  EB  xx
+35831  0   2   8   18  8   58  158 358 
358 16  17  UN  FB  xx
+26932  1   1   9   9   9   69  69  269 
269 18  19  JK  GB  xx
+66333  1   3   3   3   3   63  63  163 
663 6   7   NZ  HB  xx
+60834  0   0   8   8   8   8   8   108 
608 16  17  KX  IB  xx
+39835  0   2   8   18  8   98  198 398 
398 16  17  IP  JB  

[03/10] incubator-hawq git commit: HAWQ-898. Add feature test for COPY with new test framework.

2016-07-26 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/stud_emp.data
--
diff --git a/src/test/feature/utility/data/stud_emp.data 
b/src/test/feature/utility/data/stud_emp.data
new file mode 100755
index 000..4ad7566
--- /dev/null
+++ b/src/test/feature/utility/data/stud_emp.data
@@ -0,0 +1,3 @@
+jeff   23  (8,7.7) 600 sharon  3.5e+00 \N
+cim30  (10.5,4.7)  400 \N  3.39990e+00 \N
+linda  19  (0.9,6.1)   100 \N  2.89990e+00 \N

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b5960312/src/test/feature/utility/data/student.data
--
diff --git a/src/test/feature/utility/data/student.data 
b/src/test/feature/utility/data/student.data
new file mode 100755
index 000..f7e29e4
--- /dev/null
+++ b/src/test/feature/utility/data/student.data
@@ -0,0 +1,2 @@
+fred   28  (3.1,-1.5)  3.70020e+00
+larry  60  (21.8,4.9)  3.10010e+00



incubator-hawq git commit: HAWQ-894. Add missed sql script file

2016-07-20 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master cc7844cce -> eab41edab


HAWQ-894. Add missed sql script file


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

Branch: refs/heads/master
Commit: eab41edab5b49411120ab068775bb93b8df0bbaf
Parents: cc7844c
Author: YI JIN 
Authored: Thu Jul 21 14:46:21 2016 +1000
Committer: YI JIN 
Committed: Thu Jul 21 14:46:21 2016 +1000

--
 .../query/sql/polimorphism-test1-query.sql  | 24 
 1 file changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eab41eda/src/test/feature/query/sql/polimorphism-test1-query.sql
--
diff --git a/src/test/feature/query/sql/polimorphism-test1-query.sql 
b/src/test/feature/query/sql/polimorphism-test1-query.sql
new file mode 100644
index 000..b7be9a8
--- /dev/null
+++ b/src/test/feature/query/sql/polimorphism-test1-query.sql
@@ -0,0 +1,24 @@
+select f3, myaggp01a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp03a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp03b(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp05a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp06a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp08a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp09a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp09b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp10a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp10b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp20a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggp20b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn01a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn01b(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn03a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn05a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn05b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn06a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn06b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn08a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn08b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn09a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select f3, myaggn10a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+select mysum2(f1, f1 + 1) from t;
\ No newline at end of file



incubator-hawq git commit: HAWQ-897. Add feature test for create table distribution with new test framework

2016-07-20 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 9b004b7cb -> cc7844cce


HAWQ-897. Add feature test for create table distribution with new test framework


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

Branch: refs/heads/master
Commit: cc7844cced833ed43f2b655fc8386a934fac046e
Parents: 9b004b7
Author: YI JIN 
Authored: Thu Jul 21 14:43:13 2016 +1000
Committer: YI JIN 
Committed: Thu Jul 21 14:43:13 2016 +1000

--
 src/test/feature/catalog/test_create_table.cpp  | 307 ++-
 .../expected/create_table_distribution.out  | 382 ---
 src/test/regress/known_good_schedule|   1 -
 .../regress/sql/create_table_distribution.sql   | 227 ---
 4 files changed, 287 insertions(+), 630 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cc7844cc/src/test/feature/catalog/test_create_table.cpp
--
diff --git a/src/test/feature/catalog/test_create_table.cpp 
b/src/test/feature/catalog/test_create_table.cpp
index f72b2ec..fe12703 100644
--- a/src/test/feature/catalog/test_create_table.cpp
+++ b/src/test/feature/catalog/test_create_table.cpp
@@ -22,26 +22,26 @@ class TestCreateTable : public ::testing::Test {
 TEST_F(TestCreateTable, TestCreateTable1) {
   hawq::test::SQLUtility util;
   // prepare
-  util.execute("DROP TABLE IF EXISTS aggtest");
-  util.execute("DROP TABLE IF EXISTS tenk1");
-  util.execute("DROP TABLE IF EXISTS slow_emp4000");
-  util.execute("DROP TABLE IF EXISTS person");
-  util.execute("DROP TABLE IF EXISTS onek");
-  util.execute("DROP TABLE IF EXISTS emp");
-  util.execute("DROP TABLE IF EXISTS student");
-  util.execute("DROP TABLE IF EXISTS stud_emp");
-  util.execute("DROP TABLE IF EXISTS real_city");
-  util.execute("DROP TABLE IF EXISTS road");
-  util.execute("DROP TABLE IF EXISTS hash_i4_heap");
-  util.execute("DROP TABLE IF EXISTS hash_name_heap");
-  util.execute("DROP TABLE IF EXISTS hash_txt_heap");
-  util.execute("DROP TABLE IF EXISTS hash_f8_heap");
-  util.execute("DROP TABLE IF EXISTS bt_i4_heap");
-  util.execute("DROP TABLE IF EXISTS bt_name_heap");
-  util.execute("DROP TABLE IF EXISTS bt_txt_heap");
-  util.execute("DROP TABLE IF EXISTS bt_f8_heap");
-  util.execute("DROP TABLE IF EXISTS array_op_test");
-  util.execute("DROP TABLE IF EXISTS array_index_op_test");
+  util.execute("DROP TABLE IF EXISTS aggtest CASCADE");
+  util.execute("DROP TABLE IF EXISTS tenk1 CASCADE");
+  util.execute("DROP TABLE IF EXISTS slow_emp4000 CASCADE");
+  util.execute("DROP TABLE IF EXISTS person CASCADE");
+  util.execute("DROP TABLE IF EXISTS onek CASCADE");
+  util.execute("DROP TABLE IF EXISTS emp CASCADE");
+  util.execute("DROP TABLE IF EXISTS student CASCADE");
+  util.execute("DROP TABLE IF EXISTS stud_emp CASCADE");
+  util.execute("DROP TABLE IF EXISTS real_city CASCADE");
+  util.execute("DROP TABLE IF EXISTS road CASCADE");
+  util.execute("DROP TABLE IF EXISTS hash_i4_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS hash_name_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS hash_txt_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS hash_f8_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS bt_i4_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS bt_name_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS bt_txt_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS bt_f8_heap CASCADE");
+  util.execute("DROP TABLE IF EXISTS array_op_test CASCADE");
+  util.execute("DROP TABLE IF EXISTS array_index_op_test CASCADE");
 
   // test
   util.execute("CREATE TABLE aggtest (a int2, b float4)");
@@ -157,3 +157,270 @@ TEST_F(TestCreateTable, TestCreateTable1) {
   util.execute("DROP TABLE aggtest");
 }
 
+TEST_F(TestCreateTable, TestCreateTableInherits) {
+  hawq::test::SQLUtility util;
+  // prepare
+  util.execute("DROP TABLE IF EXISTS t1_1_6, t1_1_5, t1_1_4, t1_1_3, "
+   "t1_1_2, t1_1_1, t1_1_w, t1_1, t1 
CASCADE");
+
+  // test
+  util.execute("CREATE TABLE t1(c1 int)");
+  util.execute("CREATE TABLE t1_1(c2 int) INHERITS(t1)");
+  util.executeExpectErrorMsgStartWith(
+  "CREATE TABLE t1_1_w(c2 int) INHERITS(t1) WITH (bucketnum=3)",
+  "NOTICE:  Table has parent, setting distribution columns to match parent 
table\n"
+  "ERROR:  distribution policy for \"t1_1_w\" must be the same as that for 
\"t1\"");
+  util.executeExpectErrorMsgStartWith(
+  "CREATE TABLE t1_1_1(c2 int) INHERITS (t1) DISTRIBUTED BY (c1)",
+  "ERROR:  distribution policy for \"t1_1_1\" must be the same as that 

incubator-hawq git commit: HAWQ-698 Restore create_table_test in checkinstall-good to make test pass due to dependencies between cases

2016-07-18 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 9c8b59e00 -> 95995a62f


HAWQ-698 Restore create_table_test in checkinstall-good to make test pass due 
to dependencies between cases


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/95995a62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/95995a62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/95995a62

Branch: refs/heads/master
Commit: 95995a62f48c1da688cb8af1a7a6346b1c1bac57
Parents: 9c8b59e
Author: YI JIN 
Authored: Mon Jul 18 21:19:23 2016 +1000
Committer: YI JIN 
Committed: Mon Jul 18 21:19:23 2016 +1000

--
 src/test/regress/expected/create_table_test.out | 112 
 src/test/regress/known_good_schedule|   1 +
 src/test/regress/sql/create_table_test.sql  | 134 +++
 3 files changed, 247 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/95995a62/src/test/regress/expected/create_table_test.out
--
diff --git a/src/test/regress/expected/create_table_test.out 
b/src/test/regress/expected/create_table_test.out
new file mode 100755
index 000..d744410
--- /dev/null
+++ b/src/test/regress/expected/create_table_test.out
@@ -0,0 +1,112 @@
+--
+-- COPY
+--
+CREATE TABLE aggtest (
+a   int2,
+b   float4
+);
+CREATE TABLE tenk1 (
+unique1 int4,
+unique2 int4,
+two int4,
+fourint4,
+ten int4,
+twenty  int4,
+hundred int4,
+thousandint4,
+twothousand int4,
+fivethous   int4,
+tenthousint4,
+odd int4,
+evenint4,
+stringu1name,
+stringu2name,
+string4 name
+) WITH OIDS;
+CREATE TABLE slow_emp4000 (
+home_basebox
+);
+CREATE TABLE person (
+nametext,
+age int4,
+locationpoint
+);
+CREATE TABLE onek (
+unique1 int4,
+unique2 int4,
+two int4,
+fourint4,
+ten int4,
+twenty  int4,
+hundred int4,
+thousandint4,
+twothousand int4,
+fivethous   int4,
+tenthousint4,
+odd int4,
+evenint4,
+stringu1name,
+stringu2name,
+string4 name
+);
+CREATE TABLE emp (
+salary  int4,
+manager name
+) INHERITS (person) WITH OIDS;
+CREATE TABLE student (
+gpa float8
+) INHERITS (person);
+CREATE TABLE stud_emp (
+percent int4
+) INHERITS (emp, student);
+CREATE TABLE real_city (
+pop int4,
+cname   text,
+outline path
+);
+CREATE TABLE road (
+nametext,
+thepath path
+);
+CREATE TABLE hash_i4_heap (
+seqno   int4,
+random  int4
+);
+CREATE TABLE hash_name_heap (
+seqno   int4,
+random  name
+);
+CREATE TABLE hash_txt_heap (
+seqno   int4,
+random  text
+);
+CREATE TABLE hash_f8_heap (
+seqno   int4,
+random  float8
+);
+CREATE TABLE bt_i4_heap (
+seqno   int4,
+random  int4
+);
+CREATE TABLE bt_name_heap (
+seqno   name,
+random  int4
+);
+CREATE TABLE bt_txt_heap (
+seqno   text,
+random  int4
+);
+CREATE TABLE bt_f8_heap (
+seqno   float8,
+random  int4
+);
+CREATE TABLE array_op_test (
+seqno   int4,
+i   int4[],
+t   text[]
+);
+CREATE TABLE array_index_op_test (
+seqno   int4,
+i   int4[],
+t   text[]
+);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/95995a62/src/test/regress/known_good_schedule
--
diff --git a/src/test/regress/known_good_schedule 
b/src/test/regress/known_good_schedule
index 292573b..71564b9 100755
--- a/src/test/regress/known_good_schedule
+++ b/src/test/regress/known_good_schedule
@@ -57,6 +57,7 @@ ignore: opr_sanity
 ignore: geometry
 ignore: horology
 ignore: create_type
+test: create_table_test
 test: create_table_distribution
 ignore: create_function_2
 test: copy

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/95995a62/src/test/regress/sql/create_table_test.sql
--
diff --git a/src/test/regress/sql/create_table_test.sql 
b/src/test/regress/sql/create_table_test.sql
new file mode 100644
index 000..3c42b80
--- /dev/null
+++ b/src/test/regress/sql/create_table_test.sql
@@ -0,0 +1,134 @@
+--
+-- COPY
+--
+
+CREATE TABLE aggtest (
+a   int2,
+b   float4
+);
+
+CREATE TABLE tenk1 (
+unique1 int4,
+unique2 int4,
+two int4,
+four   

incubator-hawq git commit: HAWQ-896. Add feature test for create table with new test framework

2016-07-17 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 15323a501 -> 9c8b59e00


HAWQ-896. Add feature test for create table with new test framework


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

Branch: refs/heads/master
Commit: 9c8b59e009d5b277e0b5ceaa86ef366f450df52b
Parents: 15323a5
Author: YI JIN 
Authored: Mon Jul 18 15:30:07 2016 +1000
Committer: YI JIN 
Committed: Mon Jul 18 15:30:07 2016 +1000

--
 src/test/feature/catalog/test_create_table.cpp  | 159 +++
 src/test/regress/expected/create_table_test.out | 112 -
 src/test/regress/known_good_schedule|   1 -
 src/test/regress/sql/create_table_test.sql  | 134 
 4 files changed, 159 insertions(+), 247 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9c8b59e0/src/test/feature/catalog/test_create_table.cpp
--
diff --git a/src/test/feature/catalog/test_create_table.cpp 
b/src/test/feature/catalog/test_create_table.cpp
new file mode 100644
index 000..f72b2ec
--- /dev/null
+++ b/src/test/feature/catalog/test_create_table.cpp
@@ -0,0 +1,159 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "lib/sql_util.h"
+
+#include "gtest/gtest.h"
+
+class TestCreateTable : public ::testing::Test {
+ public:
+  TestCreateTable() {}
+  ~TestCreateTable() {}
+};
+
+
+TEST_F(TestCreateTable, TestCreateTable1) {
+  hawq::test::SQLUtility util;
+  // prepare
+  util.execute("DROP TABLE IF EXISTS aggtest");
+  util.execute("DROP TABLE IF EXISTS tenk1");
+  util.execute("DROP TABLE IF EXISTS slow_emp4000");
+  util.execute("DROP TABLE IF EXISTS person");
+  util.execute("DROP TABLE IF EXISTS onek");
+  util.execute("DROP TABLE IF EXISTS emp");
+  util.execute("DROP TABLE IF EXISTS student");
+  util.execute("DROP TABLE IF EXISTS stud_emp");
+  util.execute("DROP TABLE IF EXISTS real_city");
+  util.execute("DROP TABLE IF EXISTS road");
+  util.execute("DROP TABLE IF EXISTS hash_i4_heap");
+  util.execute("DROP TABLE IF EXISTS hash_name_heap");
+  util.execute("DROP TABLE IF EXISTS hash_txt_heap");
+  util.execute("DROP TABLE IF EXISTS hash_f8_heap");
+  util.execute("DROP TABLE IF EXISTS bt_i4_heap");
+  util.execute("DROP TABLE IF EXISTS bt_name_heap");
+  util.execute("DROP TABLE IF EXISTS bt_txt_heap");
+  util.execute("DROP TABLE IF EXISTS bt_f8_heap");
+  util.execute("DROP TABLE IF EXISTS array_op_test");
+  util.execute("DROP TABLE IF EXISTS array_index_op_test");
+
+  // test
+  util.execute("CREATE TABLE aggtest (a int2, b float4)");
+
+  util.execute("CREATE TABLE tenk1 (unique1 int4,"
+  "unique2 int4,"
+  "two int4,"
+  "fourint4,"
+  "ten int4,"
+  "twenty  int4,"
+  "hundred int4,"
+  "thousandint4,"
+  "twothousand int4,"
+  "fivethous   int4,"
+  "tenthousint4,"
+  "odd int4,"
+  "evenint4,"
+  "stringu1name,"
+  "stringu2name,"
+  "string4 name) 
WITH OIDS");
+
+  util.execute("CREATE TABLE slow_emp4000 (home_base  box)");
+
+  util.execute("CREATE TABLE person (nametext,"
+   "age int4,"
+   "locationpoint)");
+
+  util.execute("CREATE TABLE onek (unique1 int4,"
+  "unique2 int4,"
+  "two int4,"
+  "fourint4,"
+  "ten int4,"
+  "twenty  int4,"
+  "hundred int4,"
+  "thousandint4,"
+ 

incubator-hawq git commit: HAWQ-894. Add missed answer file for polymorphism case

2016-07-14 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master ef3325f2b -> 077f708c7


HAWQ-894. Add missed answer file for polymorphism case


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/077f708c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/077f708c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/077f708c

Branch: refs/heads/master
Commit: 077f708c73ab28c2142075d11877f56aeb93df62
Parents: ef3325f
Author: YI JIN 
Authored: Thu Jul 14 18:58:33 2016 +1000
Committer: YI JIN 
Committed: Thu Jul 14 18:58:33 2016 +1000

--
 .../query/ans/polimorphism-test1-query.ans  | 190 +++
 1 file changed, 190 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/077f708c/src/test/feature/query/ans/polimorphism-test1-query.ans
--
diff --git a/src/test/feature/query/ans/polimorphism-test1-query.ans 
b/src/test/feature/query/ans/polimorphism-test1-query.ans
new file mode 100644
index 000..decdf01
--- /dev/null
+++ b/src/test/feature/query/ans/polimorphism-test1-query.ans
@@ -0,0 +1,190 @@
+select f3, myaggp01a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp01a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp03a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp03a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp03b(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp03b 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp05a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp05a 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggp06a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp06a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp08a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp08a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp09a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp09a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp09b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp09b 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggp10a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp10a 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggp10b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp10b 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggp20a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp20a 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggp20b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggp20b 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggn01a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn01a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggn01b(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn01b 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggn03a(*) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn03a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggn05a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn05a 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggn05b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn05b 
++---
+ a  | {1,4,7}
+ b  | {5,2,8}
+ c  | {3,6}
+(3 rows)
+
+select f3, myaggn06a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn06a 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggn06b(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3 | myaggn06b 
++---
+ a  | {}
+ b  | {}
+ c  | {}
+(3 rows)
+
+select f3, myaggn08a(f1) from (select * from t order by f1 limit 10) as foo 
group by f3 order by f3;
+ f3

incubator-hawq git commit: HAWQ-894. Add feature test for polymorphism with new test framework

2016-07-13 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master b0ee0aee1 -> ef3325f2b


HAWQ-894. Add feature test for polymorphism with new test framework


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

Branch: refs/heads/master
Commit: ef3325f2ba1c6ac6782c4540b97942f6fc68a898
Parents: b0ee0ae
Author: YI JIN 
Authored: Thu Jul 14 14:55:30 2016 +1000
Committer: YI JIN 
Committed: Thu Jul 14 14:55:30 2016 +1000

--
 src/test/feature/lib/sql_util.cpp   |   6 +
 src/test/feature/lib/sql_util.h |   7 +
 .../feature/query/ans/polimorphism-test1.ans|  56 ++
 .../feature/query/sql/polimorphism-test1.sql|  48 ++
 src/test/feature/query/test_polymorphism.cpp| 497 +
 src/test/regress/expected/polymorphism.out  | 544 ---
 src/test/regress/known_good_schedule|   1 -
 src/test/regress/sql/polymorphism.sql   | 377 -
 8 files changed, 614 insertions(+), 922 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ef3325f2/src/test/feature/lib/sql_util.cpp
--
diff --git a/src/test/feature/lib/sql_util.cpp 
b/src/test/feature/lib/sql_util.cpp
index ea0c805..35e8ffe 100644
--- a/src/test/feature/lib/sql_util.cpp
+++ b/src/test/feature/lib/sql_util.cpp
@@ -62,6 +62,12 @@ string SQLUtility::execute(const string &sql, bool check) {
   return conn.get()->getLastResult();
 }
 
+void SQLUtility::executeExpectErrorMsgStartWith(const std::string &sql,
+const std::string &errmsg) {
+  std::string errout = execute(sql, false);
+  EXPECT_STREQ(errmsg.c_str(), errout.substr(0, errmsg.size()).c_str());
+}
+
 void SQLUtility::executeIgnore(const string &sql) {
   conn->runSQLCommand("SET SEARCH_PATH=" + schemaName + ";" + sql);
   EXPECT_NE(conn.get(), nullptr);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ef3325f2/src/test/feature/lib/sql_util.h
--
diff --git a/src/test/feature/lib/sql_util.h b/src/test/feature/lib/sql_util.h
index 768dfc9..ea75aa3 100644
--- a/src/test/feature/lib/sql_util.h
+++ b/src/test/feature/lib/sql_util.h
@@ -70,6 +70,13 @@ class SQLUtility {
   // Get GUC value
   std::string getGUCValue(const std::string &guc);
 
+  // execute expect error message
+  // @param sql the given sql command
+  // @param errmsg the expected sql error message
+  // @return void
+  void executeExpectErrorMsgStartWith(const std::string &sql, const 
std::string &errmsg);
+
+
  private:
   std::unique_ptr getConnection();
   const std::string generateSQLFile(const std::string &sqlFile);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ef3325f2/src/test/feature/query/ans/polimorphism-test1.ans
--
diff --git a/src/test/feature/query/ans/polimorphism-test1.ans 
b/src/test/feature/query/ans/polimorphism-test1.ans
new file mode 100644
index 000..ff2fd93
--- /dev/null
+++ b/src/test/feature/query/ans/polimorphism-test1.ans
@@ -0,0 +1,56 @@
+-- Legend:
+---
+-- A = type is ANY
+-- P = type is polymorphic
+-- N = type is non-polymorphic
+-- B = aggregate base type
+-- S = aggregate state type
+-- R = aggregate return type
+-- 1 = arg1 of a function
+-- 2 = arg2 of a function
+-- ag = aggregate
+-- tf = trans (state) function
+-- ff = final function
+-- rt = return type of a function
+-- -> = implies
+-- => = allowed
+-- !> = not allowed
+-- E  = exists
+-- NE = not-exists
+--
+-- Possible states:
+-- 
+-- B = (A || P || N)
+--   when (B = A) -> (tf2 = NE)
+-- S = (P || N)
+-- ff = (E || NE)
+-- tf1 = (P || N)
+-- tf2 = (NE || P || N)
+-- R = (P || N)
+-- polymorphic single arg transfn
+CREATE FUNCTION stfp(anyarray) RETURNS anyarray AS 'select $1' LANGUAGE SQL;
+CREATE FUNCTION
+-- non-polymorphic single arg transfn
+CREATE FUNCTION stfnp(int[]) RETURNS int[] AS 'select $1' LANGUAGE SQL;
+CREATE FUNCTION
+-- dual polymorphic transfn
+CREATE FUNCTION tfp(anyarray,anyelement) RETURNS anyarray AS 'select $1 || $2' 
LANGUAGE SQL;
+CREATE FUNCTION
+-- dual non-polymorphic transfn
+CREATE FUNCTION tfnp(int[],int) RETURNS int[] AS 'select $1 || $2' LANGUAGE 
SQL;
+CREATE FUNCTION
+-- arg1 only polymorphic transfn
+CREATE FUNCTION tf1p(anyarray,int) RETURNS anyarray AS 'select $1' LANGUAGE 
SQL;
+CREATE FUNCTION
+-- arg2 only polymorphic transfn
+CREATE FUNCTION tf2p(int[],anyelement) RETURNS int[] AS 'select $1' LANGUAGE 
SQL;
+CREATE FUNCTION
+--

incubator-hawq git commit: HAWQ-855. Make resource manager ask for cluster report quickly when YARN is detected down

2016-06-22 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2c87cdcbd -> 48a79cc27


HAWQ-855. Make resource manager ask for cluster report quickly when YARN is 
detected down


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/48a79cc2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/48a79cc2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/48a79cc2

Branch: refs/heads/master
Commit: 48a79cc270bb8817d9f58b64fd5abb61f8ef0643
Parents: 2c87cdc
Author: YI JIN 
Authored: Thu Jun 23 13:31:32 2016 +1000
Committer: YI JIN 
Committed: Thu Jun 23 13:31:32 2016 +1000

--
 src/backend/resourcemanager/include/resourcepool.h | 2 +-
 src/backend/resourcemanager/resourcemanager.c  | 2 +-
 src/backend/resourcemanager/resourcepool.c | 6 +-
 3 files changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/48a79cc2/src/backend/resourcemanager/include/resourcepool.h
--
diff --git a/src/backend/resourcemanager/include/resourcepool.h 
b/src/backend/resourcemanager/include/resourcepool.h
index 4caf139..f23e77b 100644
--- a/src/backend/resourcemanager/include/resourcepool.h
+++ b/src/backend/resourcemanager/include/resourcepool.h
@@ -617,7 +617,7 @@ void timeoutIdleGRMResourceToRB(void);
 void forceReturnGRMResourceToRB(void);
 
 /* Check if some hosts are not updated from GRM cluster report. */
-bool hasSegmentGRMCapacityNotUpdated(void);
+bool requireInstantClusterReport(void);
 bool allSegmentHasNoGRMContainersAllocated(void);
 
 int addOrderedResourceAllocTreeIndexByRatio(uint32_t ratio, BBST *tree);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/48a79cc2/src/backend/resourcemanager/resourcemanager.c
--
diff --git a/src/backend/resourcemanager/resourcemanager.c 
b/src/backend/resourcemanager/resourcemanager.c
index 6e9e365..e511b97 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -2882,7 +2882,7 @@ void processResourceBrokerTasks(void)
if ( (PRESPOOL->Segments.NodeCount > 0 ) &&
 (curtime - PRESPOOL->LastUpdateTime  >
  rm_cluster_report_period * 100LL ||
- hasSegmentGRMCapacityNotUpdated() ) &&
+ requireInstantClusterReport() ) &&
 (curtime - PRESPOOL->LastRequestTime > 5LL * 
100LL) )
{
double  maxcap  = 0.0;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/48a79cc2/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index dc48e70..567b295 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3711,7 +3711,7 @@ void timeoutIdleGRMResourceToRBByRatio(int
 ratioindex,
validateResourcePoolStatus(false);
 }
 
-bool hasSegmentGRMCapacityNotUpdated(void)
+bool requireInstantClusterReport(void)
 {
if (DRMGlobalInstance->ImpType == NONE_HAWQ2)
{
@@ -3741,6 +3741,10 @@ bool hasSegmentGRMCapacityNotUpdated(void)
res = true;
break;
}
+   else if ( segresource->Stat->StatusDesc & 
SEG_STATUS_NO_GRM_NODE_REPORT ) {
+   res = true;
+   break;
+   }
}
freePAIRRefList(&(PRESPOOL->Segments), &allsegres);
return res;



incubator-hawq git commit: HAWQ-776. Fix time zone problem when inserting time values for testing alter table add column

2016-06-15 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master dbf32f1b7 -> 1aa4a17b2


HAWQ-776. Fix time zone problem when inserting time values for testing alter 
table add column


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1aa4a17b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1aa4a17b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1aa4a17b

Branch: refs/heads/master
Commit: 1aa4a17b2886cc63aae7da02239fcbecb7a51255
Parents: dbf32f1
Author: YI JIN 
Authored: Thu Jun 16 15:35:10 2016 +1000
Committer: YI JIN 
Committed: Thu Jun 16 15:35:10 2016 +1000

--
 .../feature/catalog/ans/alter-table-addcol-insert-alltypes.ans   | 4 +++-
 .../feature/catalog/sql/alter-table-addcol-insert-alltypes.sql   | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1aa4a17b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
--
diff --git 
a/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans 
b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
index e28d8f6..4aec294 100644
--- a/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
+++ b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
@@ -1,3 +1,5 @@
+SET TIME ZONE UTC;
+SET
 INSERT INTO tmp 
   (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z)
VALUES (4, 
@@ -29,6 +31,6 @@ INSERT 0 1
 SELECT * FROM tmp;
  initial | a |  b   |  c   |  d  |  e  | f |   g   |   
h| i |  j   
|   k|   l   |  m  |n|   p   | 
q |   r   |  s  |  t
  |   u   |  v  |w |
 x | y | z 
 
-+---+--+--+-+-+---+---++---+--++---+-+-+---+---+---+-+-+---+-+--+---+---+---
- | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | 
1995-05-01 00:30:30+10 | c | {"1995-05-01 00:30:30+10","1992-08-24 
14:43:07+10","1970-01-01 10:00:00+10"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 
| magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | 
((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["1970-01-01 10:00:00+10" 
"infinity"] | 1970-01-01 00:00:00 | 01:00:10 | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
+ | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | 
1995-05-01 00:30:30+00 | c | {"1995-05-01 00:30:30+00","1992-08-24 
14:43:07+00","1970-01-01 00:00:00+00"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 
| magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | 
((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["1970-01-01 00:00:00+00" 
"infinity"] | 1970-01-01 00:00:00 | 01:00:10 | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
 (1 row)
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1aa4a17b/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
--
diff --git 
a/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql 
b/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
index be3280a..0f8b59e 100644
--- a/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
+++ b/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
@@ -1,3 +1,4 @@
+SET TIME ZONE UTC;
 INSERT INTO tmp 
   (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z)
VALUES (4, 



incubator-hawq git commit: HAWQ-817. Remove deprecated test cases from checkinstall-good

2016-06-15 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 9833d128c -> 76260cdf4


HAWQ-817. Remove deprecated test cases from checkinstall-good


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/76260cdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/76260cdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/76260cdf

Branch: refs/heads/master
Commit: 76260cdf4b83bd29469dfb200a20cee496e8a173
Parents: 9833d12
Author: YI JIN 
Authored: Thu Jun 16 12:47:35 2016 +1000
Committer: YI JIN 
Committed: Thu Jun 16 12:47:35 2016 +1000

--
 src/test/regress/expected/goh_alter_owner.out   |  39 
 src/test/regress/expected/insert.out|  90 
 src/test/regress/expected/insert_optimizer.out  |  92 
 src/test/regress/expected/sequence.out  | 214 --
 .../regress/expected/sequence_optimizer.out | 215 ---
 src/test/regress/known_good_schedule|   4 -
 src/test/regress/sql/goh_alter_owner.sql|  16 --
 src/test/regress/sql/insert.sql |  73 ---
 src/test/regress/sql/sequence.sql   | 110 --
 9 files changed, 853 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/76260cdf/src/test/regress/expected/goh_alter_owner.out
--
diff --git a/src/test/regress/expected/goh_alter_owner.out 
b/src/test/regress/expected/goh_alter_owner.out
deleted file mode 100644
index dc0f7e1..000
--- a/src/test/regress/expected/goh_alter_owner.out
+++ /dev/null
@@ -1,39 +0,0 @@
-CREATE ROLE super SUPERUSER;
-SET SESSION AUTHORIZATION super;
-CREATE ROLE u1;
-NOTICE:  resource queue required -- using default resource queue "pg_default"
-CREATE DATABASE u1;
-CREATE SCHEMA u1;
-select nspname, rolname from pg_namespace n, pg_authid a where n.nspowner = 
a.oid and nspname = 'u1';
- nspname | rolname 
--+-
- u1  | super
-(1 row)
-
-select datname, rolname from pg_database d, pg_authid a where d.datdba = a.oid 
and datname = 'u1';
- datname | rolname 
--+-
- u1  | super
-(1 row)
-
-alter database u1 owner to u1;
-ERROR:  Cannot support alter database owner statement yet
-alter schema u1 owner to u1;
-ERROR:  Cannot support alter schema owner statement yet
-select nspname, rolname from pg_namespace n, pg_authid a where n.nspowner = 
a.oid and nspname = 'u1';
- nspname | rolname 
--+-
- u1  | super
-(1 row)
-
-select datname, rolname from pg_database d, pg_authid a where d.datdba = a.oid 
and datname = 'u1';
- datname | rolname 
--+-
- u1  | super
-(1 row)
-
-RESET SESSION AUTHORIZATION;
-DROP DATABASE u1;
-DROP SCHEMA u1;
-DROP ROLE u1;
-DROP ROLE super;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/76260cdf/src/test/regress/expected/insert.out
--
diff --git a/src/test/regress/expected/insert.out 
b/src/test/regress/expected/insert.out
deleted file mode 100644
index d254596..000
--- a/src/test/regress/expected/insert.out
+++ /dev/null
@@ -1,90 +0,0 @@
---
--- insert with DEFAULT in the target_list
---
-create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 
'testing');
-insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT);
-ERROR:  null value in column "col2" violates not-null constraint  (seg0 
localhost:4 pid=88865)
-insert into inserttest (col2, col3) values (3, DEFAULT);
-insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
-insert into inserttest values (DEFAULT, 5, 'test');
-insert into inserttest values (DEFAULT, 7);
-select * from inserttest order by 1,2,3;
- col1 | col2 |  col3   
---+--+-
-  |3 | testing
-  |5 | test
-  |5 | testing
-  |7 | testing
-(4 rows)
-
---
--- insert with similar expression / target_list values (all fail)
---
-insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT);
-ERROR:  INSERT has more target columns than expressions
-insert into inserttest (col1, col2, col3) values (1, 2);
-ERROR:  INSERT has more target columns than expressions
-insert into inserttest (col1) values (1, 2);
-ERROR:  INSERT has more expressions than target columns
-insert into inserttest (col1) values (DEFAULT, DEFAULT);
-ERROR:  INSERT has more expressions than target columns
-select * from inserttest order by 1,2,3;
- col1 | col2 |  col3   
---+--+-
-  |3 | testing
-  |5 | test
-  |5 | testing
-  |7 | testing
-(4 rows)
-
---
--- VALUES test
---
-insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT),
-((select 2), (select i fr

incubator-hawq git commit: HAWQ-776. Refactor alter table checkinstall cases using new test framework

2016-06-15 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master aaafcab84 -> 9833d128c


HAWQ-776. Refactor alter table checkinstall cases using new test framework


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/9833d128
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/9833d128
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/9833d128

Branch: refs/heads/master
Commit: 9833d128c9b8e38bbafe6a2476c57300110f76a9
Parents: aaafcab
Author: YI JIN 
Authored: Thu Jun 16 12:45:35 2016 +1000
Committer: YI JIN 
Committed: Thu Jun 16 12:45:35 2016 +1000

--
 .../ans/alter-table-addcol-insert-alltypes.ans  |  34 +++
 .../sql/alter-table-addcol-insert-alltypes.sql  |  29 +++
 src/test/feature/catalog/test_alter_table.cpp   | 254 +++
 src/test/regress/expected/gpsql_alter_table.out | 197 --
 .../expected/gpsql_alter_table_optimizer.out| 202 ---
 src/test/regress/known_good_schedule|   1 -
 src/test/regress/sql/gpsql_alter_table.sql  | 153 ---
 7 files changed, 317 insertions(+), 553 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9833d128/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
--
diff --git 
a/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans 
b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
new file mode 100644
index 000..e28d8f6
--- /dev/null
+++ b/src/test/feature/catalog/ans/alter-table-addcol-insert-alltypes.ans
@@ -0,0 +1,34 @@
+INSERT INTO tmp 
+  (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z)
+   VALUES (4, 
+   'name', 
+   'text', 
+   4.1, 
+   4.1, 
+   2, 
+   '(4.1,4.1,3.1,3.1)',
+   'Mon May  1 00:30:30 1995', 
+   'c', 
+   '{Mon May  1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}',
+   314159, 
+   '(1,1)', 
+   '512',
+   '1 2 3 4 5 6 7 8', 
+   'magnetic disk', 
+   '(1.1,1.1)', 
+   '(4.1,4.1,3.1,3.1)',
+   '(0,2,4.1,4.1,3.1,3.1)', 
+   '(4.1,4.1,3.1,3.1)', 
+   '["epoch" "infinity"]',
+   'epoch', 
+   '01:00:10', 
+   '{1.0,2.0,3.0,4.0}', 
+   '{1.0,2.0,3.0,4.0}', 
+   '{1,2,3,4}');
+INSERT 0 1
+SELECT * FROM tmp;
+ initial | a |  b   |  c   |  d  |  e  | f |   g   |   
h| i |  j   
|   k|   l   |  m  |n|   p   | 
q |   r   |  s  |  t
  |   u   |  v  |w |
 x | y | z 
+-+---+--+--+-+-+---+---++---+--++---+-+-+---+---+---+-+-+---+-+--+---+---+---
+ | 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | 
1995-05-01 00:30:30+10 | c | {"1995-05-01 00:30:30+10","1992-08-24 
14:43:07+10","1970-01-01 10:00:00+10"} | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 
| magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | 
((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | ["1970-01-01 10:00:00+10" 
"infinity"] | 1970-01-01 00:00:00 | 01:00:10 | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
+(1 row)
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9833d128/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
--
diff --git 
a/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql 
b/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
new file mode 100644
index 000..be3280a
--- /dev/null
+++ b/src/test/feature/catalog/sql/alter-table-addcol-insert-alltypes.sql
@@ -0,0 +1,29 @@
+INSERT INTO tmp 
+  (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z)
+   VALUES (4, 
+   'name', 
+   'text', 
+   4.1, 
+   4.1, 
+   2, 
+   '(4.1,4.1,3.1,3.1)',
+   'Mon May  1 00:30:30 1995', 
+   'c', 
+   '{Mon May  1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}',
+   314159, 
+   '(1,1)', 
+   '512',
+   '1 2 3 4 5 6 7 8', 
+   'magnetic disk

incubator-hawq git commit: HAWQ-802. Remove out file for testing alter owner

2016-06-12 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 0ffcd45a6 -> 2cc43d5dd


HAWQ-802. Remove out file for testing alter owner


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

Branch: refs/heads/master
Commit: 2cc43d5dd43832c982d626ac5e2ffa5c29283c62
Parents: 0ffcd45
Author: YI JIN 
Authored: Mon Jun 13 16:50:36 2016 +1000
Committer: YI JIN 
Committed: Mon Jun 13 16:50:36 2016 +1000

--
 src/test/feature/catalog/ans/alter-owner.out | 51 ---
 1 file changed, 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2cc43d5d/src/test/feature/catalog/ans/alter-owner.out
--
diff --git a/src/test/feature/catalog/ans/alter-owner.out 
b/src/test/feature/catalog/ans/alter-owner.out
deleted file mode 100644
index c03ac67..000
--- a/src/test/feature/catalog/ans/alter-owner.out
+++ /dev/null
@@ -1,51 +0,0 @@
--- start_ignore
-SET SEARCH_PATH=TestAlterOwner_TestAlterOwnerAll;
-SET
--- end_ignore
-create role super superuser;
-CREATE ROLE
-set session authorization super;
-SET
-create role u1;
-psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:6: NOTICE:  resource queue 
required -- using default resource queue "pg_default"
-CREATE ROLE
-create database u1;
-CREATE DATABASE
-create schema u1;
-CREATE SCHEMA
-select 
-nspname, rolname 
-  from 
-pg_namespace n, pg_authid a 
-  where 
-n.nspowner = a.oid and nspname = 'u1';
- nspname | rolname 
--+-
- u1  | super
-(1 row)
-
-select 
-datname, rolname 
-  from 
-pg_database d, pg_authid a 
-  where 
-d.datdba = a.oid and datname = 'u1';
- datname | rolname 
--+-
- u1  | super
-(1 row)
-
-alter database u1 owner to u1;
-psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:24: ERROR:  Cannot support 
alter database owner statement yet
-alter schema u1 owner to u1;
-psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:25: ERROR:  Cannot support 
alter schema owner statement yet
-reset session authorization;
-RESET
-drop database u1;
-DROP DATABASE
-drop schema u1;
-DROP SCHEMA
-drop role u1;
-DROP ROLE
-drop role super;
-DROP ROLE



incubator-hawq git commit: Refactor alter owner installcheck case using new test framework

2016-06-12 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 32e9dd2ac -> 0ffcd45a6


Refactor alter owner installcheck case using new test framework


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0ffcd45a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0ffcd45a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0ffcd45a

Branch: refs/heads/master
Commit: 0ffcd45a64c52ea8aaff8d11772bbd4eadf01072
Parents: 32e9dd2
Author: YI JIN 
Authored: Mon Jun 13 16:48:39 2016 +1000
Committer: YI JIN 
Committed: Mon Jun 13 16:48:39 2016 +1000

--
 src/test/feature/catalog/ans/alter-owner.ans  | 47 
 src/test/feature/catalog/ans/alter-owner.out  | 51 ++
 src/test/feature/catalog/sql/alter-owner.sql  | 28 
 src/test/feature/catalog/test_alter_owner.cpp | 27 
 4 files changed, 153 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0ffcd45a/src/test/feature/catalog/ans/alter-owner.ans
--
diff --git a/src/test/feature/catalog/ans/alter-owner.ans 
b/src/test/feature/catalog/ans/alter-owner.ans
new file mode 100644
index 000..9d2eeaf
--- /dev/null
+++ b/src/test/feature/catalog/ans/alter-owner.ans
@@ -0,0 +1,47 @@
+create role super superuser;
+CREATE ROLE
+set session authorization super;
+SET
+create role u1;
+psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:6: NOTICE:  resource queue 
required -- using default resource queue "pg_default"
+CREATE ROLE
+create database u1;
+CREATE DATABASE
+create schema u1;
+CREATE SCHEMA
+select 
+nspname, rolname 
+  from 
+pg_namespace n, pg_authid a 
+  where 
+n.nspowner = a.oid and nspname = 'u1';
+ nspname | rolname 
+-+-
+ u1  | super
+(1 row)
+
+select 
+datname, rolname 
+  from 
+pg_database d, pg_authid a 
+  where 
+d.datdba = a.oid and datname = 'u1';
+ datname | rolname 
+-+-
+ u1  | super
+(1 row)
+
+alter database u1 owner to u1;
+psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:24: ERROR:  Cannot support 
alter database owner statement yet
+alter schema u1 owner to u1;
+psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:25: ERROR:  Cannot support 
alter schema owner statement yet
+reset session authorization;
+RESET
+drop database u1;
+DROP DATABASE
+drop schema u1;
+DROP SCHEMA
+drop role u1;
+DROP ROLE
+drop role super;
+DROP ROLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0ffcd45a/src/test/feature/catalog/ans/alter-owner.out
--
diff --git a/src/test/feature/catalog/ans/alter-owner.out 
b/src/test/feature/catalog/ans/alter-owner.out
new file mode 100644
index 000..c03ac67
--- /dev/null
+++ b/src/test/feature/catalog/ans/alter-owner.out
@@ -0,0 +1,51 @@
+-- start_ignore
+SET SEARCH_PATH=TestAlterOwner_TestAlterOwnerAll;
+SET
+-- end_ignore
+create role super superuser;
+CREATE ROLE
+set session authorization super;
+SET
+create role u1;
+psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:6: NOTICE:  resource queue 
required -- using default resource queue "pg_default"
+CREATE ROLE
+create database u1;
+CREATE DATABASE
+create schema u1;
+CREATE SCHEMA
+select 
+nspname, rolname 
+  from 
+pg_namespace n, pg_authid a 
+  where 
+n.nspowner = a.oid and nspname = 'u1';
+ nspname | rolname 
+-+-
+ u1  | super
+(1 row)
+
+select 
+datname, rolname 
+  from 
+pg_database d, pg_authid a 
+  where 
+d.datdba = a.oid and datname = 'u1';
+ datname | rolname 
+-+-
+ u1  | super
+(1 row)
+
+alter database u1 owner to u1;
+psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:24: ERROR:  Cannot support 
alter database owner statement yet
+alter schema u1 owner to u1;
+psql:/tmp/TestAlterOwner_TestAlterOwnerAll.sql:25: ERROR:  Cannot support 
alter schema owner statement yet
+reset session authorization;
+RESET
+drop database u1;
+DROP DATABASE
+drop schema u1;
+DROP SCHEMA
+drop role u1;
+DROP ROLE
+drop role super;
+DROP ROLE

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0ffcd45a/src/test/feature/catalog/sql/alter-owner.sql
--
diff --git a/src/test/feature/catalog/sql/alter-owner.sql 
b/src/test/feature/catalog/sql/alter-owner.sql
new file mode 100644
index 000..a6e7b77
--- /dev/null
+++ b/src/test/feature/catalog/sql/alter-owner.sql
@@ -0,0 +1,28 @@
+create role super superuser;
+set session authorization super;
+create role u1;
+create database u1;
+create schema u1;
+
+select 
+nspname, rolname 
+  from 
+pg_namespace n, pg_authid a 
+  where 
+n.nspowner = a.oid and nspname

incubator-hawq git commit: HAWQ-792. Orca on causes different error message when insert null value to a not null col

2016-06-11 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master c99884a3c -> b260e2d7e


HAWQ-792. Orca on causes different error message when insert null value to a 
not null col


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

Branch: refs/heads/master
Commit: b260e2d7e82dcc8405bbcb6a657c82d0cb9d883a
Parents: c99884a
Author: YI JIN 
Authored: Sun Jun 12 14:55:23 2016 +1000
Committer: YI JIN 
Committed: Sun Jun 12 14:55:23 2016 +1000

--
 src/test/feature/lib/sql_util.cpp  | 13 +
 src/test/feature/lib/sql_util.h|  5 +
 .../query/ans/sequence-serialcol-null-orca.ans |  3 +++
 src/test/feature/query/test_sequence.cpp   | 17 +++--
 4 files changed, 36 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b260e2d7/src/test/feature/lib/sql_util.cpp
--
diff --git a/src/test/feature/lib/sql_util.cpp 
b/src/test/feature/lib/sql_util.cpp
index 4f48664..8e9b615 100644
--- a/src/test/feature/lib/sql_util.cpp
+++ b/src/test/feature/lib/sql_util.cpp
@@ -164,6 +164,19 @@ string SQLUtility::getTestRootPath() const {
   return splitFilePath(result).path;
 }
 
+void SQLUtility::setGUCValue(const std::string &guc, const std::string &value) 
{
+  string sql = "set " + guc + " = " + value;
+  execute(sql, true);
+}
+
+std::string SQLUtility::getGUCValue(const std::string &guc) {
+  string sql = "show " + guc;
+  const hawq::test::PSQLQueryResult &result = executeQuery(sql);
+  EXPECT_EQ(result.rowCount(), 1);
+  std::vector row = result.getRows()[0];
+  return row[0];
+}
+
 FilePath SQLUtility::splitFilePath(const string &filePath) const {
   FilePath fp;
   size_t found1 = filePath.find_last_of("/");

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b260e2d7/src/test/feature/lib/sql_util.h
--
diff --git a/src/test/feature/lib/sql_util.h b/src/test/feature/lib/sql_util.h
index 296108b..58df9cb 100644
--- a/src/test/feature/lib/sql_util.h
+++ b/src/test/feature/lib/sql_util.h
@@ -58,6 +58,11 @@ class SQLUtility {
   // @return path string
   std::string getTestRootPath() const;
 
+  // Set GUC value
+  void setGUCValue(const std::string &guc, const std::string &value);
+  // Get GUC value
+  std::string getGUCValue(const std::string &guc);
+
  private:
   std::unique_ptr getConnection();
   const std::string generateSQLFile(const std::string &sqlFile);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b260e2d7/src/test/feature/query/ans/sequence-serialcol-null-orca.ans
--
diff --git a/src/test/feature/query/ans/sequence-serialcol-null-orca.ans 
b/src/test/feature/query/ans/sequence-serialcol-null-orca.ans
new file mode 100644
index 000..981d94f
--- /dev/null
+++ b/src/test/feature/query/ans/sequence-serialcol-null-orca.ans
@@ -0,0 +1,3 @@
+INSERT INTO serialtest VALUES('wrong',NULL);
+psql:/tmp/TestQuerySequence_TestSequenceCreateSerialColumn.sql:4: ERROR:  One 
or more assertions failed  (seg0 localhost:4 pid=11362)
+DETAIL:  Not null constraint for column f2 of table serialtest was violated

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b260e2d7/src/test/feature/query/test_sequence.cpp
--
diff --git a/src/test/feature/query/test_sequence.cpp 
b/src/test/feature/query/test_sequence.cpp
index 45027b9..36479c0 100644
--- a/src/test/feature/query/test_sequence.cpp
+++ b/src/test/feature/query/test_sequence.cpp
@@ -22,14 +22,27 @@ class TestQuerySequence : public ::testing::Test {
 
 TEST_F(TestQuerySequence, TestSequenceCreateSerialColumn) {
   hawq::test::SQLUtility util;
+  bool orcaon = false;
+  if (util.getGUCValue("optimizer") == "on") {
+   std::cout << "NOTE: TestQuerySequence.TestSequenceCreateSerialColumn "
+ "uses answer file for optimizer on" << std::endl;
+orcaon = true;
+  }
 
   util.execute("drop table if exists serialtest");
   util.execute("create table serialtest (f1 text, f2 serial)");
   util.execute("insert into serialtest values('foo')");
   util.execute("insert into serialtest values('force',100)");
   // expect failure due to null value in serial column
-  util.execSQLFile("query/sql/sequence-serialcol-null.sql",
-  "query/ans/sequence-serialcol-null.ans");
+  if (orcaon) {
+util.execSQLFile("query/sql/sequence-serialcol-null.sql",
+ 

incubator-hawq git commit: HAWQ-758. Refactor insert checkinstall cases using new test framework

2016-06-01 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 27147c570 -> b38fb124a


HAWQ-758. Refactor insert checkinstall cases using new test framework


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

Branch: refs/heads/master
Commit: b38fb124affbb2a6fe73c8f6661fc6243513e017
Parents: 27147c5
Author: YI JIN 
Authored: Thu Jun 2 14:55:20 2016 +1000
Committer: YI JIN 
Committed: Thu Jun 2 14:55:20 2016 +1000

--
 .../feature/query/ans/insert-appendonlytrue.ans |   8 +
 .../feature/query/sql/insert-appendonlytrue.sql |   4 +
 src/test/feature/query/test_insert.cpp  | 172 +++
 3 files changed, 184 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b38fb124/src/test/feature/query/ans/insert-appendonlytrue.ans
--
diff --git a/src/test/feature/query/ans/insert-appendonlytrue.ans 
b/src/test/feature/query/ans/insert-appendonlytrue.ans
new file mode 100644
index 000..c62512e
--- /dev/null
+++ b/src/test/feature/query/ans/insert-appendonlytrue.ans
@@ -0,0 +1,8 @@
+begin;
+BEGIN
+create table t (a int) with (appendonly=true);
+CREATE TABLE
+insert into t select * from generate_series(1,10);
+INSERT 0 10
+abort;
+ROLLBACK

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b38fb124/src/test/feature/query/sql/insert-appendonlytrue.sql
--
diff --git a/src/test/feature/query/sql/insert-appendonlytrue.sql 
b/src/test/feature/query/sql/insert-appendonlytrue.sql
new file mode 100644
index 000..9565ec8
--- /dev/null
+++ b/src/test/feature/query/sql/insert-appendonlytrue.sql
@@ -0,0 +1,4 @@
+begin;
+create table t (a int) with (appendonly=true);
+insert into t select * from generate_series(1,10);
+abort;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b38fb124/src/test/feature/query/test_insert.cpp
--
diff --git a/src/test/feature/query/test_insert.cpp 
b/src/test/feature/query/test_insert.cpp
new file mode 100644
index 000..1e05b9c
--- /dev/null
+++ b/src/test/feature/query/test_insert.cpp
@@ -0,0 +1,172 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "lib/sql_util.h"
+
+#include "gtest/gtest.h"
+
+class TestQueryInsert : public ::testing::Test {
+ public:
+  TestQueryInsert() {}
+  ~TestQueryInsert() {}
+};
+
+
+TEST_F(TestQueryInsert, TestInsertWithDefault) {
+  hawq::test::SQLUtility util;
+  // prepare
+  util.execute("drop table if exists inserttest");
+  util.execute("create table inserttest (col1 int4, "
+   
"col2 int4 not null,"
+   
"col3 text default 'testing')");
+  // test insert
+  util.execute("insert into inserttest(col2, col3) values(3,default)");
+  util.execute("insert into inserttest(col1, col2, col3) "
+   "values(default, 5, default)");
+  util.execute("insert into inserttest values(default, 5, 'test')");
+  util.execute("insert into inserttest values(default, 7)");
+
+  util.query("select col1, col2, col3 from inserttest order by col1, col2, 
col3",
+"|3|testing|\n"
+"|5|test|\n"
+"|5|testing|\n"
+"|7|testing|\n");
+  // cleanup
+  util.execute("drop table if exists inserttest");
+}
+
+TEST_F(TestQueryInsert, TestInsertWithDefaultNeg) {
+  hawq::test::SQLUtility util;
+  // prepare
+  util.execute("drop table if exists inserttest");
+  util.execute("create table inserttest (col1 int4, "
+   
"col2 int4 not null,"
+   
"col3 text default 'testing')");
+  // test insert
+  util.execute("insert into inserttest(col1, col2, col3) "
+   "values(default, 
default, default)",
+  false);
+  std::string errstr = "ERROR:  null value in column \"col2\" "
+  "violates not-null constraint";
+  EXPECT_STREQ(errstr.c_str(),
+   util.getPSQL()->getLastResult().substr(0, 
errstr.size()).c_str());
+  // cleanup
+  util.execute("drop table if exists inserttest");
+}
+
+TEST_F(TestQueryInsert, TestInsertUnmatchedColNumber) {
+  hawq::test::SQLUtility u

incubator-hawq git commit: HAWQ-749. segment registration should consider same ip across nodes

2016-05-25 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master d49b735ea -> f55cc6a34


HAWQ-749. segment registration should consider same ip across nodes


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

Branch: refs/heads/master
Commit: f55cc6a343f24718f0a73be6e956690713ec942c
Parents: d49b735
Author: YI JIN 
Authored: Thu May 26 12:59:08 2016 +1000
Committer: YI JIN 
Committed: Thu May 26 12:59:08 2016 +1000

--
 src/backend/resourcemanager/resourcepool.c | 32 +++--
 1 file changed, 9 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f55cc6a3/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 309ea9a..7221066 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -926,30 +926,10 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
res = getSegIDByHostName(hostname, hostnamelen, &segid);
if ( res != FUNC_RETURN_OK )
{
-   /* Try addresses of this machine. */
-   for ( int i = 0 ; i < segstat->Info.HostAddrCount ; ++i )
-   {
-   elog(DEBUG5, "Resource manager checks host ip (%d)th to 
get segment.", i);
-   AddressString addr = NULL;
-   getSegInfoHostAddrStr(&(segstat->Info), i, &addr);
-   if ( strcmp(addr->Address, IPV4_DOT_ADDR_LO) == 0 &&
-segstat->Info.HostAddrCount > 1 )
-   {
-   /*
-* If the host has only one address as 
127.0.0.1, we have to
-* save it to track the only one segment, 
otherwise, we skip
-* 127.0.0.1 address in resource pool. Because, 
each node has
-* one entry of this address.
-*/
-   continue;
-   }
+   AddressString addr = NULL;
+   getSegInfoHostAddrStr(&(segstat->Info), 0, &addr);
 
-   res = getSegIDByHostAddr((uint8_t *)(addr->Address), 
addr->Length, &segid);
-   if ( res == FUNC_RETURN_OK )
-   {
-   break;
-   }
-   }
+   res = getSegIDByHostAddr((uint8_t *)(addr->Address), 
addr->Length, &segid);
}
 
/* CASE 1. It is a new host. */
@@ -1016,6 +996,12 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
  hostaddrkey.Len, 
hostaddrkey.Array,
  hostname);
}
+   else
+   {
+   elog(WARNING, "Resource manager ignored ip 
address '%.*s' for host '%s'",
+ hostaddrkey.Len, 
hostaddrkey.Array,
+ hostname);
+   }
}
appendSMBStr(&logcontent, "");
 



incubator-hawq git commit: HAWQ-750. Change to query database postgres instead of regression

2016-05-23 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master ec5a9bad8 -> b8c9ca9c3


HAWQ-750. Change to query database postgres instead of regression


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

Branch: refs/heads/master
Commit: b8c9ca9c3c6be3b4974a9fdb70a2f954eb1c3ed9
Parents: ec5a9ba
Author: YI JIN 
Authored: Tue May 24 15:00:49 2016 +1000
Committer: YI JIN 
Committed: Tue May 24 15:00:49 2016 +1000

--
 src/test/feature/query/ans/prepare-parameters.ans | 8 
 src/test/feature/query/sql/prepare-parameters.sql | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b8c9ca9c/src/test/feature/query/ans/prepare-parameters.ans
--
diff --git a/src/test/feature/query/ans/prepare-parameters.ans 
b/src/test/feature/query/ans/prepare-parameters.ans
index b94963e..aec4d13 100644
--- a/src/test/feature/query/ans/prepare-parameters.ans
+++ b/src/test/feature/query/ans/prepare-parameters.ans
@@ -2,10 +2,10 @@ PREPARE q2(text) AS
 SELECT datname, datistemplate, datallowconn
 FROM pg_database WHERE datname = $1;
 PREPARE
-EXECUTE q2('regression');
-  datname   | datistemplate | datallowconn 
-+---+--
- regression | f | t
+EXECUTE q2('postgres');
+ datname  | datistemplate | datallowconn 
+--+---+--
+ postgres | t | t
 (1 row)
 
 PREPARE q3(text, int, float, boolean, oid, smallint) AS

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b8c9ca9c/src/test/feature/query/sql/prepare-parameters.sql
--
diff --git a/src/test/feature/query/sql/prepare-parameters.sql 
b/src/test/feature/query/sql/prepare-parameters.sql
index e014307..772ead1 100644
--- a/src/test/feature/query/sql/prepare-parameters.sql
+++ b/src/test/feature/query/sql/prepare-parameters.sql
@@ -2,7 +2,7 @@ PREPARE q2(text) AS
 SELECT datname, datistemplate, datallowconn
 FROM pg_database WHERE datname = $1;
 
-EXECUTE q2('regression');
+EXECUTE q2('postgres');
 
 PREPARE q3(text, int, float, boolean, oid, smallint) AS
 SELECT * FROM test1 WHERE string4 = $1 AND (four = $2 OR



[3/4] incubator-hawq git commit: HAWQ-750. Test prepare and sequence using new test library

2016-05-23 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/data/streets.data
--
diff --git a/src/test/feature/query/data/streets.data 
b/src/test/feature/query/data/streets.data
new file mode 100755
index 000..935b045
--- /dev/null
+++ b/src/test/feature/query/data/streets.data
@@ -0,0 +1,5124 @@
+A St   [(-122.0265,37.049),(-122.0271,37.045)]
+A St   [(-122.089,37.71),(-122.0886,37.711)]
+A St   [(-122.0985,37.671),(-122.0981,37.674)]
+A St   [(-122.0991,37.668),(-122.0988,37.669)]
+A St   
[(-122.103419,37.667),(-122.103439,37.667)]
+A St   
[(-122.103913,37.66632),(-122.104037,37.66611),(-122.104051,37.66609)]
+A St   
[(-122.106469,37.66446),(-122.1067,37.664)]
+A St   
[(-122.107,37.664),(-122.107101,37.66425),(-122.1074,37.665)]
+A St   
[(-122.1172,37.659),(-122.119506,37.65661)]
+Abbie St   
[(-121.867486,37.54243),(-121.868,37.545)]
+AcaciaAve  [(-122.2353,37.457),(-122.2344,37.461)]
+AcaciaAve  [(-122.2364,37.436),(-122.2364,37.443)]
+AcaciaAve  [(-122.2415,37.435),(-122.2407,37.437)]
+AcadiaCt   [(-121.9007,37.773),(-121.9016,37.768)]
+Acapulco  Way  [(-122.0517,37.91),(-122.0519,37.911)]
+Access Rd 162  [(-121.9469,37.993),(-121.9475,37.993)]
+Access Rd 25   [(-121.9283,37.894),(-121.9283,37.9)]
+Access Rd 29   [(-121.9339,37.854),(-121.9343,37.85)]
+Acton Cir  [(-122.2824,37.681),(-122.2824,37.688)]
+Ada   St   [(-122.2487,37.398),(-122.2496,37.401)]
+Ada   St   [(-122.2807,37.807),(-122.2797,37.811)]
+Adams Ave  [(-121.742,37.829),(-121.742,37.822)]
+Adams Ave  [(-122.1906,37.253),(-122.1893,37.272)]
+Adams St   [(-122.2349,37.542),(-122.2341,37.537)]
+Adams St   [(-122.2364,37.553),(-122.2357,37.548)]
+AdasonDr   [(-122.1315,37.016),(-122.1288,37.009)]
+Addison   St   [(-122.2735,37.705),(-122.2722,37.707)]
+Addison   St   [(-122.2856,37.688),(-122.2854,37.689)]
+Addison   St   [(-122.2874,37.686),(-122.2864,37.688)]
+Addison   Way  [(-121.9044,37.881),(-121.9044,37.889)]
+Addison   Way  [(-121.9044,37.895),(-121.9044,37.899)]
+Adelina Common 
[(-121.925847,37.29985),(-121.925765,37.29493)]
+Adeline   St   [(-122.2728,37.442),(-122.2725,37.451)]
+Adeline   St   [(-122.2785,37.291),(-122.2783,37.296)]
+AdelleSt   [(-121.7793,37.841),(-121.7797,37.849)]
+AdmiralityLane [(-122.2424,37.323),(-122.2429,37.318)]
+Adobe Dr   [(-122.0304,37.579),(-122.0278,37.592)]
+AdrianAve  [(-122.1019,37.389),(-122.1019,37.369)]
+Adriano   St   [(-122.032,37.663),(-122.0312,37.653)]
+Agate Ct   [(-121.801,37.653),(-121.8008,37.649)]
+Agena Cir  [(-122.0694,37.847),(-122.0696,37.839)]
+Agua Fria Creek
[(-121.909487,37.94485),(-121.910653,37.94809)]
+Agua Fria Creek
[(-121.9125,37.95367),(-121.9138,37.958)]
+Agua Fria Creek[(-121.9254,37.922),(-121.9281,37.889)]
+Agua Fria Creek[(-121.935,37.828),(-121.9356,37.826)]
+Agua Vista [(-122.0796,37.896),(-122.0792,37.896)]
+Agua VistaSt   [(-122.2089,37.839),(-122.2069,37.819)]
+AileenSt   [(-122.2612,37.42),(-122.2622,37.421)]
+Airport   Road [(-122.2085,37.147),(-122.2101,37.154)]
+Aladdin   Ave  [(-122.1532,37.088),(-122.1577,37.068)]
+Alameda   Ave  [(-122.2197,37.68),(-122.2192,37.68)]
+Alameda   Ave  [(-122.2555,37.689),(-122.2534,37.68)]
+Alameda   Ave  [(-122.2605,37.713),(-122.2588,37.704)]
+Alameda   Dr   [(-121.8756,37.746),(-121.8763,37.746)]
+Alameda   Road [(-122.2955,37.875),(-122.2963,37.871)]
+Alameda Belt Line Railroad [(-122.2586,37.769),(-122.2624,37.784)]
+Alameda Belt Line Railroad  

[2/4] incubator-hawq git commit: HAWQ-750. Test prepare and sequence using new test library

2016-05-23 Thread yjin
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/data/tenk.data
--
diff --git a/src/test/feature/query/data/tenk.data 
b/src/test/feature/query/data/tenk.data
new file mode 100755
index 000..c9064c9
--- /dev/null
+++ b/src/test/feature/query/data/tenk.data
@@ -0,0 +1,1 @@
+8800   0   0   0   0   0   0   800 800 3800
88000   1   MA  AA  xx
+1891   1   1   3   1   11  91  891 18911891
1891182 183 TU  BA  xx
+3420   2   0   0   0   0   20  420 14203420
342040  41  OB  CA  xx
+9850   3   0   2   0   10  50  850 18504850
9850100 101 WO  DA  xx
+7164   4   0   0   4   4   64  164 11642164
7164128 129 OP  EA  xx
+8009   5   1   1   9   9   9   9   9   3009
800918  19  BW  FA  xx
+5057   6   1   1   7   17  57  57  105757  
5057114 115 NM  GA  xx
+6701   7   1   1   1   1   1   701 701 1701
67012   3   TX  HA  xx
+4321   8   1   1   1   1   21  321 321 4321
432142  43  FK  IA  xx
+3043   9   1   3   3   3   43  43  10433043
304386  87  BN  JA  xx
+1314   10  0   2   4   14  14  314 13141314
131428  29  OY  KA  xx
+1504   11  0   0   4   4   4   504 15041504
15048   9   WF  LA  xx
+5222   12  0   2   2   2   22  222 1222222 
522244  45  WS  MA  xx
+6243   13  1   3   3   3   43  243 243 1243
624386  87  DG  NA  xx
+5471   14  1   3   1   11  71  471 1471471 
5471142 143 LC  OA  xx
+5006   15  0   2   6   6   6   6   10066   
500612  13  OK  PA  xx
+5387   16  1   3   7   7   87  387 1387387 
5387174 175 FZ  QA  xx
+5785   17  1   1   5   5   85  785 1785785 
5785170 171 NO  RA  xx
+6621   18  1   1   1   1   21  621 621 1621
662142  43  RU  SA  xx
+6969   19  1   1   9   9   69  969 969 1969
6969138 139 BI  TA  xx
+9460   20  0   0   0   0   60  460 14604460
9460120 121 WZ  UA  xx
+59 21  1   3   9   19  59  59  59  59  
59  118 119 HC  VA  xx
+8020   22  0   0   0   0   20  20  20  3020
802040  41  MW  WA  xx
+7695   23  1   3   5   15  95  695 16952695
7695190 191 ZJ  XA  xx
+3442   24  0   2   2   2   42  442 14423442
344284  85  KC  YA  xx
+5119   25  1   3   9   19  19  119 1119119 
511938  39  XO  ZA  xx
+64626  0   2   6   6   46  646 646 646 
646 92  93  WY  AB  xx
+9605   27  1   1   5   5   5   605 16054605
960510  11  LF  BB  xx
+26328  1   3   3   3   63  263 263 263 
263 126 127 DK  CB  xx
+3269   29  1   1   9   9   69  269 12693269
3269138 139 TV  DB  xx
+1839   30  1   3   9   19  39  839 18391839
183978  79  TS  EB  xx
+9144   31  0   0   4   4   44  144 11444144
914488  89  SN  FB  xx
+2513   32  1   1   3   13  13  513 513 2513
251326  27  RS  GB  xx
+8850   33  0   2   0   10  50  850 850 3850
8850100 101 KC  HB  xx
+23634  0   0   6   16  36  236 236 236 
236 72  73  CJ  IB  xx
+3162   35  0   2   2   2   62  162 11623162
3162124 125 QR  JB  xx

[4/4] incubator-hawq git commit: HAWQ-750. Test prepare and sequence using new test library

2016-05-23 Thread yjin
HAWQ-750. Test prepare and sequence using new test library


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

Branch: refs/heads/master
Commit: ec5a9bad8eeacb421327920df5e720a5f6df6c7c
Parents: 120ee70
Author: YI JIN 
Authored: Mon May 23 18:51:28 2016 +1000
Committer: YI JIN 
Committed: Mon May 23 18:51:28 2016 +1000

--
 .../feature/query/ans/prepare-parameters.ans|   112 +
 .../feature/query/ans/prepare-uniqueness.ans|43 +
 .../feature/query/ans/sequence-dependency.ans   |27 +
 .../query/ans/sequence-serialcol-null.ans   | 2 +
 .../query/ans/sequence-serialcol-query.ans  | 7 +
 .../query/ans/sequence-serialcol-query2.ans | 8 +
 src/test/feature/query/data/streets.data|  5124 +
 src/test/feature/query/data/tenk.data   | 1 +
 .../feature/query/sql/prepare-parameters.sql|31 +
 .../feature/query/sql/prepare-uniqueness.sql|18 +
 .../feature/query/sql/sequence-dependency.sql   |14 +
 .../query/sql/sequence-serialcol-null.sql   | 1 +
 .../query/sql/sequence-serialcol-query.sql  | 1 +
 src/test/feature/query/test-prepare.cpp |72 +
 src/test/feature/query/test-sequence.cpp|   122 +
 15 files changed, 15582 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/ans/prepare-parameters.ans
--
diff --git a/src/test/feature/query/ans/prepare-parameters.ans 
b/src/test/feature/query/ans/prepare-parameters.ans
new file mode 100644
index 000..b94963e
--- /dev/null
+++ b/src/test/feature/query/ans/prepare-parameters.ans
@@ -0,0 +1,112 @@
+PREPARE q2(text) AS
+SELECT datname, datistemplate, datallowconn
+FROM pg_database WHERE datname = $1;
+PREPARE
+EXECUTE q2('regression');
+  datname   | datistemplate | datallowconn 
++---+--
+ regression | f | t
+(1 row)
+
+PREPARE q3(text, int, float, boolean, oid, smallint) AS
+SELECT * FROM test1 WHERE string4 = $1 AND (four = $2 OR
+ten = $3::bigint OR true = $4 OR oid = $5 OR odd = $6::int) ORDER BY 
1,2,3,4;
+PREPARE
+EXECUTE q3('xx', 5::smallint, 10.5::float, false, 500::oid, 4::bigint);
+ unique1 | unique2 | two | four | ten | twenty | hundred | thousand | 
twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 
+-+-+-+--+-++-+--+-+---+--+-+--+--+--+-
+   2 |2716 |   0 |2 |   2 |  2 |   2 |2 |  
 2 | 2 |2 |   4 |5 | CA   | MAEAAA   | xx
+ 102 | 612 |   0 |2 |   2 |  2 |   2 |  102 | 
102 |   102 |  102 |   4 |5 | YD   | OX   | xx
+ 802 |2908 |   0 |2 |   2 |  2 |   2 |  802 | 
802 |   802 |  802 |   4 |5 | WE   | WHEAAA   | xx
+ 902 |1104 |   0 |2 |   2 |  2 |   2 |  902 | 
902 |   902 |  902 |   4 |5 | SI   | MQBAAA   | xx
+1002 |2580 |   0 |2 |   2 |  2 |   2 |2 |
1002 |  1002 | 1002 |   4 |5 | OM   | GVDAAA   | xx
+1602 |8148 |   0 |2 |   2 |  2 |   2 |  602 |
1602 |  1602 | 1602 |   4 |5 | QJ   | KBMAAA   | xx
+1702 |7940 |   0 |2 |   2 |  2 |   2 |  702 |
1702 |  1702 | 1702 |   4 |5 | MN   | KTLAAA   | xx
+2102 |6184 |   0 |2 |   2 |  2 |   2 |  102 | 
102 |  2102 | 2102 |   4 |5 | WC   | WDJAAA   | xx
+2202 |8028 |   0 |2 |   2 |  2 |   2 |  202 | 
202 |  2202 | 2202 |   4 |5 | SG   | UWLAAA   | xx
+2302 |7112 |   0 |2 |   2 |  2 |   2 |  302 | 
302 |  2302 | 2302 |   4 |5 | OK   | ONKAAA   | xx
+2902 |6816 |   0 |2 |   2 |  2 |   2 |  902 | 
902 |  2902 | 2902 |   4 |5 | QH   | ECKAAA   | xx
+3202 |7128 |   0 |2 |   2 |  2 |   2 |  202 |
1202 |  3202 | 3202 |   4 |5 | ET   | EOKAAA   | xx
+3902 |9224 |   0 |2 |   2 |  2 |   2 |  902 |
1902 |  3902 | 3902 |   4 |5 | CU   | UQNAAA   | xx
+4102 |7676 |   0 |2 |   2 |  2 

[1/4] incubator-hawq git commit: HAWQ-750. Test prepare and sequence using new test library

2016-05-23 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 120ee70ba -> ec5a9bad8


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/sql/prepare-parameters.sql
--
diff --git a/src/test/feature/query/sql/prepare-parameters.sql 
b/src/test/feature/query/sql/prepare-parameters.sql
new file mode 100644
index 000..e014307
--- /dev/null
+++ b/src/test/feature/query/sql/prepare-parameters.sql
@@ -0,0 +1,31 @@
+PREPARE q2(text) AS
+SELECT datname, datistemplate, datallowconn
+FROM pg_database WHERE datname = $1;
+
+EXECUTE q2('regression');
+
+PREPARE q3(text, int, float, boolean, oid, smallint) AS
+SELECT * FROM test1 WHERE string4 = $1 AND (four = $2 OR
+ten = $3::bigint OR true = $4 OR oid = $5 OR odd = $6::int) ORDER BY 
1,2,3,4;
+
+EXECUTE q3('xx', 5::smallint, 10.5::float, false, 500::oid, 4::bigint);
+
+EXECUTE q3('bool');
+
+EXECUTE q3('bytea', 5::smallint, 10.5::float, false, 500::oid, 4::bigint, 
true);
+
+EXECUTE q3(5::smallint, 10.5::float, false, 500::oid, 4::bigint, 'bytea');
+
+PREPARE q4(nonexistenttype) AS SELECT $1;
+
+PREPARE q5(int, text) AS
+SELECT * FROM test1 WHERE unique1 = $1 OR stringu1 = $2;
+CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DT');
+SELECT * FROM q5_prep_results ORDER BY 1,2,3,4;
+
+PREPARE q6 AS
+SELECT * FROM test1 WHERE unique1 = $1 AND stringu1 = $2;
+PREPARE q7(unknown) AS
+SELECT * FROM test2 WHERE thepath = $1;
+
+SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY 
name;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/sql/prepare-uniqueness.sql
--
diff --git a/src/test/feature/query/sql/prepare-uniqueness.sql 
b/src/test/feature/query/sql/prepare-uniqueness.sql
new file mode 100644
index 000..07f663c
--- /dev/null
+++ b/src/test/feature/query/sql/prepare-uniqueness.sql
@@ -0,0 +1,18 @@
+SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY 
1,2,3;
+
+PREPARE q1 AS SELECT 1 AS a;
+EXECUTE q1;
+
+PREPARE q1 AS SELECT 2;
+
+DEALLOCATE q1;
+PREPARE q1 AS SELECT 2;
+EXECUTE q1;
+PREPARE q2 AS SELECT 2 AS b;
+
+SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY 
1,2,3;
+
+DEALLOCATE PREPARE q1;
+DEALLOCATE PREPARE q2;
+
+SELECT name, statement, parameter_types FROM pg_prepared_statements ORDER BY 
1,2,3;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/sql/sequence-dependency.sql
--
diff --git a/src/test/feature/query/sql/sequence-dependency.sql 
b/src/test/feature/query/sql/sequence-dependency.sql
new file mode 100644
index 000..508d718
--- /dev/null
+++ b/src/test/feature/query/sql/sequence-dependency.sql
@@ -0,0 +1,14 @@
+CREATE TEMP SEQUENCE myseq2;
+CREATE TEMPORARY SEQUENCE myseq3;
+CREATE TEMP TABLE t1 (f1 SERIAL, 
+  f2 INT DEFAULT NEXTVAL('myseq2'),
+  f3 INT DEFAULT NEXTVAL('myseq3'::text)
+);
+
+DROP SEQUENCE t1_f1_seq;
+DROP SEQUENCE myseq2;
+DROP SEQUENCE myseq3;
+DROP TABLE t1;
+DROP SEQUENCE t1_f1_seq;
+DROP SEQUENCE myseq2;
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/sql/sequence-serialcol-null.sql
--
diff --git a/src/test/feature/query/sql/sequence-serialcol-null.sql 
b/src/test/feature/query/sql/sequence-serialcol-null.sql
new file mode 100644
index 000..edc5d00
--- /dev/null
+++ b/src/test/feature/query/sql/sequence-serialcol-null.sql
@@ -0,0 +1 @@
+INSERT INTO serialtest VALUES('wrong',NULL);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/sql/sequence-serialcol-query.sql
--
diff --git a/src/test/feature/query/sql/sequence-serialcol-query.sql 
b/src/test/feature/query/sql/sequence-serialcol-query.sql
new file mode 100644
index 000..cebcd37
--- /dev/null
+++ b/src/test/feature/query/sql/sequence-serialcol-query.sql
@@ -0,0 +1 @@
+select * from serialtest order by f2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ec5a9bad/src/test/feature/query/test-prepare.cpp
--
diff --git a/src/test/feature/query/test-prepare.cpp 
b/src/test/feature/query/test-prepare.cpp
new file mode 100644
index 000..89b806c
--- /dev/null
+++ b/src/test/feature/query/test-prepare.cpp
@@ -0,0 +1,72 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#i

incubator-hawq git commit: HAWQ-737. Last action time should be initialized as created time instead of 0

2016-05-16 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 101adfab1 -> cec472dca


HAWQ-737. Last action time should be initialized as created time instead of 0


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

Branch: refs/heads/master
Commit: cec472dcab39a03ca31103c30b6fe32f0abfaa19
Parents: 101adfa
Author: YI JIN 
Authored: Tue May 17 13:01:23 2016 +1000
Committer: YI JIN 
Committed: Tue May 17 13:01:23 2016 +1000

--
 src/backend/resourcemanager/conntrack.c   |  2 +-
 src/backend/resourcemanager/resqueuemanager.c | 21 ++---
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cec472dc/src/backend/resourcemanager/conntrack.c
--
diff --git a/src/backend/resourcemanager/conntrack.c 
b/src/backend/resourcemanager/conntrack.c
index c5b0fbf..5811c08 100644
--- a/src/backend/resourcemanager/conntrack.c
+++ b/src/backend/resourcemanager/conntrack.c
@@ -103,7 +103,7 @@ void createEmptyConnectionTrack(ConnectionTrack *track)
(*track)->RegisterTime  = 0;
(*track)->ResRequestTime= 0;
(*track)->ResAllocTime  = 0;
-   (*track)->LastActTime   = 0;
+   (*track)->LastActTime   = gettime_microsec();
(*track)->HeadQueueTime = 0;
 
(*track)->MessageSize   = 0;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cec472dc/src/backend/resourcemanager/resqueuemanager.c
--
diff --git a/src/backend/resourcemanager/resqueuemanager.c 
b/src/backend/resourcemanager/resqueuemanager.c
index cf4dc1f..2916df9 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -4509,8 +4509,11 @@ void timeoutDeadResourceAllocation(void)
if ( curmsec - curcon->LastActTime >
 100L * rm_session_lease_timeout )
{
-   elog(LOG, "ConnID %d. The allocated resource 
timeout is detected.",
- curcon->ConnID);
+   elog(WARNING, "ConnID %d. The allocated 
resource timeout is "
+ "detected. Last 
action time is "UINT64_FORMAT
+ "msec ago.",
+ curcon->ConnID,
+ curmsec - 
curcon->LastActTime);
returnResourceToResQueMgr(curcon);
returnConnectionToQueue(curcon, true);
if ( curcon->CommBuffer != NULL )
@@ -4530,9 +4533,11 @@ void timeoutDeadResourceAllocation(void)
if ( curmsec - curcon->LastActTime >
 100L * rm_session_lease_timeout )
{
-   elog(LOG, "ConnID %d. The queued resource 
request timeout is "
- "detected.",
- curcon->ConnID);
+   elog(WARNING, "ConnID %d. The queued resource 
request timeout is "
+ "detected. Last action 
time is "UINT64_FORMAT
+ "msec ago",
+ curcon->ConnID,
+ curmsec - 
curcon->LastActTime);
 
snprintf(errorbuf, sizeof(errorbuf),
 "queued resource request is 
timed out due to no session "
@@ -4558,8 +4563,10 @@ void timeoutDeadResourceAllocation(void)
 100L * rm_session_lease_timeout )
{
elog(WARNING, "The registered connection 
timeout is detected. "
- "ConnID %d",
- curcon->ConnID);
+ "ConnID %d. Last 
action time is "UINT64_FORMAT
+ "msec a

incubator-hawq git commit: HAWQ-687. The segment resource increase pending counter is not adjusted correctly when failing to increase resource quota

2016-04-18 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 649828ff7 -> 1469782ed


HAWQ-687. The segment resource increase pending counter is not adjusted 
correctly when failing to increase resource quota


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1469782e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1469782e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1469782e

Branch: refs/heads/master
Commit: 1469782edd0552e1635952a9677ac38241665257
Parents: 649828f
Author: YI JIN 
Authored: Tue Apr 19 13:51:36 2016 +1000
Committer: YI JIN 
Committed: Tue Apr 19 13:51:36 2016 +1000

--
 .../resourcemanager/communication/rmcomm_RM2RMSEG.c| 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1469782e/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
index a726723..a79bd6c 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -627,6 +627,11 @@ void 
processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accept
PRESPOOL->AddPendingContainerCount--;
elog(LOG, "AddPendingContainerCount minus 1, current value %d",
  PRESPOOL->AddPendingContainerCount);
+
+   /* This container can not generate additional increase 
pending */
+   minusResourceBundleData(&(ctn->Resource->IncPending),
+   
ctn->MemoryMB,
+   
ctn->Core);
/*
 * Add container to ToKickContainers if lifetime is not too 
long.
 * If the resource manager is not in clean up phase, directly 
drop
@@ -635,16 +640,14 @@ void 
processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accept
if( !isCleanGRMResourceStatus() &&
ctn->Life < RESOURCE_CONTAINER_MAX_LIFETIME )
{
-   /* This container can not generate additional increase 
pending */
-   minusResourceBundleData(&(ctn->Resource->IncPending),
-   
ctn->MemoryMB,
-   
ctn->Core);
addGRMContainerToToBeAccepted(ctn);
}
/* Add container to KickedContainers if lifetime is long enough 
*/
else
{
-   removePendingResourceRequestInRootQueue(ctn->MemoryMB, 
ctn->Core, false);
+   removePendingResourceRequestInRootQueue(ctn->MemoryMB,
+   
ctn->Core,
+   
false);
addGRMContainerToKicked(ctn);
}
}



incubator-hawq git commit: HAWQ-685. Pass wrong pointer to transform connection track instance status when canceling a waiting query resource request

2016-04-18 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master b2651cf8b -> b75c2c359


HAWQ-685. Pass wrong pointer to transform connection track instance status when 
canceling a waiting query resource request


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

Branch: refs/heads/master
Commit: b75c2c35953bad242796d9459f1c5d2adac0a8da
Parents: b2651cf
Author: YI JIN 
Authored: Mon Apr 18 20:08:17 2016 +1000
Committer: YI JIN 
Committed: Mon Apr 18 20:08:17 2016 +1000

--
 src/backend/resourcemanager/requesthandler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b75c2c35/src/backend/resourcemanager/requesthandler.c
--
diff --git a/src/backend/resourcemanager/requesthandler.c 
b/src/backend/resourcemanager/requesthandler.c
index d1dcace..9946322 100644
--- a/src/backend/resourcemanager/requesthandler.c
+++ b/src/backend/resourcemanager/requesthandler.c
@@ -266,7 +266,7 @@ bool handleRMRequestConnectionUnReg(void **arg)
if ( (*conntrack)->Progress == CONN_PP_RESOURCE_QUEUE_ALLOC_WAIT )
{
cancelResourceAllocRequest((*conntrack), errorbuf, false);
-   transformConnectionTrackProgress(conntrack, 
CONN_PP_REGISTER_DONE);
+   transformConnectionTrackProgress((*conntrack), 
CONN_PP_REGISTER_DONE);
}
/* If this connection has resource allocated, return the resource. */
else if ( (*conntrack)->Progress == CONN_PP_RESOURCE_QUEUE_ALLOC_DONE )



incubator-hawq git commit: HAWQ-684. Wrongly process container set when failed to increase resource quota due to failing to connect to segment

2016-04-18 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master e45f405c5 -> b2651cf8b


HAWQ-684. Wrongly process container set when failed to increase resource quota 
due to failing to connect to segment


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

Branch: refs/heads/master
Commit: b2651cf8ba90faf1942ca6febc56b836306c5b21
Parents: e45f405
Author: YI JIN 
Authored: Mon Apr 18 17:39:06 2016 +1000
Committer: YI JIN 
Committed: Mon Apr 18 17:39:06 2016 +1000

--
 src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b2651cf8/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
index 44addcf..a726723 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -349,7 +349,7 @@ int increaseMemoryQuota(char *seghostname, GRMContainerSet 
containerset)
  "on port %d to increase memory quota.",
   seghostname,
  rm_segment_port);
-processContainersAfterIncreaseMemoryQuota(containerset, false);
+processContainersAfterIncreaseMemoryQuota(newctns, false);
freeGRMContainerSet(newctns);
 rm_pfree(AsyncCommContext, context);
 return res;



incubator-hawq git commit: HAWQ-678. Resource manager should close connection with QD when QD is cancelled and try to return resource to clean up all registered resource context

2016-04-14 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 14359278d -> 856991354


HAWQ-678. Resource manager should close connection with QD when QD is cancelled 
and try to return resource to clean up all registered resource context


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

Branch: refs/heads/master
Commit: 8569913548b37498d36a008f17267e30b0de9558
Parents: 1435927
Author: YI JIN 
Authored: Fri Apr 15 11:47:54 2016 +1000
Committer: YI JIN 
Committed: Fri Apr 15 11:47:54 2016 +1000

--
 src/backend/resourcemanager/conntrack.c | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/85699135/src/backend/resourcemanager/conntrack.c
--
diff --git a/src/backend/resourcemanager/conntrack.c 
b/src/backend/resourcemanager/conntrack.c
index 2babef4..c5b0fbf 100644
--- a/src/backend/resourcemanager/conntrack.c
+++ b/src/backend/resourcemanager/conntrack.c
@@ -264,6 +264,23 @@ int retrieveConnectionTrack(ConnectionTrack track, int32_t 
connid)
 
Assert( oldct != NULL );
 
+   /*
+* If the old connection track has an active connection, close it and 
cut
+* its relation with comm buffer.
+*/
+   if ( oldct->CommBuffer != NULL )
+   {
+   AsyncCommBuffer commbuffer  = 
oldct->CommBuffer;
+   AsyncCommMessageHandlerContext  context = 
commbuffer->UserData;
+   elog(WARNING, "Uncompleted resource negotiation is found, force 
FD %d "
+ "closed.",
+ commbuffer->FD);
+   /* Cut the reference between connection track and rmcomm 
buffer. */
+   oldct->CommBuffer = NULL;
+   context->UserData = NULL;
+   forceCloseFileDesc(commbuffer);
+   }
+
track->ConnID   = oldct->ConnID;
track->Progress = oldct->Progress;
track->QueueID  = oldct->QueueID;



incubator-hawq git commit: HAWQ-674. Wrongly validate an incomplete resource pool status when GRM is not available

2016-04-14 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 81caf811e -> 14359278d


HAWQ-674. Wrongly validate an incomplete resource pool status when GRM is not 
available


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

Branch: refs/heads/master
Commit: 14359278d94a9611f5abf7cbdf49675a5e8e35fa
Parents: 81caf81
Author: YI JIN 
Authored: Thu Apr 14 19:22:25 2016 +1000
Committer: YI JIN 
Committed: Thu Apr 14 19:22:25 2016 +1000

--
 src/backend/resourcemanager/resourcemanager.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/14359278/src/backend/resourcemanager/resourcemanager.c
--
diff --git a/src/backend/resourcemanager/resourcemanager.c 
b/src/backend/resourcemanager/resourcemanager.c
index b3b10a2..6e9e365 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -2634,7 +2634,8 @@ void setAllNodesGRMDown()
 
if (oldDesc != node->Stat->StatusDesc)
{
-   elog(WARNING, "Resource manager sets host %s DOWN in 
cleanup phase for resource broker error.",
+   elog(WARNING, "Resource manager sets host %s down in 
cleanup phase "
+ "for resource broker error.",
  
GET_SEGRESOURCE_HOSTNAME(node));
}
}
@@ -2644,8 +2645,6 @@ void setAllNodesGRMDown()
refreshResourceQueueCapacity(false);
refreshActualMinGRMContainerPerSeg();
}
-
-   validateResourcePoolStatus(true);
 }
 
 /**



incubator-hawq git commit: HAWQ-671. Fix coverity problem and refine debug log

2016-04-14 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master e9c5dc3d7 -> 81caf811e


HAWQ-671. Fix coverity problem and refine debug log


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

Branch: refs/heads/master
Commit: 81caf811e0b67457d000627f529c8750ac8fd147
Parents: e9c5dc3
Author: YI JIN 
Authored: Thu Apr 14 18:31:46 2016 +1000
Committer: YI JIN 
Committed: Thu Apr 14 18:31:46 2016 +1000

--
 src/backend/resourcemanager/resqueuemanager.c | 88 +-
 1 file changed, 51 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/81caf811/src/backend/resourcemanager/resqueuemanager.c
--
diff --git a/src/backend/resourcemanager/resqueuemanager.c 
b/src/backend/resourcemanager/resqueuemanager.c
index d8b62c0..cf4dc1f 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -3846,27 +3846,34 @@ int addNewResourceToResourceManager(int32_t memorymb, 
double core)
Assert( trunc(core) == core );
uint32_t ratio = trunc(1.0 * memorymb / core);
int32_t  ratioindex = getResourceQueueRatioIndex(ratio);
-   Assert( ratioindex >= 0 );
 
-   elog(RMLOG, "addNewResourceToResourceManager (%d MB, %lf CORE) "
-   "plus (%d MB, %lf CORE)",
-   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.MemoryMB,
-   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.Core,
-   memorymb,
-   core);
-
-   
addResourceBundleData(&(PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated),
- memorymb,
- core);
-
-   elog(RMLOG, "addNewResourceToResourceManager leavs (%d MB, %lf CORE)",
-   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.MemoryMB,
-   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.Core);
-
-
-   /* New resource is added. Try to dispatch resource to queries. */
-   PQUEMGR->toRunQueryDispatch = true;
-   return FUNC_RETURN_OK;
+   if ( ratioindex >= 0 )
+   {
+   elog(RMLOG, "Allocated resource for ratio %d (%d MB, %lf CORE) 
plus "
+   "(%d MB, %lf CORE)",
+   ratio,
+   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.MemoryMB,
+   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.Core,
+   memorymb,
+   core);
+
+   
addResourceBundleData(&(PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated),
+ memorymb,
+ core);
+
+   elog(RMLOG, "Current allocated resource for ratio %d (%d MB, 
%lf CORE)",
+   ratio,
+   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.MemoryMB,
+   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.Core);
+
+   /* New resource is added. Try to dispatch resource to queries. 
*/
+   PQUEMGR->toRunQueryDispatch = true;
+   return FUNC_RETURN_OK;
+   }
+   else
+   {
+   return RESOURCEPOOL_NO_RATIO;
+   }
 }
 
 int minusResourceFromResourceManagerByBundle(ResourceBundle bundle)
@@ -3889,24 +3896,31 @@ int minusResourceFromResourceManager(int32_t memorymb, 
double core)
Assert( trunc(core) == core );
uint32_t ratio = trunc(1.0 * memorymb / core);
int32_t  ratioindex = getResourceQueueRatioIndex(ratio);
-   Assert( ratioindex >= 0 );
-
-   elog(RMLOG, "minusResourceFromResourceManager (%d MB, %lf CORE) "
-   "minus (%d MB, %lf CORE)",
-   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.MemoryMB,
-   
PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated.Core,
-   memorymb,
-   core);
 
-   
minusResourceBundleData(&(PQUEMGR->RatioTrackers[ratioindex]->TotalAllocated),
-   memorymb,
-   core);
-
-  

incubator-hawq git commit: HAWQ-671. Validation raises error when adding accepted containers into a down node and fix function typo

2016-04-13 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 9452055bc -> a60a54e5d


HAWQ-671. Validation raises error when adding accepted containers into a down 
node and fix function typo


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

Branch: refs/heads/master
Commit: a60a54e5dbaa5fb7d0d3299816b80fcb658ac94d
Parents: 9452055
Author: YI JIN 
Authored: Thu Apr 14 16:19:15 2016 +1000
Committer: YI JIN 
Committed: Thu Apr 14 16:19:15 2016 +1000

--
 .../communication/rmcomm_RM2RMSEG.c |  3 +-
 .../resourcemanager/include/resqueuemanager.h   |  2 +-
 src/backend/resourcemanager/resourcemanager.c   |  4 --
 src/backend/resourcemanager/resourcepool.c  | 28 
 src/backend/resourcemanager/resqueuemanager.c   | 67 
 5 files changed, 62 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a60a54e5/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
index 95bc194..44addcf 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -216,7 +216,8 @@ void receivedRUAliveResponse(AsyncCommMessageHandlerContext 
 context,
}
else
{
-   elog(DEBUG3, "Resource manager finds host %s still up.");
+   elog(DEBUG3, "Resource manager finds host %s still up.",
+GET_SEGRESOURCE_HOSTNAME(segres));
}
 
setSegResRUAlivePending(segres, false);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a60a54e5/src/backend/resourcemanager/include/resqueuemanager.h
--
diff --git a/src/backend/resourcemanager/include/resqueuemanager.h 
b/src/backend/resourcemanager/include/resqueuemanager.h
index 5ebf539..946a859 100644
--- a/src/backend/resourcemanager/include/resqueuemanager.h
+++ b/src/backend/resourcemanager/include/resqueuemanager.h
@@ -430,7 +430,7 @@ UserInfo getUserByUserName( const char *userid, int 
useridlen, bool *exist);
 UserInfo getUserByUserOID ( int64_t useroid, bool *exist);
 
 int addNewResourceToResourceManager(int32_t memorymb, double core);
-int minusResourceFromReourceManager(int32_t memorymb, double core);
+int minusResourceFromResourceManager(int32_t memorymb, double core);
 int addNewResourceToResourceManagerByBundle(ResourceBundle bundle);
 int minusResourceFromResourceManagerByBundle(ResourceBundle bundle);
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a60a54e5/src/backend/resourcemanager/resourcemanager.c
--
diff --git a/src/backend/resourcemanager/resourcemanager.c 
b/src/backend/resourcemanager/resourcemanager.c
index d744900..b3b10a2 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -2614,10 +2614,6 @@ void setAllNodesGRMDown()
 * trackers' capacity.
 */
setSegResHAWQAvailability(node, 
RESOURCE_SEG_STATUS_UNAVAILABLE);
-   /*
-* This call makes resource pool remove unused 
containers.
-*/
-   returnAllGRMResourceFromSegment(node);
changedstatus = true;
}
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a60a54e5/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index f6beee0..309ea9a 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3210,8 +3210,6 @@ void returnAllGRMResourceFromSegment(SegResource segres)
GRMContainerSet ctns  = NULL;
uint32_tcount = 0;
 
-   minusResourceFromResourceManagerByBundle(&(segres->Allocated));
-
for ( int i = 0 ; i < PQUEMGR->RatioCount ; ++i )
{
ctns = segres->ContainerSets[i];
@@ -3462,6 +3460,15 @@ void moveAllAcceptedGRMContainersToResPool(void)
addNewResourceToResourceManager(ctn->MemoryMB, ctn->Core);
removePendingResourceRequestInRootQueue(ctn->MemoryMB, 
ctn->Core, tr

incubator-hawq git commit: HAWQ-664. The return value of registering fd is not checked for asynchronous connection

2016-04-12 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 5553271a6 -> 17389e39a


HAWQ-664. The return value of registering fd is not checked for asynchronous 
connection


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/17389e39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/17389e39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/17389e39

Branch: refs/heads/master
Commit: 17389e39a6d5cc1f40b18694779d5228dc749de8
Parents: 5553271
Author: YI JIN 
Authored: Wed Apr 13 11:36:22 2016 +1000
Committer: YI JIN 
Committed: Wed Apr 13 11:36:22 2016 +1000

--
 .../communication/rmcomm_AsyncComm.c| 74 +++-
 1 file changed, 41 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/17389e39/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c 
b/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
index ee005bf..f2203db 100644
--- a/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
+++ b/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
@@ -691,7 +691,7 @@ int registerAsyncConnectionFileDesc(const char  
*address,
   methods,
   userdata,
   newcommbuffer);
-   goto exit;
+   return res;
}
 
/* Create socket FD */
@@ -725,27 +725,30 @@ int registerAsyncConnectionFileDesc(const char
*address,
if ( setConnectionLongTermNoDelay(fd) != FUNC_RETURN_OK )
{
close(fd);
-   res = UTIL_NETWORK_FAIL_CONNECT;
-   goto exit;
+   return UTIL_NETWORK_FAIL_CONNECT;
}
/*
 * New connection is created. Suppose domain socket and local 
socket
 * connection can be done now. Register a normal client FD in 
poll() to
 * perform content sending and receiving.
 */
-   res = registerFileDesc(fd,
-  actionmask,
-  methods,
-  userdata,
-  newcommbuffer);
-
-   /* Assign connection address. */
-   assignFileDescClientAddressInfo(*newcommbuffer,
-   
address,
-   
port,
-   
&server_addr,
-   
sizeof(server_addr));
-   goto exit;
+   res = registerFileDesc(fd, actionmask, methods, userdata, 
newcommbuffer);
+   if ( res == FUNC_RETURN_OK )
+   {
+   /* Assign connection address. */
+   assignFileDescClientAddressInfo(*newcommbuffer,
+   
address,
+   
port,
+   
&server_addr,
+   
sizeof(server_addr));
+   }
+   else
+   {
+   write_log("registerAsyncCommectionFileDesc failed 
registering fd %d.",
+ fd);
+   close(fd);
+   res = UTIL_NETWORK_FAIL_CONNECT;
+   }
}
else if ( sockres < 0 && errno == EINPROGRESS )
{
@@ -758,27 +761,32 @@ int registerAsyncConnectionFileDesc(const char
*address,

   methods,

   userdata,

   newcommbuffer);
-
-   /* Assign connection address. */
-   assignFileDescClientAddressInfo(*newcommbuffer,
-

incubator-hawq git commit: HAWQ-663. Wrongly count total allocated resource in resource queue manager

2016-04-12 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 1ba3686a6 -> 5553271a6


HAWQ-663. Wrongly count total allocated resource in resource queue manager


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

Branch: refs/heads/master
Commit: 5553271a6e52f18bf447e39c06bfe70defcd4f13
Parents: 1ba3686
Author: YI JIN 
Authored: Wed Apr 13 11:35:23 2016 +1000
Committer: YI JIN 
Committed: Wed Apr 13 11:35:23 2016 +1000

--
 src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c | 2 +-
 src/backend/resourcemanager/resourcepool.c  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5553271a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
index 50038b1..95bc194 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -204,7 +204,7 @@ void receivedRUAliveResponse(AsyncCommMessageHandlerContext 
 context,
/* Set the host down. */
elog(WARNING, "Resource manager sets host %s from up to 
down "
  "due to not getting valid 
RUAlive response.",
- GET_SEGRESOURCE_HOSTNAME(segres));
+ 
GET_SEGRESOURCE_HOSTNAME(segres));
 
refreshResourceQueueCapacity(false);
refreshActualMinGRMContainerPerSeg();

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5553271a/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 9ed243e..f6beee0 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3210,6 +3210,8 @@ void returnAllGRMResourceFromSegment(SegResource segres)
GRMContainerSet ctns  = NULL;
uint32_tcount = 0;
 
+   minusResourceFromResourceManagerByBundle(&(segres->Allocated));
+
for ( int i = 0 ; i < PQUEMGR->RatioCount ; ++i )
{
ctns = segres->ContainerSets[i];
@@ -3262,7 +3264,6 @@ void returnAllGRMResourceFromUnavailableSegments(void)
{
continue;
}
-   minusResourceFromResourceManagerByBundle(&(segres->Allocated));
returnAllGRMResourceFromSegment(segres);
}
freePAIRRefList(&(PRESPOOL->Segments), &allsegres);



incubator-hawq git commit: HAWQ-660. Change segment resource manager log level when failing in updating memory quota

2016-04-11 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 193619cb2 -> a6680fbe1


HAWQ-660. Change segment resource manager log level when failing in updating 
memory quota


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

Branch: refs/heads/master
Commit: a6680fbe1987c35dd8243a3d44f860b5dea22746
Parents: 193619c
Author: YI JIN 
Authored: Mon Apr 11 18:17:57 2016 +1000
Committer: YI JIN 
Committed: Mon Apr 11 18:17:57 2016 +1000

--
 src/backend/resourcemanager/requesthandler_RMSEG.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a6680fbe/src/backend/resourcemanager/requesthandler_RMSEG.c
--
diff --git a/src/backend/resourcemanager/requesthandler_RMSEG.c 
b/src/backend/resourcemanager/requesthandler_RMSEG.c
index 3f27c6d..a31bc81 100644
--- a/src/backend/resourcemanager/requesthandler_RMSEG.c
+++ b/src/backend/resourcemanager/requesthandler_RMSEG.c
@@ -450,10 +450,10 @@ bool handleRMIncreaseMemoryQuota(void **arg)
   
conntrack->MessageMark2,
   
RESPONSE_RM_INCREASE_MEMORY_QUOTA);
 
-   elog(ERROR, "Resource enforcer fails to increase memory quota 
to: ",
-   "total memory quota = "INT64_FORMAT" MB, "
-   "delta memory quota = "INT64_FORMAT" MB",
-   memquotatotal, memquotadelta);
+   elog(WARNING, "Resource enforcer fails to increase memory quota 
to: ",
+ "total memory quota = "INT64_FORMAT" MB, "
+ "delta memory quota = "INT64_FORMAT" MB",
+ memquotatotal, memquotadelta);
}
 
conntrack->ResponseSent = false;
@@ -538,10 +538,10 @@ bool handleRMDecreaseMemoryQuota(void **arg)
   
conntrack->MessageMark2,
   
RESPONSE_RM_DECREASE_MEMORY_QUOTA);
 
-   elog(ERROR, "Resource enforcer fails to decrease memory quota 
to: ",
-   "total memory quota = "INT64_FORMAT" MB, "
-   "delta memory quota = "INT64_FORMAT" MB",
-   memquotatotal, memquotadelta);
+   elog(WARNING, "Resource enforcer fails to decrease memory quota 
to: ",
+ "total memory quota = "INT64_FORMAT" MB, "
+ "delta memory quota = "INT64_FORMAT" MB",
+ memquotatotal, memquotadelta);
}
 
conntrack->ResponseSent = false;



incubator-hawq git commit: HAWQ-657. Remove duplicate validation logic in requesthandler_ddl.c

2016-04-10 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 421b97350 -> 193619cb2


HAWQ-657. Remove duplicate validation logic in requesthandler_ddl.c


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

Branch: refs/heads/master
Commit: 193619cb20df68992ebcd3d0f3117026478a7213
Parents: 421b973
Author: YI JIN 
Authored: Mon Apr 11 16:11:11 2016 +1000
Committer: YI JIN 
Committed: Mon Apr 11 16:11:11 2016 +1000

--
 .../resourcemanager/requesthandler_ddl.c| 26 
 1 file changed, 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/193619cb/src/backend/resourcemanager/requesthandler_ddl.c
--
diff --git a/src/backend/resourcemanager/requesthandler_ddl.c 
b/src/backend/resourcemanager/requesthandler_ddl.c
index eb1af7d..adb2330 100644
--- a/src/backend/resourcemanager/requesthandler_ddl.c
+++ b/src/backend/resourcemanager/requesthandler_ddl.c
@@ -517,32 +517,6 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
goto senderr;
}
 
-   if (todroptrack->QueueInfo->OID == DEFAULTRESQUEUE_OID)
-   {
-   /* already check before send RPC to RM */
-   Assert(todroptrack->QueueInfo->OID != 
DEFAULTRESQUEUE_OID);
-   ddlres = RESQUEMGR_IN_USE;
-   snprintf(errorbuf, sizeof(errorbuf),
-   "pg_default as system queue 
cannot be dropped");
-   elog(WARNING, "Resource manager cannot drop 
resource queue %s, %s",
- nameattr->Val.Str,
- errorbuf);
-   goto senderr;
-   }
-
-   if (todroptrack->QueueInfo->OID == ROOTRESQUEUE_OID)
-   {
-   /* already check before send RPC to RM */
-   Assert(todroptrack->QueueInfo->OID != 
ROOTRESQUEUE_OID);
-   ddlres = RESQUEMGR_IN_USE;
-   snprintf(errorbuf, sizeof(errorbuf),
-   "pg_root as system queue cannot 
be dropped.");
-   elog(WARNING, "Resource manager cannot drop 
resource queue %s, %s",
- nameattr->Val.Str,
- errorbuf);
-   goto senderr;
-   }
-
res = updateResqueueCatalog(request->ManipulateAction,

todroptrack,

rsqattr);



incubator-hawq git commit: HAWQ-654. Fix coverity problem in resqueuemanager.c

2016-04-10 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master e4e7f0045 -> 3953930d9


HAWQ-654. Fix coverity problem in resqueuemanager.c


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/3953930d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/3953930d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/3953930d

Branch: refs/heads/master
Commit: 3953930d95f3573a656ca0d65544d2c4c54a1be8
Parents: e4e7f00
Author: YI JIN 
Authored: Sun Apr 10 20:41:54 2016 +1000
Committer: YI JIN 
Committed: Sun Apr 10 20:41:54 2016 +1000

--
 src/backend/resourcemanager/resqueuemanager.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3953930d/src/backend/resourcemanager/resqueuemanager.c
--
diff --git a/src/backend/resourcemanager/resqueuemanager.c 
b/src/backend/resourcemanager/resqueuemanager.c
index 74fc5d2..3f30396 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -1218,6 +1218,7 @@ int createQueueAndTrack( DynResourceQueue queue,
int res  = 
FUNC_RETURN_OK;
DynResourceQueueTrack   parenttrack  = NULL;
 DynResourceQueueTrack  newqueuetrack= NULL;
+DynResourceQueueTrack  tmpquetrack  = NULL;
 bool   isDefaultQueue   = false;
 bool   isRootQueue  = 
false;
 
@@ -1238,15 +1239,14 @@ int createQueueAndTrack( DynResourceQueue   
queue,
  */
 if ( queue->OID > InvalidOid )
 {
-   DynResourceQueueTrack tmpquetrack = getQueueTrackByQueueOID(queue->OID);
+   tmpquetrack = getQueueTrackByQueueOID(queue->OID);
Assert(tmpquetrack == NULL);
 }
 
 /* New queue name must be set and unique. */
 Assert(queue->NameLen > 0);
 
-DynResourceQueueTrack tmpquetrack = getQueueTrackByQueueName((char 
*)(queue->Name),
-   
 queue->NameLen);
+tmpquetrack = getQueueTrackByQueueName((char *)(queue->Name), 
queue->NameLen);
if (tmpquetrack != NULL) {
res = RESQUEMGR_DUPLICATE_QUENAME;
snprintf(errorbuf, errorbufsize,



incubator-hawq git commit: HAWQ-649. Fix bug of adjusting segment capacity

2016-04-10 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 96d926186 -> 0d6db98fa


HAWQ-649. Fix bug of adjusting segment capacity


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0d6db98f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0d6db98f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0d6db98f

Branch: refs/heads/master
Commit: 0d6db98fa9237a8681bebb2f210c9a68fa0df44f
Parents: 96d9261
Author: YI JIN 
Authored: Sun Apr 10 20:10:57 2016 +1000
Committer: YI JIN 
Committed: Sun Apr 10 20:10:57 2016 +1000

--
 src/backend/resourcemanager/resourcepool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0d6db98f/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 3ff1871..9ed243e 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -4714,7 +4714,7 @@ void adjustSegmentStatGRMCapacity(SegStat segstat)
 
 void adjustSegmentCapacityForNone(SegResource segres)
 {
-   if ( PRESPOOL->ClusterMemoryCoreRatio == 0 )
+   if ( PRESPOOL->ClusterMemoryCoreRatio != 0 )
{
uint32_t oldmemorymb = 0;
uint32_t oldcore = 0;
@@ -4754,7 +4754,7 @@ void adjustSegmentCapacityForNone(SegResource segres)
 
 void adjustSegmentCapacityForGRM(SegResource segres)
 {
-   if ( PRESPOOL->ClusterMemoryCoreRatio == 0 )
+   if ( PRESPOOL->ClusterMemoryCoreRatio != 0 )
{
uint32_t oldmemorymb = 0;
uint32_t oldcore = 0;



incubator-hawq git commit: HAWQ-649. Remove unused variables in release build, resourcepool.c

2016-04-09 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master a57cc9523 -> 434b93170


HAWQ-649. Remove unused variables in release build, resourcepool.c


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/434b9317
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/434b9317
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/434b9317

Branch: refs/heads/master
Commit: 434b93170bbd31a55143494e864cd06f5b245e6c
Parents: a57cc95
Author: YI JIN 
Authored: Sun Apr 10 16:48:33 2016 +1000
Committer: YI JIN 
Committed: Sun Apr 10 16:48:33 2016 +1000

--
 src/backend/resourcemanager/resourcepool.c | 27 +++--
 1 file changed, 12 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/434b9317/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index e5f4cdd..3ff1871 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -240,11 +240,10 @@ void getBufferedHostName(char *hostname, char 
**buffhostname)
length = strlen(hostname);
newstring = (char *)rm_palloc0(PCONTEXT, length+1);
strcpy(newstring, hostname);
-   void *oldval = setHASHTABLENode(&(PRESPOOL->BufferedHostNames),
-   
(void *)&hostnamestr,
-   
(void *)newstring,
-   
false /* No need to free old value. */);
-   Assert(oldval == NULL);
+   setHASHTABLENode(&(PRESPOOL->BufferedHostNames),
+(void *)&hostnamestr,
+(void *)newstring,
+false /* No need to free old 
value. */);
*buffhostname = newstring;
elog(DEBUG3, "Resource manager adds new hostname %s to hostname 
buffer. "
 "Current hostname buffer size %d",
@@ -965,20 +964,18 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
segid = segresource->Stat->ID;
 
/* Add HAWQ node into resource pool indexed by machine id. */
-   void *oldval = setHASHTABLENode(&(PRESPOOL->Segments),
-   
TYPCONVERT(void *, segid),
-   
TYPCONVERT(void *, segresource),
-   
false /* Should be no old value. */);
-   Assert( oldval == NULL );
+   setHASHTABLENode(&(PRESPOOL->Segments),
+TYPCONVERT(void *, segid),
+TYPCONVERT(void *, 
segresource),
+false /* Should be no old 
value. */);
 
/* Set HAWQ node indices to help find machine id. */
setSimpleStringRef(&hostnamekey, hostname, hostnamelen);
 
-   oldval = setHASHTABLENode(&(PRESPOOL->SegmentHostNameIndexed),
- 
TYPCONVERT(void *, &hostnamekey),
- 
TYPCONVERT(void *, segid),
- false /* 
There should be no old value. */);
-   Assert( oldval == NULL );
+   setHASHTABLENode(&(PRESPOOL->SegmentHostNameIndexed),
+TYPCONVERT(void *, 
&hostnamekey),
+TYPCONVERT(void *, segid),
+false /* There should be no 
old value. */);
 
SelfMaintainBufferData logcontent;
initializeSelfMaintainBuffer(&logcontent, PCONTEXT);



incubator-hawq git commit: HAWQ-654. Reform function getQueueTrackByQueueName() and getQueueTrackByQueueOID() to facilitate test

2016-04-09 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 83ce21489 -> 1bcd79f70


HAWQ-654. Reform function getQueueTrackByQueueName() and 
getQueueTrackByQueueOID() to facilitate test


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1bcd79f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1bcd79f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1bcd79f7

Branch: refs/heads/master
Commit: 1bcd79f70b01207173b6b826baffecc69d28b1a9
Parents: 83ce214
Author: YI JIN 
Authored: Sun Apr 10 16:22:07 2016 +1000
Committer: YI JIN 
Committed: Sun Apr 10 16:22:07 2016 +1000

--
 .../resourcemanager/include/resqueuemanager.h   |  5 +-
 src/backend/resourcemanager/requesthandler.c|  5 +-
 .../resourcemanager/requesthandler_ddl.c| 11 ++--
 src/backend/resourcemanager/resqueuemanager.c   | 56 
 4 files changed, 31 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1bcd79f7/src/backend/resourcemanager/include/resqueuemanager.h
--
diff --git a/src/backend/resourcemanager/include/resqueuemanager.h 
b/src/backend/resourcemanager/include/resqueuemanager.h
index 68cd7ff..5ebf539 100644
--- a/src/backend/resourcemanager/include/resqueuemanager.h
+++ b/src/backend/resourcemanager/include/resqueuemanager.h
@@ -406,11 +406,10 @@ void 
setQueueTrackIndexedByQueueName(DynResourceQueueTrack queuetrack);
 
 void removeQueueTrackIndexedByQueueName(DynResourceQueueTrack queuetrack);
 
-DynResourceQueueTrack getQueueTrackByQueueOID (int64_t queoid, bool *exist);
+DynResourceQueueTrack getQueueTrackByQueueOID (int64_t queoid);
 
 DynResourceQueueTrack getQueueTrackByQueueName(char*quename,
-   
   int   quenamelen,
-   
   bool *exist);
+   
   int   quenamelen);
 
 bool hasUserAssignedToQueue(DynResourceQueue queue);
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1bcd79f7/src/backend/resourcemanager/requesthandler.c
--
diff --git a/src/backend/resourcemanager/requesthandler.c 
b/src/backend/resourcemanager/requesthandler.c
index eb9fc1d..d1dcace 100644
--- a/src/backend/resourcemanager/requesthandler.c
+++ b/src/backend/resourcemanager/requesthandler.c
@@ -917,9 +917,8 @@ bool handleRMRequestAcquireResourceQuota(void **arg)
{
RPCResponseHeadAcquireResourceQuotaFromRMByOIDData response;
 
-   DynResourceQueueTrack queuetrack =
-   getQueueTrackByQueueOID(reguser->QueueOID, &exist);
-   if ( exist )
+   DynResourceQueueTrack queuetrack = 
getQueueTrackByQueueOID(reguser->QueueOID);
+   if ( queuetrack != NULL )
{
memcpy(response.QueueName,
   queuetrack->QueueInfo->Name,

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1bcd79f7/src/backend/resourcemanager/requesthandler_ddl.c
--
diff --git a/src/backend/resourcemanager/requesthandler_ddl.c 
b/src/backend/resourcemanager/requesthandler_ddl.c
index f50d924..eb1af7d 100644
--- a/src/backend/resourcemanager/requesthandler_ddl.c
+++ b/src/backend/resourcemanager/requesthandler_ddl.c
@@ -93,7 +93,6 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
DynResourceQueueTrack   newtrack= NULL;
DynResourceQueueTrack   todroptrack = NULL;
SelfMaintainBufferData  responsebuff;
-   boolexist   = false;
List   *fineattr= NULL;
List   *rsqattr = NULL;
DynResourceQueuenewqueue= NULL;
@@ -342,9 +341,8 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
newqueue = NULL;
 
toaltertrack = getQueueTrackByQueueName((char 
*)(nameattr->Val.Str),
-   
nameattr->Val.Len,
-   
&exist);
-   if (!exist || toaltertrack == NULL)
+  

incubator-hawq git commit: HAWQ-649. Fix a wrong expression in resourcepool.c

2016-04-09 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 92f7b00c5 -> 83ce21489


HAWQ-649. Fix a wrong expression in resourcepool.c


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/83ce2148
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/83ce2148
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/83ce2148

Branch: refs/heads/master
Commit: 83ce21489eb4aa47a040e435fb3a09a19ff48bcf
Parents: 92f7b00
Author: YI JIN 
Authored: Sun Apr 10 15:55:37 2016 +1000
Committer: YI JIN 
Committed: Sun Apr 10 15:55:37 2016 +1000

--
 src/backend/resourcemanager/resourcepool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/83ce2148/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 1eea957..e5f4cdd 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -2030,7 +2030,7 @@ void moveGRMContainerSetToAccepted(GRMContainerSet ctns)
 
 void moveGRMContainerSetToKicked(GRMContainerSet ctns)
 {
-   if ( ctns == NULL )
+   if ( ctns != NULL )
{
PRESPOOL->KickedContainers = 
list_concat(PRESPOOL->KickedContainers,

   ctns->Containers);



incubator-hawq git commit: HAWQ-649. Remove resourcepool.c unused code

2016-04-09 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 4538dcd82 -> 92f7b00c5


HAWQ-649. Remove resourcepool.c unused code


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/92f7b00c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/92f7b00c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/92f7b00c

Branch: refs/heads/master
Commit: 92f7b00c5d224fd5888c60e9f68713983f9d6dfe
Parents: 4538dcd
Author: YI JIN 
Authored: Sun Apr 10 14:09:57 2016 +1000
Committer: YI JIN 
Committed: Sun Apr 10 14:09:57 2016 +1000

--
 .../resourcemanager/include/resourcepool.h  |   2 -
 src/backend/resourcemanager/resourcepool.c  | 342 ---
 2 files changed, 137 insertions(+), 207 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/92f7b00c/src/backend/resourcemanager/include/resourcepool.h
--
diff --git a/src/backend/resourcemanager/include/resourcepool.h 
b/src/backend/resourcemanager/include/resourcepool.h
index 8c25ee1..e957bb0 100644
--- a/src/backend/resourcemanager/include/resourcepool.h
+++ b/src/backend/resourcemanager/include/resourcepool.h
@@ -564,8 +564,6 @@ struct VSegmentCounterInternalData {
 typedef struct VSegmentCounterInternalData  VSegmentCounterInternalData;
 typedef struct VSegmentCounterInternalData *VSegmentCounterInternal;
 
-void freeVSegmentConterList(List **list);
-
 int allocateResourceFromResourcePoolIOBytes2(int32_tnodecount,

 int32_t minnodecount,

 uint32_tmemory,

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/92f7b00c/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 1e744f4..1eea957 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -244,10 +244,7 @@ void getBufferedHostName(char *hostname, char 
**buffhostname)

(void *)&hostnamestr,

(void *)newstring,

false /* No need to free old value. */);
-   if( oldval != NULL )
-   {
-   Assert(false);
-   }
+   Assert(oldval == NULL);
*buffhostname = newstring;
elog(DEBUG3, "Resource manager adds new hostname %s to hostname 
buffer. "
 "Current hostname buffer size %d",
@@ -561,10 +558,14 @@ gp_remove_segment_history(PG_FUNCTION_ARGS)
int ret = true;
 
if (!superuser())
+   {
elog(ERROR, "gp_remove_segment_history can only be run by a 
superuser");
+   }
 
if (Gp_role != GP_ROLE_UTILITY)
+   {
elog(ERROR, "gp_remove_segment_history can only be run in 
utility mode");
+   }
 
sprintf(conninfo, "options='-c gp_session_role=UTILITY -c 
allow_system_table_mods=dml' "
"dbname=template1 port=%d connect_timeout=%d", 
master_addr_port, CONNECT_TIMEOUT);
@@ -645,8 +646,6 @@ void update_segment_status(int32_t id, char status, char* 
description)
Assert(strlen(description) == 0);
else if (status == SEGMENT_STATUS_DOWN)
Assert(strlen(description) != 0);
-   else
-   Assert(0);
 
sprintf(conninfo, "options='-c gp_session_role=UTILITY -c 
allow_system_table_mods=dml' "
"dbname=template1 port=%d connect_timeout=%d", 
master_addr_port, CONNECT_TIMEOUT);
@@ -970,10 +969,7 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)

TYPCONVERT(void *, segid),

TYPCONVERT(void *, segresource),

false /* Should be no old value. */);
-   if ( oldval != NULL )
-   {
-   Assert(false);
-   }
+   Assert( oldval == NULL );
 
/* Set HAWQ node indices to help find machine id. */
setSimpleStringRef(&hostnamekey, hostname, hostnamelen);
@@ -982,10 +978,7 @@ int addHAWQSegWithSegStat(SegStat se

incubator-hawq git commit: HAWQ-648. Remove hawqsite.c unused code

2016-04-09 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 37839128b -> f6d855b52


HAWQ-648. Remove hawqsite.c unused code


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

Branch: refs/heads/master
Commit: f6d855b52da8d182afb5661be510070ba9a19f5d
Parents: 3783912
Author: YI JIN 
Authored: Sat Apr 9 18:59:34 2016 +1000
Committer: YI JIN 
Committed: Sat Apr 9 18:59:34 2016 +1000

--
 src/backend/resourcemanager/hawqsite.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f6d855b5/src/backend/resourcemanager/hawqsite.c
--
diff --git a/src/backend/resourcemanager/hawqsite.c 
b/src/backend/resourcemanager/hawqsite.c
index c9d79ef..e86465e 100644
--- a/src/backend/resourcemanager/hawqsite.c
+++ b/src/backend/resourcemanager/hawqsite.c
@@ -50,7 +50,6 @@ List *getHawqSiteConfigurationList(const char *hawqsitepath, 
MCTYPE context)
if ( res != FUNC_RETURN_OK )
{
elog(ERROR, "Fail to parse file %s for reading configuration.", 
conffile);
-   return NULL;
}
 
return result;
@@ -58,9 +57,9 @@ List *getHawqSiteConfigurationList(const char *hawqsitepath, 
MCTYPE context)
 
 void freeHawqSiteConfigurationList(MCTYPE context, List **conf)
 {
-   if ( *conf == NULL )
+   if ( *conf != NULL )
{
-   return;
+   cleanPropertyList(context, conf);
}
-   cleanPropertyList(context, conf);
+
 }



incubator-hawq git commit: HAWQ-645. shrink LOG level log output from resource manager

2016-04-08 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 143c0e3f1 -> 37839128b


HAWQ-645. shrink LOG level log output from resource manager


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

Branch: refs/heads/master
Commit: 37839128bfe8b063918300a929825485c1d0b3af
Parents: 143c0e3
Author: YI JIN 
Authored: Sat Apr 9 12:36:12 2016 +1000
Committer: YI JIN 
Committed: Sat Apr 9 12:36:12 2016 +1000

--
 .../communication/rmcomm_Message.c  |  10 +-
 .../communication/rmcomm_QD2RM.c|  20 +--
 src/backend/resourcemanager/requesthandler.c|   4 +-
 .../resourcebroker/resourcebroker_LIBYARN.c |  67 ++---
 .../resourcebroker_LIBYARN_proc.c   | 149 ++-
 src/backend/resourcemanager/resourcemanager.c   |  22 +--
 src/backend/resourcemanager/resourcepool.c  |  66 
 src/backend/resourcemanager/resqueuemanager.c   |  62 
 src/backend/tcop/pquery.c   |   2 -
 9 files changed, 224 insertions(+), 178 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/37839128/src/backend/resourcemanager/communication/rmcomm_Message.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_Message.c 
b/src/backend/resourcemanager/communication/rmcomm_Message.c
index 364c8a2..b12a734 100644
--- a/src/backend/resourcemanager/communication/rmcomm_Message.c
+++ b/src/backend/resourcemanager/communication/rmcomm_Message.c
@@ -96,13 +96,9 @@ void ReadPostHandler_Message(AsyncCommBuffer buffer)
if ( DRM_MSGFRAME_TAILTAG_MATCHED(p) )
{
/* Skip heart-beat message log. */
-   elog((header->MessageID == 
REQUEST_QD_REFRESH_RESOURCE ||
- header->MessageID == 
REQUEST_RM_IMALIVE  ||
- header->MessageID == 
RESPONSE_QD_REFRESH_RESOURCE ||
- header->MessageID == 
RESPONSE_RM_IMALIVE) ? DEBUG3 : LOG,
-"AsyncComm framework receives message 
%d from FD %d",
-header->MessageID,
-buffer->FD);
+   elog(RMLOG, "AsyncComm framework receives 
message %d from FD %d",
+   header->MessageID,
+   buffer->FD);
 
/* Get complete message and call the handler. */
if ( context->MessageRecvedHandler != NULL )

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/37839128/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c 
b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
index 4808a8b..f5cd379 100644
--- a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
+++ b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
@@ -698,16 +698,16 @@ int acquireResourceFromRM(int 
  index,
0 :

preferred_nodes_size;
 
-elog(LOG, "ConnID: %d. Acquire resource request for index %d. "
- "Max vseg size %d Min vseg size %d Estimated slice size %d "
- "estimated IO bytes size " INT64_FORMAT " Preferred node 
count %d.",
- curcontext->QD_Conn_ID,
- index,
- max_seg_count_fix,
- min_seg_count_fix,
- slice_size,
- iobytes,
- nodecount);
+elog(RMLOG, "ConnID: %d. Acquire resource request for index %d. "
+   "Max vseg size %d Min vseg size %d Estimated slice size 
%d "
+   "estimated IO bytes size " INT64_FORMAT " Preferred 
node count %d.",
+   curcontext->QD_Conn_ID,
+   index,
+   max_seg_count_fix,
+   min_seg_count_fix,
+   slice_size,
+   iobytes,
+   nodecount);
 
 /* Build request. */
 re

incubator-hawq git commit: HAWQ-641. Add log for changing host capacity that registers before fixing cluster memory to core ratio

2016-04-08 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master a1872589e -> e0430586f


HAWQ-641. Add log for changing host capacity that registers before fixing 
cluster memory to core ratio


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

Branch: refs/heads/master
Commit: e0430586fcfe749fe295cbb44cd443b7bde6e5af
Parents: a187258
Author: YI JIN 
Authored: Sat Apr 9 11:07:54 2016 +1000
Committer: YI JIN 
Committed: Sat Apr 9 11:07:54 2016 +1000

--
 src/backend/resourcemanager/resourcepool.c | 36 ++---
 1 file changed, 27 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e0430586/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 1be9079..9941226 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -4776,14 +4776,23 @@ void adjustSegmentCapacityForNone(SegResource segres)
adjustMemoryCoreValue(&(segres->Stat->FTSTotalMemoryMB),
  
&(segres->Stat->FTSTotalCore));
 
-   if ( !IS_SEGSTAT_FTSAVAILABLE(segres->Stat) )
-   {
-   return;
-   }
 
if ( oldmemorymb != segres->Stat->FTSTotalMemoryMB ||
 oldcore != segres->Stat->FTSTotalCore )
{
+   elog(LOG, "Resource manager adjusts segment %s original 
resource "
+ "capacity from (%d MB, %d CORE) to (%d MB, %d 
CORE)",
+ GET_SEGINFO_HOSTNAME(&(segres->Stat->Info)),
+ oldmemorymb,
+ oldcore,
+ segres->Stat->FTSTotalMemoryMB,
+ segres->Stat->FTSTotalCore);
+
+   if ( !IS_SEGSTAT_FTSAVAILABLE(segres->Stat) )
+   {
+   return;
+   }
+
minusResourceBundleData(&(PRESPOOL->FTSTotal),
oldmemorymb,
oldcore * 1.0);
@@ -4809,14 +4818,23 @@ void adjustSegmentCapacityForGRM(SegResource segres)
adjustMemoryCoreValue(&(segres->Stat->GRMTotalMemoryMB),
  
&(segres->Stat->GRMTotalCore));
 
-   if (!IS_SEGSTAT_FTSAVAILABLE(segres->Stat))
-   {
-   return;
-   }
-
if ( oldmemorymb != segres->Stat->GRMTotalMemoryMB ||
 oldcore != segres->Stat->GRMTotalCore )
{
+   elog(LOG, "Resource manager adjusts segment %s original global 
resource "
+ "manager resource capacity from (%d MB, %d 
CORE) to "
+ "(%d MB, %d CORE)",
+ GET_SEGINFO_HOSTNAME(&(segres->Stat->Info)),
+ oldmemorymb,
+ oldcore,
+ segres->Stat->GRMTotalMemoryMB,
+ segres->Stat->GRMTotalCore);
+
+   if (!IS_SEGSTAT_FTSAVAILABLE(segres->Stat))
+   {
+   return;
+   }
+
minusResourceBundleData(&(PRESPOOL->GRMTotal),
oldmemorymb,
oldcore * 1.0);



incubator-hawq git commit: HAWQ-640. Wrongly timing the reqeusts for YARN containers causes resource manager not fully acquire resource

2016-04-08 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 0ee50a91b -> a1872589e


HAWQ-640. Wrongly timing the reqeusts for YARN containers causes resource 
manager not fully acquire resource


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

Branch: refs/heads/master
Commit: a1872589eb96ff5cb9e978280b7a01aeb6d302cc
Parents: 0ee50a9
Author: YI JIN 
Authored: Sat Apr 9 11:06:47 2016 +1000
Committer: YI JIN 
Committed: Sat Apr 9 11:06:47 2016 +1000

--
 src/backend/resourcemanager/resourcemanager.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a1872589/src/backend/resourcemanager/resourcemanager.c
--
diff --git a/src/backend/resourcemanager/resourcemanager.c 
b/src/backend/resourcemanager/resourcemanager.c
index 9732df8..f460ba5 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -2194,7 +2194,6 @@ int generateAllocRequestToBroker(void)
/* Call resource broker to request resource. */
if ( reqmem > 0 && reqcore > 0 )
{
-
/*
 * Here we know that we have to allocate more resource from 
GRM, we should
 * check again to enrich the preferred host list for new 
locality data
@@ -2211,6 +2210,8 @@ int generateAllocRequestToBroker(void)
 
if ( reqcore > 0 )
{
+   PRESPOOL->LastResAcqTime = gettime_microsec();
+
addResourceBundleData(&(mctrack->TotalPending), reqmem, 
reqcore);
uint64_t oldtime = mctrack->TotalPendingStartTime;
if ( mctrack->TotalPendingStartTime == 0 )
@@ -2906,7 +2907,6 @@ void generateResourceRequestToResourceBroker(void)
 
if ( !isCleanGRMResourceStatus() )
{
-
curtime = gettime_microsec();
 
 if ( PRESPOOL->Segments.NodeCount > 0 && PQUEMGR->RatioCount > 0 )
@@ -2914,7 +2914,6 @@ void generateResourceRequestToResourceBroker(void)
refreshMemoryCoreRatioLevelUsage(curtime);
if ( curtime - PRESPOOL->LastResAcqTime > 100LL)
{
-   PRESPOOL->LastResAcqTime = curtime;
res = generateAllocRequestToBroker();
if ( res != FUNC_RETURN_OK )
{



incubator-hawq git commit: HAWQ-634. Let resource manager cancel waiting and return allocated resource when unregister connection rpc is called

2016-04-08 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 300d9149f -> 0ee50a91b


HAWQ-634. Let resource manager cancel waiting and return allocated resource 
when unregister connection rpc is called


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0ee50a91
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0ee50a91
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0ee50a91

Branch: refs/heads/master
Commit: 0ee50a91b3b9304d7766fee43ce99a3d2690cc99
Parents: 300d914
Author: YI JIN 
Authored: Fri Apr 8 21:37:05 2016 +1000
Committer: YI JIN 
Committed: Fri Apr 8 21:37:05 2016 +1000

--
 .../communication/rmcomm_AsyncComm.c|  8 ++-
 .../communication/rmcomm_SyncComm.c | 14 ++---
 src/backend/resourcemanager/conntrack.c | 60 +---
 src/backend/resourcemanager/include/conntrack.h |  3 +
 .../resourcemanager/include/resqueuemanager.h   |  4 +-
 src/backend/resourcemanager/requesthandler.c| 27 -
 src/backend/resourcemanager/resqueuemanager.c   | 17 --
 src/backend/tcop/postgres.c |  2 +-
 src/backend/tcop/pquery.c   | 15 -
 9 files changed, 119 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0ee50a91/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c 
b/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
index 181cc86..ee005bf 100644
--- a/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
+++ b/src/backend/resourcemanager/communication/rmcomm_AsyncComm.c
@@ -403,7 +403,7 @@ int processAllCommFileDescs(void)
if ( CommBuffers[i]->forcedClose )
{
/* Call cleanup handler if necessary to do user-defined 
cleanup. */
-   elog(DEBUG5, "Close FD %d Index %d.", 
CommBuffers[i]->FD, i);
+   elog(DEBUG3, "Close FD %d Index %d.", 
CommBuffers[i]->FD, i);
 
/* Close connection and free buffer */
closeRegisteredFileDesc(CommBuffers[i]);
@@ -414,6 +414,7 @@ int processAllCommFileDescs(void)
if ( CommBuffers[i]->ClientHostname.Str != NULL &&
 CommBuffers[i]->ServerPort != 0 )
{
+   elog(DEBUG3, "Return FD %d Index %d.", 
CommBuffers[i]->FD, i);
returnAliveConnectionRemoteByHostname(
&(CommBuffers[i]->FD),

CommBuffers[i]->ClientHostname.Str,
@@ -421,6 +422,7 @@ int processAllCommFileDescs(void)
}
else
{
+   elog(DEBUG3, "Close FD %d Index %d normally.", 
CommBuffers[i]->FD, i);
closeRegisteredFileDesc(CommBuffers[i]);
}
shouldfree = true;
@@ -518,6 +520,8 @@ void freeCommBuffer(AsyncCommBuffer *pcommbuffer)
 {
Assert( pcommbuffer != NULL );
 
+   elog(DEBUG3, "Free CommBuffer for FD %d.", (*pcommbuffer)->FD);
+
freeSimpleStringContent(&((*pcommbuffer)->ClientHostname));
 
destroySelfMaintainBuffer(&((*pcommbuffer)->ReadBuffer));
@@ -574,7 +578,7 @@ void unresigsterFileDesc(int fd)
{
/* Call cleanup handler if necessary to do user-defined 
cleanup. */
CommBuffers[i]->Methods->CleanUpHandle(CommBuffers[i]);
-   elog(DEBUG5, "Unregister FD %d Index %d.", 
CommBuffers[i]->FD, i);
+   elog(DEBUG3, "Unregister FD %d Index %d.", 
CommBuffers[i]->FD, i);
CommBuffers[i]->FD = -1;
freeCommBuffer(&CommBuffers[i]);
pos = i;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0ee50a91/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_SyncComm.c 
b/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
index f476add..62c043e 100644
--- a/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
+++ b/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
@@ -120,25 +120,19 @@ int callSyncRPCRemote(const char *hostname,
while( true )
{
processAllCommFileDescs();
+   CHECK_FOR_INTERRUP

incubator-hawq git commit: HAWQ-631. Wrongly report error message when QD fails to connect to resource manager

2016-04-05 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 5e6cdd69a -> 8bd10631e


HAWQ-631. Wrongly report error message when QD fails to connect to resource 
manager


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/8bd10631
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/8bd10631
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/8bd10631

Branch: refs/heads/master
Commit: 8bd10631ecb90f05042abc90471cd170250cf680
Parents: 5e6cdd6
Author: YI JIN 
Authored: Wed Apr 6 16:56:57 2016 +1000
Committer: YI JIN 
Committed: Wed Apr 6 16:56:57 2016 +1000

--
 .../communication/rmcomm_SyncComm.c  |  6 +++---
 src/backend/tcop/pquery.c| 19 ++-
 2 files changed, 9 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8bd10631/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_SyncComm.c 
b/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
index dfc89d7..f476add 100644
--- a/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
+++ b/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
@@ -84,7 +84,7 @@ int callSyncRPCRemote(const char *hostname,
 "failed to connect to remote socket server 
%s:%d",
 hostname,
 port);
-   elog(WARNING, "%s", errorbuf);
+   elog(LOG, "%s", errorbuf);
goto exit;
}
 
@@ -106,7 +106,7 @@ int callSyncRPCRemote(const char   *hostname,
 fd,
 hostname, port);
 
-   elog(WARNING, "%s", errorbuf);
+   elog(LOG, "%s", errorbuf);
goto exit;
}
 
@@ -150,7 +150,7 @@ int callSyncRPCRemote(const char   *hostname,
 
if (res != FUNC_RETURN_OK)
{
- elog(WARNING, "Sync RPC framework (inet) finds exception raised.");
+ elog(LOG, "Sync RPC framework (inet) finds exception raised.");
 
  switch(res)
  {

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8bd10631/src/backend/tcop/pquery.c
--
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index 04420c3..243ac75 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -747,8 +747,7 @@ AllocateResource(QueryResourceLife   life,
 
int ret;
int resourceId = -1;
-   char errorbuf[1024];
-   int  errorcode;
+   static char errorbuf[1024];
 
QDResourceContext rescontext = NULL;
 
@@ -766,7 +765,8 @@ AllocateResource(QueryResourceLife   life,
 
/* Create new resource context. */
ret = createNewResourceContext(&resourceId);
-   if ( ret == FUNC_RETURN_OK ) {
+   if ( ret == FUNC_RETURN_OK )
+   {
elog(DEBUG3, "Created new resource context for this session 
indexed %d",
 resourceId);
}
@@ -782,16 +782,9 @@ AllocateResource(QueryResourceLife   life,
  
useridoid,
  
errorbuf,
  
sizeof(errorbuf));
-   errorcode = ret;
-   if (ret != FUNC_RETURN_OK) {
-   ereport(ERROR,
-   (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-errmsg("must be superuser to create resource 
queues")));
-   elog(ERROR, "%s. (%d)", errorbuf, ret);
-   }
-
-   if ( errorcode != FUNC_RETURN_OK ) {
-   elog(ERROR, "%s. (%d)", errorbuf, errorcode);
+   if (ret != FUNC_RETURN_OK)
+   {
+   ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), 
errmsg("%s",errorbuf)));
}
 
AddToGlobalQueryResources(resourceId, life);



incubator-hawq git commit: HAWQ-630. Change QD lease heart-beat interval to 10s and timeout to 180s

2016-04-05 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 0aa695293 -> 5e6cdd69a


HAWQ-630. Change QD lease heart-beat interval to 10s and timeout to 180s


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

Branch: refs/heads/master
Commit: 5e6cdd69a259bb74c5496f081a0341569c6fc893
Parents: 0aa6952
Author: YI JIN 
Authored: Wed Apr 6 15:59:01 2016 +1000
Committer: YI JIN 
Committed: Wed Apr 6 15:59:01 2016 +1000

--
 src/backend/utils/misc/guc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5e6cdd69/src/backend/utils/misc/guc.c
--
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index dd136a5..3125c58 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -6446,7 +6446,7 @@ static struct config_int ConfigureNamesInt[] =
NULL
},
&rm_session_lease_timeout,
-   10, 5, 65535, NULL, NULL
+   180, 5, 65535, NULL, NULL
},
 
{
@@ -6493,7 +6493,7 @@ static struct config_int ConfigureNamesInt[] =
NULL
},
&rm_session_lease_heartbeat_interval,
-   1, 1, 65535, NULL, NULL
+   10, 1, 65535, NULL, NULL
},
 
{



incubator-hawq git commit: HAWQ-605. Some segment capacity changes are not logged out and when segment goes to up status, the capacity is not adjusted

2016-04-05 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master fa2600cfb -> 1fbdf8b9a


HAWQ-605. Some segment capacity changes are not logged out and when segment 
goes to up status, the capacity is not adjusted


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1fbdf8b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1fbdf8b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1fbdf8b9

Branch: refs/heads/master
Commit: 1fbdf8b9a17d9fec449f8ed920498e7952cdd4fd
Parents: fa2600c
Author: YI JIN 
Authored: Wed Apr 6 12:41:12 2016 +1000
Committer: YI JIN 
Committed: Wed Apr 6 12:41:12 2016 +1000

--
 src/backend/resourcemanager/resourcepool.c | 47 ++---
 1 file changed, 26 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1fbdf8b9/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 0f06f22..1be9079 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -1366,8 +1366,8 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
  
segresource->Stat->FTSTotalCore);
}
 
-   elog(LOG, "Resource manager sets physical host '%s' 
capacity change "
- "from FTS (%d MB,%d CORE) to FTS (%d 
MB,%d CORE)",
+   elog(LOG, "Resource manager finds host %s segment 
resource capacity "
+ "changed from (%d MB,%d CORE) to (%d 
MB,%d CORE)",
  GET_SEGRESOURCE_HOSTNAME(segresource),
  oldftsmem,
  oldftscore,
@@ -1575,13 +1575,14 @@ int updateHAWQSegWithGRMSegStat( SegStat segstat)
  
segres->Stat->GRMTotalCore);
}
 
-   elog(LOG, "Resource manager finds host %s capacity changed from 
"
-   "GRM (%d MB, %d CORE) to GRM (%d MB, %d 
CORE)",
-   GET_SEGRESOURCE_HOSTNAME(segres),
-   oldgrmmem,
-   oldgrmcore,
-   segres->Stat->GRMTotalMemoryMB,
-   segres->Stat->GRMTotalCore);
+   elog(LOG, "Resource manager finds host %s global resource 
manager "
+ "node resource capacity changed from (%d MB, 
%d CORE) to "
+ "GRM (%d MB, %d CORE)",
+ GET_SEGRESOURCE_HOSTNAME(segres),
+ oldgrmmem,
+ oldgrmcore,
+ segres->Stat->GRMTotalMemoryMB,
+ segres->Stat->GRMTotalCore);
}
 
segres->Stat->GRMHandled = true;
@@ -1789,6 +1790,7 @@ int setSegResHAWQAvailability( SegResource segres, 
uint8_t newstatus)
}
else if (newstatus == RESOURCE_SEG_STATUS_AVAILABLE)
{
+   adjustSegmentCapacity(segres);
addResourceBundleData(&(PRESPOOL->FTSTotal),
  
segres->Stat->FTSTotalMemoryMB,
  
segres->Stat->FTSTotalCore);
@@ -4722,12 +4724,13 @@ void adjustSegmentStatFTSCapacity(SegStat segstat)
if ( oldmemorymb != segstat->FTSTotalMemoryMB ||
 oldcore != segstat->FTSTotalCore )
{
-   elog(RMLOG, "Resource manager adjusts segment FTS capacity from 
"
-   "(%d MB, %d CORE) to (%d MB, %d CORE)",
-   oldmemorymb,
-   oldcore,
-   segstat->FTSTotalMemoryMB,
-   segstat->FTSTotalCore);
+   elog(LOG, "Resource manager adjusts segment %s original 
resource "
+ "capacity from (%d MB, %d CORE) to (%d MB, %d 
CORE)",
+ GET_SEGINFO_HOSTNAME(&(segstat->Info)),
+ oldmemorymb,
+ oldcore,
+ segstat->FTSTotalMemoryMB,
+ segstat->FTSTotalCore);
}
 }
 
@@ -4746,12 +4749,14 

incubator-hawq git commit: HAWQ-623. Resource quota request does not follow latest resource quota calculating logic

2016-04-04 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 3828d9147 -> cf2744dc5


HAWQ-623. Resource quota request does not follow latest resource quota 
calculating logic


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

Branch: refs/heads/master
Commit: cf2744dc5fdefb47a4fbcd6f8fa807861822ebbd
Parents: 3828d91
Author: YI JIN 
Authored: Tue Apr 5 12:03:19 2016 +1000
Committer: YI JIN 
Committed: Tue Apr 5 12:03:19 2016 +1000

--
 src/backend/resourcemanager/requesthandler.c  | 73 +++---
 src/backend/resourcemanager/resqueuemanager.c | 40 +---
 2 files changed, 69 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cf2744dc/src/backend/resourcemanager/requesthandler.c
--
diff --git a/src/backend/resourcemanager/requesthandler.c 
b/src/backend/resourcemanager/requesthandler.c
index 4e24848..b89d23a 100644
--- a/src/backend/resourcemanager/requesthandler.c
+++ b/src/backend/resourcemanager/requesthandler.c
@@ -793,18 +793,52 @@ bool handleRMRequestAcquireResourceQuota(void **arg)
int  res= FUNC_RETURN_OK;
ConnectionTrack  conntrack  = (ConnectionTrack)(*arg);
bool exist  = false;
+   uint64_t reqtime= gettime_microsec();
+   /* If we run in YARN mode, we expect that we should try to get at least 
one
+* available segment, and this requires at least once global resource 
manager
+* cluster report returned.
+*/
+   if ( reqtime - DRMGlobalInstance->ResourceManagerStartTime <=
+rm_nocluster_timeout * 100LL &&
+PRESPOOL->RBClusterReportCounter == 0 )
+   {
+   elog(DEBUG3, "Resource manager defers the resource request.");
+   return false;
+   }
+
+   /*
+* If resource queue has no concrete capacity set yet, no need to handle
+* the request.
+*/
+   if ( PQUEMGR->RootTrack->QueueInfo->ClusterMemoryMB <= 0 )
+   {
+   elog(DEBUG3, "Resource manager defers the resource request 
because the "
+"resource queues have no valid 
resource capacities yet.");
+   return false;
+   }
+
+   Assert(PRESPOOL->SlavesHostCount > 0);
+   int rejectlimit = ceil(PRESPOOL->SlavesHostCount * 
rm_rejectrequest_nseg_limit);
+   int unavailcount = PRESPOOL->SlavesHostCount - PRESPOOL->AvailNodeCount;
+   if ( unavailcount > rejectlimit )
+   {
+   snprintf(errorbuf, sizeof(errorbuf),
+"%d of %d segments %s unavailable, exceeds 
%.1f%% defined in "
+"GUC hawq_rm_rejectrequest_nseg_limit. The 
resource quota "
+"request is rejected.",
+unavailcount,
+PRESPOOL->SlavesHostCount,
+unavailcount == 1 ? "is" : "are",
+rm_rejectrequest_nseg_limit*100.0);
+   elog(WARNING, "ConnID %d. %s", conntrack->ConnID, errorbuf);
+   res = RESOURCEPOOL_TOO_MANY_UAVAILABLE_HOST;
+   goto errorexit;
+   }
 
RPCRequestHeadAcquireResourceQuotaFromRMByOID request =
SMBUFF_HEAD(RPCRequestHeadAcquireResourceQuotaFromRMByOID,
&(conntrack->MessageBuff));
 
-   elog(LOG, "ConnID %d. User "INT64_FORMAT" acquires query resource quota 
"
- "with expected %d vseg (MIN %d).",
- conntrack->ConnID,
- request->UseridOid,
- request->MaxSegCountFix,
- request->MinSegCountFix);
-
/* Get user name from oid. */
UserInfo reguser = getUserByUserOID(request->UseridOid, &exist);
if ( !exist )
@@ -826,6 +860,31 @@ bool handleRMRequestAcquireResourceQuota(void **arg)
conntrack->MinSegCountFixed = request->MinSegCountFix;
conntrack->VSegLimitPerSeg  = request->VSegLimitPerSeg;
conntrack->VSegLimit= request->VSegLimit;
+   conntrack->StatVSegMemoryMB = request->StatVSegMemoryMB;
+   conntrack->StatNVSeg= request->StatNVSeg;
+
+   elog(RMLOG, "ConnID %d. User "INT64_FORMAT" acquires query resource 
quota. "
+   "Expect %d vseg (MIN %d). "
+  

incubator-hawq git commit: HAWQ-564. HAWQ-564. Resume resource dispatching when reset a RUAlive pending segment

2016-04-04 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master b7a8528ce -> 3828d9147


HAWQ-564. HAWQ-564. Resume resource dispatching when reset a RUAlive pending 
segment


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/3828d914
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/3828d914
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/3828d914

Branch: refs/heads/master
Commit: 3828d9147f6175848fb239f610c6b2cd2e6b8c8c
Parents: b7a8528
Author: YI JIN 
Authored: Tue Apr 5 11:22:44 2016 +1000
Committer: YI JIN 
Committed: Tue Apr 5 11:22:44 2016 +1000

--
 src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3828d914/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
index c784f65..50038b1 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -210,12 +210,18 @@ void 
receivedRUAliveResponse(AsyncCommMessageHandlerContext  context,
refreshActualMinGRMContainerPerSeg();
}
else {
-   elog(DEBUG3, "Resource manager find host %s is down 
already.",
+   elog(DEBUG3, "Resource manager finds host %s is down 
already.",
 
GET_SEGRESOURCE_HOSTNAME(segres));
}
}
+   else
+   {
+   elog(DEBUG3, "Resource manager finds host %s still up.");
+   }
 
setSegResRUAlivePending(segres, false);
+   PQUEMGR->toRunQueryDispatch = true;
+
closeFileDesc(context->AsyncBuffer);
 }
 



incubator-hawq git commit: HAWQ-564. QD hangs when connecting to resource manager

2016-03-31 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 758d26539 -> 02a1c6c22


HAWQ-564. QD hangs when connecting to resource manager


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/02a1c6c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/02a1c6c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/02a1c6c2

Branch: refs/heads/master
Commit: 02a1c6c221184d2dfbda8c2c29b36e049646f12f
Parents: 758d265
Author: YI JIN 
Authored: Fri Apr 1 12:53:22 2016 +1100
Committer: YI JIN 
Committed: Fri Apr 1 12:53:22 2016 +1100

--
 .../communication/rmcomm_RM2RMSEG.c |  6 ++-
 .../resourcemanager/include/resourcepool.h  |  1 -
 src/backend/resourcemanager/resourcepool.c  | 45 
 3 files changed, 41 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/02a1c6c2/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
--
diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c 
b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
index 85629a8..c784f65 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -618,7 +618,7 @@ void 
processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accept
ctn->Life += 1;
 
PRESPOOL->AddPendingContainerCount--;
-   elog(LOG, "AddPendingContainerCount minused 1, current value 
%d",
+   elog(LOG, "AddPendingContainerCount minus 1, current value %d",
  PRESPOOL->AddPendingContainerCount);
/*
 * Add container to ToKickContainers if lifetime is not too 
long.
@@ -628,6 +628,10 @@ void 
processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accept
if( !isCleanGRMResourceStatus() &&
ctn->Life < RESOURCE_CONTAINER_MAX_LIFETIME )
{
+   /* This container can not generate additional increase 
pending */
+   minusResourceBundleData(&(ctn->Resource->IncPending),
+   
ctn->MemoryMB,
+   
ctn->Core);
addGRMContainerToToBeAccepted(ctn);
}
/* Add container to KickedContainers if lifetime is long enough 
*/

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/02a1c6c2/src/backend/resourcemanager/include/resourcepool.h
--
diff --git a/src/backend/resourcemanager/include/resourcepool.h 
b/src/backend/resourcemanager/include/resourcepool.h
index f9f893d..8c25ee1 100644
--- a/src/backend/resourcemanager/include/resourcepool.h
+++ b/src/backend/resourcemanager/include/resourcepool.h
@@ -308,7 +308,6 @@ struct SegResourceData {
 SegResource createSegResource(SegStat segstat);
 
 int setSegResHAWQAvailability( SegResource segres, uint8_t newstatus);
-int setSegResGLOBAvailability( SegResource segres, uint8_t newstatus);
 
 /* Set the segment is under or not under RUAlive pending status. */
 bool setSegResRUAlivePending( SegResource segres, bool pending);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/02a1c6c2/src/backend/resourcemanager/resourcepool.c
--
diff --git a/src/backend/resourcemanager/resourcepool.c 
b/src/backend/resourcemanager/resourcepool.c
index 976ddca..0f06f22 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -907,8 +907,8 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
int32_t  segid   = SEGSTAT_ID_INVALID;
SimpString   hostnamekey;
SimpArrayhostaddrkey;
-   bool segcapchanged  = false;
-
+   bool segcapchanged   = false;
+   bool segavailchanged = false;
/*
 * Anyway, the host capacity is updated here if the cluster level 
capacity
 * is fixed.
@@ -1040,6 +1040,7 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
if (segresource->Stat->StatusDesc == 0)
{
setSegResHAWQAvailability(segresource, 
RESOURCE_SEG_STATUS_AVAILABLE);
+   segavailchanged = true;
}
 
/* Add this node into the table gp_segment_configurat

incubator-hawq git commit: HAWQ-610. HAWQ-610. Remove resource manager temporary directory facility that is not used any more

2016-03-30 Thread yjin
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 1eaa931e3 -> 6107a7ce3


HAWQ-610. HAWQ-610. Remove resource manager temporary directory facility that 
is not used any more


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/6107a7ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/6107a7ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/6107a7ce

Branch: refs/heads/master
Commit: 6107a7ce39bac07e2ef77f48056676ef0d88ce77
Parents: 1eaa931
Author: YI JIN 
Authored: Thu Mar 31 14:46:05 2016 +1100
Committer: YI JIN 
Committed: Thu Mar 31 14:46:05 2016 +1100

--
 src/backend/resourcemanager/include/dynrm.h   |  7 ---
 src/backend/resourcemanager/resourcemanager.c | 19 ---
 2 files changed, 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/6107a7ce/src/backend/resourcemanager/include/dynrm.h
--
diff --git a/src/backend/resourcemanager/include/dynrm.h 
b/src/backend/resourcemanager/include/dynrm.h
index 34f4b92..69f8718 100644
--- a/src/backend/resourcemanager/include/dynrm.h
+++ b/src/backend/resourcemanager/include/dynrm.h
@@ -206,15 +206,8 @@ struct DynRMGlobalData{
 
/**/
 SegStat LocalHostStat;
 
-DQueueData  LocalHostTempDirectoriesForQD;
-int  NextLocalHostTempDirIdxForQD;
-
 DQueueData  LocalHostTempDirectories;
 List*LocalHostFailedTmpDirList;
-int  NextLocalHostTempDirIdx;
-HTAB *LocalTmpDirTable;
-int  TmpDirTableCapacity;
-DQueueData   TmpDirLRUList;
 
 uint64_tLocalHostLastUpdateTime;
 uint64_tHeartBeatLastSentTime;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/6107a7ce/src/backend/resourcemanager/resourcemanager.c
--
diff --git a/src/backend/resourcemanager/resourcemanager.c 
b/src/backend/resourcemanager/resourcemanager.c
index 8fae27b..9732df8 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -823,24 +823,14 @@ int initializeDRMInstance(MCTYPE context)
DRMGlobalInstance->HeartBeatLastSentTime= 0;
DRMGlobalInstance->TmpDirLastCheckTime  = 0;
DRMGlobalInstance->LocalHostStat= NULL;
-
-   initializeDQueue(&(DRMGlobalInstance->LocalHostTempDirectoriesForQD),   
context);
-DRMGlobalInstance->NextLocalHostTempDirIdxForQD = -1;

 initializeDQueue(&(DRMGlobalInstance->LocalHostTempDirectories),   
context);
-DRMGlobalInstance->NextLocalHostTempDirIdx = -1;
 DRMGlobalInstance->LocalHostFailedTmpDirList = NULL;
 
 HASHCTL ctl;
 ctl.keysize = sizeof(TmpDirKey);
 ctl.entrysize   = sizeof(TmpDirEntry);
 ctl.hcxt= context;
-DRMGlobalInstance->LocalTmpDirTable = hash_create("Executor 
temporary directory table",
-   
  16,
-   
  &ctl,
-   
  HASH_ELEM);
-DRMGlobalInstance->TmpDirTableCapacity  = 256;
-initializeDQueue(&(DRMGlobalInstance->TmpDirLRUList), context);
 
/* Tell the working threads keep running. */
DRMGlobalInstance->ResManagerMainKeepRun= true;
@@ -1054,16 +1044,7 @@ int  loadDynamicResourceManagerConfigure(void)
 DRMGlobalInstance->SegmentCore);
 
 // For temporary directories
-
-InitTemporaryDirs(&DRMGlobalInstance->LocalHostTempDirectoriesForQD, 
rm_master_tmp_dirs);
-   DRMGlobalInstance->NextLocalHostTempDirIdxForQD = 0;
-   
-DQUEUE_LOOP_BEGIN(&DRMGlobalInstance->LocalHostTempDirectoriesForQD, iter, 
SimpStringPtr, value)
-   elog(LOG, "HAWQ Master RM :: Temporary directory %s", 
value->Str);
-   DQUEUE_LOOP_END
-
 InitTemporaryDirs(&DRMGlobalInstance->LocalHostTempDirectories, 
rm_seg_tmp_dirs);
-   DRMGlobalInstance->NextLocalHostTempDirIdx = 0;
 
DQUEUE_LOOP_BEGIN(&DRMGlobalInstance->LocalHostTempDirectories, iter, 
SimpStringPtr, 

  1   2   3   >