zoukankan      html  css  js  c++  java
  • hbase

    wget tar 包

    去官网下吧,我这里 已经没了。。。
    wget hbase-xxx.tar.gz -C /opt/module/
    

    从 hadoop etc/hadoop/下拷贝 两份配置文件到 hbase conff 下

    /root/hbase-1.2.8/conf
    
    [root@master conf]# cp /opt/modules/hadoopstandalone/hadoop-2.8.4/etc/hadoop/core-site.xml .
    [root@master conf]# cp /opt/modules/hadoopstandalone/hadoop-2.8.4/etc/hadoop/hdfs-site.xml .
    

    1、 修改 hbase-env.sh

    export JAVA_HOME=/home/yli/jdk1.8.0_131
    
    由于是 1.8  jdk 注释掉 两行
    #export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
    #export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
    
    保留 zookeeper 管理 hbase
    # export HBASE_MANAGES_ZK=true
    

    2、 修改 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>
        <!--hbase.rootdir,HDFS的入口地址,地址和端口要和你的hadoop配置一样(core-site.xml中的 <name>fs.default.name</name>),所有节点公用地址-->
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase</value>
    </property>
    
    <property>  
        <!--hbase.zookeeper.property.dataDir , zookeeper 保持信息的文件,默认为/tmp 重启会丢失-->
        <name>hbase.zookeeper.property.dataDir</name>  
        <value>/opt/modules/zookeeperdataDir</value>  
    </property> 
    <property >
        <name>hbase.cluster.distributed</name>
        <value>true</value>
        <description>The mode the cluster will be in. Possible values are
          false for standalone mode and true for distributed mode.  If
          false, startup will run all HBase and ZooKeeper daemons together
          in the one JVM.</description>
      </property>
    </configuration>
    
    

    3 进入 hbase bin 目录下 执行

    ./start-hbase.sh
    jps 查看下
    

    4 进入 hbase shell

    ./hbase shell
    
    
    如果有来生,一个人去远行,看不同的风景,感受生命的活力。。。
  • 相关阅读:
    initctl 创建自己的JOB
    TortoiseXX 与TotalCommander (TC)的图标问题
    eclipse 与 tomcat 的那些路径
    把函数视为对象
    序列增量赋值的一个谜题: +=
    __new__ 和 __init__ 的区别
    Python 中 is 与 == 区别
    Flask 2.0.1 changes
    flask run 与 DispatcherMiddleware 不兼容处理
    waitress 部署 flask服务
  • 原文地址:https://www.cnblogs.com/Frank99/p/9953664.html
Copyright © 2011-2022 走看看