hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esp...@apache.org
Subject [01/50] [abbrv] incubator-hawq git commit: HAWQ-1243. Add suffix name for ranger restful service. [Forced Update!]
Date Fri, 03 Feb 2017 09:00:03 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/2.1.0.0-incubating 2d0993dfd -> 12c7df017 (forced update)


HAWQ-1243. Add suffix name for ranger restful service.


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

Branch: refs/heads/2.1.0.0-incubating
Commit: eed9a0f2535e7c7b39468252ee7ae184da009884
Parents: 3e3c41a
Author: hzhang2 <zhanghuan929@163.com>
Authored: Wed Dec 28 13:36:45 2016 +0800
Committer: hzhang2 <zhanghuan929@163.com>
Committed: Wed Dec 28 13:36:45 2016 +0800

----------------------------------------------------------------------
 src/backend/libpq/rangerrest.c | 13 ++-----------
 src/backend/utils/misc/guc.c   | 12 +++++++++++-
 src/include/utils/guc.h        |  1 +
 3 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eed9a0f2/src/backend/libpq/rangerrest.c
----------------------------------------------------------------------
diff --git a/src/backend/libpq/rangerrest.c b/src/backend/libpq/rangerrest.c
index e50c3e1..59b33a8 100644
--- a/src/backend/libpq/rangerrest.c
+++ b/src/backend/libpq/rangerrest.c
@@ -426,25 +426,16 @@ int call_ranger_rest(CURL_HANDLE curl_handle, const char* request)
 	curl_easy_setopt(curl_handle->curl_handle, CURLOPT_TIMEOUT, 30L);
 
 	/* specify URL to get */
-	//curl_easy_setopt(curl_handle->curl_handle, CURLOPT_URL, "http://localhost:8089/checkprivilege");
 	StringInfoData tname;
 	initStringInfo(&tname);
 	appendStringInfo(&tname, "http://");
 	appendStringInfo(&tname, "%s", rps_addr_host);
 	appendStringInfo(&tname, ":");
 	appendStringInfo(&tname, "%d", rps_addr_port);
-	appendStringInfo(&tname, "/rps");
+	appendStringInfo(&tname, "/");
+	appendStringInfo(&tname, "%s", rps_addr_suffix);
 	curl_easy_setopt(curl_handle->curl_handle, CURLOPT_URL, tname.data);
 
-	/* specify format */
-	// struct curl_slist *plist = curl_slist_append(NULL, "Content-Type:application/json;charset=UTF-8");
-	// curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, plist);
-
-
-	//curl_easy_setopt(curl_handle->curl_handle, CURLOPT_POSTFIELDSIZE_LARGE, 1000);
-	//curl_easy_setopt(curl_handle->curl_handle, CURLOPT_HTTPGET, 0);
-	//curl_easy_setopt(curl_handle->curl_handle, CURLOPT_CUSTOMREQUEST, "POST");
-
 	struct curl_slist *headers = NULL;
 	//curl_slist_append(headers, "Accept: application/json");
 	headers = curl_slist_append(headers, "Content-Type:application/json");

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eed9a0f2/src/backend/utils/misc/guc.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 3d36a72..00b9bad 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -780,6 +780,7 @@ bool gp_plpgsql_clear_cache_always = false;
 bool gp_called_by_pgdump = false;
 
 char   *rps_addr_host;
+char   *rps_addr_suffix;
 int     rps_addr_port;
 
 /*
@@ -6268,7 +6269,7 @@ static struct config_int ConfigureNamesInt[] =
       NULL
     },
     &rps_addr_port,
-    1, 1, 65535, NULL, NULL
+    8080, 1, 65535, NULL, NULL
   },
 
 	{
@@ -8184,6 +8185,15 @@ static struct config_string ConfigureNamesString[] =
     "localhost", NULL, NULL
   },
 
+  {
+    {"hawq_rps_address_suffix", PGC_POSTMASTER, PRESET_OPTIONS,
+      gettext_noop("ranger plugin server suffix of restful service address"),
+      NULL
+    },
+    &rps_addr_suffix,
+    "hawq", NULL, NULL
+  },
+
 	{
 		{"standby_address_host", PGC_POSTMASTER, PRESET_OPTIONS,
 			gettext_noop("standby server address hostname"),

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eed9a0f2/src/include/utils/guc.h
----------------------------------------------------------------------
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index 95e14a4..cb45a7c 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -454,6 +454,7 @@ extern bool	optimizer_partition_selection_log;
  * rps host and port
  */
 extern char   *rps_addr_host;
+extern char   *rps_addr_suffix;
 extern int     rps_addr_port;
 /*
  * During insertion in a table with parquet partitions,


Mime
View raw message