您的位置:首页 > 运维架构 > Apache

Apache HBase配置介绍

2016-10-16 11:04 260 查看
原文地址:https://hbase.apache.org/book.html#_configuration_files

Apache HBase Configuration

This chapter expands upon the Getting Started chapter to further explain configuration of Apache HBase. Please read this chapter carefully, especially theBasic
Prerequisites to ensure that your HBase testing and deployment goes smoothly, and prevent data loss. Familiarize yourself withSupport and Testing Expectations as well.

3. Configuration Files
Apache HBase uses the same configuration system as Apache Hadoop. All configuration files are located in theconf/ directory, which needs to be kept in sync for each node on your cluster.
HBase Configuration File Descriptions

backup-masters

Not present by default. A plain-text file which lists hosts on which the Master should start a backup Master process, one host per line.

hadoop-metrics2-hbase.properties

Used to connect HBase Hadoop’s Metrics2 framework. See theHadoop Wiki entry for more information on Metrics2.
Contains only commented-out examples by default.

hbase-env.cmd and hbase-env.sh

Script for Windows and Linux / Unix environments to set up the working environment for HBase, including the location of Java, Java options, and other environment variables. The file contains many commented-out examples to provide
guidance.

hbase-policy.xml

The default policy configuration file used by RPC servers to make authorization decisions on client requests. Only used if HBasesecurity is enabled.

hbase-site.xml

The main HBase configuration file. This file specifies configuration options which override HBase’s default configuration. You can view (but do not edit) the default configuration file atdocs/hbase-default.xml. You can
also view the entire effective configuration for your cluster (defaults and overrides) in the HBase Configuration tab of the HBase Web UI.

log4j.properties

Configuration file for HBase logging via log4j.

regionservers

A plain-text file containing a list of hosts which should run a RegionServer in your HBase cluster. By default this file contains the single entrylocalhost. It should contain a list
of hostnames or IP addresses, one per line, and should only containlocalhost if each node in your cluster will run a RegionServer on itslocalhost interface.

Checking XML Validity

When you edit XML, it is a good idea to use an XML-aware editor to be sure that your syntax is correct and your XML is well-formed. You can also use thexmllint utility to check that
your XML is well-formed. By default,xmllint re-flows and prints the XML to standard output. To check for well-formedness and only print output if errors exist, use the commandxmllint -noout
filename.xml.

Keep Configuration In Sync Across the Cluster

When running in distributed mode, after you make an edit to an HBase configuration, make sure you copy the content of theconf/ directory to all nodes of the cluster. HBase will not do this for you. Usersync,scp,
or another secure mechanism for copying the configuration files to your nodes. For most configuration, a restart is needed for servers to pick up changes An exception is dynamic configuration. to be described later below.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: