|
@@ -29,7 +29,8 @@ from resource_management.libraries.resources.hdfs_resource import HdfsResource
|
|
from resource_management.libraries.functions import conf_select
|
|
from resource_management.libraries.functions import conf_select
|
|
from resource_management.libraries.functions import stack_select
|
|
from resource_management.libraries.functions import stack_select
|
|
from resource_management.libraries.functions import format
|
|
from resource_management.libraries.functions import format
|
|
-from resource_management.libraries.functions.version import format_stack_version
|
|
|
|
|
|
+from resource_management.libraries.functions import StackFeature
|
|
|
|
+from resource_management.libraries.functions.stack_features import check_stack_feature
|
|
from resource_management.libraries.functions.default import default
|
|
from resource_management.libraries.functions.default import default
|
|
from resource_management.libraries.functions import get_kinit_path
|
|
from resource_management.libraries.functions import get_kinit_path
|
|
from resource_management.libraries.functions import is_empty
|
|
from resource_management.libraries.functions import is_empty
|
|
@@ -51,8 +52,9 @@ version = default("/commandParams/version", None)
|
|
component_directory = status_params.component_directory
|
|
component_directory = status_params.component_directory
|
|
etc_prefix_dir = "/etc/hbase"
|
|
etc_prefix_dir = "/etc/hbase"
|
|
|
|
|
|
-stack_version_unformatted = config['hostLevelParams']['stack_version']
|
|
|
|
-stack_version_formatted = format_stack_version(stack_version_unformatted)
|
|
|
|
|
|
+stack_version_unformatted = status_params.stack_version_unformatted
|
|
|
|
+stack_version_formatted = status_params.stack_version_formatted
|
|
|
|
+stack_root = status_params.stack_root
|
|
|
|
|
|
# hadoop default parameters
|
|
# hadoop default parameters
|
|
hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
|
|
hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
|
|
@@ -63,19 +65,19 @@ region_drainer = "/usr/lib/hbase/bin/draining_servers.rb"
|
|
hbase_cmd = "/usr/lib/hbase/bin/hbase"
|
|
hbase_cmd = "/usr/lib/hbase/bin/hbase"
|
|
hbase_max_direct_memory_size = None
|
|
hbase_max_direct_memory_size = None
|
|
|
|
|
|
-# hadoop parameters for 2.2+
|
|
|
|
-if Script.is_stack_greater_or_equal("2.2"):
|
|
|
|
- daemon_script = format('/usr/hdp/current/hbase-client/bin/hbase-daemon.sh')
|
|
|
|
- region_mover = format('/usr/hdp/current/hbase-client/bin/region_mover.rb')
|
|
|
|
- region_drainer = format('/usr/hdp/current/hbase-client/bin/draining_servers.rb')
|
|
|
|
- hbase_cmd = format('/usr/hdp/current/hbase-client/bin/hbase')
|
|
|
|
|
|
+# hadoop parameters for stacks supporting rolling_upgrade
|
|
|
|
+if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
|
|
|
|
+ daemon_script = format('{stack_root}/current/hbase-client/bin/hbase-daemon.sh')
|
|
|
|
+ region_mover = format('{stack_root}/current/hbase-client/bin/region_mover.rb')
|
|
|
|
+ region_drainer = format('{stack_root}/current/hbase-client/bin/draining_servers.rb')
|
|
|
|
+ hbase_cmd = format('{stack_root}/current/hbase-client/bin/hbase')
|
|
|
|
|
|
hbase_max_direct_memory_size = default('configurations/hbase-env/hbase_max_direct_memory_size', None)
|
|
hbase_max_direct_memory_size = default('configurations/hbase-env/hbase_max_direct_memory_size', None)
|
|
|
|
|
|
- daemon_script=format("/usr/hdp/current/{component_directory}/bin/hbase-daemon.sh")
|
|
|
|
- region_mover = format("/usr/hdp/current/{component_directory}/bin/region_mover.rb")
|
|
|
|
- region_drainer = format("/usr/hdp/current/{component_directory}/bin/draining_servers.rb")
|
|
|
|
- hbase_cmd = format("/usr/hdp/current/{component_directory}/bin/hbase")
|
|
|
|
|
|
+ daemon_script=format("{stack_root}/current/{component_directory}/bin/hbase-daemon.sh")
|
|
|
|
+ region_mover = format("{stack_root}/current/{component_directory}/bin/region_mover.rb")
|
|
|
|
+ region_drainer = format("{stack_root}/current/{component_directory}/bin/draining_servers.rb")
|
|
|
|
+ hbase_cmd = format("{stack_root}/current/{component_directory}/bin/hbase")
|
|
|
|
|
|
|
|
|
|
hbase_conf_dir = status_params.hbase_conf_dir
|
|
hbase_conf_dir = status_params.hbase_conf_dir
|
|
@@ -85,7 +87,7 @@ hbase_user_nofile_limit = default("/configurations/hbase-env/hbase_user_nofile_l
|
|
hbase_user_nproc_limit = default("/configurations/hbase-env/hbase_user_nproc_limit", "16000")
|
|
hbase_user_nproc_limit = default("/configurations/hbase-env/hbase_user_nproc_limit", "16000")
|
|
|
|
|
|
# no symlink for phoenix-server at this point
|
|
# no symlink for phoenix-server at this point
|
|
-phx_daemon_script = '/usr/hdp/current/phoenix-server/bin/queryserver.py'
|
|
|
|
|
|
+phx_daemon_script = format('{stack_root}/current/phoenix-server/bin/queryserver.py')
|
|
|
|
|
|
hbase_excluded_hosts = config['commandParams']['excluded_hosts']
|
|
hbase_excluded_hosts = config['commandParams']['excluded_hosts']
|
|
hbase_drain_only = default("/commandParams/mark_draining_only",False)
|
|
hbase_drain_only = default("/commandParams/mark_draining_only",False)
|
|
@@ -313,7 +315,7 @@ if has_ranger_admin:
|
|
|
|
|
|
downloaded_custom_connector = format("{exec_tmp_dir}/{jdbc_jar_name}")
|
|
downloaded_custom_connector = format("{exec_tmp_dir}/{jdbc_jar_name}")
|
|
driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")
|
|
driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")
|
|
- driver_curl_target = format("/usr/hdp/current/{component_directory}/lib/{jdbc_jar_name}")
|
|
|
|
|
|
+ driver_curl_target = format("{stack_root}/current/{component_directory}/lib/{jdbc_jar_name}")
|
|
|
|
|
|
hbase_ranger_plugin_config = {
|
|
hbase_ranger_plugin_config = {
|
|
'username': repo_config_username,
|
|
'username': repo_config_username,
|
|
@@ -353,11 +355,11 @@ if security_enabled:
|
|
hbase_coprocessor_master_classes = "org.apache.hadoop.hbase.security.access.AccessController"
|
|
hbase_coprocessor_master_classes = "org.apache.hadoop.hbase.security.access.AccessController"
|
|
hbase_coprocessor_regionserver_classes = "org.apache.hadoop.hbase.security.access.AccessController"
|
|
hbase_coprocessor_regionserver_classes = "org.apache.hadoop.hbase.security.access.AccessController"
|
|
hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,org.apache.hadoop.hbase.security.access.AccessController"
|
|
hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,org.apache.hadoop.hbase.security.access.AccessController"
|
|
- elif xml_configurations_supported: # HDP stack 2.3+ ranger plugin enabled
|
|
|
|
|
|
+ elif xml_configurations_supported: # stack version ranger plugin enabled
|
|
hbase_coprocessor_master_classes = "org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor "
|
|
hbase_coprocessor_master_classes = "org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor "
|
|
hbase_coprocessor_regionserver_classes = "org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor"
|
|
hbase_coprocessor_regionserver_classes = "org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor"
|
|
hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor"
|
|
hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor"
|
|
- else: # HDP Stack 2.2 and less / ranger plugin enabled
|
|
|
|
|
|
+ else:
|
|
hbase_coprocessor_master_classes = "com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor"
|
|
hbase_coprocessor_master_classes = "com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor"
|
|
hbase_coprocessor_regionserver_classes = "com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor"
|
|
hbase_coprocessor_regionserver_classes = "com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor"
|
|
hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor"
|
|
hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor"
|