This is an automated email from the ASF dual-hosted git repository.
JiaLiangC pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new d51e88d3df AMBARI-26593: Adding Hbase thrift as hbase component (#4122)
d51e88d3df is described below
commit d51e88d3dfdcf9e0e6e4a1269d84ced96a6300a6
Author: Basapuram Kumar <[email protected]>
AuthorDate: Wed Jun 10 07:48:37 2026 +0530
AMBARI-26593: Adding Hbase thrift as hbase component (#4122)
---
.../BIGTOP/3.2.0/properties/stack_packages.json | 12 ++
.../HBASE/configuration/hbase-thrift-site.xml | 45 ++++++
.../BIGTOP/3.2.0/services/HBASE/metainfo.xml | 27 ++++
.../services/HBASE/package/scripts/hbase_thrift.py | 161 +++++++++++++++++++++
.../services/HBASE/package/scripts/params_linux.py | 3 +
.../HBASE/package/scripts/status_params.py | 2 +
.../services/HBASE/quicklinks/quicklinks.json | 15 ++
.../3.2.0/services/HBASE/role_command_order.json | 3 +-
.../BIGTOP/3.2.0/services/HBASE/service_advisor.py | 2 +-
ambari-web/app/mappers/components_state_mapper.js | 5 +
ambari-web/app/mappers/service_metrics_mapper.js | 5 +-
ambari-web/app/messages.js | 2 +
ambari-web/app/models/service/hbase.js | 3 +
.../app/templates/main/service/services/hbase.hbs | 19 +++
.../app/views/main/service/services/hbase.js | 10 ++
.../test/views/main/service/services/hbase_test.js | 2 +
16 files changed, 313 insertions(+), 3 deletions(-)
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
index 3cbda98976..6fcce5ed72 100644
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
@@ -67,6 +67,18 @@
"STANDARD": [
"hbase-regionserver"
]
+ },
+ "HBASE_THRIFT": {
+ "STACK-SELECT-PACKAGE": "hbase-master",
+ "INSTALL": [
+ "hbase-master"
+ ],
+ "PATCH": [
+ "hbase-master"
+ ],
+ "STANDARD": [
+ "hbase-master"
+ ]
}
},
"HDFS": {
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/configuration/hbase-thrift-site.xml
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/configuration/hbase-thrift-site.xml
new file mode 100644
index 0000000000..50503a878b
--- /dev/null
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/configuration/hbase-thrift-site.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+<configuration supports_final="true">
+ <property>
+ <name>hbase.thrift.port</name>
+ <value>9091</value>
+ <display-name>HBase Thrift Port</display-name>
+ <description>The port for the HBase Thrift server.</description>
+ <value-attributes>
+ <type>int</type>
+ <overridable>true</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>hbase.thrift.info.port</name>
+ <value>9095</value>
+ <display-name>HBase Thrift Info Port</display-name>
+ <description>The info port for the HBase Thrift server web
UI.</description>
+ <value-attributes>
+ <type>int</type>
+ <overridable>true</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml
index 657459107b..da4f4d5609 100755
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml
@@ -98,6 +98,32 @@
</logs>
</component>
+ <component>
+ <name>HBASE_THRIFT</name>
+ <displayName>HBase Thrift Server</displayName>
+ <category>SLAVE</category>
+ <cardinality>0+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <timelineAppid>hbase</timelineAppid>
+ <commandScript>
+ <script>scripts/hbase_thrift.py</script>
+ <scriptType>PYTHON</scriptType>
+ </commandScript>
+ <configFiles>
+ <configFile>
+ <type>xml</type>
+ <fileName>hbase-thrift-site.xml</fileName>
+ <dictionaryName>hbase-thrift-site</dictionaryName>
+ </configFile>
+ </configFiles>
+ <logs>
+ <log>
+ <logId>hbase_thrift</logId>
+ <primary>true</primary>
+ </log>
+ </logs>
+ </component>
+
<component>
<name>HBASE_CLIENT</name>
<displayName>HBase Client</displayName>
@@ -150,6 +176,7 @@
<config-type>viewfs-mount-table</config-type>
<config-type>hbase-policy</config-type>
<config-type>hbase-site</config-type>
+ <config-type>hbase-thrift-site</config-type>
<config-type>hbase-env</config-type>
<config-type>hbase-log4j</config-type>
<config-type>ranger-hbase-plugin-properties</config-type>
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/hbase_thrift.py
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/hbase_thrift.py
new file mode 100644
index 0000000000..550340a4b7
--- /dev/null
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/hbase_thrift.py
@@ -0,0 +1,161 @@
+#!/usr/bin/env python3
+"""
+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.
+
+HBase Thrift Server - Manages the HBase Thrift service.
+Uses hbase-daemon.sh start thrift -p <port> --infoport <infoport>
+"""
+
+from resource_management.core.resources.system import Execute
+from resource_management.core.shell import as_sudo
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.check_process_status import
check_process_status
+from resource_management.libraries.functions.show_logs import show_logs
+from resource_management.core.resources import File
+import upgrade
+
+
+class HbaseThrift(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+
+ def pre_upgrade_restart(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ upgrade.prestart(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+ thrift_site_config =
params.config['configurations'].get('hbase-thrift-site', {})
+ hbase_site_config = params.config['configurations'].get('hbase-site', {})
+ hbase_env_config = params.config['configurations'].get('hbase-env', {})
+
+ from hbase import hbase
+ hbase(name='regionserver') # Use same config as regionserver for thrift
+
+ # Build an effective hbase-site.xml for Thrift without mutating immutable
Ambari config dicts.
+ effective_hbase_site_config = dict(hbase_site_config)
+ if not effective_hbase_site_config.get('hbase.thrift.kerberos.principal'):
+ thrift_principal = (
+ effective_hbase_site_config.get('hbase.master.kerberos.principal')
+ or
effective_hbase_site_config.get('hbase.regionserver.kerberos.principal')
+ or hbase_env_config.get('hbase_principal_name')
+ )
+ if thrift_principal:
+ effective_hbase_site_config['hbase.thrift.kerberos.principal'] =
thrift_principal
+
+ if not effective_hbase_site_config.get('hbase.thrift.keytab.file'):
+ thrift_keytab = (
+ effective_hbase_site_config.get('hbase.master.keytab.file')
+ or effective_hbase_site_config.get('hbase.regionserver.keytab.file')
+ or hbase_env_config.get('hbase_user_keytab')
+ )
+ if thrift_keytab:
+ effective_hbase_site_config['hbase.thrift.keytab.file'] = thrift_keytab
+
+ from resource_management.libraries.resources.xml_config import XmlConfig
+ XmlConfig("hbase-site.xml",
+ conf_dir=params.hbase_conf_dir,
+ configurations=effective_hbase_site_config,
+
configuration_attributes=params.config['configurationAttributes']['hbase-site'],
+ owner=params.hbase_user,
+ group=params.user_group)
+
+ # Deploy hbase-thrift-site.xml (Thrift-specific config)
+ if thrift_site_config:
+ XmlConfig("hbase-thrift-site.xml",
+ conf_dir=params.hbase_conf_dir,
+ configurations=thrift_site_config,
+
configuration_attributes=params.config['configurationAttributes'].get('hbase-thrift-site',
{}),
+ owner=params.hbase_user,
+ group=params.user_group)
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ role = 'thrift'
+ cmd = format("{daemon_script} --config {hbase_conf_dir}")
+ pid_file = format("{pid_dir}/hbase-{hbase_user}-{role}.pid")
+ pid_expression = as_sudo(["cat", pid_file])
+ no_op_test = as_sudo(["test", "-f", pid_file]) + format(" && ps -p
`{pid_expression}` >/dev/null 2>&1")
+
+ # Thrift requires port args: -p <port> --infoport <infoport>
+ thrift_port = params.hbase_thrift_port
+ thrift_info_port = params.hbase_thrift_info_port
+ daemon_cmd = format("{cmd} start {role} -p {thrift_port} --infoport
{thrift_info_port}")
+
+ try:
+ Execute(daemon_cmd,
+ not_if=no_op_test,
+ user=params.hbase_user
+ )
+ except:
+ show_logs(params.log_dir, params.hbase_user)
+ raise
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+
+ role = 'thrift'
+ cmd = format("{daemon_script} --config {hbase_conf_dir}")
+ pid_file = format("{pid_dir}/hbase-{hbase_user}-{role}.pid")
+ pid_expression = as_sudo(["cat", pid_file])
+ no_op_test = as_sudo(["test", "-f", pid_file]) + format(" && ps -p
`{pid_expression}` >/dev/null 2>&1")
+
+ daemon_cmd = format("{cmd} stop {role}")
+ shutdown_timeout = getattr(params, 'hbase_regionserver_shutdown_timeout',
30)
+
+ try:
+ Execute(daemon_cmd,
+ user=params.hbase_user,
+ only_if=no_op_test,
+ timeout=shutdown_timeout,
+ on_timeout=format("! ( {no_op_test} ) || {sudo} -H -E kill -9
`{pid_expression}`")
+ )
+ except:
+ show_logs(params.log_dir, params.hbase_user)
+ raise
+
+ File(pid_file, action="delete")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.thrift_pid_file)
+
+ def get_log_folder(self):
+ import params
+ return params.log_dir
+
+ def get_user(self):
+ import params
+ return params.hbase_user
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.thrift_pid_file]
+
+
+if __name__ == "__main__":
+ HbaseThrift().execute()
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/params_linux.py
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/params_linux.py
index b6b8b8757f..4a22f528dc 100755
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/params_linux.py
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/params_linux.py
@@ -181,6 +181,9 @@ phoenix_hosts =
default("/clusterHostInfo/phoenix_query_server_hosts", [])
phoenix_enabled = default("/configurations/hbase-env/phoenix_sql_enabled",
False)
has_phoenix = len(phoenix_hosts) > 0
+hbase_thrift_port =
default("/configurations/hbase-thrift-site/hbase.thrift.port", "9091")
+hbase_thrift_info_port =
default("/configurations/hbase-thrift-site/hbase.thrift.info.port", "9095")
+
underscored_version = stack_version_unformatted.replace(".", "_")
dashed_version = stack_version_unformatted.replace(".", "-")
# if OSCheck.is_redhat_family() or OSCheck.is_suse_family():
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/status_params.py
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/status_params.py
index 0844ef7b3f..673d9e5bd3 100755
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/status_params.py
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/status_params.py
@@ -33,6 +33,7 @@ from resource_management.libraries.script.script import Script
SERVER_ROLE_DIRECTORY_MAP = {
"HBASE_MASTER": "hbase-master",
"HBASE_REGIONSERVER": "hbase-regionserver",
+ "HBASE_THRIFT": "hbase-master",
"HBASE_CLIENT": "hbase-client",
}
@@ -51,6 +52,7 @@ else:
hbase_master_pid_file = format("{pid_dir}/hbase-{hbase_user}-master.pid")
regionserver_pid_file =
format("{pid_dir}/hbase-{hbase_user}-regionserver.pid")
+ thrift_pid_file = format("{pid_dir}/hbase-{hbase_user}-thrift.pid")
# Security related/required params
hostname = config["agentLevelParams"]["hostname"]
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/quicklinks/quicklinks.json
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/quicklinks/quicklinks.json
index ccf901b5c9..edba790afe 100755
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/quicklinks/quicklinks.json
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/quicklinks/quicklinks.json
@@ -97,6 +97,21 @@
"regex": "",
"site": "hbase-site"
}
+ },
+ {
+ "name": "hbase_thrift_ui",
+ "label": "Thrift Server Info",
+ "component_name": "HBASE_THRIFT",
+ "url": "%@://%@:%@/",
+ "requires_user_name": "false",
+ "port": {
+ "http_property": "hbase.thrift.info.port",
+ "http_default_port": "9095",
+ "https_property": "hbase.thrift.info.port",
+ "https_default_port": "9095",
+ "regex": "",
+ "site": "hbase-thrift-site"
+ }
}
]
}
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/role_command_order.json
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/role_command_order.json
index 58d0c1c2a0..58175e242f 100755
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/role_command_order.json
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/role_command_order.json
@@ -4,6 +4,7 @@
"HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
"HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START",
"HBASE_REGIONSERVER-START"],
"HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
- "HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START",
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"]
+ "HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START",
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"],
+ "HBASE_THRIFT-START": ["HBASE_MASTER-START"]
}
}
diff --git
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/service_advisor.py
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/service_advisor.py
index 2b96fdbee0..23881023e0 100755
---
a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/service_advisor.py
+++
b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/service_advisor.py
@@ -186,7 +186,7 @@ class HBASEServiceAdvisor(service_advisor.ServiceAdvisor):
)
def isComponentUsingCardinalityForLayout(self, componentName):
- return componentName == "PHOENIX_QUERY_SERVER"
+ return componentName in ["PHOENIX_QUERY_SERVER", "HBASE_THRIFT"]
class HBASERecommender(service_advisor.ServiceAdvisor):
diff --git a/ambari-web/app/mappers/components_state_mapper.js
b/ambari-web/app/mappers/components_state_mapper.js
index fb1213840f..fb81228858 100644
--- a/ambari-web/app/mappers/components_state_mapper.js
+++ b/ambari-web/app/mappers/components_state_mapper.js
@@ -87,6 +87,11 @@ App.componentsStateMapper = App.QuickDataMapper.create({
phoenix_servers_installed: 'INSTALLED_PATH',
phoenix_servers_total: 'TOTAL_PATH'
},
+ 'HBASE_THRIFT': {
+ thrift_servers_started: 'STARTED_PATH',
+ thrift_servers_installed: 'INSTALLED_PATH',
+ thrift_servers_total: 'TOTAL_PATH'
+ },
'GANGLIA_MONITOR': {
ganglia_monitors_started: 'STARTED_PATH',
ganglia_monitors_installed: 'INSTALLED_PATH',
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js
b/ambari-web/app/mappers/service_metrics_mapper.js
index 7da550d6b1..9b9517f6ec 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -149,7 +149,10 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
region_servers_total: 'region_servers_total',
phoenix_servers_started: 'phoenix_servers_started',
phoenix_servers_installed: 'phoenix_servers_installed',
- phoenix_servers_total: 'phoenix_servers_total'
+ phoenix_servers_total: 'phoenix_servers_total',
+ thrift_servers_started: 'thrift_servers_started',
+ thrift_servers_installed: 'thrift_servers_installed',
+ thrift_servers_total: 'thrift_servers_total'
},
stormConfig: {
total_tasks: 'restApiComponent.tasksTotal',
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 6ccaf175af..bdf8bb1752 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -3226,6 +3226,8 @@ Em.I18n.translations = {
'dashboard.services.hbase.regionServersSummary':'{0} live / {1} total',
'dashboard.services.hbase.phoenixServers':'Phoenix Query Servers',
'dashboard.services.hbase.phoenixServersSummary':'{0} live / {1} total',
+ 'dashboard.services.hbase.thriftServers':'HBase Thrift Servers',
+ 'dashboard.services.hbase.thriftServersSummary':'{0} live / {1} total',
'dashboard.services.hbase.chart.label':'Request Count',
'dashboard.services.hbase.masterWebUI':'Master Web UI',
'dashboard.services.hbase.regions.transition':'Regions In Transition',
diff --git a/ambari-web/app/models/service/hbase.js
b/ambari-web/app/models/service/hbase.js
index 09378fc7c1..dc3be34413 100644
--- a/ambari-web/app/models/service/hbase.js
+++ b/ambari-web/app/models/service/hbase.js
@@ -25,6 +25,9 @@ App.HBaseService = App.Service.extend({
phoenixServersStarted: DS.attr('number'),
phoenixServersInstalled: DS.attr('number'),
phoenixServersTotal: DS.attr('number'),
+ thriftServersStarted: DS.attr('number'),
+ thriftServersInstalled: DS.attr('number'),
+ thriftServersTotal: DS.attr('number'),
masterStartTime: DS.attr('number'),
masterActiveTime: DS.attr('number'),
averageLoad: DS.attr('number'),
diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs
b/ambari-web/app/templates/main/service/services/hbase.hbs
index 581099b3e0..9c418cd85f 100644
--- a/ambari-web/app/templates/main/service/services/hbase.hbs
+++ b/ambari-web/app/templates/main/service/services/hbase.hbs
@@ -67,6 +67,25 @@
</div>
</div>
{{/if}}
+ {{! ThriftServers }}
+ {{#if view.isThriftServerCreated}}
+ <div {{bindAttr class=":row :component :col-md-3
view.thriftServerComponent.componentName"}}>
+ <div class="summary-value main-info">
+ <span>
+ {{#view App.ComponentLiveTextView
liveComponentsBinding="view.service.thriftServersStarted"
totalComponentsBinding="view.service.thriftServersTotal"}}
+ {{#if
App.router.clusterController.isServiceContentFullyLoaded}}
+ {{view.liveComponents}}/{{view.totalComponents}}
+ {{/if}}
+ {{/view}}
+ </span>
+ {{t common.live}}
+ </div>
+ <div class="summary-label">
+ <a
+ href="#" {{action filterHosts view.thriftServerComponent}}>{{t
dashboard.services.hbase.thriftServers}}</a>
+ </div>
+ </div>
+ {{/if}}
{{! Regions in Transition }}
<div class="row col-md-3 regions-in-trnasition">
<div class="summary-value
main-info">{{view.service.regionsInTransition}}</div>
diff --git a/ambari-web/app/views/main/service/services/hbase.js
b/ambari-web/app/views/main/service/services/hbase.js
index fd889a99d0..37fbe8c15a 100644
--- a/ambari-web/app/views/main/service/services/hbase.js
+++ b/ambari-web/app/views/main/service/services/hbase.js
@@ -50,6 +50,8 @@ App.MainDashboardServiceHbaseView =
App.MainDashboardServiceView.extend({
phoenixServersText:
Em.computed.countBasedMessage('service.phoenixServersTotal', '',
Em.I18n.t('services.service.summary.viewHost'),
Em.I18n.t('services.service.summary.viewHosts')),
+ thriftServersText:
Em.computed.countBasedMessage('service.thriftServersTotal', '',
Em.I18n.t('services.service.summary.viewHost'),
Em.I18n.t('services.service.summary.viewHosts')),
+
/**
* One(!) active master component
*/
@@ -87,11 +89,19 @@ App.MainDashboardServiceHbaseView =
App.MainDashboardServiceView.extend({
componentName: 'PHOENIX_QUERY_SERVER'
}),
+ thriftServerComponent: Em.Object.create({
+ componentName: 'HBASE_THRIFT'
+ }),
+
isRegionServerCreated: function () {
return this.isServiceComponentCreated('HBASE_REGIONSERVER');
}.property('App.router.clusterController.isComponentsStateLoaded'),
isPhoenixQueryServerCreated: function () {
return this.isServiceComponentCreated('PHOENIX_QUERY_SERVER');
+ }.property('App.router.clusterController.isComponentsStateLoaded'),
+
+ isThriftServerCreated: function () {
+ return this.isServiceComponentCreated('HBASE_THRIFT');
}.property('App.router.clusterController.isComponentsStateLoaded')
});
diff --git a/ambari-web/test/views/main/service/services/hbase_test.js
b/ambari-web/test/views/main/service/services/hbase_test.js
index f8f194181c..b4e46d13d3 100644
--- a/ambari-web/test/views/main/service/services/hbase_test.js
+++ b/ambari-web/test/views/main/service/services/hbase_test.js
@@ -41,6 +41,8 @@ describe('App.MainDashboardServiceHbaseView', function () {
App.TestAliases.testAsComputedCountBasedMessage(getView(),
'phoenixServersText', 'service.phoenixServersTotal', '',
Em.I18n.t('services.service.summary.viewHost'),
Em.I18n.t('services.service.summary.viewHosts'));
+ App.TestAliases.testAsComputedCountBasedMessage(getView(),
'thriftServersText', 'service.thriftServersTotal', '',
Em.I18n.t('services.service.summary.viewHost'),
Em.I18n.t('services.service.summary.viewHosts'));
+
describe('#averageLoad', function () {
beforeEach(function () {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]