Repository: incubator-hawq Updated Branches: refs/heads/master 6589f1cdc -> 111655e36
HAWQ-1002. Implement configuration GUC related to Ranger. Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/78aa0947 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/78aa0947 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/78aa0947 Branch: refs/heads/master Commit: 78aa094794e94bc91a42fc237b59ca1a5f5bf39d Parents: 6589f1c Author: hzhang2 <[email protected]> Authored: Fri Dec 16 11:48:08 2016 +0800 Committer: hzhang2 <[email protected]> Committed: Fri Dec 16 11:48:08 2016 +0800 ---------------------------------------------------------------------- src/backend/utils/misc/guc.c | 31 +++++++++++++++++++++++++++++++ src/include/utils/guc.h | 6 ++++++ 2 files changed, 37 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/78aa0947/src/backend/utils/misc/guc.c ---------------------------------------------------------------------- diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index e5f6548..3d36a72 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -732,6 +732,7 @@ int hawq_rm_nvseg_for_analyze_nopart_perquery_perseg_limit; int hawq_rm_nvseg_for_analyze_part_perquery_perseg_limit; int hawq_rm_nvseg_for_analyze_nopart_perquery_limit; int hawq_rm_nvseg_for_analyze_part_perquery_limit; +bool enable_ranger = false; double optimizer_cost_threshold; double optimizer_nestloop_factor; double locality_upper_bound; @@ -778,6 +779,8 @@ bool gp_plpgsql_clear_cache_always = false; /* indicate whether called by gpdump, if yes, processutility will open some limitations */ bool gp_called_by_pgdump = false; +char *rps_addr_host; +int rps_addr_port; /* * Displayable names for context types (enum GucContext) @@ -4326,6 +4329,16 @@ static struct config_bool ConfigureNamesBool[] = }, { + {"enable_ranger", PGC_POSTMASTER, CONN_AUTH_SETTINGS, + gettext_noop("Enable Apache Ranger for HAWQ privilege management."), + NULL, + GUC_SUPERUSER_ONLY + }, + &enable_ranger, + false, NULL, NULL + }, + + { {"filesystem_support_truncate", PGC_USERSET, APPENDONLY_TABLES, gettext_noop("the file system support truncate feature."), NULL, @@ -6250,6 +6263,15 @@ static struct config_int ConfigureNamesInt[] = }, { + {"hawq_rps_address_port", PGC_POSTMASTER, PRESET_OPTIONS, + gettext_noop("ranger plugin server address port number"), + NULL + }, + &rps_addr_port, + 1, 1, 65535, NULL, NULL + }, + + { {"hawq_segment_address_port", PGC_POSTMASTER, PRESET_OPTIONS, gettext_noop("segment address port number"), NULL @@ -8154,6 +8176,15 @@ static struct config_string ConfigureNamesString[] = }, { + {"hawq_rps_address_host", PGC_POSTMASTER, PRESET_OPTIONS, + gettext_noop("ranger plugin server address hostname"), + NULL + }, + &rps_addr_host, + "localhost", NULL, NULL + }, + + { {"standby_address_host", PGC_POSTMASTER, PRESET_OPTIONS, gettext_noop("standby server address hostname"), NULL http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/78aa0947/src/include/utils/guc.h ---------------------------------------------------------------------- diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 8fdab3c..95e14a4 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -275,6 +275,7 @@ extern bool gp_plpgsql_clear_cache_always; extern bool gp_disable_catalog_access_on_segment; extern bool gp_called_by_pgdump; +extern bool enable_ranger; /* Debug DTM Action */ typedef enum @@ -449,6 +450,11 @@ extern bool optimizer_array_constraints; */ extern bool optimizer_partition_selection_log; +/** + * rps host and port + */ +extern char *rps_addr_host; +extern int rps_addr_port; /* * During insertion in a table with parquet partitions, * require tuples to be sorted by partition key.
