[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread interma
Github user interma commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93184941
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread interma
Github user interma commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93184810
  
--- Diff: src/test/regress/checkinc.py ---
@@ -78,9 +78,10 @@
 'winsock.h': [],
 'winsock2.h':[],
 'ws2tcpip.h':[],
-'hdfs/hdfs.h':  [],
+'hdfs/hdfs.h':  [],
 'quicklz1.h':   [],
 'quicklz3.h':   [],
+'json-c/json.h': [],
--- End diff --

Yes, only in "make install". 
"make" is ok.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread zhangh43
Github user zhangh43 commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93183177
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq issue #1058: HAWQ-1226. HAWQ core dump due to enable ranger w...

2016-12-19 Thread zhangh43
Github user zhangh43 commented on the issue:

https://github.com/apache/incubator-hawq/pull/1058
  
Return RANGERCHECK_UNKNOWN has some problem.
check_privilege_from_ranger is call by pg_rangercheck which returns 
AclResult. But RANGERCHECK_UNKNOWN is belong to RangerACLResult. We need to 
unify them.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread zhangh43
Github user zhangh43 commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93183193
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread zhangh43
Github user zhangh43 commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93183185
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread interma
Github user interma commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93182919
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq issue #1058: HAWQ-1226. HAWQ core dump due to enable ranger w...

2016-12-19 Thread interma
Github user interma commented on the issue:

https://github.com/apache/incubator-hawq/pull/1058
  
@xunzhang warning:

be-secure.c:322:1: warning: unused function 'report_commerror' 
[-Wunused-function]
report_commerror(const char *err_msg)
^
1 warning generated.

rangerrest.c:63:37: warning: 'json_object_object_get' is deprecated 
[-Wdeprecated-declarations]
struct json_object *accessObj = json_object_object_get(response, 
"access");
^
/usr/local/include/json-c/json_object.h:290:56: note: 
'json_object_object_get' has been explicitly marked deprecated here
THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* 
json_object_object_get(struct json_object* obj,
   ^
rangerrest.c:74:16: warning: 'json_object_object_get' is deprecated 
[-Wdeprecated-declarations]
  jallow = json_object_object_get(jvalue, "allowed");
   ^
/usr/local/include/json-c/json_object.h:290:56: note: 
'json_object_object_get' has been explicitly marked deprecated here
THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* 
json_object_object_get(struct json_object* obj,
   ^
rangerrest.c:406:30: warning: format string is not a string literal 
(potentially insecure) [-Wformat-security]
appendStringInfo(&tname, rps_addr_host);
 ^
rangerrest.c:406:30: note: treat the string as an argument to avoid this
appendStringInfo(&tname, rps_addr_host);
 ^
 "%s",
3 warnings generated.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1058: HAWQ-1226. HAWQ core dump due to enable ranger w...

2016-12-19 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1058
  
@interma Could you please attach the compile warning message you fixed here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93179924
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93180221
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -86,132 +98,132 @@ RangerACLResult parse_ranger_response(char* buffer)
  */
 json_object *create_ranger_request_json_batch(List *args)
 {
-  json_object *juser = NULL;
-  json_object *jaccess = json_object_new_array();
-  json_object *jrequest = json_object_new_object();
-  char *user = NULL;
-  ListCell *arg;
-  
-  foreach(arg, args)
-  {
-RangerRequestJsonArgs *arg_ptr = (RangerRequestJsonArgs *) lfirst(arg);
-if (user == NULL)
-{
-  user = arg_ptr->user;
-  juser = json_object_new_string(user);
-}
-AclObjectKind kind = arg_ptr->kind;
-char* object = arg_ptr->object;
-Assert(user != NULL && object != NULL && privilege != NULL && 
arg_ptr->isAll);
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
- user, AclObjectKindStr[kind], object);
-
-json_object *jresource = json_object_new_object();
-json_object *jelement = json_object_new_object();
-json_object *jactions = json_object_new_array();
-
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-} // switch
-
-json_object_object_add(jelement, "resource", jresource);
-
-//ListCell *cell;
-//foreach(cell, arg_ptr->actions)
-//{
-  char tmp[7] = "select";
-  json_object* jaction = json_object_new_string((char *)tmp);
-  //json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-  json_object_array_add(jactions, jaction);
-//}
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-  } // foreach
-
-  json_object_object_add(jrequest, "user", juser);
-  json_object_object_add(jrequest, "access", jaccess);
-
-  json_object *jreqid = json_object_new_string("1");
-  

[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93179978
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -24,60 +24,72 @@
  *
  *-
  */
-
 #include "utils/rangerrest.h"
-
 /*
  * A mapping from AclObjectKind to string
  */
 char* AclObjectKindStr[] =
 {
-"table", /* pg_class */
-"sequence",  /* pg_sequence */
-"database",  /* pg_database */
-"function",  /* pg_proc */
-"operator",  /* pg_operator */
-"type",  /* pg_type */
-"language",  /* pg_language */
-"namespace", /* pg_namespace */
-"oplass",/* pg_opclass */
-"conversion",/* pg_conversion */
-"tablespace",/* pg_tablespace */
-"filespace", /* pg_filespace */
-"filesystem",/* pg_filesystem */
-"fdw",   /* pg_foreign_data_wrapper */
-"foreign_server",/* pg_foreign_server */
-"protocol",  /* pg_extprotocol */
-"none"   /* MUST BE LAST */
+   "table", /* pg_class */
+   "sequence",  /* pg_sequence */
+   "database",  /* pg_database */
+   "function",  /* pg_proc */
+   "operator",  /* pg_operator */
+   "type",  /* pg_type */
+   "language",  /* pg_language */
+   "namespace", /* pg_namespace */
+   "oplass",/* pg_opclass */
+   "conversion",/* pg_conversion */
+   "tablespace",/* pg_tablespace */
+   "filespace", /* pg_filespace */
+   "filesystem",/* pg_filesystem */
+   "fdw",   /* pg_foreign_data_wrapper */
+   "foreign_server",/* pg_foreign_server */
+   "protocol",  /* pg_extprotocol */
+   "none"   /* MUST BE LAST */
 };
 
 RangerACLResult parse_ranger_response(char* buffer)
 {
-Assert(buffer != NULL);
-if (strlen(buffer) == 0)
-return RANGERCHECK_UNKNOWN;
-
-elog(LOG, "read from Ranger Restful API: %s", buffer);
-
-struct json_object *response = json_tokener_parse(buffer);
-struct json_object *accessObj = json_object_object_get(response, 
"access");
-
-int arraylen = json_object_array_length(accessObj);
-elog(LOG, "Array Length: %dn",arraylen);
-
-json_object * jvalue;
-json_object * jallow;
-json_bool result;
-// here should return which table's acl check failed in future.
-for (int i=0; i< arraylen; i++){
-  jvalue = json_object_array_get_idx(accessObj, i);
-  jallow = json_object_object_get(jvalue, "allowed");
-  result = json_object_get_boolean(jallow);
-  if(result != 1){
-return RANGERCHECK_NO_PRIV;
-  }
-}
-return RANGERCHECK_OK;
+   Assert(buffer != NULL);
+   if (strlen(buffer) == 0)
+   return RANGERCHECK_UNKNOWN;
+
+   elog(LOG, "read from Ranger Restful API: %s", buffer);
+
+   struct json_object *response = json_tokener_parse(buffer);
+   if (response == NULL) 
--- End diff --

Looks good 👋 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93179777
  
--- Diff: src/test/regress/checkinc.py ---
@@ -78,9 +78,10 @@
 'winsock.h': [],
 'winsock2.h':[],
 'ws2tcpip.h':[],
-'hdfs/hdfs.h':  [],
+'hdfs/hdfs.h':  [],
 'quicklz1.h':   [],
 'quicklz3.h':   [],
+'json-c/json.h': [],
--- End diff --

Does `checkinc.py` apply only when executing `make install`? I think this 
fix is necessary but I don't have a Mac environment to test it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93180025
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -24,60 +24,72 @@
  *
  *-
  */
-
 #include "utils/rangerrest.h"
-
 /*
  * A mapping from AclObjectKind to string
  */
 char* AclObjectKindStr[] =
 {
-"table", /* pg_class */
-"sequence",  /* pg_sequence */
-"database",  /* pg_database */
-"function",  /* pg_proc */
-"operator",  /* pg_operator */
-"type",  /* pg_type */
-"language",  /* pg_language */
-"namespace", /* pg_namespace */
-"oplass",/* pg_opclass */
-"conversion",/* pg_conversion */
-"tablespace",/* pg_tablespace */
-"filespace", /* pg_filespace */
-"filesystem",/* pg_filesystem */
-"fdw",   /* pg_foreign_data_wrapper */
-"foreign_server",/* pg_foreign_server */
-"protocol",  /* pg_extprotocol */
-"none"   /* MUST BE LAST */
+   "table", /* pg_class */
+   "sequence",  /* pg_sequence */
+   "database",  /* pg_database */
+   "function",  /* pg_proc */
+   "operator",  /* pg_operator */
+   "type",  /* pg_type */
+   "language",  /* pg_language */
+   "namespace", /* pg_namespace */
+   "oplass",/* pg_opclass */
+   "conversion",/* pg_conversion */
+   "tablespace",/* pg_tablespace */
+   "filespace", /* pg_filespace */
+   "filesystem",/* pg_filesystem */
+   "fdw",   /* pg_foreign_data_wrapper */
+   "foreign_server",/* pg_foreign_server */
+   "protocol",  /* pg_extprotocol */
+   "none"   /* MUST BE LAST */
 };
 
 RangerACLResult parse_ranger_response(char* buffer)
 {
-Assert(buffer != NULL);
-if (strlen(buffer) == 0)
-return RANGERCHECK_UNKNOWN;
-
-elog(LOG, "read from Ranger Restful API: %s", buffer);
-
-struct json_object *response = json_tokener_parse(buffer);
-struct json_object *accessObj = json_object_object_get(response, 
"access");
-
-int arraylen = json_object_array_length(accessObj);
-elog(LOG, "Array Length: %dn",arraylen);
-
-json_object * jvalue;
-json_object * jallow;
-json_bool result;
-// here should return which table's acl check failed in future.
-for (int i=0; i< arraylen; i++){
-  jvalue = json_object_array_get_idx(accessObj, i);
-  jallow = json_object_object_get(jvalue, "allowed");
-  result = json_object_get_boolean(jallow);
-  if(result != 1){
-return RANGERCHECK_NO_PRIV;
-  }
-}
-return RANGERCHECK_OK;
+   Assert(buffer != NULL);
+   if (strlen(buffer) == 0)
+   return RANGERCHECK_UNKNOWN;
+
+   elog(LOG, "read from Ranger Restful API: %s", buffer);
+
+   struct json_object *response = json_tokener_parse(buffer);
+   if (response == NULL) 
+   {
+   elog(WARNING, "json_tokener_parse failed");
+   return RANGERCHECK_UNKNOWN;
+   }
+
+   struct json_object *accessObj = NULL;
+   if (!json_object_object_get_ex(response, "access", &accessObj))
--- End diff --

What about other fields check?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread interma
Github user interma commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93179635
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jrequest;

[GitHub] incubator-hawq issue #1058: HAWQ-1226. HAWQ core dump due to enable ranger w...

2016-12-19 Thread interma
Github user interma commented on the issue:

https://github.com/apache/incubator-hawq/pull/1058
  
@linwen @xunzhang @stanlyxiang @zhangh43 help to review, thanks.

1. fix core dump while RPS not running
rangerrest.c:435 

2. fix libcurl write_callback() problem
rangerrest.c:374

3. add libcurl timeout (hard-code 30s now)
rangerrest.c:451

4. fix some compile warnings
5. fix compile error: add json.h to checkinc.py



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread stanlyxiang
Github user stanlyxiang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93179139
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -245,279 +257,326 @@ json_object *create_ranger_request_json_batch(List 
*args)
  *   }
  */
 json_object* create_ranger_request_json(char* user, AclObjectKind kind, 
char* object,
-List* actions, bool isAll)
+   List* actions, bool isAll)
 {
-Assert(user != NULL && object != NULL && privilege != NULL
-&& isAll);
-ListCell *cell;
-
-elog(LOG, "build json for ranger request, user:%s, kind:%s, object:%s",
-  user, AclObjectKindStr[kind], object);
-json_object *jrequest = json_object_new_object();
-json_object *juser = json_object_new_string(user);
-
-json_object *jaccess = json_object_new_array();
-json_object *jelement = json_object_new_object();
-
-json_object *jresource = json_object_new_object();
-switch(kind)
-{
-case ACL_KIND_CLASS:
-case ACL_KIND_SEQUENCE:
-case ACL_KIND_PROC:
-case ACL_KIND_NAMESPACE:
-case ACL_KIND_LANGUAGE:
-{
-char *ptr = NULL; char *name = NULL;
-char *first = NULL; // could be a database or protocol or 
tablespace
-char *second = NULL; // could be a schema or language
-char *third = NULL; // could be a table or sequence or function
-int idx = 0;
-for (name = strtok_r(object, ".", &ptr);
- name;
- name = strtok_r(NULL, ".", &ptr), idx++)
-{
-if (idx == 0)
-{
-first = pstrdup(name);
-}
-else if (idx == 1)
-{
-second = pstrdup(name);
-}
-else
-{
-third = pstrdup(name);
-}
-}
-
-if (first != NULL)
-{
-json_object *jfirst = json_object_new_string(first);
-json_object_object_add(jresource, "database", jfirst);
-}
-if (second != NULL)
-{
-json_object *jsecond = json_object_new_string(second);
-json_object_object_add(jresource,
-(kind == ACL_KIND_LANGUAGE) ? "language" : 
"schema", jsecond);
-}
-if (third != NULL)
-{
-json_object *jthird = json_object_new_string(third);
-json_object_object_add(jresource,
- (kind == ACL_KIND_CLASS) ? "table" :
- (kind == ACL_KIND_SEQUENCE) ? "sequence" : 
"function", jthird);
-}
-
-if (first != NULL)
-pfree(first);
-if (second != NULL)
-pfree(second);
-if (third != NULL)
-pfree(third);
-break;
-}
-case ACL_KIND_OPER:
-case ACL_KIND_CONVERSION:
-case ACL_KIND_DATABASE:
-case ACL_KIND_TABLESPACE:
-case ACL_KIND_TYPE:
-case ACL_KIND_FILESYSTEM:
-case ACL_KIND_FDW:
-case ACL_KIND_FOREIGN_SERVER:
-case ACL_KIND_EXTPROTOCOL:
-{
-json_object *jobject = json_object_new_string(object);
-json_object_object_add(jresource, AclObjectKindStr[kind], 
jobject);
-break;
-}
-default:
-elog(ERROR, "unrecognized objkind: %d", (int) kind);
-}
-
-json_object *jactions = json_object_new_array();
-foreach(cell, actions)
-{
-json_object* jaction = json_object_new_string((char 
*)cell->data.ptr_value);
-json_object_array_add(jactions, jaction);
-}
-json_object_object_add(jelement, "resource", jresource);
-json_object_object_add(jelement, "privileges", jactions);
-json_object_array_add(jaccess, jelement);
-
-json_object_object_add(jrequest, "user", juser);
-json_object_object_add(jrequest, "access", jaccess);
-json_object *jreqid = json_object_new_string("1");
-json_object_object_add(jrequest, "requestId", jreqid);
-json_object *jclientip = json_object_new_string("123.0.0.21");
-json_object_object_add(jrequest, "clientIp", jclientip);
-json_object *jcontext = json_object_new_string("SELECT * FROM 
DDD");
-json_object_object_add(jrequest, "context", jcontext);
-
-
-return jreque

[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread stanlyxiang
Github user stanlyxiang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1058#discussion_r93179019
  
--- Diff: src/backend/libpq/be-secure.c ---
@@ -329,6 +331,7 @@ report_commerror(const char *err_msg)
 
RESUME_INTERRUPTS();
 }
+*/
--- End diff --

If it is unused now, could we remove it directly  ? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1058: HAWQ-1226. HAWQ core dump due to enable r...

2016-12-19 Thread interma
GitHub user interma opened a pull request:

https://github.com/apache/incubator-hawq/pull/1058

HAWQ-1226. HAWQ core dump due to enable ranger while RPS is down 

also include:
1. fix core dump while RPS not running
2. fix libcurl write_callback() problem
3. add libcurl timeout (hard-code 30s now)
4. fix some compile warnings
5. fix compile error: add json.h to checkinc.py

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/interma/interma-hawq HAWQ-1226

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1058.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1058


commit c663476c4413fd02ee39ae8b6c55edd9e7f60826
Author: interma 
Date:   2016-12-19T10:17:25Z

core dump while RPS not running

include:
1. core dump while RPS not running
2. libcurl write callback problem
3. libcurl timeout
4. compile warning

commit 695cf1dac824ddf61ab266dd6f7a581c075ced66
Author: interma 
Date:   2016-12-20T05:51:09Z

merge hong wu's code

commit 0ad094b167d4ce7fbccd914c9e5e8b93d39e506a
Author: interma 
Date:   2016-12-20T05:54:48Z

Merge remote-tracking branch 'origin/master' into HAWQ-1226

commit 303b5d1d48f3fd1f13c77488e5bfa0a6dab7734b
Author: interma 
Date:   2016-12-20T06:20:43Z

HAWQ-1226. HAWQ core dump due to enable ranger while RPS is down

include:
1. fix core dump while RPS not running
2. fix libcurl write_callback() problem
3. add libcurl timeout (hard-code 30s now)
4. fix some compile warnings
5. fix compile error: add json.h to checkinc.py




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1056: HAWQ-1227. Fix hawq init fails when user ...

2016-12-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1056


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (HAWQ-1226) HAWQ core dump due to enable ranger while RPS is down

2016-12-19 Thread Hongxu Ma (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hongxu Ma updated HAWQ-1226:

Summary: HAWQ core dump due to enable ranger while RPS is down   (was: HAWQ 
core dump due to enable ranger while RPS is down. )

> HAWQ core dump due to enable ranger while RPS is down 
> --
>
> Key: HAWQ-1226
> URL: https://issues.apache.org/jira/browse/HAWQ-1226
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Hongxu Ma
>Assignee: Hongxu Ma
>
> Core dump when starting hawq without starting RPS with enable_ranger is true.
> {code}
> (lldb) bt
> * thread #1: tid = 0x, 0x7fffe9264dda 
> libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
>   * frame #0: 0x7fffe9264dda libsystem_kernel.dylib`__pthread_kill + 10
> frame #1: 0x7fffe9350787 libsystem_pthread.dylib`pthread_kill + 90
> frame #2: 0x7fffe917b497 libsystem_c.dylib`raise + 26
> frame #3: 0x00010cbdd93f 
> postgres`SafeHandlerForSegvBusIll(processName="Process", 
> postgres_signal_arg=11) + 591 at elog.c:4519
> frame #4: 0x00010cbdd6cb 
> postgres`StandardHandlerForSigillSigsegvSigbus_OnMainThread(processName="Process",
>  postgres_signal_arg=11) + 43 at elog.c:4597
> frame #5: 0x00010cab66ef 
> postgres`CdbProgramErrorHandler(postgres_signal_arg=11) + 319 at 
> postgres.c:3512
> frame #6: 0x7fffe9343bba libsystem_platform.dylib`_sigtramp + 26
> frame #7: 0x7fffe916cb53 libsystem_c.dylib`strlen + 19
> frame #8: 0x00010c951215 
> postgres`parse_ranger_response(buffer=0x) + 21 at 
> rangerrest.c:59
> frame #9: 0x00010c951c8e 
> postgres`check_privilege_from_ranger(user="wuhong", kind=ACL_KIND_NAMESPACE, 
> object="template1", actions=0x7ff338036598, how=0x) + 254 
> at rangerrest.c:339
> frame #10: 0x00010c7890c4 
> postgres`pg_rangercheck(objkind=ACL_KIND_NAMESPACE, object_oid=2200, 
> roleid=10, mask=256, how=ACLMASK_ANY) + 164 at aclchk.c:2678
> frame #11: 0x00010c78b085 
> postgres`pg_namespace_aclcheck(nsp_oid=2200, roleid=10, mode=256) + 101 at 
> aclchk.c:3752
> frame #12: 0x00010c77ea48 postgres`recomputeNamespacePath + 600 at 
> namespace.c:2010
> frame #13: 0x00010c77dec1 
> postgres`RelnameGetRelid(relname="gp_segment_configuration") + 17 at 
> namespace.c:423
> frame #14: 0x00010c77db61 
> postgres`RangeVarGetRelid(relation=0x7ff3388cef60, failOK='\0', 
> allowHcatalog='\x01') + 449 at namespace.c:278
> frame #15: 0x00010c671f6e 
> postgres`CdbOpenRelationRv(relation=0x7ff3388cef60, reqmode=3, 
> noWait='\0', lockUpgraded=0x) + 46 at heapam.c:1075
> frame #16: 0x00010c7f718c 
> postgres`setTargetTable(pstate=0x7ff3388cf460, 
> relation=0x7ff3388cef60, inh='\x01', alsoSource='\x01', requiredPerms=8) 
> + 140 at parse_clause.c:866
> frame #17: 0x00010c7b9a6e 
> postgres`transformDeleteStmt(pstate=0x7ff3388cf460, 
> stmt=0x7ff3388cf3c0) + 174 at analyze.c:943
> frame #18: 0x00010c7b5249 
> postgres`transformStmt(pstate=0x7ff3388cf460, 
> parseTree=0x7ff3388cf3c0, extras_before=0x7fff535bcba0, 
> extras_after=0x7fff535bcb98) + 841 at analyze.c:769
> frame #19: 0x00010c7a5b60 
> postgres`do_parse_analyze(parseTree=0x7ff3388cf3c0, 
> pstate=0x7ff3388cf460) + 112 at analyze.c:497
> frame #20: 0x00010c7a5acf 
> postgres`parse_analyze(parseTree=0x7ff3388cf3c0, sourceText="DELETE FROM 
> gp_segment_configuration WHERE role = 'p' or role = 'm'", 
> paramTypes=0x, numParams=0) + 95 at analyze.c:351
> frame #21: 0x00010cab5960 
> postgres`pg_analyze_and_rewrite(parsetree=0x7ff3388cf3c0, 
> query_string="DELETE FROM gp_segment_configuration WHERE role = 'p' or role = 
> 'm'", paramTypes=0x, numParams=0) + 64 at postgres.c:812
> frame #22: 0x00010caba448 
> postgres`exec_simple_query(query_string="DELETE FROM gp_segment_configuration 
> WHERE role = 'p' or role = 'm'", seqServerHost=0x, 
> seqServerPort=-1) + 1416 at postgres.c:1739
> frame #23: 0x00010cab8b15 postgres`PostgresMain(argc=8, 
> argv=0x7ff338818698, username="wuhong") + 7189 at postgres.c:4840
> frame #24: 0x00010ca62295 
> postgres`BackendRun(port=0x7ff337416a60) + 981 at postmaster.c:5915
> frame #25: 0x00010ca5f6e5 
> postgres`BackendStartup(port=0x7ff337416a60) + 373 at postmaster.c:5484
> frame #26: 0x00010ca5cbb0 postgres`ServerLoop + 1248 at 
> postmaster.c:2163
> frame #27: 0x00010ca5b2e3 postgres`PostmasterMain(argc=9, 
> argv=0x7ff337415af0) + 4835 at postmaster.c:1454
> frame #28: 0x00010c96742c postgres`main(argc=9, 
> argv=0x7ff337415af0) 

[jira] [Updated] (HAWQ-1226) HAWQ core dump due to enable ranger while RPS is down.

2016-12-19 Thread Hongxu Ma (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hongxu Ma updated HAWQ-1226:

Summary: HAWQ core dump due to enable ranger while RPS is down.   (was: 
HAWQ core dump due to Enable ranger while RPS is down. )

> HAWQ core dump due to enable ranger while RPS is down. 
> ---
>
> Key: HAWQ-1226
> URL: https://issues.apache.org/jira/browse/HAWQ-1226
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Hongxu Ma
>Assignee: Hongxu Ma
>
> Core dump when starting hawq without starting RPS with enable_ranger is true.
> {code}
> (lldb) bt
> * thread #1: tid = 0x, 0x7fffe9264dda 
> libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
>   * frame #0: 0x7fffe9264dda libsystem_kernel.dylib`__pthread_kill + 10
> frame #1: 0x7fffe9350787 libsystem_pthread.dylib`pthread_kill + 90
> frame #2: 0x7fffe917b497 libsystem_c.dylib`raise + 26
> frame #3: 0x00010cbdd93f 
> postgres`SafeHandlerForSegvBusIll(processName="Process", 
> postgres_signal_arg=11) + 591 at elog.c:4519
> frame #4: 0x00010cbdd6cb 
> postgres`StandardHandlerForSigillSigsegvSigbus_OnMainThread(processName="Process",
>  postgres_signal_arg=11) + 43 at elog.c:4597
> frame #5: 0x00010cab66ef 
> postgres`CdbProgramErrorHandler(postgres_signal_arg=11) + 319 at 
> postgres.c:3512
> frame #6: 0x7fffe9343bba libsystem_platform.dylib`_sigtramp + 26
> frame #7: 0x7fffe916cb53 libsystem_c.dylib`strlen + 19
> frame #8: 0x00010c951215 
> postgres`parse_ranger_response(buffer=0x) + 21 at 
> rangerrest.c:59
> frame #9: 0x00010c951c8e 
> postgres`check_privilege_from_ranger(user="wuhong", kind=ACL_KIND_NAMESPACE, 
> object="template1", actions=0x7ff338036598, how=0x) + 254 
> at rangerrest.c:339
> frame #10: 0x00010c7890c4 
> postgres`pg_rangercheck(objkind=ACL_KIND_NAMESPACE, object_oid=2200, 
> roleid=10, mask=256, how=ACLMASK_ANY) + 164 at aclchk.c:2678
> frame #11: 0x00010c78b085 
> postgres`pg_namespace_aclcheck(nsp_oid=2200, roleid=10, mode=256) + 101 at 
> aclchk.c:3752
> frame #12: 0x00010c77ea48 postgres`recomputeNamespacePath + 600 at 
> namespace.c:2010
> frame #13: 0x00010c77dec1 
> postgres`RelnameGetRelid(relname="gp_segment_configuration") + 17 at 
> namespace.c:423
> frame #14: 0x00010c77db61 
> postgres`RangeVarGetRelid(relation=0x7ff3388cef60, failOK='\0', 
> allowHcatalog='\x01') + 449 at namespace.c:278
> frame #15: 0x00010c671f6e 
> postgres`CdbOpenRelationRv(relation=0x7ff3388cef60, reqmode=3, 
> noWait='\0', lockUpgraded=0x) + 46 at heapam.c:1075
> frame #16: 0x00010c7f718c 
> postgres`setTargetTable(pstate=0x7ff3388cf460, 
> relation=0x7ff3388cef60, inh='\x01', alsoSource='\x01', requiredPerms=8) 
> + 140 at parse_clause.c:866
> frame #17: 0x00010c7b9a6e 
> postgres`transformDeleteStmt(pstate=0x7ff3388cf460, 
> stmt=0x7ff3388cf3c0) + 174 at analyze.c:943
> frame #18: 0x00010c7b5249 
> postgres`transformStmt(pstate=0x7ff3388cf460, 
> parseTree=0x7ff3388cf3c0, extras_before=0x7fff535bcba0, 
> extras_after=0x7fff535bcb98) + 841 at analyze.c:769
> frame #19: 0x00010c7a5b60 
> postgres`do_parse_analyze(parseTree=0x7ff3388cf3c0, 
> pstate=0x7ff3388cf460) + 112 at analyze.c:497
> frame #20: 0x00010c7a5acf 
> postgres`parse_analyze(parseTree=0x7ff3388cf3c0, sourceText="DELETE FROM 
> gp_segment_configuration WHERE role = 'p' or role = 'm'", 
> paramTypes=0x, numParams=0) + 95 at analyze.c:351
> frame #21: 0x00010cab5960 
> postgres`pg_analyze_and_rewrite(parsetree=0x7ff3388cf3c0, 
> query_string="DELETE FROM gp_segment_configuration WHERE role = 'p' or role = 
> 'm'", paramTypes=0x, numParams=0) + 64 at postgres.c:812
> frame #22: 0x00010caba448 
> postgres`exec_simple_query(query_string="DELETE FROM gp_segment_configuration 
> WHERE role = 'p' or role = 'm'", seqServerHost=0x, 
> seqServerPort=-1) + 1416 at postgres.c:1739
> frame #23: 0x00010cab8b15 postgres`PostgresMain(argc=8, 
> argv=0x7ff338818698, username="wuhong") + 7189 at postgres.c:4840
> frame #24: 0x00010ca62295 
> postgres`BackendRun(port=0x7ff337416a60) + 981 at postmaster.c:5915
> frame #25: 0x00010ca5f6e5 
> postgres`BackendStartup(port=0x7ff337416a60) + 373 at postmaster.c:5484
> frame #26: 0x00010ca5cbb0 postgres`ServerLoop + 1248 at 
> postmaster.c:2163
> frame #27: 0x00010ca5b2e3 postgres`PostmasterMain(argc=9, 
> argv=0x7ff337415af0) + 4835 at postmaster.c:1454
> frame #28: 0x00010c96742c postgres`main(argc=9, 
> argv=0x7ff337415af

[jira] [Updated] (HAWQ-1226) HAWQ core dump due to Enable ranger while RPS is down.

2016-12-19 Thread Hongxu Ma (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hongxu Ma updated HAWQ-1226:

Summary: HAWQ core dump due to Enable ranger while RPS is down.   (was: 
Enable ranger while RPS is down cause HAWQ to core dump)

> HAWQ core dump due to Enable ranger while RPS is down. 
> ---
>
> Key: HAWQ-1226
> URL: https://issues.apache.org/jira/browse/HAWQ-1226
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Hongxu Ma
>Assignee: Hongxu Ma
>
> Core dump when starting hawq without starting RPS with enable_ranger is true.
> {code}
> (lldb) bt
> * thread #1: tid = 0x, 0x7fffe9264dda 
> libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
>   * frame #0: 0x7fffe9264dda libsystem_kernel.dylib`__pthread_kill + 10
> frame #1: 0x7fffe9350787 libsystem_pthread.dylib`pthread_kill + 90
> frame #2: 0x7fffe917b497 libsystem_c.dylib`raise + 26
> frame #3: 0x00010cbdd93f 
> postgres`SafeHandlerForSegvBusIll(processName="Process", 
> postgres_signal_arg=11) + 591 at elog.c:4519
> frame #4: 0x00010cbdd6cb 
> postgres`StandardHandlerForSigillSigsegvSigbus_OnMainThread(processName="Process",
>  postgres_signal_arg=11) + 43 at elog.c:4597
> frame #5: 0x00010cab66ef 
> postgres`CdbProgramErrorHandler(postgres_signal_arg=11) + 319 at 
> postgres.c:3512
> frame #6: 0x7fffe9343bba libsystem_platform.dylib`_sigtramp + 26
> frame #7: 0x7fffe916cb53 libsystem_c.dylib`strlen + 19
> frame #8: 0x00010c951215 
> postgres`parse_ranger_response(buffer=0x) + 21 at 
> rangerrest.c:59
> frame #9: 0x00010c951c8e 
> postgres`check_privilege_from_ranger(user="wuhong", kind=ACL_KIND_NAMESPACE, 
> object="template1", actions=0x7ff338036598, how=0x) + 254 
> at rangerrest.c:339
> frame #10: 0x00010c7890c4 
> postgres`pg_rangercheck(objkind=ACL_KIND_NAMESPACE, object_oid=2200, 
> roleid=10, mask=256, how=ACLMASK_ANY) + 164 at aclchk.c:2678
> frame #11: 0x00010c78b085 
> postgres`pg_namespace_aclcheck(nsp_oid=2200, roleid=10, mode=256) + 101 at 
> aclchk.c:3752
> frame #12: 0x00010c77ea48 postgres`recomputeNamespacePath + 600 at 
> namespace.c:2010
> frame #13: 0x00010c77dec1 
> postgres`RelnameGetRelid(relname="gp_segment_configuration") + 17 at 
> namespace.c:423
> frame #14: 0x00010c77db61 
> postgres`RangeVarGetRelid(relation=0x7ff3388cef60, failOK='\0', 
> allowHcatalog='\x01') + 449 at namespace.c:278
> frame #15: 0x00010c671f6e 
> postgres`CdbOpenRelationRv(relation=0x7ff3388cef60, reqmode=3, 
> noWait='\0', lockUpgraded=0x) + 46 at heapam.c:1075
> frame #16: 0x00010c7f718c 
> postgres`setTargetTable(pstate=0x7ff3388cf460, 
> relation=0x7ff3388cef60, inh='\x01', alsoSource='\x01', requiredPerms=8) 
> + 140 at parse_clause.c:866
> frame #17: 0x00010c7b9a6e 
> postgres`transformDeleteStmt(pstate=0x7ff3388cf460, 
> stmt=0x7ff3388cf3c0) + 174 at analyze.c:943
> frame #18: 0x00010c7b5249 
> postgres`transformStmt(pstate=0x7ff3388cf460, 
> parseTree=0x7ff3388cf3c0, extras_before=0x7fff535bcba0, 
> extras_after=0x7fff535bcb98) + 841 at analyze.c:769
> frame #19: 0x00010c7a5b60 
> postgres`do_parse_analyze(parseTree=0x7ff3388cf3c0, 
> pstate=0x7ff3388cf460) + 112 at analyze.c:497
> frame #20: 0x00010c7a5acf 
> postgres`parse_analyze(parseTree=0x7ff3388cf3c0, sourceText="DELETE FROM 
> gp_segment_configuration WHERE role = 'p' or role = 'm'", 
> paramTypes=0x, numParams=0) + 95 at analyze.c:351
> frame #21: 0x00010cab5960 
> postgres`pg_analyze_and_rewrite(parsetree=0x7ff3388cf3c0, 
> query_string="DELETE FROM gp_segment_configuration WHERE role = 'p' or role = 
> 'm'", paramTypes=0x, numParams=0) + 64 at postgres.c:812
> frame #22: 0x00010caba448 
> postgres`exec_simple_query(query_string="DELETE FROM gp_segment_configuration 
> WHERE role = 'p' or role = 'm'", seqServerHost=0x, 
> seqServerPort=-1) + 1416 at postgres.c:1739
> frame #23: 0x00010cab8b15 postgres`PostgresMain(argc=8, 
> argv=0x7ff338818698, username="wuhong") + 7189 at postgres.c:4840
> frame #24: 0x00010ca62295 
> postgres`BackendRun(port=0x7ff337416a60) + 981 at postmaster.c:5915
> frame #25: 0x00010ca5f6e5 
> postgres`BackendStartup(port=0x7ff337416a60) + 373 at postmaster.c:5484
> frame #26: 0x00010ca5cbb0 postgres`ServerLoop + 1248 at 
> postmaster.c:2163
> frame #27: 0x00010ca5b2e3 postgres`PostmasterMain(argc=9, 
> argv=0x7ff337415af0) + 4835 at postmaster.c:1454
> frame #28: 0x00010c96742c postgres`main(argc=9, 
> argv=0x7ff337415af

[jira] [Updated] (HAWQ-1226) Enable ranger while RPS is down cause HAWQ to core dump

2016-12-19 Thread Hongxu Ma (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hongxu Ma updated HAWQ-1226:

Summary: Enable ranger while RPS is down cause HAWQ to core dump  (was: 
Enable ranger while RPS is down will cause HAWQ to core dump)

> Enable ranger while RPS is down cause HAWQ to core dump
> ---
>
> Key: HAWQ-1226
> URL: https://issues.apache.org/jira/browse/HAWQ-1226
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Hongxu Ma
>Assignee: Hongxu Ma
>
> Core dump when starting hawq without starting RPS with enable_ranger is true.
> {code}
> (lldb) bt
> * thread #1: tid = 0x, 0x7fffe9264dda 
> libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
>   * frame #0: 0x7fffe9264dda libsystem_kernel.dylib`__pthread_kill + 10
> frame #1: 0x7fffe9350787 libsystem_pthread.dylib`pthread_kill + 90
> frame #2: 0x7fffe917b497 libsystem_c.dylib`raise + 26
> frame #3: 0x00010cbdd93f 
> postgres`SafeHandlerForSegvBusIll(processName="Process", 
> postgres_signal_arg=11) + 591 at elog.c:4519
> frame #4: 0x00010cbdd6cb 
> postgres`StandardHandlerForSigillSigsegvSigbus_OnMainThread(processName="Process",
>  postgres_signal_arg=11) + 43 at elog.c:4597
> frame #5: 0x00010cab66ef 
> postgres`CdbProgramErrorHandler(postgres_signal_arg=11) + 319 at 
> postgres.c:3512
> frame #6: 0x7fffe9343bba libsystem_platform.dylib`_sigtramp + 26
> frame #7: 0x7fffe916cb53 libsystem_c.dylib`strlen + 19
> frame #8: 0x00010c951215 
> postgres`parse_ranger_response(buffer=0x) + 21 at 
> rangerrest.c:59
> frame #9: 0x00010c951c8e 
> postgres`check_privilege_from_ranger(user="wuhong", kind=ACL_KIND_NAMESPACE, 
> object="template1", actions=0x7ff338036598, how=0x) + 254 
> at rangerrest.c:339
> frame #10: 0x00010c7890c4 
> postgres`pg_rangercheck(objkind=ACL_KIND_NAMESPACE, object_oid=2200, 
> roleid=10, mask=256, how=ACLMASK_ANY) + 164 at aclchk.c:2678
> frame #11: 0x00010c78b085 
> postgres`pg_namespace_aclcheck(nsp_oid=2200, roleid=10, mode=256) + 101 at 
> aclchk.c:3752
> frame #12: 0x00010c77ea48 postgres`recomputeNamespacePath + 600 at 
> namespace.c:2010
> frame #13: 0x00010c77dec1 
> postgres`RelnameGetRelid(relname="gp_segment_configuration") + 17 at 
> namespace.c:423
> frame #14: 0x00010c77db61 
> postgres`RangeVarGetRelid(relation=0x7ff3388cef60, failOK='\0', 
> allowHcatalog='\x01') + 449 at namespace.c:278
> frame #15: 0x00010c671f6e 
> postgres`CdbOpenRelationRv(relation=0x7ff3388cef60, reqmode=3, 
> noWait='\0', lockUpgraded=0x) + 46 at heapam.c:1075
> frame #16: 0x00010c7f718c 
> postgres`setTargetTable(pstate=0x7ff3388cf460, 
> relation=0x7ff3388cef60, inh='\x01', alsoSource='\x01', requiredPerms=8) 
> + 140 at parse_clause.c:866
> frame #17: 0x00010c7b9a6e 
> postgres`transformDeleteStmt(pstate=0x7ff3388cf460, 
> stmt=0x7ff3388cf3c0) + 174 at analyze.c:943
> frame #18: 0x00010c7b5249 
> postgres`transformStmt(pstate=0x7ff3388cf460, 
> parseTree=0x7ff3388cf3c0, extras_before=0x7fff535bcba0, 
> extras_after=0x7fff535bcb98) + 841 at analyze.c:769
> frame #19: 0x00010c7a5b60 
> postgres`do_parse_analyze(parseTree=0x7ff3388cf3c0, 
> pstate=0x7ff3388cf460) + 112 at analyze.c:497
> frame #20: 0x00010c7a5acf 
> postgres`parse_analyze(parseTree=0x7ff3388cf3c0, sourceText="DELETE FROM 
> gp_segment_configuration WHERE role = 'p' or role = 'm'", 
> paramTypes=0x, numParams=0) + 95 at analyze.c:351
> frame #21: 0x00010cab5960 
> postgres`pg_analyze_and_rewrite(parsetree=0x7ff3388cf3c0, 
> query_string="DELETE FROM gp_segment_configuration WHERE role = 'p' or role = 
> 'm'", paramTypes=0x, numParams=0) + 64 at postgres.c:812
> frame #22: 0x00010caba448 
> postgres`exec_simple_query(query_string="DELETE FROM gp_segment_configuration 
> WHERE role = 'p' or role = 'm'", seqServerHost=0x, 
> seqServerPort=-1) + 1416 at postgres.c:1739
> frame #23: 0x00010cab8b15 postgres`PostgresMain(argc=8, 
> argv=0x7ff338818698, username="wuhong") + 7189 at postgres.c:4840
> frame #24: 0x00010ca62295 
> postgres`BackendRun(port=0x7ff337416a60) + 981 at postmaster.c:5915
> frame #25: 0x00010ca5f6e5 
> postgres`BackendStartup(port=0x7ff337416a60) + 373 at postmaster.c:5484
> frame #26: 0x00010ca5cbb0 postgres`ServerLoop + 1248 at 
> postmaster.c:2163
> frame #27: 0x00010ca5b2e3 postgres`PostmasterMain(argc=9, 
> argv=0x7ff337415af0) + 4835 at postmaster.c:1454
> frame #28: 0x00010c96742c postgres`main(argc=9, 
> argv=0x7ff337

[jira] [Updated] (HAWQ-1226) Enable ranger while RPS is down will cause HAWQ to core dump

2016-12-19 Thread Hongxu Ma (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hongxu Ma updated HAWQ-1226:

Summary: Enable ranger while RPS is down will cause HAWQ to core dump  
(was: Enable ranger while RPS is down will cause HAWQ core dump)

> Enable ranger while RPS is down will cause HAWQ to core dump
> 
>
> Key: HAWQ-1226
> URL: https://issues.apache.org/jira/browse/HAWQ-1226
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Hongxu Ma
>Assignee: Hongxu Ma
>
> Core dump when starting hawq without starting RPS with enable_ranger is true.
> {code}
> (lldb) bt
> * thread #1: tid = 0x, 0x7fffe9264dda 
> libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
>   * frame #0: 0x7fffe9264dda libsystem_kernel.dylib`__pthread_kill + 10
> frame #1: 0x7fffe9350787 libsystem_pthread.dylib`pthread_kill + 90
> frame #2: 0x7fffe917b497 libsystem_c.dylib`raise + 26
> frame #3: 0x00010cbdd93f 
> postgres`SafeHandlerForSegvBusIll(processName="Process", 
> postgres_signal_arg=11) + 591 at elog.c:4519
> frame #4: 0x00010cbdd6cb 
> postgres`StandardHandlerForSigillSigsegvSigbus_OnMainThread(processName="Process",
>  postgres_signal_arg=11) + 43 at elog.c:4597
> frame #5: 0x00010cab66ef 
> postgres`CdbProgramErrorHandler(postgres_signal_arg=11) + 319 at 
> postgres.c:3512
> frame #6: 0x7fffe9343bba libsystem_platform.dylib`_sigtramp + 26
> frame #7: 0x7fffe916cb53 libsystem_c.dylib`strlen + 19
> frame #8: 0x00010c951215 
> postgres`parse_ranger_response(buffer=0x) + 21 at 
> rangerrest.c:59
> frame #9: 0x00010c951c8e 
> postgres`check_privilege_from_ranger(user="wuhong", kind=ACL_KIND_NAMESPACE, 
> object="template1", actions=0x7ff338036598, how=0x) + 254 
> at rangerrest.c:339
> frame #10: 0x00010c7890c4 
> postgres`pg_rangercheck(objkind=ACL_KIND_NAMESPACE, object_oid=2200, 
> roleid=10, mask=256, how=ACLMASK_ANY) + 164 at aclchk.c:2678
> frame #11: 0x00010c78b085 
> postgres`pg_namespace_aclcheck(nsp_oid=2200, roleid=10, mode=256) + 101 at 
> aclchk.c:3752
> frame #12: 0x00010c77ea48 postgres`recomputeNamespacePath + 600 at 
> namespace.c:2010
> frame #13: 0x00010c77dec1 
> postgres`RelnameGetRelid(relname="gp_segment_configuration") + 17 at 
> namespace.c:423
> frame #14: 0x00010c77db61 
> postgres`RangeVarGetRelid(relation=0x7ff3388cef60, failOK='\0', 
> allowHcatalog='\x01') + 449 at namespace.c:278
> frame #15: 0x00010c671f6e 
> postgres`CdbOpenRelationRv(relation=0x7ff3388cef60, reqmode=3, 
> noWait='\0', lockUpgraded=0x) + 46 at heapam.c:1075
> frame #16: 0x00010c7f718c 
> postgres`setTargetTable(pstate=0x7ff3388cf460, 
> relation=0x7ff3388cef60, inh='\x01', alsoSource='\x01', requiredPerms=8) 
> + 140 at parse_clause.c:866
> frame #17: 0x00010c7b9a6e 
> postgres`transformDeleteStmt(pstate=0x7ff3388cf460, 
> stmt=0x7ff3388cf3c0) + 174 at analyze.c:943
> frame #18: 0x00010c7b5249 
> postgres`transformStmt(pstate=0x7ff3388cf460, 
> parseTree=0x7ff3388cf3c0, extras_before=0x7fff535bcba0, 
> extras_after=0x7fff535bcb98) + 841 at analyze.c:769
> frame #19: 0x00010c7a5b60 
> postgres`do_parse_analyze(parseTree=0x7ff3388cf3c0, 
> pstate=0x7ff3388cf460) + 112 at analyze.c:497
> frame #20: 0x00010c7a5acf 
> postgres`parse_analyze(parseTree=0x7ff3388cf3c0, sourceText="DELETE FROM 
> gp_segment_configuration WHERE role = 'p' or role = 'm'", 
> paramTypes=0x, numParams=0) + 95 at analyze.c:351
> frame #21: 0x00010cab5960 
> postgres`pg_analyze_and_rewrite(parsetree=0x7ff3388cf3c0, 
> query_string="DELETE FROM gp_segment_configuration WHERE role = 'p' or role = 
> 'm'", paramTypes=0x, numParams=0) + 64 at postgres.c:812
> frame #22: 0x00010caba448 
> postgres`exec_simple_query(query_string="DELETE FROM gp_segment_configuration 
> WHERE role = 'p' or role = 'm'", seqServerHost=0x, 
> seqServerPort=-1) + 1416 at postgres.c:1739
> frame #23: 0x00010cab8b15 postgres`PostgresMain(argc=8, 
> argv=0x7ff338818698, username="wuhong") + 7189 at postgres.c:4840
> frame #24: 0x00010ca62295 
> postgres`BackendRun(port=0x7ff337416a60) + 981 at postmaster.c:5915
> frame #25: 0x00010ca5f6e5 
> postgres`BackendStartup(port=0x7ff337416a60) + 373 at postmaster.c:5484
> frame #26: 0x00010ca5cbb0 postgres`ServerLoop + 1248 at 
> postmaster.c:2163
> frame #27: 0x00010ca5b2e3 postgres`PostmasterMain(argc=9, 
> argv=0x7ff337415af0) + 4835 at postmaster.c:1454
> frame #28: 0x00010c96742c postgres`main(argc=9, 
> argv=

[GitHub] incubator-hawq pull request #1057: HAWQ-1221. Add register test case verify ...

2016-12-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1057


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1057: HAWQ-1221. Add register test case verify bug fix...

2016-12-19 Thread stanlyxiang
Github user stanlyxiang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1057
  
@paul-guo-  modified. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1057: HAWQ-1221. Add test case verify for bug fix

2016-12-19 Thread paul-guo-
Github user paul-guo- commented on the issue:

https://github.com/apache/incubator-hawq/pull/1057
  
The JIRA title should be more accurate.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1057: HAWQ-1221. Add test case verify for bug fix

2016-12-19 Thread linwen
Github user linwen commented on the issue:

https://github.com/apache/incubator-hawq/pull/1057
  
+1 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1057: HAWQ-1221. Add test case verify for bug fix

2016-12-19 Thread zhangh43
Github user zhangh43 commented on the issue:

https://github.com/apache/incubator-hawq/pull/1057
  
+1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (HAWQ-1145) After registering a partition table, if we want to insert some data into the table, it fails.

2016-12-19 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu resolved HAWQ-1145.
--
Resolution: Fixed
  Assignee: Chunling Wang  (was: Hubert Zhang)

> After registering a partition table, if we want to insert some data into the 
> table, it fails.
> -
>
> Key: HAWQ-1145
> URL: https://issues.apache.org/jira/browse/HAWQ-1145
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: Chunling Wang
> Fix For: 2.0.1.0-incubating
>
> Attachments: dbgen, dists.dss
>
>
> Reproduce Steps:
> 1. Create a partition table
> {code}
> CREATE TABLE parquet_LINEITEM_uncompressed(   
>   
>   
>   
>  L_ORDERKEY INT8, 
>   
>   
>   
>  L_PARTKEY BIGINT,
>   
>   
>   
>  L_SUPPKEY BIGINT,
>   
>   
>   
>  L_LINENUMBER BIGINT, 
>   
>   
>   
>  L_QUANTITY decimal,  
>   
>   
>   
>  L_EXTENDEDPRICE decimal, 
>   
>   
>   
>  L_DISCOUNT decimal,  
>   
>   
>   
>  L_TAX decimal,   
>   
>   
>   
>  L_RETURNFLAG CHAR(1),
>   
>   
>   
>  L_LINESTATUS 
> CHAR(1),  
>   
>   
>  
> L_SHIPDATE date,  
>   
>   
>   
> L_COMMITDATE date,
> 

[jira] [Resolved] (HAWQ-1004) Implement calling Ranger REST Service using libcurl.

2016-12-19 Thread Lin Wen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lin Wen resolved HAWQ-1004.
---
Resolution: Fixed

> Implement calling Ranger REST Service using libcurl.
> 
>
> Key: HAWQ-1004
> URL: https://issues.apache.org/jira/browse/HAWQ-1004
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Lili Ma
>Assignee: Lin Wen
> Fix For: backlog
>
>
> Decide How HAWQ connect Ranger, through which user, how to connect to REST 
> Server
> Acceptance Criteria: 
> Provide an interface for HAWQ connecting Ranger REST Server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-832) Integrate ICG to Gtest

2016-12-19 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu resolved HAWQ-832.
-
Resolution: Done

> Integrate ICG to Gtest
> --
>
> Key: HAWQ-832
> URL: https://issues.apache.org/jira/browse/HAWQ-832
> Project: Apache HAWQ
>  Issue Type: Test
>  Components: Tests
>Reporter: Jiali Yao
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
> Attachments: GoogleTest.pdf
>
>
> In HAWQ test, google test is used for libyarn and libhdfs test. Install check 
> test framework is used for smoke test and has a lot of limitations. To make 
> it easy to learn and consolidate test, we want to unify the two frameworks. 
> Considering below factors, we want to use google test: 
> It supports more functions and then a developer can write more complex tests 
> which are not only limited to SQL test.  
> Google test support run test parallelly. 
> Google mock is an extension for google test, it can also be used for unit 
> test. 
> Please see the attach file for detail. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq pull request #1052: HAWQ-1004. Implement calling Ranger REST ...

2016-12-19 Thread linwen
Github user linwen commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1052#discussion_r93160802
  
--- Diff: src/backend/libpq/rangerrest.c ---
@@ -0,0 +1,551 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*-
+ *
+ * rangerrest.c
+ * routines to interact with Ranger REST API
+ *
+ *-
+ */
+#include "postgres.h"
+
+#include 
+
+#include "utils/acl.h"
+#include "utils/guc.h"
+#include "utils/rangerrest.h"
+
+/*
+ * Internal buffer for libcurl context
+ */
+typedef struct curl_context_t
+{
+CURL* curl_handle;
+
+char curl_error_buffer[CURL_ERROR_SIZE];
+
+int curl_still_running;
+
+struct
+{
+char* buffer;
+int size;
+} response;
+
+char* last_http_reponse;
+} curl_context_t;
+typedef curl_context_t* CURL_HANDLE;
+
+RangerACLResult parse_ranger_response(char* buffer)
+{
+Assert(buffer != NULL);
+if (strlen(buffer) == 0)
+return RANGERCHECK_UNKNOWN;
+
+elog(LOG, "read from Ranger Restful API: %s", buffer);
+
+struct json_object *response = json_tokener_parse(buffer);
+struct json_object *accessObj = json_object_object_get(response, 
"access");
+
+int arraylen = json_object_array_length(accessObj);
+elog(LOG, "Array Length: %dn",arraylen);
+
+json_object * jvalue;
+json_object * jallow;
+json_bool result;
+// here should return which table's acl check failed in future.
+for (int i=0; i< arraylen; i++){
+  jvalue = json_object_array_get_idx(accessObj, i);
+  jallow = json_object_object_get(jvalue, "allowed");
+  result = json_object_get_boolean(jallow);
+  if(result != 1){
+return RANGERCHECK_NO_PRIV;
+  }
+}
+return RANGERCHECK_OK;
+
+}
+
+/*
+ * A mapping from AclObjectKind to string
+ */
+char* AclObjectKindStr[] =
+{
+"table", /* pg_class */
+"sequence",  /* pg_sequence */
+"database",  /* pg_database */
+"function",  /* pg_proc */
+"operator",  /* pg_operator */
+"type",  /* pg_type */
+"language",  /* pg_language */
+"namespace", /* pg_namespace */
+"oplass",/* pg_opclass */
+"conversion",/* pg_conversion */
+"tablespace",/* pg_tablespace */
+"filespace", /* pg_filespace */
+"filesystem",/* pg_filesystem */
+"fdw",   /* pg_foreign_data_wrapper */
+"foreign_server",/* pg_foreign_server */
+"protocol",  /* pg_extprotocol */
+"none"   /* MUST BE LAST */
+};
+
+/*
+ * args: List of RangerRequestJsonArgs
+ */
+json_object *create_ranger_request_json_batch(List *args)
+{
+  json_object *juser = NULL;
+  json_object *jaccess = json_object_new_array();
+  json_object *jrequest = json_object_new_object();
+  char *user = NULL;
+  ListCell *arg;
+  
+  foreach(arg, args)
+  {
+RangerRequestJsonArgs *arg_ptr = (RangerRequestJsonArgs *) lfirst(arg);
+if (user == NULL)
+{
+  user = arg_ptr->user;
+  juser = json_object_new_string(user);
+}
+AclObjectKind kind = arg_ptr->kind;
+char* object = arg_ptr->object;
+char* how = arg_ptr->how;
--- End diff --

Yes. We just leave it there, will modify it later. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastruc

[jira] [Assigned] (HAWQ-832) Integrate ICG to Gtest

2016-12-19 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu reassigned HAWQ-832:
---

Assignee: hongwu  (was: Jiali Yao)

> Integrate ICG to Gtest
> --
>
> Key: HAWQ-832
> URL: https://issues.apache.org/jira/browse/HAWQ-832
> Project: Apache HAWQ
>  Issue Type: Test
>  Components: Tests
>Reporter: Jiali Yao
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
> Attachments: GoogleTest.pdf
>
>
> In HAWQ test, google test is used for libyarn and libhdfs test. Install check 
> test framework is used for smoke test and has a lot of limitations. To make 
> it easy to learn and consolidate test, we want to unify the two frameworks. 
> Considering below factors, we want to use google test: 
> It supports more functions and then a developer can write more complex tests 
> which are not only limited to SQL test.  
> Google test support run test parallelly. 
> Google mock is an extension for google test, it can also be used for unit 
> test. 
> Please see the attach file for detail. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1044) Verify the correctness of hawq register

2016-12-19 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu resolved HAWQ-1044.
--
Resolution: Done

> Verify the correctness of hawq register
> ---
>
> Key: HAWQ-1044
> URL: https://issues.apache.org/jira/browse/HAWQ-1044
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: Lili Ma
>Assignee: hongwu
> Fix For: backlog
>
>
> Verify the correctness of hawq register, summary all the use scenarios and 
> design corresponding test cases for it.
> I think following test cases should be added for the HAWQ register.
> 1. Use Case 1: Register file/folder into HAWQ by specifying file/folder name
> a) hawq register -d postgres -f a.file tableA
> b) hawq register -d postgres -f a.file -e eof tableA
> c) hawq register -d postgres -f folderA tableA
> d) register file to existing table. normal path
> e) register file to existing table. error path: to-be-registered files under 
> the file folder for the existing table on HDFS. Should throw error out.
> f) verify wrong input file. The file format not parquet format.
> 2. Use case 2: Register into HAWQ table using .yml configuration file to a 
> non-existing table
> a) Verify normal input:
> create table a(a int, b int);
> insert into a values(generate_series(1,100), 25);
> hawq extract -d postgres -o a.yml a
> hawq register -d postgres -c a.yml b
> b) Modify the fileSize in .yml file to a value which is different from actual 
> data size of data file
> 3. Use Case 2: Regsiter into HAWQ table using .yml configuration file to an 
> existing table
> a) Verify normal path:
> Call multiple times of hawq register, to verify whether can succeed. Each 
> time the to-be-registered files are not under the table directory.
> b) Error path: to-be-registered files under the file folder for the existing 
> table on HDFS
> Should throw error out: not support!
> 4. Use Case 2: Register into HAWQ table using .yml configuration file by 
> specifying --force option
> a) The table not exist: should create a new table, and do the register
> b) The table already exist, but no data there: can directly call hawq register
> c) Table already exist, and already data there -- normal path: .yml 
> configuration file includes the data files under table directory, and 
> just include those data files.
> d) Table already exist, and already data there -- normal path: .yml 
> configuration file includes the data files under table directory, and 
> also includes data files not under table directory.
> e) Table already exist, and already data there -- error path: .yml 
> configuration file doesn't include the data files under that table directory. 
> Should throw error out, "there are already existing files under the table, 
> but not included in .yml configuration file"
> 5. Use Case 2: Register into HAWQ table using .yml configuration file by 
> specifying --repair option
> a) Normal Path 1: (Append to new file)
> create a tableA
> insert some data into tableA
> call hawq extract the metadata to a.yml file
> insert new data into tableA
> call hawq register --repair option to rollback to the state
> b) Normal Path 2: (New files generated)
> Same as Normal Path 1, but during the second insert, use multiple inserts 
> concurrenly aiming at producing new files. Then call hawq register --repair,
> the new files should be discarded.
> c) Error Path: restributed
> Create a table with hash-distributed, distributed by column A
> insert some data into tableA
> call hawq extract the metadata to a.yml file
> alter table redistributed by column B
> insert new data into tableA
> call hawq register --repair option to rollback to the state  
> --> should throw error "the table is redistributed"
> d) Error Path: table being truncated
> Create a table with hash-distributed, distributed by column A
> insert some data into tableA
> call hawq extract the metadata to a.yml file
> truncate tableA
> call hawq register --repair option to rollback to the state  
> --> should throw error "the table becomes smaller than the .yml config file 
> specified."
> e) Error Path: files specified in .yml configuration not under data directory 
> of table A
> --> should throw error "the files should all under the table directory when 
> --repair option specified for hawq register"
> 6. hawq register partition table support
> a) Normal Path: create a 1-level partition table, calling hawq extract and 
> then hawq register, can work
> b) Error Path: create a 2-level partition table, calling hawq extract and 
> then hawq register, 
> --> should throw error "only supports 1-level partition table"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1037) modify way to get HDFS port in TestHawqRegister

2016-12-19 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu resolved HAWQ-1037.
--
Resolution: Fixed

> modify way to get HDFS port in TestHawqRegister
> ---
>
> Key: HAWQ-1037
> URL: https://issues.apache.org/jira/browse/HAWQ-1037
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Tests
>Reporter: Chunling Wang
>Assignee: Chunling Wang
> Fix For: backlog
>
>
> In test TestHawqRegister, the HDFS port is hard-coded. Now we get the HDFS 
> port from HdfsConfig.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-955) Add script for feature test running in parallel

2016-12-19 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu resolved HAWQ-955.
-
Resolution: Implemented

> Add script for feature test running in parallel
> ---
>
> Key: HAWQ-955
> URL: https://issues.apache.org/jira/browse/HAWQ-955
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Tests
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1131) Fix error message difference between Orca and Planner

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-1131.
-
   Resolution: Fixed
Fix Version/s: 2.0.1.0-incubating

> Fix error message difference between Orca and Planner
> -
>
> Key: HAWQ-1131
> URL: https://issues.apache.org/jira/browse/HAWQ-1131
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Optimizer
>Reporter: Haisheng Yuan
>Assignee: Haisheng Yuan
> Fix For: 2.0.1.0-incubating
>
>
> In ORCA, due to the way exception handled previously we do warning first
> and then later print error referring that message. Only a single message 
> should be printed. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-934) Populate canSetTag of PlannedStmt from Query object

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-934.

Resolution: Fixed

> Populate canSetTag of PlannedStmt from Query object
> ---
>
> Key: HAWQ-934
> URL: https://issues.apache.org/jira/browse/HAWQ-934
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Optimizer
>Reporter: Haisheng Yuan
>Assignee: Venkatesh
> Fix For: 2.0.1.0-incubating
>
>
> HAWQ generated an error if a single query resulted in multiple query plans 
> because of rule transformation and the plans were produced by PQO. This is 
> because of an incorrect directive in the plan to lock the same resource more 
> than once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-938) Remove ivy.xml in gpopt and read orca version from header file

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-938.

Resolution: Fixed

> Remove ivy.xml in gpopt and read orca version from header file
> --
>
> Key: HAWQ-938
> URL: https://issues.apache.org/jira/browse/HAWQ-938
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Optimizer
>Reporter: Haisheng Yuan
>Assignee: Haisheng Yuan
> Fix For: 2.0.1.0-incubating
>
>
> Currently, if we want to upgrade orca or gpos, we need change the orca SHA as 
> well as the version number in ivy.xml. The function gp_opt_version() returns 
> version number that is read from ivy.xml, which is not a right way. It should 
> only be dependent on the source file of orca and gpos.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-983) Minirepro generate wrong dependency order of objects and miss CTE relations

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-983.

Resolution: Fixed

> Minirepro generate wrong dependency order of objects and miss CTE relations
> ---
>
> Key: HAWQ-983
> URL: https://issues.apache.org/jira/browse/HAWQ-983
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Reporter: Haisheng Yuan
>Assignee: Haisheng Yuan
> Fix For: 2.0.1.0-incubating
>
>
> The minirepro generate scripts in the wrong dependency order if dtabase 
> relations are in different schemas. In addition, it misses relations in CTE 
> and function objects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-936) Add GUC for array expansion in ORCA optimizer

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-936.

Resolution: Fixed

> Add GUC for array expansion in ORCA optimizer
> -
>
> Key: HAWQ-936
> URL: https://issues.apache.org/jira/browse/HAWQ-936
> Project: Apache HAWQ
>  Issue Type: New Feature
>  Components: Optimizer
>Reporter: Haisheng Yuan
>Assignee: Venkatesh
> Fix For: 2.0.1.0-incubating
>
>
> Consider the query with the following pattern select * from foo where foo.a 
> IN {1,2,3,...}. Currently, when the number of constants in the IN subquery is 
> large, the query optimization time is unacceptable. This is stopping 
> customers from turning Orca on by default since many of the queries are 
> generated queries with such a pattern.
> The root cause is due to the expansion of the IN subquery into an expression 
> in disjunctive normal form. The objective of this story is to disable this 
> expansion when the number of constants in the IN list is large.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-929) Fix plan generated by query window function and no partition by clause

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-929.

Resolution: Resolved

> Fix plan generated by query window function and no partition by clause
> --
>
> Key: HAWQ-929
> URL: https://issues.apache.org/jira/browse/HAWQ-929
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Optimizer
>Reporter: Haisheng Yuan
>Assignee: Venkatesh
> Fix For: 2.0.1.0-incubating
>
>
> Bump ORCA version to 1.637



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-860) Optimizer generates wrong plan when correlated subquery contains set-returning functions

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-860.

Resolution: Fixed

> Optimizer generates wrong plan when correlated subquery contains 
> set-returning functions
> 
>
> Key: HAWQ-860
> URL: https://issues.apache.org/jira/browse/HAWQ-860
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Optimizer
>Reporter: Venkatesh
>Assignee: Haisheng Yuan
> Fix For: 2.0.1.0-incubating
>
>
> Bump ORCA to 1.634 [#119042413]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1122) Bump ORCA version to 1.674

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-1122.
-
   Resolution: Resolved
Fix Version/s: 2.0.1.0-incubating

> Bump ORCA version to 1.674
> --
>
> Key: HAWQ-1122
> URL: https://issues.apache.org/jira/browse/HAWQ-1122
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Optimizer
>Reporter: xin zhang
>Assignee: Lei Chang
> Fix For: 2.0.1.0-incubating
>
>
> This improvement will port related changes under `src/backend/gpopt` from 
> GPDB OSS to use GPORCA version v1.674.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1137) Remove banned api mechanism in Orca

2016-12-19 Thread Haisheng Yuan (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved HAWQ-1137.
-
   Resolution: Resolved
Fix Version/s: 2.0.1.0-incubating

> Remove banned api mechanism in Orca
> ---
>
> Key: HAWQ-1137
> URL: https://issues.apache.org/jira/browse/HAWQ-1137
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Optimizer
>Reporter: Haisheng Yuan
>Assignee: Haisheng Yuan
> Fix For: 2.0.1.0-incubating
>
>
> gporca has a set of banned API calls which needs to be allowed with the 
> ALLOW_xxx macro in order for gpopt to compile. But it should be the library 
> caller (HAWQ)'s responsibility to take care of the function call.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1218) docs - create reference page for DROP LANGUAGE

2016-12-19 Thread Lisa Owen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisa Owen resolved HAWQ-1218.
-
   Resolution: Fixed
Fix Version/s: 2.0.1.0-incubating

DROP LANGUAGE page added to SQL reference section.  associated PR merged and 
closed.

> docs - create reference page for DROP LANGUAGE
> --
>
> Key: HAWQ-1218
> URL: https://issues.apache.org/jira/browse/HAWQ-1218
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: David Yozie
>Priority: Minor
> Fix For: 2.0.1.0-incubating
>
>
> the DROP LANGUAGE SQL reference page is missing from the documentation.  
> create and add it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (HAWQ-1218) docs - create reference page for DROP LANGUAGE

2016-12-19 Thread Lisa Owen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisa Owen closed HAWQ-1218.
---

> docs - create reference page for DROP LANGUAGE
> --
>
> Key: HAWQ-1218
> URL: https://issues.apache.org/jira/browse/HAWQ-1218
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: David Yozie
>Priority: Minor
> Fix For: 2.0.1.0-incubating
>
>
> the DROP LANGUAGE SQL reference page is missing from the documentation.  
> create and add it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1219) docs - pg_class ref page missing relstorage modes

2016-12-19 Thread Lisa Owen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisa Owen resolved HAWQ-1219.
-
   Resolution: Fixed
Fix Version/s: 2.0.1.0-incubating

missing relstorage modes have been added to the pg_class ref page.  associated 
PR merged.

> docs - pg_class ref page missing relstorage modes
> -
>
> Key: HAWQ-1219
> URL: https://issues.apache.org/jira/browse/HAWQ-1219
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: Ed Espino
>Priority: Minor
> Fix For: 2.0.1.0-incubating
>
>
> the pg_class reference page is missing the relstorage append-only and parquet 
> modes.  add these to the table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (HAWQ-1219) docs - pg_class ref page missing relstorage modes

2016-12-19 Thread Lisa Owen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisa Owen closed HAWQ-1219.
---

> docs - pg_class ref page missing relstorage modes
> -
>
> Key: HAWQ-1219
> URL: https://issues.apache.org/jira/browse/HAWQ-1219
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: Ed Espino
>Priority: Minor
> Fix For: 2.0.1.0-incubating
>
>
> the pg_class reference page is missing the relstorage append-only and parquet 
> modes.  add these to the table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HAWQ-1218) docs - create reference page for DROP LANGUAGE

2016-12-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15761759#comment-15761759
 ] 

ASF GitHub Bot commented on HAWQ-1218:
--

Github user lisakowen closed the pull request at:

https://github.com/apache/incubator-hawq-docs/pull/76


> docs - create reference page for DROP LANGUAGE
> --
>
> Key: HAWQ-1218
> URL: https://issues.apache.org/jira/browse/HAWQ-1218
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: David Yozie
>Priority: Minor
>
> the DROP LANGUAGE SQL reference page is missing from the documentation.  
> create and add it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HAWQ-1218) docs - create reference page for DROP LANGUAGE

2016-12-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15761755#comment-15761755
 ] 

ASF GitHub Bot commented on HAWQ-1218:
--

Github user lisakowen closed the pull request at:

https://github.com/apache/incubator-hawq-docs/pull/75


> docs - create reference page for DROP LANGUAGE
> --
>
> Key: HAWQ-1218
> URL: https://issues.apache.org/jira/browse/HAWQ-1218
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: David Yozie
>Priority: Minor
>
> the DROP LANGUAGE SQL reference page is missing from the documentation.  
> create and add it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HAWQ-1219) docs - pg_class ref page missing relstorage modes

2016-12-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15761752#comment-15761752
 ] 

ASF GitHub Bot commented on HAWQ-1219:
--

Github user lisakowen closed the pull request at:

https://github.com/apache/incubator-hawq-docs/pull/74


> docs - pg_class ref page missing relstorage modes
> -
>
> Key: HAWQ-1219
> URL: https://issues.apache.org/jira/browse/HAWQ-1219
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Documentation
>Reporter: Lisa Owen
>Assignee: Ed Espino
>Priority: Minor
>
> the pg_class reference page is missing the relstorage append-only and parquet 
> modes.  add these to the table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq issue #1056: HAWQ-1227. Fix hawq init fails when user name wi...

2016-12-19 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1056
  
`CEO` is a great capitalized user name.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1056: HAWQ-1227. Fix hawq init fails when user name wi...

2016-12-19 Thread jianlirong
Github user jianlirong commented on the issue:

https://github.com/apache/incubator-hawq/pull/1056
  
Last time when I encountered this issue, it was one year ago. It seems I am 
the only one who likes to use a capitalized user name, :). Glad to hear that 
this issue is finally resolved. Nice job. +1.

Lirong


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1057: HAWQ-1221. Add test case verify for bug f...

2016-12-19 Thread stanlyxiang
GitHub user stanlyxiang opened a pull request:

https://github.com/apache/incubator-hawq/pull/1057

HAWQ-1221. Add test case verify for bug fix

cc @ictmalili @linwen @interma @xunzhang pls review. thanks.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stanlyxiang/incubator-hawq hawq-1221-bfv

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1057.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1057


commit 9ffa0d8fa7367fbc1f9ee59006196a16571a9108
Author: stanlyxiang 
Date:   2016-12-19T07:35:48Z

HAWQ-1221. Add test case verify for bug fix




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1055: HAWQ-1001. Bugfix and refactor ranger log...

2016-12-19 Thread xunzhang
Github user xunzhang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1055


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1055: HAWQ-1001. Bugfix and refactor ranger logic.

2016-12-19 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1055
  
Merged into master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1055: HAWQ-1001. Bugfix and refactor ranger logic.

2016-12-19 Thread radarwave
Github user radarwave commented on the issue:

https://github.com/apache/incubator-hawq/pull/1055
  
+1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Closed] (HAWQ-1186) Remove with-thrift in src/Makefile.global.in

2016-12-19 Thread Paul Guo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Guo closed HAWQ-1186.
--

> Remove with-thrift in src/Makefile.global.in
> 
>
> Key: HAWQ-1186
> URL: https://issues.apache.org/jira/browse/HAWQ-1186
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Paul Guo
>Assignee: Paul Guo
> Fix For: 2.0.1.0-incubating
>
>
> We removed the thrift code but forgot to remote with-thrift related things in 
> src/Makefile.global.in.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq issue #1056: HAWQ-1227. Fix hawq init fails when user name wi...

2016-12-19 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1056
  
LGTM. +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1056: HAWQ-1227. Fix hawq init fails when user ...

2016-12-19 Thread radarwave
GitHub user radarwave opened a pull request:

https://github.com/apache/incubator-hawq/pull/1056

HAWQ-1227. Fix hawq init fails when user name with a capital.

Add single quote to ROLENAME, so it's capital sensitive. 

Add option '-v ON_ERROR_STOP=on' to psql client, so it will fail for each 
sql queries in the sql file but not only the last query. 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/radarwave/incubator-hawq capital

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1056.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1056


commit 7ce076431f77eb4bcb2d616f71b7e48fed98
Author: rlei 
Date:   2016-12-19T07:03:26Z

HAWQ-1227. Fix hawq init fails when user name with a capital.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---