1. 程式人生 > >hbase在hue上的配置應用(hue的應用教程---3)

hbase在hue上的配置應用(hue的應用教程---3)

1.hbase相關配置的修改

修改hbase-site.xml檔案如下

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration> 
<property>
    <name>hbase.rootdir</name>
    <!--HDFS儲存方式
    <value>hdfs://localhost:9000/tmp/hbase</value>
    -->
    <value>file:///usr/hbase-1.2.3/tmp</value>
 </property>
  <property>
     <name>ha.zookeeper.quorum</name>
     <value>localhost:2181</value>
  </property>
  
  <!--下面為hue的相關配置-->
  
  <property>
      <name>hbase.thrift.support.proxyuser</name>
      <value>true</value>
   </property>

    <property>
      <name>hbase.regionserver.thrift.http</name>
      <value>true</value>
    </property>
  
  
  
  
</configuration>

2.hue.ini的相關配置

[hbase]
  # Comma-separated list of HBase Thrift servers for clusters in the format of ''
(name|host:port)'.
  # Use full hostname with security.
  # If using Kerberos we assume GSSAPI SASL, not PLAIN.
  ## hbase_clusters=(Cluster|localhost:9090)
  hbase_clusters=(Cluster|localhost:9090)

  # HBase configuration directory, where hbase-site.xml is located.
 # hbase_conf_dir=/usr/lib/xdata/hbase/conf
 hbase_conf_dir=/opt/hbase/hbase-1.2.2/conf
  # Hard limit of rows or columns per row fetched before truncating.
  truncate_limit = 500

  # 'buffered' is the default of the HBase Thrift Server and supports security.
  # 'framed' can be used to chunk up responses,
  # which is useful when used in conjunction with the nonblocking server in Thrii
ft.
  thrift_transport=buffered

3.啟動hbase服務

#啟動hbase
./start-hbase.sh

#啟動ThriftServer
hbase thrift start &

4.啟動hue服務

 build/env/bin/supervisor

5.開啟瀏覽器輸入localhost:8888即可操作hbase