hlj@hlj-Inspiron-3568:~/hbase$ bin/start-hbase.sh
localhost: running zookeeper, logging to /home/hlj/hbase/bin/../logs/hbase-hlj-zookeeper-hlj-Inspiron-3568.out
localhost: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
localhost: SLF4J: Defaulting to no-operation (NOP) logger implementation
localhost: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
running master, logging to /home/hlj/hbase/bin/../logs/hbase-hlj-master-hlj-Inspiron-3568.out
hlj@hlj-Inspiron-3568:~/hbase$ bin/hbase shell
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.0.5, r76458dd074df17520ad451ded198cd832138e929, Mon Mar 18 00:41:49 UTC 2019
Took 0.0030 seconds
hbase(main):001:0> create 'student','Sname','Ssex','Sage','Sdept','course'
ERROR: KeeperErrorCode = NoNode for /hbase/master
Creates a table. Pass a table name, and a set of column family
specifications (at least one), and, optionally, table configuration.
Column specification can be a simple string (name), or a dictionary
(dictionaries are described below in main help output), necessarily
including NAME attribute.
Examples:
Create a table with namespace=ns1 and table qualifier=t1
hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}
Create a table with namespace=default and table qualifier=t1
hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
hbase> # The above in shorthand would be the following:
hbase> create 't1', 'f1', 'f2', 'f3'
hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}
hbase> create 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 1000000, MOB_COMPACT_PARTITION_POLICY => 'weekly'}
Table configuration options can be put at the end.
Examples:
hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40']
hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' }
hbase> # Optionally pre-split the table into NUMREGIONS, using
hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', REGION_REPLICATION => 2, CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}
hbase> create 't1', {NAME => 'f1', DFS_REPLICATION => 1}
You can also keep around a reference to the created table:
hbase> t1 = create 't1', 'f1'
Which gives you a reference to the table named 't1', on which you can then
call methods.
Took 8.2418 seconds
hbase(main):002:0>
uj5u.com熱心網友回復:
第一個錯誤:Failed to load class "org.slf4j.impl.StaticLoggerBinder". 版本沖突造成的,請參考 : https://blog.csdn.net/weixin_43935907/article/details/89378012第二個錯誤:
hbase(main):001:0> create 'student','Sname','Ssex','Sage','Sdept','course'
ERROR: KeeperErrorCode = NoNode for /hbase/master
這個是你語法的問題,寫的不對,具體怎么 寫下面錯誤提示已經給了案例了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/144716.html
標籤:分布式計算/Hadoop
上一篇:作業系統
下一篇:java連接hbase 無限卡處
