user guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on apache...

73
CloudTable Service User Guide Issue 08 Date 2018-08-03 HUAWEI TECHNOLOGIES CO., LTD.

Upload: others

Post on 17-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

CloudTable Service

User Guide

Issue 08

Date 2018-08-03

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Copyright © Huawei Technologies Co., Ltd. 2018. All rights reserved.No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respectiveholders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei and thecustomer. All or part of the products, services and features described in this document may not be within thepurchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,and recommendations in this document are provided "AS IS" without warranties, guarantees orrepresentations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

Bantian, LonggangShenzhen 518129People's Republic of China

Website: http://www.huawei.com

Email: [email protected]

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

i

Page 3: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Contents

1 Overview......................................................................................................................................... 11.1 What Is CloudTable Service?......................................................................................................................................... 11.2 Application Scenarios.....................................................................................................................................................11.3 CloudTable Service Functions........................................................................................................................................21.3.1 Cluster Management....................................................................................................................................................31.3.2 HBase...........................................................................................................................................................................31.3.3 OpenTSDB.................................................................................................................................................................. 41.3.4 GeoMesa......................................................................................................................................................................41.4 Related Services............................................................................................................................................................. 51.5 Permissions Required for Using CloudTable................................................................................................................. 51.6 Restrictions..................................................................................................................................................................... 6

2 Getting Started with CloudTable...............................................................................................82.1 Creating a Cluster........................................................................................................................................................... 82.2 Getting Started with HBase.......................................................................................................................................... 11

3 Cluster Operation Instructions................................................................................................. 133.1 Overview...................................................................................................................................................................... 133.2 Cluster Management List..............................................................................................................................................143.3 Creating a Cluster......................................................................................................................................................... 153.4 Viewing Cluster Information........................................................................................................................................ 193.4.1 Viewing Basic Cluster Information........................................................................................................................... 193.4.2 Modifying HBase Parameters of the Cluster.............................................................................................................213.5 Enabling or Disabling OpenTSDB............................................................................................................................... 253.5.1 Enabling OpenTSDB.................................................................................................................................................253.5.2 Disabling OpenTSDB................................................................................................................................................273.6 Restarting a Cluster...................................................................................................................................................... 283.7 Deleting a Cluster......................................................................................................................................................... 28

4 Client Operation Instructions................................................................................................... 304.1 Preparing an ECS..........................................................................................................................................................304.2 Using HBase Shell to Access a Cluster........................................................................................................................ 314.3 HBase Shell Commands............................................................................................................................................... 384.4 Accessing the HBase Web UI.......................................................................................................................................394.5 Using the GeoMesa Command Line Tools...................................................................................................................44

CloudTable ServiceUser Guide Contents

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

ii

Page 4: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

4.6 GeoMesa Command Line.............................................................................................................................................45

5 Batch Data Import........................................................................................................................485.1 Using CDM to Migrate Data to CloudTable.................................................................................................................485.2 Using the Import Tool to Importing Data..................................................................................................................... 52

6 Cluster Monitoring......................................................................................................................536.1 Monitored CloudTable Metrics.....................................................................................................................................536.2 Setting CloudTable Alarm Rules.................................................................................................................................. 566.3 Viewing Cluster Monitoring Information.....................................................................................................................58

7 Audit Logs.....................................................................................................................................617.1 Supported Key Audit Log Operations.......................................................................................................................... 617.2 Viewing Audit Logs......................................................................................................................................................61

8 FAQs...............................................................................................................................................658.1 What Services Does a CloudTable Cluster Provide?....................................................................................................658.2 Why Do I Choose CloudTable Service?.......................................................................................................................658.3 How Do I Prepare for Creating a CloudTable Cluster?................................................................................................658.4 What Should I Pay Attention to When Using CloudTable Service?............................................................................ 658.5 How Do I Access a CloudTable Cluster?..................................................................................................................... 668.6 What Is OpenTSDB?.................................................................................................................................................... 668.7 Why Cannot I Access HBase After the ZK Address Is Configured?........................................................................... 668.8 How Do I View the Native HBase Page?..................................................................................................................... 668.9 What Compression Algorithms Are Supported by CloudTable Clusters?................................................................... 668.10 Why Is the Precision Lost Sometimes When a Large Integer Is Written into OpenTSDB?...................................... 66

A Change History........................................................................................................................... 68

CloudTable ServiceUser Guide Contents

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

iii

Page 5: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

1 Overview

1.1 What Is CloudTable Service?CloudTable Service (CloudTable for short) is a distributed, scalable, and fully-managed key-value data storage service based on Apache HBase. It provides high-performance randomread/write capabilities so it is great for applications for storage and queries of massiveamounts of structured, semi-structured, and time series data.

1.2 Application ScenariosCloudTable applies to scenarios such as Internet of Things (IoT) as well as storage andqueries of massive amounts of key-value data.

IoTl IoT sub-areas

Internet of Vehicles (IoV), Internet of Elevators & Escalators (IoEE), and industrial IoT.l Application scenario

IoT applications require high-speed write, storage, and low-latency queries of vastamounts of data. CloudTable lets you easily store and query vast amounts of data basedon the HBase storage architecture.Various devices in the IoT will generate data with time labels, that is, time series data.Time series data is mainly collected or generated by various types of real-timemonitoring, inspection, and analysis equipment, involving the electric power industry,chemical industry, and so on. The typical characteristics of these industrial data are asfollows: high data generation frequency, highly dependent on collection time, a largenumber of measurement points, and a large amount of information. Common relationaldatabases cannot efficiently process such data any longer. Instead, the OpenTSDB in theCloudTable service can easily cope with storage, queries, and analysis of high-volumetime series data.

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1

Page 6: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 1-1 IoT application

Storage and Queries of Massive Amounts of Key-Value Datal Data types

Structured and semi-structured key-value data can be stored and queried, includingmessages, reports, recommendation data, risk control data, logs, and orders.

l Application scenario

CloudTable allows high-speed write of massive amounts of online and offline key-valuedata and low-latency data queries. It applies to online applications or report display.CloudTable can easily scale capacity up or down to achieve high availability (HA) andlow-latency storage and queries of vast amounts of data.

Figure 1-2 Storage and queries of massive amounts of data

1.3 CloudTable Service Functions

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2

Page 7: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

1.3.1 Cluster ManagementCloudTable is a distributed and scalable key-value data storage service provided by HUAWEICLOUD. CloudTable provides the following functions on the web-based console.

l Cluster creation: You can create a cluster on the CloudTable Service console. You arecharged for the number of computing units you select when creating the cluster and thestorage capacity you actually use. You can freely select the advanced feature, which isindependently installed and separately charged, and unsubscribe it when you do not needit any more. You will be notified of renewal if there is no sufficient balance for feededuction. Cluster resources will be frozen during a retention period and unfrozen afteryour renewal. CloudTable helps you reduce costs as much as possible by adopting acomputing and storage isolation architecture and dynamically adjusting computingresources.

l Advanced feature: Currently, CloudTable supports the advanced features OpenTSDB andGeoMesa. You can selectively enable the advanced feature and disable it when you donot need it. The advance feature will be charged once upon you enable it, and chargingstops once you disable it. You are advised to immediately disable the advanced featurewhen you do not need it.

l Cluster management: You can manage clusters you create.– Monitoring metrics: CloudTable collects monitored metric data from a running

cluster and reports it to Cloud Eye so that you can view cluster running statusdisplayed in graphics. If there is an abnormal metric, CloudTable sends a messageto notify you and administrators for immediate manual intervention.

– Deleting a cluster: You can delete a cluster when you do not need it. Deleting acluster is risky and may cause data loss. Before deleting a cluster, ensure that thereis no running service and all data has been saved.

– Restarting a cluster: Restarting a cluster may cause data loss in running services. Ifyou have to restart a cluster, ensure that there is no running service and all data hasbeen saved.

– Querying alarms: In case of a cluster operating exception or system failure,CloudTable will collect fault information and report it to the network managementsystem for maintenance personnel to locate faults.

– Querying logs: CloudTable records your operations on clusters to help you locatecauses of a cluster running exception.

1.3.2 HBaseHBase is a column-oriented distributed cloud storage system that features enhancedreliability, excellent performance, and elastic scalability. It applies to the storage of massiveamounts of data and distributed computing. You can use HBase to build a storage systemcapable of storing TB- or even PB-level data. With HBase, you can filter and analyze datawith ease and get responses in milliseconds, rapidly mining data value.

HBase applies to the following scenarios:

l Storage of massive amounts of dataHBase applies to TB- or even PB-level data storage and provides dynamic scalingcapabilities so that you can adjust cluster resources to meet specific performance orcapacity requirements.

l Real-time query

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3

Page 8: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

The columnar and key-value storage models apply to the ad-hoc query of enterprise userdetails. The primary key–based low-latency point query reduces the response latency toseconds or even milliseconds, facilitating real-time data analysis.

For details about HBase architecture and principles, visit http://hbase.apache.org/book.html.

1.3.3 OpenTSDBOpenTSDB is a distributed, scalable time series database based on HBase. It stores time seriesdata. Time series data refers to the data collected at different time points. This type of datareflects the change status or degree of an object over time.

Application Scenarios of OpenTSDB

OpenTSDB supports storage, index, and queries of massive amounts of time series data. Itcan be used for system monitoring and measurement as well as monitoring and analysis ofIoT data, financial data, and scientific experimental results.

l OpenTSDB can help O&M engineers obtain the real-time status of infrastructure andservices, and display software and hardware faults, performance changes, andperformance bottlenecks of clusters.

l OpenTSDB can help managers store and analyze system monitoring data, measuresystem SLA, and understand interactions between complicated systems, as well asdisplay resource consumption. It also provides the overall job status of the cluster to helpmanagers with budget and cluster resource coordination.

l OpenTSDB assists developers in finding major cluster performance bottlenecks bystoring and analyzing system monitoring data.

When to Enable OpenTSDB

When you want to store and query time series data, you can enable OpenTSDB.

1.3.4 GeoMesaGeoMesa is a distributed, scalable, open source spatio-temporal data spatial-temporaldatabase based on HBase. GeoMesa uses highly parallel index policies to provide HBase-based spatio-temporal data query and processing capabilities.

Application Scenarios of GeoMesa

GeoMesa supports spatio-temporal queries in milliseconds and can store, index, and queryvarious kinds of user GIS data.

GeoMesa applies to the following scenarios:

l Large-scale geospatial data storageGeoMesa integrates with HBase storage capabilities and can store TB-level or PB-levelgeospatial data.

l Real-time queryGeoMesa provides quick spatio-temporal data queries based on an especially designedindex architecture.

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4

Page 9: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

When to Enable GeoMesaWhen you want to store and query spatio-temporal and geospatial data, you can enableGeoMesa.

1.4 Related ServicesThe related services are as follows:

l IAMCloudTable uses Identity and Access Management (IAM) for authentication.

l ECSCloudTable uses an Elastic Cloud Server (ECS) as a node in the cluster.

l VPCCloudTable uses Virtual Private Cloud (VPC) to provide a network topology for clustersto isolate clusters and control access.

l OBSCloudTable uses Object Storage Service (OBS) to store data backups and snapshots,making storage secure, reliable, and cost-effective.

l CDMCloudTable uses Cloud Data Migration (CDM) to migrate data from multiple datasources on the cloud and on-premises or third-party cloud to an HBase table of aCloudTable cluster.

l CTSCloudTable uses Cloud Trace Service (CTS) to provide users with operation records ofCloudTable resource operation requests and request results for querying, auditing, andbacktracking.

l Cloud EyeCloudTable uses Cloud Eye to monitor cluster performance metrics, delivering statusinformation in a concise and efficient manner. Cloud Eye supports alarm customizationso that you can keep track of all exceptions in real time.

1.5 Permissions Required for Using CloudTableThis section describes permissions required for using CloudTable.

Permission ListTable 1-1 lists the permissions for using CloudTable.

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5

Page 10: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Table 1-1 Permission description

NodeName

PermissionName

Managed CloudService Resource

Permission Description

CloudTable CloudTableAdministrator

CloudTable Service If you have both CloudTableAdministrator and TenantAdministrator permissions at thesame time, you can perform thefollowing operations:l Create, restart, and delete a

CloudTable cluster.l View and configure

CloudTable cluster parameters.l View the overview, cluster list,

and cluster details ofCloudTable.

l View the monitoringinformation and alarm list ofCloudTable.

l Query operation logs ofCloudTable.

If you have the CloudTableAdministrator permission only,you can perform the followingoperations:l Create, restart, and delete a

CloudTable cluster.l View the overview, cluster list,

and cluster details ofCloudTable.

l View the monitoringinformation and alarm list ofCloudTable.

l Query operation logs ofCloudTable.

1.6 RestrictionsPay attention to the following restrictions before you use CloudTable.

l CloudTable clusters must be created in VPC subnets.l You are advised to use one of the following browsers to log in to the CloudTable

management console.– Google Chrome 36.0 or later– Mozilla Firefox 35.0 or later– Internet Explorer 9.0 or later

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6

Page 11: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

If you use Internet Explorer 9.0, you may fail to log in to the CloudTablemanagement console because user Administrator is disabled by default in someWindows systems, such as Windows 7 Ultimate. The Internet Explorerautomatically selects a system user for installation. As a result, the Internet Explorercannot access the management console. Reinstall Internet Explorer 9.0 or later(recommended) or run Internet Explorer 9.0 as user Administrator.

l When you create a CloudTable cluster, the system will create a default security group.Do not delete or change the default security group. Deleting or changing the defaultsecurity group may cause a cluster exception and affect the use of CloudTable clusters.

l Do not assign the access permission for security groups used by CloudTable to preventmalicious access.

l Do not delete existing processes and files on the CloudTable cluster node. Otherwise, theCloudTable cluster may not be used.

l CloudTable does not save the initial password you set for logging in to a node. Please setand keep the password. To prevent malicious attacks, you are advised to set a passwordwith a high complexity.

l Cluster nodes are used only for running CloudTable clusters. You are advised to applyfor an independent ECS to deploy your other client applications and businessapplications.

CloudTable ServiceUser Guide 1 Overview

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7

Page 12: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

2 Getting Started with CloudTable

2.1 Creating a ClusterThis section describes how to create a cluster on the CloudTable management console.

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 Click Buy Cluster. The Buy Cluster page is displayed.

For example, the related parameter configurations are as follows:

l Billing Mode: Use the default value.

l Region: Use the default value.

l AZ: Use the default value.

l Name: Enter a cluster name, for example, cloudtable-demo.

l Storage Quota: The default storage quota is 800 GB. To apply for more quotas, clickApply for Higher Quota.

l VPC: You can use the existing VPC. If you do not have a VPC, click View VPC. On theVPC management console that is displayed, create a VPC. Then you can select the newlycreated VPC from the VPC drop-down list on CloudTable. For details, see the VirtualPrivate Cloud User Guide.

l Subnet: When you create a VPC, a subnet is created by default. You can select a subnetname.

l Security Group: You can use the default value and ensure that the rules listed in Figure2-1 are available in the selected security group.

– Direction: Inbound

– Type: IPv4

– Protocol: Any

– Port Range/ICMP Type: Any

– Remote End: Local security group

CloudTable ServiceUser Guide 2 Getting Started with CloudTable

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8

Page 13: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 2-1 Security group rule

If the rule does not exist, add the preceding rules to the security group according toFigure 2-2.

Figure 2-2 Adding rules

If you are concerned that the default security group has network security risks, you canset as few open ports as possible in the security group. However, you need to ensure thatthe security group rules listed in Table 2-1 exist in the selected security group.

Table 2-1 Customized security rules

Direction

Protocol

Port Range/ICMP Type

Source Address/Security Group

Usage

Outbound

ANY ANY ANY Permit in the outbounddirection

Inbound

TCP 22 0.0.0.0/0 ECS remote login port(Linux)

TCP 3389 0.0.0.0/0 ECS remote desktop service(Windows)

CloudTable ServiceUser Guide 2 Getting Started with CloudTable

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9

Page 14: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Direction

Protocol

Port Range/ICMP Type

Source Address/Security Group

Usage

TCP 16000 Security group ofthe CloudTablecluster

HMaster RPC port

TCP 16010 HMaster web UI port

TCP 16020 RegionServer RPC port

TCP 16030 RegionServer web UI port

TCP 2181 ZooKeeper client connectionmonitoring port

TCP 2888 Follower connectionmonitoring port

TCP 3888 ZooKeeper election port

TCP 10101 RegionServer JMX entry

TCP 10102 HMaster JMX entry

TCP 2000 Hagent access port

TCP 8085 RestServer access port

TCP 9600 RestServer access port

TCP 4242 OpenTSDB access port

UDP 8649 Gmond port

TCP 8649 Gmetad port

l CloudTable Version: Use the default value.l HBase Version: Select 1.3.1 from the drop-down list.l IAM Authentication: This function is disabled by default. Use the default value.l Advanced Feature: By default, OpenTSDB 2.3.0 and GeoMesa are not selected. You can

select or deselect them as required. In this example, OpenTSDB 2.3.0 and GeoMesa arenot selected.

l RS units: Use the default value 2.

Step 3 Click Next.

Step 4 Confirm the details of the order and click Submit. The cluster creation task is submittedsuccessfully.

Creating a cluster takes some time. The initial status of the cluster is Creating. After thecluster is created, the cluster status changes to In service.

----End

CloudTable ServiceUser Guide 2 Getting Started with CloudTable

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

10

Page 15: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

2.2 Getting Started with HBaseHBase is a column-based distributed storage system that features high reliability,performance, and scalability. This section describes how to use HBase from scratch. Forexample, how to run the Hbase shell command to create tables, insert data into tables, modifytables, read table data, delete table data, and delete tables.

Background Information

Suppose a user develops an application to manage users who use service A in an enterprise.The procedure of operating service A on the HBase client is as follows:

l Create the user_info table.l Add users' educational backgrounds and titles to the table.l Query user names and addresses by user ID.l Query information by user name.l Deregister users and delete user data from the user information table.l Delete the user information table after service A ends.

Table 2-2 User information

ID Name Gender Age Address

12005000201 A Male 19 Shenzhen, Guangdong

12005000202 B Female 23 Shijiazhuang, Hebei

12005000203 C Male 26 Ningbo, Zhejiang

12005000204 D Male 18 Xiangyang, Hubei

12005000205 E Female 21 Shangrao, Jiangxi

12005000206 F Male 32 Zhuzhou, Hunan

12005000207 G Female 29 Nanyang, Henan

12005000208 H Female 30 Kaixian, Chongqing

12005000209 I Male 26 Weinan, Shaanxi

12005000210 J Male 25 Dalian, Liaoning

Procedure

Step 1 Create a cluster named cloudtable-demo.

For details, see Creating a Cluster.

Step 2 Prepare a Linux ECS.

Assume that the ECS name is ecs_ 20170916. For details, see Preparing an ECS.

CloudTable ServiceUser Guide 2 Getting Started with CloudTable

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

11

Page 16: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Step 3 Install a client and start the shell to access the CloudTable cluster.

For details about how to use the HBase shell to access the cluster, see Using HBase Shell toAccess a Cluster.

Step 4 Run the following commands on the HBase client to implement service A.

1. Create the user_info user information table and populate it with related data according toTable 2-2.create 'user_info',{NAME => 'i'}For example, to add information about the user whose ID is 12005000201, run thefollowing commands:put 'user_info','12005000201','i:name','A'put 'user_info','12005000201','i:gender','Male'put 'user_info','12005000201','i:age','19'put 'user_info','12005000201','i:address','Shenzhen, Guangdong'

2. Add users' educational backgrounds and titles to the user_info table.For example, to add educational background and title information about user12005000201, run the following commands:put 'user_info','12005000201','i:degree','master'put 'user_info','12005000201','i:pose','manager'

3. Query user names and addresses by user ID.For example, to query the name and address of user 12005000201, run the followingcommand:scan 'user_info',{STARTROW=>'12005000201',STOPROW=>'12005000201',COLUMNS=>['i:name','i:address']}

4. Query information by user name.For example, to query information about user A, run the following command:scan 'user_info',{FILTER=>"SingleColumnValueFilter('i','name',=,'binary:A')"}

5. Delete user data from the user information table.All user data needs to be deleted. For example, to delete data of user 12005000201, runthe following command:delete 'user_info','12005000201','i'

6. Run the following command to delete the user information table.disable 'user_info';drop 'user_info'

Step 5 Delete the cluster.

For details, see Deleting a Cluster.

----End

CloudTable ServiceUser Guide 2 Getting Started with CloudTable

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

12

Page 17: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

3 Cluster Operation Instructions

3.1 OverviewLog in to the CloudTable Service management console. In the left navigation pane, clickOverview. You can view the following information on the Overview page shown in Figure3-1.

l Cluster Running Status: You can quickly view running status of all CloudTable clustersin the My Resources area.

l CloudTable Procedure: You can briefly learn about how to use CloudTable.

l Useful Link: You can download CloudTable documentation, including the user guideand FAQs, as well as the client and sample code by clicking links listed under UsefulLink.

Figure 3-1 Overview

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

13

Page 18: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Cluster Running StatusTable 3-1 lists all running status of CloudTable clusters on the CloudTable managementconsole.

Table 3-1 Cluster status description

Status Description

In service If the cluster is successfully created and can provide services, thecluster running status is In service.

Unavailable If the cluster status is Creation failed or Sub-health, the clusterrunning status is Unavailable.Sub-health indicates that the cluster status fails to be monitored withina specified period. You need to manually recover the cluster, forexample, by restarting the cluster.

Processing If the cluster status is Creating or the task status is Restarting,OpenTSDB enabling, or OpenTSDB disabling, the cluster runningstatus is Processing.

CloudTable ProcedureThe procedure of using CloudTable is as follows:

1. Create a cluster.To use CloudTable, you need to create a CloudTable cluster. For details about how tocreate a cluster, see Creating a Cluster.

2. Prepare a client.Before accessing the CloudTable cluster using a client, you need to download clientinstallation files and sample code. For details about how to prepare a client, see ClientOperation Instructions.

3. Store and access data.Based on your applications, you can use the CloudTable cluster as a storage backend tostore and access data.

3.2 Cluster Management ListLog in to the CloudTable management console. In the left navigation pane, click ClusterManagement. On the Cluster Management page, a cluster list is displayed. If there are alarge number of clusters, you can turn pages to view clusters in any state.

Clusters are listed in chronological order by default, with the latest cluster displayed at thetop. Table 3-2 and Table 3-3 provides parameters and icons in the cluster list.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

14

Page 19: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Table 3-2 Cluster management parameters

Parameter Description

Cluster Name Name of a cluster. Set this parameter when creating a cluster.

Cluster Status Cluster status, including Creating, In service, and Unavailable

Task Status Task status of a cluster

CloudTableVersion

CloudTable version information. Currently, version v1.1.5 is supported.

Created Time when a cluster is created

ZK Link ZooKeeper address

Billing Mode Cluster billing mode

Operation l Restart: Click Restart to restart a cluster. For details, seeRestarting a Cluster.

l Monitor: Click Monitor. The CloudTable Service Monitoringpage is displayed.

l More– Enable OpenTSDB: If you do not select OpenTSDB 2.3.0 when

creating a cluster, Enable OpenTSDB will be displayed. You canclick Enable OpenTSDB to enable it. For details, see EnablingOpenTSDB.

– Disable OpenTSDB: If you select OpenTSDB 2.3.0 whencreating a cluster, Disable OpenTSDB will be displayed. You canclick Disable OpenTSDB to disable it. For details, see DisablingOpenTSDB.

– Delete: You can click Delete to delete a cluster. For details, seeDeleting a Cluster.

Table 3-3 Icon description

Icon Description

Enter a cluster name in the search box and click to search for thecluster.

Click to manually refresh the cluster list.

3.3 Creating a ClusterYou can centrally manage clusters with CloudTable. A cluster is necessary for usingCloudTable. This section describes how to create a cluster on the CloudTable managementconsole.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

15

Page 20: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 Click Buy Cluster. The Buy Cluster page is displayed.

Step 3 Configure basic cluster information by referring to the following table.

Figure 3-2 Region

Table 3-4 Region

Parameter Description

Region Current working zone of the cluster. Currently, the CN North-Beijing1region is supported.

AZ An availability zone (AZ) is a physical region where resources useindependent power supplies and networks. AZs are physically isolatedbut interconnected through the internal network. This improves theavailability of applications. You are advised to create clusters in differentAZs.Select an AZ associated with the cluster region. AZ2 corresponds to theCN North-Beijing1 region.

Figure 3-3 Cluster configuration

Table 3-5 Cluster configuration

Parameter Description

Name Name of a cluster.A cluster name must start with a letter and contain 4 to 64 letters, digits,and hyphens (-). It cannot contain other special characters.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

16

Page 21: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Parameter Description

Storage Quota Storage capacity provided by the cluster for you. The unit is GB. Thedefault value is 800 GB.The parameter value must be an integer multiple of 10.

Figure 3-4 Network configuration

Table 3-6 Network configuration

Parameter Description

VPC A Virtual Private Cloud (VPC) is a secure, isolated, logical networkenvironment.You can select an existing VPC or click View VPC to apply for a newone.For more information about VPC, see the Virtual Private Cloud UserGuide.

Subnet A subnet provides dedicated network resources that are logicallyisolated from other networks, improving network security.A subnet is automatically created when a VPC is created. If you want tocreate a new one, follow instructions in the Virtual Private Cloud UserGuide.

Security Group A security group is used to control ECS access within a security groupor between security groups by defining access rules. You can definedifferent access control rules for a security group, and these rules takeeffect for all ECSs added to this security group.You can use an existing security group or click View Security Group tocreate a new one.For more information about security groups, see the Virtual PrivateCloud User Guide.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

17

Page 22: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 3-5 Software configuration

Table 3-7 Software configuration

Parameter Description

CloudTableVersion

CloudTable version information. Currently, version v1.1.5 is supported.

HBase Version HBase version information. Version 1.3.1 is supported.

IAMAuthentication

Whether to enable IAM authentication.

l indicates that IAM authentication is disabled and the normalmode is used by default.

l indicates that IAM authentication is enabled. In this case,the client and applications must be configured with the username,accesskey, and secretkey to access the cluster.

AdvancedFeature

l OpenTSDB 2.3.0: whether to enable OpenTSDB. Currently, theOpenTSDB version is 2.3.0. If you select this option, OpenTSDB isenabled.

l GeoMesa: whether to enable GeoMesa. If you select this option,GeoMesa is enabled.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

18

Page 23: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 3-6 Computing unit

Table 3-8 Computing unit

Parameter Description

RS Units Number of RegionServer units.

TSD Units Number of OpenTSDB units. This parameter is displayed only when theOpenTSDB advanced feature is enabled.

Step 4 Click Next.

Step 5 Confirm the details of the order and click Submit. The cluster creation task is submittedsuccessfully.

Step 6 Click Back to Cluster List to view the cluster status.

Creating a cluster takes some time. The initial status of the cluster is Creating. After thecluster is created, the cluster status changes to In service.

NOTE

After the CloudTable cluster is created, access the cluster by following instructions in Client OperationInstructions.

----End

3.4 Viewing Cluster Information

3.4.1 Viewing Basic Cluster InformationYou can monitor and manage the clusters you create. In the left navigation pane, click ClusterManagement. Click a cluster name to access its basic information page. Then you can viewcluster information and network configurations.

Table 3-9 and Table 3-10 describe parameters about basic cluster information.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

19

Page 24: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Table 3-9 Cluster information

Parameter Description

Cluster Name Name of a cluster. Set this parameter when creating a cluster.

Cluster ID Cluster ID

Cluster Status Cluster status information

Used StorageCapacity (GB)

Used storage capacity

RS Units Number of RegionServer units

Cluster StorageQuota (GB)

Storage capacity of the cluster

Charging Mode Charging mode of the cluster

I/O Type I/O type used by CloudTable

Created Time when a cluster is created

CloudTableVersion

CloudTable version information. Currently, v1.1.5 is supported.

TSD Units Number of OpenTSDB units.

OpenTSDBLink

OpenTSDB provides a web UI and you can access it using a URL.

l If OpenTSDB is enabled in the cluster, you can click to copy theOpenTSDB link address.

l After OpenTSDB is enabled in a cluster, you can search for thecluster in the cluster list on the Cluster Management page. In theOperation column of the cluster, choose More > DisableOpenTSDB to disable OpenTSDB.

l After OpenTSDB is disabled in a cluster, you can search for thecluster in the cluster list on the Cluster Management page. In theOperation column of the cluster, choose More > EnableOpenTSDB to enable OpenTSDB.

ZK Link ZooKeeper address.

You can click to copy the ZK link to the clipboard.

Table 3-10 Network configuration

Parameter Description

Region Service deployment region. Currently, the CN North-Beijing1 region issupported.

AZ AZ you select during cluster creation

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

20

Page 25: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Parameter Description

VPC VPC you select during cluster creationA VPC is a secure, isolated, logical network environment.

Subnet Subnet you select during cluster creationA subnet provides dedicated network resources that are logicallyisolated from other networks, improving network security.

Security Group Security group you select during cluster creation

3.4.2 Modifying HBase Parameters of the Cluster

Scenario

A CloudTable cluster has many HBase parameters related to read/write performance. You canmodify the HBase parameters to tune cluster performance under different read/write requestloads. You need to restart the cluster to make changes take effect.

ProcedureNOTE

l Restart the cluster after parameter configuration modification. Otherwise, service interruption maytake place.

l Do not modify cluster parameters when the cluster is being restarted.

Step 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 Click the name of a cluster for which you want to modify HBase parameters to access thebasic cluster information page.

Step 4 In the Parameter Configuration area, click the Parameters tab to modify HBaseparameters.

For details about the HBase parameters you can modify, see Table 3-11.

1. Select the target parameter and click in the Parameter Running Value column.

2. Enter a new value in the text box, and then click . If the system prompts "Theparameter changed to xx successfully. Save the modified value.", the parameter value issuccessfully changed.

If you want to cancel it, click .

3. Click Save Change in the upper left corner of the parameter list. The Save Changedialog box is displayed.

4. In the Save Change dialog box, verify whether the parameter settings are correct. SelectRestart the cluster immediately and click OK.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

21

Page 26: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 3-7 Save changes

– After you select Restart the cluster immediately and click OK, the cluster restartsimmediately. After the cluster restart is complete, the new parameter configurations

take effect. Click above the parameter list. The system prompts "The newvalue is applied" above the parameter list.

– If you do not select Restart the cluster immediately and click OK in the SaveChange dialog box, the system prompts "The new value is not applied" above theparameter list. In this case, you need to restart the cluster for the changes to takeeffect. For details about how to restart a cluster, see Restarting a Cluster.

– If the new parameter value is incorrect, click Quick Restore to cancel themodification.

Step 5 After modifying parameters, you can click the Change History tab to view the changehistory.

On the Change History tab page, you can view the following information.

l Name: Name of the changed parameter.

l Old Value: Old parameter running value

l New Value: New parameter running value

l Modification Time: Time when you modify a parameter running value

----End

HBase Parameters

Table 3-11 lists HBase parameters you can modify currently.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

22

Page 27: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

NOTE

The sum of the values of hbase.regionserver.global.memstore.size and hfile.block.cache.size cannotexceed 0.8.

Table 3-11 HBase parameters

Parameter DefaultValue

Value Range Unit Description

hbase.regionserver.thread.compaction.small

1 [1,20] -- Indicates the number ofHFile compactionthreads. You canincrease the parametervalue in heavy-put-loadscenarios.

hbase.regionserver.global.memstore.size

0.4 (0,0.8) -- It is recommended thatyou set this parameter to"hbase.hregion.memstore.flush.size x Number ofregions with activewrites/RegionServer GC-Xmx)." The defaultvalue is 0.4, indicatingthat 40% ofRegionServer GC -Xmxis used.

hbase.hstore.blockingStoreFiles

60 [1,2147483647] -- When the HFile numberin the column clusterreaches this threshold,all operations in theregion are blocked untilthe compaction iscomplete. You canincrease the parametervalue in heavy-put-loadscenarios.

hbase.client.scanner.timeout.period

60000 [1,2147483647] ms A client andRegionServer parameter,indicating the scan leaseperiod. It isrecommended that youset this parameter to anintegral multiple of60000 ms, and increasethe parameter value inheavy-read-loadscenarios. Unit: ms.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

23

Page 28: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Parameter DefaultValue

Value Range Unit Description

hfile.block.cache.size

0.2 (0,0.8) -- Indicates the data cachepercentage in theRegionServer GC –Xmx.You can increase theparameter value inheavy-read-loadscenarios, in order toimprove cache hit ratioand performance. Thedefault value is 0.2,indicating that 20% ofRegionServer GC -Xmxis used.

hbase.regionserver.handler.count

100 [1,300] -- Indicates the number ofRPC server instances onthe RegionServer. Therecommended valueranges from 100 to 300.

hbase.regionserver.metahandler.count

50 [1,100] -- Indicates the number ofprogram instances forprocessing prioritizedrequests. Therecommended valueranges from 20 to 100.

hbase.hstore.flusher.count

2 [1,10] -- Indicates the number ofmemstore flush threads.You can increase theparameter value inheavy-put-loadscenarios.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

24

Page 29: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Parameter DefaultValue

Value Range Unit Description

hbase.ipc.server.callqueue.read.ratio

0.5 [0,1] -- When used underdifferent load models, itcontrols the ratiobetween the numbers ofread and write RPCqueues. The value rangesfrom 0 to 1.0, and thedefault value is 0.5.0 indicates the total RPCqueues of read and writeoperations.If the value is less than0.5, it indicates that theread load is less than thewrite load.0.5 indicates that theread load equals to thewrite load.If the value is greaterthan 0.5, it indicates thatthe read load is greaterthan the write load.1.0 indicates that allRPC queues except oneare used for readoperations.

3.5 Enabling or Disabling OpenTSDB

3.5.1 Enabling OpenTSDBIf you do not select OpenTSDB when creating a CloudTable cluster, you can enableOpenTSDB after the cluster is created to provide the HTTP access function.

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 In the upper right corner of the cluster list, enter the name of a cluster in the search box and

click .

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

25

Page 30: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 3-8 Searching for a cluster

Step 4 In the Operation column of a cluster for which you want to enable OpenTSDB, choose More> Enable OpenTSDB. In the dialog box that is displayed, click OK to enable OpenTSDB.

Figure 3-9 shows the location of Enable OpenTSDB.

Figure 3-9 Enabling OpenTSDB

----End

Using HTTP APIs to Access OpenTSDB

After OpenTSDB is enabled, OpenTSDB uses HTTP for external access. You can use aOpenTSDB link to access OpenTSDB on ECS. An HTTP request will be sent to a resourcepath for data read and write.

OpenTSDB 2.3.0 is used in CloudTable and its APIs are consistent with the APIs of the opensource OpenTSDB.

OpenTSDB System Table

OpenTSDB stores time series data based on HBase. After OpenTSDB is enabled in a cluster,the system will create four HBase tables in the cluster. Table 3-12 describes the OpenTSDBsystem tables.

NOTE

Do not modify the four HBase tables manually, because this may cause unavailable OpenTSDB.

Table 3-12 OpenTSDB system tables

Table Name Description

OPENTSDB.DATA It stores data points. All OpenTSDB data isstored in this table.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

26

Page 31: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Table Name Description

OPENTSDB.UID It stores unique identifier (UID) mappings.Each metric in a data point is mapped to aUID, and each tag in a data point is mappedto a UID. At the same time, each UID isreversely mapped to the metric or tag. Thesemappings are stored in this table.

OPENTSDB.TREE It stores metric structure information. Thisfeature is disabled by default.

OPENTSDB.META It stores time series indexes and metadata.This feature is disabled by default.

3.5.2 Disabling OpenTSDBYou can disable OpenTSDB when you stop accessing OpenTSDB and will not use it anymore. After you disable OpenTSDB, you cannot access OpenTSDB using HTTP, butOpenTSDB system tables and your historical data will not be deleted. You can enableOpenTSDB again in the future.

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 In the upper right corner of the cluster list, enter the name of a cluster in the search box and

click .

Figure 3-10 Searching for a cluster

Step 4 In the Operation column of a cluster for which you want to disable OpenTSDB, chooseMore > Disable OpenTSDB. In the dialog box that is displayed, select the check box andclick OK to disable OpenTSDB.

Figure 3-11 shows the location of Disable OpenTSDB.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

27

Page 32: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 3-11 Disabling OpenTSDB

Step 5 OpenTSDB system tables and historical user data will not be deleted after OpenTSDB isdisabled. To delete the system tables, disable OpenTSDB and run the HBase shell command.

For details about how to run the HBase shell command, see HBase Shell Commands.

----End

3.6 Restarting a Cluster

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 In the upper right corner of the cluster list, enter the name of a cluster in the search box and

click .

Figure 3-12 Searching for a cluster

Step 4 In the Operation column of the cluster, click Restart.

Figure 3-13 Restarting a cluster

Step 5 In the dialog box that is displayed, select the check box and click OK to restart the cluster.

----End

3.7 Deleting a ClusterYou can delete clusters you will no longer use.

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

28

Page 33: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 In the upper right corner of the cluster list, enter the name of a cluster in the search box and

click .

Figure 3-14 Searching for a cluster

Step 4 In the Operation column of the cluster, choose More > Delete.

Step 5 In the dialog box that is displayed, select the check box and click OK to delete the cluster.

----End

CloudTable ServiceUser Guide 3 Cluster Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

29

Page 34: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

4 Client Operation Instructions

4.1 Preparing an ECSBefore using HBase shell to access a cluster or access a cluster web UI, you need to preparean ECS in the same region as the cluster.

You can select an ECS of different images and functions to meet your needs.

l If you use an ECS to access the cluster through HBase shell, you are advised to use aLinux ECS.

l If you use an ECS to access the cluster on a web UI, you are advised to use a WindowsECS.

Preparing an ECS

For details about how to purchase a Linux or Windows ECS, see section Purchasing andLogging In to a Linux ECS in the Elastic Cloud Server Quick Start.

The ECS you purchase must meet the following requirements:

l The ECS must have the same region, AZ, VPC, and subnet as the CloudTable cluster.For details about VPC operations, see VPC and Subnet in the Virtual Private CloudUser Guide.

l The ECS must have the same security group as the CloudTable cluster.For details about security group operations, see Security > Security Group in theVirtual Private Cloud User Guide.Check whether the security group has the following rules:– Direction: Outbound– Type: IPv4– Protocol: Any– Port Range/ICMP Type: Any– Remote End: 0.0.0.0/0If the preceding rules do not exist, add rules according to Figure 4-1.– Direction: Outbound

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

30

Page 35: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

– Protocol: TCP

– Port Range: 80

– Destination: IP address, set to 0.0.0.0/0

Figure 4-1 Adding rules

l When purchasing an ECS, you need to set EIP to Automatically assign to bind to theelastic IP address (EIP).

For details about how to bind to an EIP, see Network Components > EIP in the VirtualPrivate Cloud User Guide.

l To access a Linux ECS, you need to log in to a Linux ECS using a password (SSH).

For details about how to log in to the Linux ECS, see Getting Started > Logging In toan ECS > Logging In to a Linux ECS Using a Password (SSH) in the Elastic CloudServer User Guide.

l Accessing a Windows ECS

For details, see Getting Started > Logging In to an ECS > Logging In to a WindowsECS Using a Password (MSTSC) in the Elastic Cloud Server User Guide.

4.2 Using HBase Shell to Access a ClusterYou can use the HBase shell to access a cluster by deploying a client with one click ormanually installing a client on an ECS. Deploying a Client with One Click isrecommended.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

31

Page 36: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Deploying a Client with One Click

Step 1 Prepare a Linux ECS.

Using a one-click client deployment tool. The recommended Linux ECS operating systemsare EulerOS, CentOS, Ubuntu, and SUSE. For details, see Preparing an ECS.

Step 2 Download the one-click client deployment tool.

Use the SSH login tool (such as PuTTY) to remotely log in to the Linux ECS through the EIPand run the following command to obtain the one-click deployment tool.

curl -O -k "http://cloudtable-publish.obs.myhwclouds.com/quick_start_hbase_shell.sh"

Step 3 Obtain a cluster access address.

In the cluster list, search for the ZK link of the cluster and use it as the cluster access address.

To obtain the ZK link, log in to the CloudTable management console and choose ClusterManagement. Search for the cluster and obtain its ZK link from the cluster list, as shown inFigure 4-2.

Figure 4-2 ZK link

Step 4 Use the tool to deploy the client.

Replace $zookeeper_address in the following command with the ZK link you obtained inStep 3. Then, run the command on the CLI of the ECS to deploy the client by one click.

source quick_start_hbase_shell.sh $zookeeper_address

Step 5 Set security mode parameters.

Perform this step only when IAM authentication is enabled during cluster creation. Otherwise,skip this step.

1. Open the conf/hbase-site.xml file in the client installation directory.2. Uncomment the security parameters except hbase.zookeeper.quorum and

mapreduce.cluster.local.dir.By default, the security parameters in the hbase-site.xml file are commented out. Youneed to uncomment the security parameters before configuring them.

3. Configure the username, accesskey, and secretkey.– cloudtable.iam.username: username– cloudtable.iam.accesskey: AK plaintext– cloudtable.iam.secretkey: SK plaintext

NOTE

– You can move your cursor over your account in the upper right corner and choose MyCredential. Click the Access Key tab and then the Add Access Key button to add an accesskey. After the access key is generated, you must download and save the key file that containsthe AK plaintext and SK plaintext.

– If you fail to query the AK plaintext and SK plaintext on the interface after the generation ofthe access key due to some reasons, for example, loss of the AK plaintext and SK plaintext,you can add another access key to make the previous one become invalid.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

32

Page 37: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Retain the default values of other parameters.The configuration example is as follows:<configuration><property><name>hbase.zookeeper.quorum</name><value>xxx-zk1.cloudtable.com,xxx-zk2.cloudtable.com,xxx-zk3.cloudtable.com</value></property>

<property><name>mapreduce.cluster.local.dir</name><value>${hadoop.tmp.dir}/mapred/local</value></property>

<property><name>hbase.security.authorization</name><value>true</value></property>

<property><name>hbase.security.authentication</name><value>digest</value></property>

<property><name>hbase.rpc.protection</name><value>authentication</value></property>

<property><name>cloudtable.iam.service.password.encrypted</name><value>false</value></property>

<property><name>cloudtable.iam.username</name><value>op_svc_xxx</value></property>

<property><name>cloudtable.iam.accesskey</name><value>XXXXXXXXXX</value></property>

<property><name>cloudtable.iam.secretkey</name><value>XXXXXXXXXXXXXXXXXXXX</value></property>

<property><name>hbase.client.userprovider.class</name><value>org.apache.hadoop.hbase.security.UserProviderExtend</value></property>

<property><name>hbase.zookeeper.custom.auth.enabled</name><value>true</value></property>

<property><name>hbase.zookeeper.authProvider.scheme</name><value>IAM_AK_SK</value></property></configuration>

Step 6 Start the shell to access the cluster.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

33

Page 38: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Run the bin/hbase shell command to start the shell to access the cluster.

----End

Manually Installing a Client

Step 1 Prepare a Linux ECS.

For details, see Preparing an ECS.

Step 2 Configure /etc/hosts for the Linux ECS.

Configure the host IP address in the /etc/hosts file to accelerate the access to the CloudTablecluster.

To configure /etc/hosts for a Linux ECS, perform the following steps:

1. Log in to the Linux ECS as user root.2. Run the hostname command to query the host name.

[root@euler ~]# hostnameeuler.novalocal

3. Run the ifconfig command to query the IP address of the local host.

Figure 4-3 Querying the IP address

4. Run the vi/etc/hosts command to edit the file and add the host configuration.192.168.0.58 euler.novalocal127.0.0.1 euler.novalocal

5. Press Esc and enter :wq to save the settings and exit.6. Run the following command to check whether the IP address is successfully added:

cat /etc/hosts7. Run the following command to check whether the host name can be resolved:

ping Host name

Step 3 Configure DNS for the Linux ECS.

The DNS server resolves the domain name for the CloudTable cluster to access ZooKeeper.The IP address of the DNS server is 100.125.1.250.

To configure DNS for a Linux ECS, perform the following steps:

1. Log in to the Linux ECS as user root.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

34

Page 39: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

2. Run the vi /etc/resolv.conf command to edit the /etc/resolv.conf file and add thenameserver configuration.

Above the Internet IP address, add two lines to input the DNS server IP addresses in thefollowing format.nameserver 100.125.1.250

3. Press Esc and enter :wq to save the settings and exit.

4. Run the following command to check whether the IP address is successfully added:cat /etc/resolv.conf

5. Run the following command to check whether an IP address can be resolved from theaccess domain name.nslookup Access domain name

NOTE

Obtain the access domain name from the ZK link of the CloudTable cluster.

Step 4 Download a client.

Log in to the CloudTable management console and click Overview. Click Download Clienton the right.

Figure 4-4 Downloading the client

Step 5 Install the client.

1. Use a file transfer tool (such as WinSCP) to upload the client installation package to theLinux ECS.

2. Use the SSH login tool (such as PuTTY) to log in to the Linux ECS through the EIP.

For details about how to log in to the Linux ECS, see Getting Started > Logging In toan ECS > Logging In to a Linux ECS Using a Password (SSH) in the Elastic CloudServer User Guide.

Run the following command to decompress the client installation package:cd <Path of the client installation package>tar xzvf hbase-1.3.1-bin.tar.gz

<Path of the client installation package>: Replace it with the actual path.

3. Configure the ZooKeeper address in a configuration file.

In the decompression directory of the client installation package, open the conf/hbase-site.xml file and set the following parameters:

– hbase.zookeeper.quorum: The value of this parameter is the ZK link of the clusterfound in the cluster list.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

35

Page 40: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

To obtain the ZK link, log in to the CloudTable management console and chooseCluster Management. Search for the cluster and obtain its ZK link from the clusterlist, as shown in Figure 4-5.

Figure 4-5 ZK link

– mapreduce.cluster.local.dir: Check whether the configuration item exists. If theconfiguration item does not exist, add it.

The configuration example is as follows:<configuration><property><name>hbase.zookeeper.quorum</name><value>xxx-zk1.cloudtable.com,xxx-zk2.cloudtable.com,xxx-zk3.cloudtable.com</value></property>

<property><name>mapreduce.cluster.local.dir</name><value>${hadoop.tmp.dir}/mapred/local</value></property></configuration>

Step 6 Set security mode parameters.

Perform this step only when IAM authentication is enabled during cluster creation. Otherwise,skip this step.

1. Open the conf/hbase-site.xml file in the client installation directory.2. Uncomment the security parameters except hbase.zookeeper.quorum and

mapreduce.cluster.local.dir.By default, the security parameters in the hbase-site.xml file are commented out. Youneed to uncomment the security parameters before configuring them.

3. Configure the username, accesskey, and secretkey.– cloudtable.iam.username: username– cloudtable.iam.accesskey: AK plaintext– cloudtable.iam.secretkey: SK plaintext

NOTICEYou can move your cursor over your account in the upper right corner and chooseMy Credential. Click the Access Key tab and then the Add Access Key button toadd an access key. After the access key is generated, you must download and savethe key file that contains the AK plaintext and SK plaintext.If you fail to query the AK plaintext and SK plaintext on the interface after thegeneration of the access key due to some reasons, for example, loss of the AKplaintext and SK plaintext, you can add another access key to make the previousone become invalid.

Retain the default values of other parameters.The configuration example is as follows:

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

36

Page 41: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

<configuration><property><name>hbase.zookeeper.quorum</name><value>xxx-zk1.cloudtable.com,xxx-zk2.cloudtable.com,xxx-zk3.cloudtable.com</value></property>

<property><name>mapreduce.cluster.local.dir</name><value>${hadoop.tmp.dir}/mapred/local</value></property>

<property><name>hbase.security.authorization</name><value>true</value></property>

<property><name>hbase.security.authentication</name><value>digest</value></property>

<property><name>hbase.rpc.protection</name><value>authentication</value></property>

<property><name>cloudtable.iam.service.password.encrypted</name><value>false</value></property>

<property><name>cloudtable.iam.username</name><value>op_svc_xxx</value></property>

<property><name>cloudtable.iam.accesskey</name><value>XXXXXXXXXX</value></property>

<property><name>cloudtable.iam.secretkey</name><value>XXXXXXXXXXXXXXXXXXXX</value></property>

<property><name>hbase.client.userprovider.class</name><value>org.apache.hadoop.hbase.security.UserProviderExtend</value></property>

<property><name>hbase.zookeeper.custom.auth.enabled</name><value>true</value></property>

<property><name>hbase.zookeeper.authProvider.scheme</name><value>IAM_AK_SK</value></property></configuration>

Step 7 Start the shell to access the cluster.

Run the bin/hbase shell command to start the shell to access the cluster.

----End

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

37

Page 42: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

4.3 HBase Shell CommandsThis section describes common HBase shell commands. For more HBase shell commands,visit https://learnhbase.wordpress.com/2013/03/02/hbase-shell-commands/.

1. Start the HBase shell.Go to the HBase directory and run the following command to access the HBase shell:./bin/hbase shell

2. Get help information.After you run the help command in the HBase shell, all command information as well ascommon command instructions and use methods will be returned.hbase(main):001:0> help

3. Create a table.Run the create command to create a table. When creating a table, you must specify thetable name and column family name.hbase(main):007:0> create 'cloudtable','cf'0 row(s) in 1.5530 seconds

=> Hbase::Table - cloudtable4. Query a table:

Run the list command to query the specified table. The table name must be specified.hbase(main):009:0> list 'cloudtable'TABLEcloudtable1 row(s) in 0.0060 seconds

=> ["cloudtable"]5. Insert a piece of record to a table.

Run the put command to insert a piece of record to the specified table. You need tospecify the table name, primary key, customized column, and inserted value.hbase(main):004:0> put 'cloudtable','row1','cf:a','value1'0 row(s) in 0.2720 secondsThe following describes parameters in the command:– cloudtable: table name– row1: primary key– cf:a: customized column– value1: inserted value

6. Scan recordsRun the scan command to scan a table. You need to specify the table name and you canscan a full table or specify a scanning range.hbase(main):001:0> scan 'cloudtable'ROW COLUMN+CELLrow1 column=cf:a, timestamp=1504866237162, value=value11 row(s) in 0.2420 seconds

7. Query a single record.Run the get command to query a single record. The name and primary key of the queriedtable must be specified.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

38

Page 43: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

hbase(main):001:0> get 'cloudtable','row1'COLUMN CELLcf:a timestamp=1504866237162, value=value11 row(s) in 0.2280 seconds

8. Disable a table.Before modifying or deleting a table, you need to disable the table. Run the disablecommand to disable the table. When you perform operations on a disabled table,"ERROR" will be reported, indicating that the table is disabled.hbase(main):002:0> disable 'cloudtable'0 row(s) in 2.3550 seconds

9. Enable a table.If you want to use a table that has been disabled, run the enable command to enable thetable.hbase(main):004:0> enable 'cloudtable'0 row(s) in 1.2500 seconds

10. Delete a table.Run the drop command to delete a table that you do not require any more. Beforedeleting a table, disable the table. Otherwise, "ERROR" will be displayed, indicating thatthe table is enabled. Deleting a table will cause data loss. Therefore, exercise cautionwhen deleting a table.hbase(main):007:0> disable 'cloudtable'0 row(s) in 2.2380 seconds

hbase(main):008:0> drop 'cloudtable'0 row(s) in 1.2600 seconds

11. Exit the HBase shell.Run the quit command to exit the HBase shell.hbase(main):009:0> quit

4.4 Accessing the HBase Web UI

ScenarioThe web UI) displays the HBase cluster status, including cluster overview, RegionServer andmaster node information, snapshots, and running processes. You can learn about the overallHBase cluster status based on information displayed on the web UI.

Procedure

Step 1 Prepare a Windows ECS.

For details, see Preparing an ECS.

Step 2 Configure DNS for the Windows ECS.

The DNS server resolves the domain name for the CloudTable cluster to access ZooKeeper.The IP address of the DNS server is 100.125.1.250.

To configure DNS for a Windows ECS, perform the following steps:

1. Log in to the Windows ECS as user Administrator.2. On the Windows ECS, choose Start > Control Panel > Network and Internet >

Network and Sharing Center.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

39

Page 44: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

3. In the Network and Sharing Center window, click Change adapter settings on theright.

4. Right-click the network adapter name and choose Properties from the shortcut menu.The Properties dialog box is displayed.

5. Click Internet Protocol Version 4 (TCP/IPv4). The Internet Protocol Version 4(TCP/IPv4) Properties dialog box is displayed.

Figure 4-6 Internet protocol version 4 (TCP/IPv4) properties

6. In the dialog box shown in Figure 4-6, select Use the following DNS server addresses,enter the IP address in the Preferred DNS server textbox, and click OK.

7. Click Start, enter cmd in the search box, and press Enter. The CLI is displayed.8. Run the following command on the CLI to check whether the DNS is successfully

configured:ping Access domain name

Step 3 In the browser address box, enter the following URL:http://xxx-zk1.cloudtable.com:16010/master-status

In the preceding URL, xxx-zk1.cloudtable.com indicates the IP address of the active masternode. The method of obtaining the master node address is the same as that of obtaining theZooKeeper address. The zk1 or zk2 address in the ZooKeeper address list is the domain nameof the master node.

You can obtain the ZooKeeper address (ZK link) from the basic cluster information page. Fordetails, Viewing Basic Cluster Information.

Step 4 If you open the backup master page, you can click the link displayed in Figure 4-7 to accessthe active master page.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

40

Page 45: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 4-7 Backup master page

l On the HBase web UI of the active master, the HBase summary is displayed on thehomepage, including the following information:– The Region Servers page displays basic RegionServer information, as shown in

Figure 4-8.

Figure 4-8 Region Servers

– The Backup Master page displays backup master information, as shown in Figure4-9.

Figure 4-9 Backup Masters

– The Tables page displays information about HBase tables, including User Tables,Catalog Tables, and Snapshots, as shown in Figure 4-10.

Figure 4-10 Tables

– The Tasks page displays information about tasks running on HBase, such as thestart time and status, as shown in Figure 4-11.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

41

Page 46: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 4-11 Tasks

l The Table Details page displays overview of HBase storage tables, as shown in Figure4-12.

Figure 4-12 TableDetails

l The Debug dump page displays HBase debugging information, as shown in Figure4-13.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

42

Page 47: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 4-13 Debug dump

l The HBase Configuration page displays HBase control information, as shown inFigure 4-14.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

43

Page 48: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 4-14 HBase Configuration

----End

4.5 Using the GeoMesa Command Line ToolsYou can use the GeoMesa shell or HBase shell to access a cluster by deploying a client withone click on an ECS.

Deploying a Client with One Click

Step 1 Prepare a Linux ECS.

Using a one-click client deployment tool. The recommended Linux ECS operating systemsare EulerOS, CentOS, Ubuntu, and SUSE. For details, see Preparing an ECS.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

44

Page 49: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Step 2 Download the one-click client deployment tool.

Run the following command to obtain the one-click client deployment tool:

curl -O -k "http://cloudtable-publish.obs.myhwclouds.com/quick_start_hbase_shell.sh"

Step 3 Obtain a cluster access address.

In the cluster list, search for the ZK link of the cluster and use it as the cluster access address.

To obtain the ZK link, log in to the CloudTable management console and choose ClusterManagement. Search for the cluster and obtain its ZK link from the cluster list, as shown inFigure 4-15.

Figure 4-15 ZK link

Step 4 Use the tool to deploy the client.

Use the ZK link address obtained in step 2 as the value of the $zookeeper_addressparameter, and run the following command to deploy the client by one click:

source quick_start_hbase_shell.sh $zookeeper_address

----End

4.6 GeoMesa Command LineThis section describes common GeoMesa commands. For more GeoMesa commands, visithttp://www.geomesa.org/documentation/user/accumulo/commandline_tools.html.

1. View classpath.After you run the classpath command, all classpath information of the current commandline tool will be returned.bin/geomesa-hbase classpath

2. Create a table.Run the create-schema command to create a table. When creating a table, you need tospecify the directory name, table name, and table specifications at least.bin/geomesa-hbase create-schema -c geomesa -f test -s Who:String,What:java.lang.Long,When:Date,*Where:Point:srid=4326,Why:String

3. Describe a table.Run the describe-schema command to obtain table descriptions. When describing atable, you need to specify the directory name and table name.bin/geomesa-hbase describe-schema -c geomesa -f test

4. Import data in batches.Run the ingest command to import data in batches. When importing data, you need tospecify the directory name, table name, table specifications, and the related dataconverter.Data (license plate number, vehicle color, longitude, dimension, and time): data.csv.Save the data table to the data folder.AAA,red,113.918417,22.505892,2017-04-09 18:03:46BBB,white,113.960719,22.556511,2017-04-24 07:38:47

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

45

Page 50: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

CCC,blue,114.088333,22.637222,2017-04-23 15:07:54DDD,yellow,114.195456,22.596103,2017-04-21 21:27:06EEE,black,113.897614,22.551331,2017-04-09 09:34:48

Table structure definition: myschema.sft. Save myschema.sft to the conf folder of theGeoMesa command line tool.geomesa.sfts.cars = { attributes = [ { name = "carid", type = "String", index = true } { name = "color", type = "String", index = false } { name = "time", type = "Date", index = false } { name = "geom", type = "Point", index = true,srid = 4326,default = true } ]}

Converter definition: myconvertor.convert Save myconvertor.convert to the conffolder of the GeoMesa command line tool.geomesa.converters.cars= { type = "delimited-text", format = "CSV", id-field = "$fid", fields = [ { name = "fid", transform = "concat($1,$5)" } { name = "carid", transform = "$1::string" } { name = "color", transform = "$2::string" } { name = "lon", transform = "$3::double" } { name = "lat", transform = "$4::double" } { name = "geom", transform = "point($lon,$lat)" } { name = "time", transform = "date('YYYY-MM-dd HH:mm:ss',$5)" } ]}

Run the following command to import data:bin/geomesa-hbase ingest -c geomesa -C conf/myconvertor.convert -s conf/myschema.sft data/data.csv

For details about other parameters for importing data, visit http://www.geomesa.org/documentation/user/accumulo/examples.html#ingesting-data.

5. Query explanations.

Run the explain command to obtain execution plan explanations of the specified querystatement. You need to specify the directory name, table name, and query statement.bin/geomesa-hbase explain -c geomesa -f cars -q "carid = 'BBB'"

6. Conduct statistical analysis.

Run the stats-analyze command to conduct statistical analysis on the data table. Inaddition, you can run the stats-bounds, stats-count, stats-histogram, and stats-top-kcommands to collect more detailed statistics on the data table.bin/geomesa-hbase stats-analyze -c geomesa -f carsbin/geomesa-hbase stats-bounds -c geomesa -f carsbin/geomesa-hbase stats-count -c geomesa -f carsbin/geomesa-hbase stats-histogram -c geomesa -f carsbin/geomesa-hbase stats-top-k -c geomesa -f cars

7. Export a feature.

Run the export command to export a feature. When exporting the feature, you mustspecify the directory name and table name. In addition, you can specify a querystatement to export the feature.bin/geomesa-hbase export -c geomesa -f cars -q "carid = 'BBB'"

8. Delete a feature.

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

46

Page 51: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Run the delete-features command to delete a feature. When deleting the feature, youmust specify the directory name and table name. In addition, you can specify a querystatement to delete the feature.bin/geomesa-hbase delete-features -c geomesa -f cars -q "carid = 'BBB'"

9. Obtain the names of all tables in the directory.Run the get-type-names command to obtain the names of tables in the specifieddirectory.bin/geomesa-hbase get-type-names -c geomesa

10. Delete a table.Run the remove-schema command to delete a table. You need to specify the directoryname and table name at least.bin/geomesa-hbase remove-schema -c geomesa -f testbin/geomesa-hbase remove-schema -c geomesa -f cars

11. Delete a catalog.Run the delete-catalog command to delete the specified catalog.bin/geomesa-hbase delete-catalog -c geomesa

CloudTable ServiceUser Guide 4 Client Operation Instructions

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

47

Page 52: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

5 Batch Data Import

5.1 Using CDM to Migrate Data to CloudTableCloudTable uses CDM to migrate data from multiple data sources on the cloud and on-premises or third-party cloud to an HBase table of a CloudTable cluster. For details about thesupported data sources, see Cloud Data Migration > User Guide > Introduction > DataSources Supported by CDM.

The procedure of using CDM to migrate data to CloudTable is as follows:

1. Creating a CloudTable Cluster2. Using CDM to Migrate Data to CloudTable3. Viewing the Imported Data on CloudTable

Creating a CloudTable Cluster

Step 1 Create a CloudTable cluster.

For details about how to create a CloudTable cluster, see Creating a Cluster. If there is oneavailable, you can skip this step.

For example, create a CloudTable cluster named CloudTable-demo.

----End

Using CDM to Migrate Data to CloudTable

Step 1 Create a CDM cluster.

The CDM cluster you create must have the same region, AZ, VPC, subnet, and security groupas the CloudTable cluster.

For details about how to create a CDM cluster, see Cluster Management > Creating aCluster in the Cloud Data Migration User Guide.

For example, create a CDM cluster named CDM-demo.

Step 2 Create a source link in the new CDM cluster.

CloudTable ServiceUser Guide 5 Batch Data Import

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

48

Page 53: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

CDM enables you to migrate data from multiple data sources to CloudTable. Create a link asthe source link based on the actual data source. The link is used for CDM to connect to thedata source and read data from the data source.

For details about how to create a link, see Link Management in the Cloud Data MigrationUser Guide.

Step 3 Create a destination link in the new CDM cluster.

In the CDM cluster, create a link for which Data Source Type is set to CloudTable as adestination link. The link is used for CDM to connect to the CloudTable cluster, read datafrom the data source, and import data to the HBase table of the CloudTable cluster.

For details about how to create a link, see Link Management in the Cloud Data MigrationUser Guide.

The following is an example of destination link settings.

1. On the Cluster Management page, locate the newly created CDM cluster and click JobManagement in the row of the CDM cluster. The job management page is displayed.

2. Click the Link Management tab and then click Create Link. On the Select connectortype page that is displayed, select CloudTable Service and click Next.

Figure 5-1 Selecting a connector type

3. Configure link parameters.– Name: Enter a link name. You can create a link name based on the data source type

for easy memorization. For example, enter cloudtable_connect.– Zookeeper Quorum: Set this parameter to the ZK link of the CloudTable cluster.

To obtain the ZK link, log in to the CloudTable management console and chooseCluster Management. Search for the cluster and obtain its ZK link from the clusterlist.

CloudTable ServiceUser Guide 5 Batch Data Import

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

49

Page 54: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 5-2 Link parameter configuration

4. Click Save.

Step 4 In the CDM cluster, create a job on the Table/File Migration page.

For details about how to create a table/file migration job, see Job Management > Creating aJob > Migrating a Table or File in the Cloud Data Migration User Guide.

NOTE

When you create a table/file migration job, if the table or file of the source end does not have thecorresponding HBase table in the destination CloudTable cluster, set a table name and field mapping inthe job for the destination end (the field name can be copied from the source end). Therefore, when a jobis running, the corresponding HBase table is automatically created at the destination end.

The following uses the SFTP data source on an ECS as an example to describe how to createa job.

1. On the Cluster Management page, locate the newly created CDM cluster and click JobManagement in the row of the CDM cluster. The job management page is displayed.

2. Choose Table/File Migration > Create Job.3. Set parameters as follows:

Figure 5-3 Configuring basic information

CloudTable ServiceUser Guide 5 Batch Data Import

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

50

Page 55: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

4. Set the field mapping as follows:

Figure 5-4 Field mapping

5. Configure the task as follows:

Figure 5-5 Configuring a task

6. Click Save and Run.

----End

Viewing the Imported Data on CloudTable

Step 1 Prepare a Linux ECS.

Assume that the ECS name is ecs_ 20170916. For details, see Preparing an ECS.

Step 2 Install a client and start the shell to access the CloudTable cluster.

For details about how to use the HBase shell to access the cluster, see Using HBase Shell toAccess a Cluster.

Step 3 On the CloudTable client, run a command to query the data migrated to CloudTable usingCDM.

The following is an example of the command. Replace table_name with the name of the tablespecified when a job is created in the CDM cluster.

SELECT * FROM table_name;

----End

CloudTable ServiceUser Guide 5 Batch Data Import

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

51

Page 56: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

5.2 Using the Import Tool to Importing DataUse the Import tool to import the SequenceFile data file of HBase to HBase of CloudTable.The Import tool is a tool contained in the installation package of the client tool.

NOTE

The SequenceFile file is a data file exported from HBase by the Export tool.

Step 1 Prepare a server where a CloudTable client is installed. For details about how to install aclient, see Using HBase Shell to Access a Cluster.

Step 2 Upload the SequenceFile file directory to the server where the CloudTable client is located.Assume that the directory is /tmp/sequencefile.

Step 3 The Import tool must be executed on the shell interface of the operating system of the clienthost. Go to the HBase directory on the client host and run the Import tool. The commandformat of the Import tool is as follows:

./bin/hbase org.apache.hadoop.hbase.mapreduce.Import <TableName> <InputPath>

TableName: Name of the table to which data is to be imported

InputPath: Directory of the SequenceFile file In the local file system, the directory muststart with file://.

Example:

./bin/hbase org.apache.hadoop.hbase.mapreduce.Import t1 file:///tmp/sequencefile

----End

CloudTable ServiceUser Guide 5 Batch Data Import

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

52

Page 57: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

6 Cluster Monitoring

Monitoring is critical to ensure CloudTable reliability, availability, and performance. You canmonitor the running status of CloudTable servers.

Based on Cloud Eye, CloudTable monitoring service can display CloudTable performancemetrics and provide alarm and notification functions. You can set alarm rules and notificationpolicies for monitored metrics to learn about the running status and performance ofCloudTable cluster resources in a timely manner.

6.1 Monitored CloudTable MetricsTable 6-1 lists CloudTable metrics that can be monitored.

Table 6-1 Monitored CloudTable metrics

Metric Description Value Range Remarks

CPU Number Number of CPUs of theinstance

> 0 Monitored object:CloudTableinstance

CPU Usage CPU usage of the instance(unit: %)

0%-100% Monitored object:CloudTableinstance

Total Memory Total memory size of theinstance (unit: Byte)

> 0Byte

Monitored object:CloudTableinstance

Memory Usage Memory usage of the instance(unit: %)

0%-100% Monitored object:CloudTableinstance

Disks WriteRate

Disk write rate of the instance(unit: byte/s)

>= 0Byte/s

Monitored object:CloudTableinstance

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

53

Page 58: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Metric Description Value Range Remarks

Disks Read Rate Disk read rate of the instance(unit: byte/s)

>= 0Byte/s

Monitored object:CloudTableinstance

Used StorageSize

Size of the used storage spacein the cluster (unit: byte)

>= 0Byte

Monitored object:CloudTableinstance

Used StorageRate

Ratio of the used storagespace in the cluster (unit: %)

0%-100% Monitored object:CloudTableinstance

NormalRegionServers

Number of normalRegionServers

>= 0 Monitored object:CloudTableinstance

FaultyRegionServers

Number of faultyRegionServers

>= 0 Monitored object:CloudTableinstance

RIT Count OverThreshold

Region in transaction countover threshold

>= 0 Monitored object:CloudTableinstance

RIT Count Region in transaction count >= 0 Monitored object:CloudTableinstance

Requests PerSecond

Number of requests of aRegionServer per second(unit: requests/s)

>= 0requests/s

Monitored object:CloudTableinstance

Regions Number of regions of aRegionServer

>= 0 Monitored object:CloudTableinstance

Write Requests Number of write requests of aRegionServer

>= 0 Monitored object:CloudTableinstance

Read Requests Number of read requests of aRegionServer

>= 0 Monitored object:CloudTableinstance

Hit Cache BlockCaching Ratio

Block hit caching ratio (unit:%)

0%-100% Monitored object:CloudTableinstance

Hit Cache BlockRatio

Block hit ratio (unit: %) 0%-100% Monitored object:CloudTableinstance

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

54

Page 59: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Metric Description Value Range Remarks

Get Delay (Avg) Get operation delay of theRegionServer per unit time(unit: millisecond)

>= 0ms

Monitored object:CloudTableinstance

Put Delay (Avg) Put operation delay of theRegionServer per unit time(unit: millisecond)

>= 0ms

Monitored object:CloudTableinstance

Delete Delay(Avg)

Delete operation delay of theRegionServer per unit time(unit: millisecond)

>= 0ms

Monitored object:CloudTableinstance

Get Operations Number of Get operations ofthe RegionServer per unittime

>= 0 Monitored object:CloudTableinstance

Put Operations Number of Put operations ofthe RegionServer per unittime

>= 0 Monitored object:CloudTableinstance

DeleteOperations

Number of Delete operationsof the RegionServer per unittime

>= 0 Monitored object:CloudTableinstance

RPC Queue CallTime (Max)

Max RPC queue call time(unit: millisecond)

>= 0ms

Monitored object:CloudTableinstance

RPC Queue CallTime (Mean)

Mean RPC queue call time(unit: millisecond)

>= 0ms

Monitored object:CloudTableinstance

FlushTime(Mean)

Mean time of flush (unit:millisecond)

>= 0ms

Monitored object:CloudTableinstance

CompactionQueue Size

Point in time length of thecompaction queue. Thenumber of Stores forcompaction in theRegionServer.

>= 0 Monitored object:CloudTableinstance

Flush QueueSize

Flush queue size >= 0 Monitored object:CloudTableinstance

CompactionCount

Count of compaction >= 0 Monitored object:CloudTableinstance

Flush OperationCount

Count of flush operation >= 0 Monitored object:CloudTableinstance

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

55

Page 60: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Metric Description Value Range Remarks

DiscardedCache Blocks

Block cache evict count >= 0 Monitored object:CloudTableinstance

Sync WALTime(Max)

Max time it took to sync theWAL to HDFS (unit:millisecond)

>= 0ms

Monitored object:CloudTableinstance

Sync WALTime(Mean)

Mean time it took to sync theWAL to HDFS (unit:millisecond)

>= 0ms

Monitored object:CloudTableinstance

6.2 Setting CloudTable Alarm RulesYou can set CloudTable alarm rules to customize the monitored objects and notificationpolicies. Then, you can learn about CloudTable running status in a timely manner.

The CloudTable alarm rules include alarm rule name, instance, metric, threshold, monitoringinterval and whether to send notification. This section describes how to set CloudTable alarmrules.

Procedure

Step 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 In the upper right corner of the cluster list, enter the name of a cluster in the search box and

click .

Figure 6-1 Searching for a cluster

Step 4 In the Operation column of the cluster, click Monitor to access the Cloud Eye managementconsole. Then you can view CloudTable monitoring information.

NOTE

The status of the cluster whose monitoring information you want to view must be In service.

Step 5 In the left navigation pane, choose Alarm > Alarm Rule.

Step 6 On the Alarm Rule page, click Add Alarm Rule to create an alarm rule, or modify anexisting alarm rule.

For details about how to configure parameters to create an alarm rule, see the Cloud EyeUser Guide.

1. On the Select Object for Monitoring page, set parameters according to Figure 6-2 andclick Next.

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

56

Page 61: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 6-2 Selecting an instance

– Resource Type: Select CloudTable Service.– Dimension: Select Compute Unit.– Monitored Object: Select the ID of the cluster instance you create.

2. On the Select Metric page, set parameters according to Figure 6-3 and click Next.

Figure 6-3 Selecting a metric

– Source: There are two options: Import from template or Manually create. SelectManually create, because CloudTable does not provide a template now.

– Metric: Select a metric from the drop-down list. For details, see MonitoredCloudTable Metrics.

– Threshold: Specifies a condition for triggering an alarm. A threshold consists ofrollup methods (Raw data, Max., Min., Avg., Sum., and Variance), identificationconditions (>, ≥, <, ≤, and =), and critical value. For example, an average valuegreater than 80 is a condition for triggering an alarm. You can set a threshold tomeet your needs.

– Occurrences: Specifies the number of sampling points when an alarm is triggered.For example, if Occurrences is set to n, the sampling point of the alarm rule is thesampling points in n consecutive monitoring intervals. Only all the sampling pointsmeet the threshold configured for the alarm rule, will the alarm rule status berefreshed as the Alarm status. Raw data uses a default 5-minute monitoringinterval. You can set this parameter to meet your needs.

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

57

Page 62: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

– Monitoring Interval: Specifies an interval at which the alarm status is updatedbased on the alarm rule. You can set a monitoring interval to meet your needs.

– Send Notification: Enable Send Notification.– Topic Name: You can select an existing topic or create a new one.– Trigger Condition: Specifies the condition for triggering an alarm. You can select

one or more from the following: Generated alarm, Cleared alarm, andInsufficient data.

3. On the Specify Rule Details, add alarm rule details and click Add. The alarm rule isadded.– Name: Specifies a name of an alarm rule. The system generates a name randomly

but you can change it.– Description: Provides alarm rule description. This parameter is optional.

After the alarm rule is set, the system automatically notifies you when an alarm is triggered.

For details about how to modify alarm rules, see the Cloud Eye User Guide.

----End

6.3 Viewing Cluster Monitoring InformationScenario

Cloud Eye on the public cloud monitors CloudTable cluster running status. You can viewCloudTable monitoring metrics on the management console. According to the monitoringinformation, you can quickly learn about cluster health status and key system information.

Monitored data requires some time for transmission and display. Cloud Eye providesCloudTable cluster node monitoring information obtained 5 to 10 minutes before. You canview the monitored data of a newly created CloudTable cluster 5 to 10 minutes later.

Background Informationl Monitoring metrics of an unavailable CloudTable cluster node cannot be displayed on

the Cloud Eye page. You can view the monitoring information only after the CloudTablecluster node is restarted or recovered.

l Cloud Eye will delete a CloudTable cluster node that becomes faulty for 1 hour from themonitoring list and will not monitor it any more. However, you need to manually clearits alarm rules.

ProcedureStep 1 Log in to the CloudTable management console.

Step 2 In the left navigation pane, click Cluster Management.

Step 3 In the upper right corner of the cluster list, enter the name of a cluster in the search box and

click .

Figure 6-4 Searching for a cluster

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

58

Page 63: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Step 4 In the Operation column of the cluster, click Monitor to access the Cloud Eye managementconsole. Then you can view CloudTable monitoring information.

Table 6-2 describes parameters about CloudTable service monitoring.

Table 6-2 Instance monitoring parameters

Parameter Description

ID Name of the monitored instance

Permanent Data Storage Name of the OBS bucket where raw data of all monitoringmetrics is stored

Click next to ID to expand the instance, and clickConfigure Data Storage to configure the permanent datastorage.

OperationClick next to ID to expand the instance. You can see thefollowing operation buttons: View Monitoring Graph,Create Alarm Rule, and Configure Data Storage.

Step 5 In the Operation column of the cluster, click Monitor to access the Cloud Eye managementconsole. Then you can view CloudTable monitoring information.

For more information about monitoring graphs, see the Cloud Eye User Guide.

Step 6 On the Monitoring graph page, graphs of raw data collected in Last 1 hour, Last 3 hours,and Last 12 hours are displayed. In the right corner of the monitoring graph of raw metricdata, Max and Min values of the target metric are displayed. By default, nine monitoringgraphs are displayed on one page. If the number of metrics of a service instance is more thannine, you can click Load more to view more monitoring graphs.

Step 7 In the upper right corner of the monitoring graph, click to enlarge the graph for viewingdetailed data.

Step 8 On the displayed page, select an existing time range or manually specify a time range forinstance monitoring.

The system allows you to select a fixed time range or customize the time range.

l The fixed time range can be Last 1 hour, Last 3 hours, Last 12 hours, Last 24 hours,Last 7 days, or Last 30 days.

– If you select Last 1 hour, Last 3 hours, Last 12 hours, or Last 24 hours, rawmetric data is displayed by default.

– If you select Last 7 days or Last 30 days, aggregated metric data is displayed bydefault.

l Custom time ranges can be any time within the last six months.

Step 9 On the page of graph details, click Show Setting to aggregate monitoring data. Select Enablerollup. Set Period and Statistic.

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

59

Page 64: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

l Enable rollup dictates what type of metric data is displayed. If you select Enablerollup, aggregated metric data is displayed. If you do not select Enable rollup, rawmetric data is displayed.

l Period indicates a time range during which raw data is collected. The value can be 5minutes, 20 minutes, 1 hour, 4 hours, or 1 day. In the Period drop-down, severalvalues are recommended based on your custom time range.

l Statistic indicates the rollup method to be used, including Max., Min., Avg., Sum, andVariance.

----End

CloudTable ServiceUser Guide 6 Cluster Monitoring

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

60

Page 65: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

7 Audit Logs

7.1 Supported Key Audit Log OperationsCloudTable uses CTS to record operations associated with CloudTable for later query, audit,and backtrack operations.

The following key operation traces of CloudTable are recorded in audit logs. For details, seeTable 7-1.

Table 7-1 CloudTable operation traces supported by CTS

Operation Trace Name Resource Type

Creating a cluster createCluster cluster

Deleting a cluster deleteCloudTableCluster cluster

Expanding clustercapacity

growCloudTableCluster cluster

Restarting a cluster rebootCloudTableCluster cluster

Setting the storagequota

storageClusterAction cluster

Modifying a feature modifyClusterFeatures cluster

Configuringparameters

modifyClusterSetting cluster

7.2 Viewing Audit LogsAfter you enable CTS, the system starts recording CloudTable operation logs. Operationrecords of the last 7 days can be viewed on the CTS management console.

This section is organized as follows:

CloudTable ServiceUser Guide 7 Audit Logs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

61

Page 66: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

l Enabling CTSl Disabling the Audit Log Functionl Viewing CTS Logs of CloudTable

Enabling CTSA tracker will be automatically created after CTS is enabled. All traces recorded by CTS areassociated with a tracker. Currently, only one tracker can be created for each account.

Step 1 On the CloudTable management console, choose Service List > Management &Deployment > Cloud Trace Service. The CTS management console is displayed.

Step 2 In the navigation pane on the left, click Tracker.

Step 3 Click Enable CTS.

Step 4 On the Enable CTS page that is displayed, click Enable to enable CTS.

If you enable Apply to All Regions, the tracker is created in all regions of the current site toimprove the completeness and accuracy of the current tenant's audit logs.

After CTS is enabled, the system automatically assigns a tracker. You can view details aboutthe created tracker on the Tracker page.

Figure 7-1 Enabling CTS

----End

Disabling the Audit Log FunctionIf you want to disable the audit log function, disable the tracker in CTS.

Step 1 On the CloudTable management console, choose Service List > Management &Deployment > Cloud Trace Service. The CTS management console is displayed.

Step 2 In the navigation pane on the left, click Tracker.

Step 3 In the tracker list, click Disable in the Operation column.

Step 4 In the displayed dialog box, click OK to disable the tracker.

After the tracker is disabled, the Disable button in the Operation column is switched toEnable. To enable the tracker again, click Enable and then click OK. The system will startrecording operations again.

CloudTable ServiceUser Guide 7 Audit Logs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

62

Page 67: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

After the tracker is disabled, the system will stop recording operations, but you can still viewexisting operation records.

----End

Viewing CTS Logs of CloudTable

Step 1 Log in to the management console.

Step 2 Click Service List on the upper part of the page and choose Management & Deployment >Cloud Trace Service.

Step 3 In the navigation pane on the left, choose Trace List.

Step 4 In the upper right corner of the trace list, click Filter to set the search criteria.

The following four filter criteria are available:

l Trace Source, Resource Type, and Search By

– Trace Source: Select CloudTable.

– Resource Type: Select All resource types or specify a resource type.

– Search By: Select All or any of the following options:

n Trace name: If you select this option, you also need to select a specific tracename.

n Resource ID: If you select this option, you also need to select or enter aspecific resource ID.

n Resource name: If you select this option, you also need to select or enter aspecific resource name.

l Operator: Select a specific operator (at user level rather than tenant level).

l Trace Status: Available options include All trace statuses, normal, warning, andincident. You can only select one of them.

l Start Date and End Date: You can specify the time period to query traces.

Step 5 Click Query.

Step 6 Click on the left of the trace to be queried to extend its details.

Figure 7-2 Trace

Step 7 Locate the row containing the target trace and click View Trace in the Operation column.

CloudTable ServiceUser Guide 7 Audit Logs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

63

Page 68: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Figure 7-3 Viewing a trace

For details about the key fields in the CTS trace structure, see sections Trace Structure andTrace Examples in the Cloud Trace Service User Guide.

----End

CloudTable ServiceUser Guide 7 Audit Logs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

64

Page 69: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

8 FAQs

8.1 What Services Does a CloudTable Cluster Provide?CloudTable Service (CloudTable for short) is a distributed, scalable, and fully-managed key-value data storage service based on Apache HBase. It provides high-performance randomread/write capabilities so it is great for applications for storage and queries of massiveamounts of structured, semi-structured, and time series data.

8.2 Why Do I Choose CloudTable Service?CloudTable is a fully-managed and high-performance key-value data storage service onHUAWEI CLOUD. With CloudTable, you can be free from deployment and O&Moperations, create clusters on demand to reduce costs, and obtain professional tutorial.

8.3 How Do I Prepare for Creating a CloudTable Cluster?l Select a proper region to create a CloudTable cluster based on cluster access delay

requirements.l When creating a CloudTable cluster, determine the number of computing units based on

service loads. After a cluster is created, computing units cannot be reduced and thecluster is charged based on the number of computing units. If the delay for the cluster toprocess services exceeds the recommended value, increase the number of computingunits. Currently, computing units cannot be increased.

8.4 What Should I Pay Attention to When UsingCloudTable Service?

l On the CloudTable management console, check cluster status and task status. If thecluster status is Creation failed or Sub-health, or a task fails to be executed, submit atrouble ticket to Huawei technical support.

l On the CloudTable management console, click Monitor on the right of the ClusterManagement page to access the CloudTable Service Monitoring page on the CloudEye management console. View metric monitoring information and set alarm rules for

CloudTable ServiceUser Guide 8 FAQs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

65

Page 70: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

key metrics. If there is an alarm, submit a service ticket to Huawei technical support. Ifthe cluster CPU or memory usage exceeds the threshold for a long time, you need toincrease the number of computing units to balance loads.

l On the CloudTable management console, click Cluster Management to open the clusterlist. Check whether the used storage capacity of a cluster exceeds the threshold. If itexceeds the threshold, increase storage quotas and storage capacities.

8.5 How Do I Access a CloudTable Cluster?CloudTable is based on an elastic cloud server (ECS). You need to create an ECS in the samesubnet as the CloudTable cluster, synchronize the ZooKeeper address of the cluster, andaccess the cluster using shell or APIs.

8.6 What Is OpenTSDB?OpenTSDB is a distributed, scalable time series database based on HBase. It stores time seriesdata. Time series data refers to the data collected at different time points. This type of datareflects the change status or degree of an object over time.

8.7 Why Cannot I Access HBase After the ZK Address IsConfigured?

CloudTable does not provide an external access address. Therefore, you cannot access HBasefrom the public network. You need to prepare an ECS that is in the same VPC as the HBasecluster to access HBase.

Ensure that nameserver is correctly configured in the /etc/resolv.conf file on your ECS. Fordetails about configuration methods, see Client Operation Instructions > Preparing anECS in the CloudTable Service User Guide.

8.8 How Do I View the Native HBase Page?For details, see Client Operation Instructions > Accessing the HBase Web UI in theCloudTable Service User Guide.

8.9 What Compression Algorithms Are Supported byCloudTable Clusters?

CloudTable clusters support the LZ4, SNAPPY, and GZ compression algorithms.

8.10 Why Is the Precision Lost Sometimes When a LargeInteger Is Written into OpenTSDB?

Assume that the following data is written into OpenTSDB.

CloudTable ServiceUser Guide 8 FAQs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

66

Page 71: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Table 8-1 Sample data

Metrics Timestamp Tag Value

Money 1483200000 Card1 9223372036854775709

1483200001 Card1 9223372036854775709

1483200002 Card1 922337203685477.12

1483200003 Card1 9223372036854775700

The query result is as follows:

{"1483200000":9223372036854775709,"1483200001":9.223372036854776E18, "1483200002":9.223372036854771E14,"1483200003":9223372036854775700}

The value of the timestamp 1483200001 is changed to 9.223372036854776E18. The dataprecision has been changed compared with the original value 9223372036854775709.

The reason is as follows: If the next piece of data (that is, "1483200002":9.223372036854771E14) is a floating point number, OpenTSDB will convert the currentpiece of data into a floating point number for return.

At the same time, the integer value 9223372036854775709 can only be represented as9.223372036854776E18 if it is expressed in a double-precision (Double) floating pointnumber. This is because Double is represented by scientific notation in memory.

1bit (symbol bit) 11bits (exponent bit) 52bits (mantissa bit)

The precision is determined by the mantissa bit. Therefore, the precision of Double is 2^52 =4503599627370496. There are 16 bits in total. The maximum precision of Double is 16 bits.In this case, the integer 9223372036854775709 (19 bits) cannot be completely represented.

You are advised not to mix integer and floating point data for the same metric. In this way,similar problems can be avoided.

CloudTable ServiceUser Guide 8 FAQs

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

67

Page 72: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

A Change History

Release Date Description

2018-08-03 This issue is the eighth official release.l Modified the following sections:

– Creating a Cluster– Using HBase Shell to Access a Cluster

2018-06-30 This issue is the seventh official releasel Modified the following sections:

– Creating a Cluster– Using HBase Shell to Access a Cluster

l Deleted the following sections:– Application Development Guide: This section is

released separately.

2018-05-31 This issue is the sixth official release.l Modified the following sections:

– Batch Data Import– Audit Logs

2018-04-26 This issue is the fifth official release.l Added the following sections:

– Using the GeoMesa Command Line Tools– GeoMesa Command Line

l Modified the following sections:– Creating a Cluster

CloudTable ServiceUser Guide A Change History

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

68

Page 73: User Guide - developer-res-cbc-cn.obs.cn-north-1 ......value data storage service based on Apache HBase. It provides high-performance random read/write capabilities so it is great

Release Date Description

2018-02-12 This issue is the fourth official release.l Added the following sections:

Cluster Monitoringl Modified the following sections:

– Creating a Cluster– Preparing an ECS– Using HBase Shell to Access a Cluster

2018-01-03 This issue is the third official release.Added the following sections:Modifying HBase Parameters of the ClusterModified the following sections:l Overviewl Creating a Clusterl Viewing Basic Cluster Information

2017-11-29 This issue is the second official release.Modified the following sections:l Creating a Clusterl Using HBase Shell to Access a Cluster

2017-09-30 This issue the first official release.

CloudTable ServiceUser Guide A Change History

Issue 08 (2018-08-03) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

69