The computer re-installed the system, and set up hadoopcdh4.5 pseudo-distributed in the Ubuntu environment of the local machine. Go to hbase shell and run the following exception when creating a table:
ERROR: org.apache.hadoop.hbase.PleaseHoldException: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:1710) at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1234) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:320) at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1428)Here is some help for this command:Create table; pass table name, a dictionary of specifications percolumn family, and optionally a dictionary of table configuration.Dictionaries are described below in the GENERAL NOTES section.Examples: hbase> create ‘t1‘, {NAME => ‘f1‘, VERSIONS => 5} 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‘, ‘f1‘, {SPLITS => [‘10‘, ‘20‘, ‘30‘, ‘40‘]} hbase> create ‘t1‘, ‘f1‘, {SPLITS_FILE => ‘splits.txt‘} hbase> # Optionally pre-split the table into NUMREGIONS, using hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname) hbase> create ‘t1‘, ‘f1‘, {NUMREGIONS => 15, SPLITALGO => ‘HexStringSplit‘}
Finally, the IP address in the/etc/hosts file is incorrect.
#127.0.0.1 localhost
127.0.1.1 hadoop
Solution:
Modify 127.0.1.1 in/etc/hosts to 127.0.0.1, disable hbase, disable hadoop, and enable it again.
hbase(main):002:0> create ‘test‘, ‘t1‘0 row(s) in 1.1710 seconds=> Hbase::Table - testhbase(main):003:0> describe ‘test‘DESCRIPTION ENABLED {NAME => ‘test‘, FAMILIES => [{NAME => ‘t1‘, DATA_BLOCK_ENCODING => ‘NONE‘, BLOOMFILTER => true ‘NONE‘, REPLICATION_SCOPE => ‘0‘, VERSIONS => ‘3‘, COMPRESSION => ‘NONE‘, MIN_VERSIONS => ‘ 0‘, TTL => ‘2147483647‘, KEEP_DELETED_CELLS => ‘false‘, BLOCKSIZE => ‘65536‘, IN_MEMORY => ‘false‘, ENCODE_ON_DISK => ‘true‘, BLOCKCACHE => ‘true‘}]} 1 row(s) in 0.0560 seconds
Mistakes caused by carelessness waste time.
Org. Apache. hadoop. hbase. pleaseholdexception: Master is initializing