zoukankan      html  css  js  c++  java
  • Linux巩固记录(8) Hbase shell 基本使用

    继续前几篇内容,讲解hbase基本使用

    1.进入hbase shell: hbase有很多种操作方式,比如shell,java客户端,webUI等,可以直接输入hbase进行提示

    [root@master ~]# date
    Fri Sep  8 22:50:06 CST 2017
    [root@master ~]# hbase
    Usage: hbase [<options>] <command> [<args>]
    Options:
      --config DIR     Configuration direction to use. Default: ./conf
      --hosts HOSTS    Override the list in 'regionservers' file
      --auth-as-server Authenticate to ZooKeeper using servers configuration
    
    Commands:
    Some commands take arguments. Pass no args or -h for usage.
      shell           Run the HBase shell
      hbck            Run the hbase 'fsck' tool
      snapshot        Tool for managing snapshots
      snapshotinfo    Tool for dumping snapshot information
      wal             Write-ahead-log analyzer
      hfile           Store file analyzer
      zkcli           Run the ZooKeeper shell
      upgrade         Upgrade hbase
      master          Run an HBase HMaster node
      regionserver    Run an HBase HRegionServer node
      zookeeper       Run a Zookeeper server
      rest            Run an HBase REST server
      thrift          Run the HBase Thrift server
      thrift2         Run the HBase Thrift2 server
      clean           Run the HBase clean up script
      classpath       Dump hbase CLASSPATH
      mapredcp        Dump CLASSPATH entries required by mapreduce
      pe              Run PerformanceEvaluation
      ltt             Run LoadTestTool
      canary          Run the Canary tool
      version         Print the version
      CLASSNAME       Run the class named CLASSNAME
    [root@master ~]# 

    进入shell

    [root@master ~]# date
    Fri Sep  8 22:50:30 CST 2017
    [root@master ~]# hbase shell
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/home/hbase-1.3.1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/home/hadoop-2.7.4/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
    HBase Shell; enter 'help<RETURN>' for list of supported commands.
    Type "exit<RETURN>" to leave the HBase Shell
    Version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr  6 19:36:54 PDT 2017
    
    hbase(main):001:0> 

    2.查询所有表

    hbase(main):001:0> list
    TABLE                                                                                                                                                                                                                                                                         
    0 row(s) in 0.2560 seconds
    
    => []
    hbase(main):002:0> 

    其它命令就不挨个讲解了,可以参考

    http://blog.csdn.net/smcwwh/article/details/7468672

    http://blog.csdn.net/wisgood/article/details/17576397

    http://www.cnblogs.com/cxzdy/p/5583239.html

  • 相关阅读:
    JVM系列六(自定义插入式注解器).
    JVM系列五(Javac 字节码编译器).
    2019 — 求不得,放不下
    Mybatis 条件判断单双引号解析问题
    JVM系列四(对象分配策略).
    JVM系列三(垃圾收集器).
    Spring MVC -- Spring Tool Suite和Maven(安装Tomcat、JDK)
    Spring MVC -- 单元测试和集成测试
    Spring MVC -- 下载文件
    Spring MVC -- 上传文件
  • 原文地址:https://www.cnblogs.com/xiaochangwei/p/7496426.html
Copyright © 2011-2022 走看看