hbase1.2配置(带kerberos认证)
hbase配置
·
hbase-env.sh
export HADOOP_HOME=/export/hadoop
export HADOOP_CONF_DIR=/export/common/hadoop/conf
export JAVA_HOME=/export/java
export HBASE_LOG_DIR=/export/hbase/logs
export HBASE_PID_DIR=/export/hbase/pid
export HBASE_MANAGES_ZK=false
#GC优化
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintGCDetails"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintGCTimeStamps"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintGCDateStamps"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintClassHistogram"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintTenuringDistribution"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintGCApplicationStoppedTime"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintGCApplicationConcurrentTime"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintHeapAtGC"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+UseBiasedLocking"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+PrintSafepointStatistics"
export SERVER_GC_OPTS="$SERVER_GC_OPTS -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=2 -XX:GCLogFileSize=512M"
# export HBASE_OPTS="-XX:+UseG1GC"
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
# -Djava.security.auth.login.config=/export/common/hbase/conf/zk-jaas.conf"
export HBASE_REGIONSERVER_OPTS="-Xms32g -Xmx32g -XX:NewRatio=3 -XX:SurvivorRatio=6 -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=16 -XX:InitiatingHeapOccupancyPercent=40"
export HBASE_HEAPSIZE=32768
export HBASE_OFFHEAPSIZE=20G
zk-jaas.conf
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/export/common/hbase/conf/hbase.keytab"
storeKey=true
useTicketCache=true
principal="hbase/{hostname}@{KDC_REALM}";
};
hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://bigdata/hbase</value>
</property>
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>
<property>
<name>hbase.replication</name>
<value>true</value>
</property>
<property>
<name>hbase.client.write.buffer</name>
<value>16777216</value>
</property>
<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>4096</value>
</property>
<property>
<name>hbase.client.pause</name>
<value>100</value>
</property>
<property>
<name>hbase.client.retries.number</name>
<value>35</value>
</property>
<property>
<name>hbase.client.scanner.caching</name>
<value>100</value>
</property>
<property>
<name>hbase.client.keyvalue.maxsize</name>
<value>10485760</value>
</property>
<property>
<name>hbase.regionserver.thrift.http</name>
<value>false</value>
</property>
<property>
<name>hbase.master.port</name>
<value>60000</value>
</property>
<property>
<name>hbase.master.info.port</name>
<value>60010</value>
</property>
<property>
<name>hbase.regionserver.port</name>
<value>60020</value>
</property>
<property>
<name>hbase.regionserver.info.port</name>
<value>60030</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.thrift.support.proxyuser</name>
<value>false</value>
</property>
<property>
<name>hbase.rpc.timeout</name>
<value>60000</value>
</property>
<property>
<name>hbase.snapshot.enabled</name>
<value>true</value>
</property>
<property>
<name>hbase.snapshot.master.timeoutMillis</name>
<value>60000</value>
</property>
<property>
<name>hbase.snapshot.region.timeout</name>
<value>60000</value>
</property>
<property>
<name>hbase.snapshot.master.timeout.millis</name>
<value>60000</value>
</property>
<property>
<name>hbase.security.authentication</name>
<value>simple</value>
</property>
<property>
<name>zookeeper.session.timeout</name>
<value>1200000</value>
</property>
<property>
<name>hbase.regionserver.restart.on.zk.expire</name>
<value>true</value>
</property>
<property>
<name>hbase.regionserver.handler.count</name>
<value>100</value>
</property>
<property>
<name>ipc.server.max.callqueue.length</name>
<value>500</value>
</property>
<property>
<name>hbase.ipc.warn.response.time</name>
<value>400</value>
</property>
<property>
<name>hbase.regionserver.global.memstore.upperLimit</name>
<value>0.6</value>
</property>
<property>
<name>hbase.regionserver.global.memstore.lowerLimit</name>
<value>0.5</value>
</property>
<property>
<name>hbase.hregion.memstore.flush.size</name>
<value>268435456</value>
</property>
<property>
<name>hbase.hregion.memstore.block.multiplier</name>
<value>2</value>
</property>
<property>
<name>hbase.hstore.blockingStoreFiles</name>
<value>100</value>
</property>
<property>
<name>hbase.hstore.compaction.max</name>
<value>10</value>
</property>
<property>
<name>hbase.hstore.compaction.min</name>
<value>3</value>
</property>
<property>
<name>hbase.master</name>
<value>60000</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>192.168.56.71:2181,192.168.56.72:2181,192.168.56.70:2181</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
<property>
<name>hbase.regionserver.optionalcacheflushinterval</name>
<value>86400000</value>
</property>
<property>
<name>hbase.hregion.majorcompaction</name>
<value>0</value>
</property>
<property>
<name>hbase.coprocessor.user.region.classes</name>
<value>org.apache.hadoop.hbase.coprocessor.AggregateImplementation</value>
</property>
<property>
<name>hbase.balancer.period</name>
<value>1200000</value>
</property>
<property>
<name>hbase.hregion.max.filesize</name>
<value>53687091200</value>
</property>
<property>
<name>hbase.bucketcache.ioengine</name>
<value>offheap</value>
</property>
<property>
<name>hfile.block.cache.size</name>
<value>0.2</value>
</property>
<property>
<name>hbase.bucketcache.size</name>
<value>1024</value>
</property>
<property>
<name>hbase.regionserver.executor.openregion.threads</name>
<value>100</value>
</property>
<property>
<name>phoenix.schema.isNamespaceMappingEnabled</name>
<value>true</value>
</property>
<property>
<name>phoenix.schema.mapSystemTablesToNamespace</name>
<value>true</value>
</property>
<property>
<name>hbase.security.authentication</name>
<value>kerberos</value>
</property>
<property>
<name>hbase.rpc.engine</name>
<value>org.apache.hadoop.hbase.ipc.SecureRpcEngine</value>
</property>
<property>
<name>hbase.regionserver.kerberos.principal</name>
<value>hbase/_HOST@BIGDATA.COM</value>
</property>
<property>
<name>hbase.regionserver.keytab.file</name>
<value>/export/common/hbase/conf/hbase.keytab</value>
</property>
<property>
<name>hbase.master.kerberos.principal</name>
<value>hbase/_HOST@BIGDATA.COM</value>
</property>
<property>
<name>hbase.master.keytab.file</name>
<value>/export/common/hbase/conf/hbase.keytab</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.bulkload.staging.dir</name>
<value>/hbase/hbase-staging</value>
</property>
<property>
<name>hbase.coprocessor.region.classes</name>
<value>org.apache.hadoop.hbase.security.token.TokenProvider,
org.apache.hadoop.hbase.security.access.AccessController,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint</value>
</property>
<property>
<name>hbase.coprocessor.master.classes</name>
<value>org.apache.hadoop.hbase.security.access.AccessController</value>
</property>
<property>
<name>hbase.superuser</name>
<value>root,hdfs</value>
</property>
</configuration>
更多推荐
已为社区贡献2条内容
所有评论(0)