HBase:创建表命令需要很长时间

时间:2017-06-20 11:17:51

标签: hadoop hbase hdfs apache-zookeeper hadoop2

我是HBase的新手,我正在阅读“Hadoop-The Definitve Guide”一书。 我已经在我的本地系统上启动了所有应用程序,这意味着应该没有网络开销。但是,当我运行简单命令在基础中创建一个表时,大约需要9秒钟。

以下是我用来启动hbase和create table的过程:

 ./start-hbase.sh 
 ./hbase shell
 create 'test' , 'data'

这是控制台日志,显示大约需要8.3秒:

hbase(main):002:0> create 'test' , 'data'
0 row(s) in 8.3310 seconds

=> Hbase::Table - test

虽然基础日志中没有错误或异常。作为参考,这是我的hbase-KV-master-KV.local.log文件:

2017-06-20 16:23:49,335 INFO [B.defaultRpcServer.handler=9,queue=0,port=64717] master.HMaster: Client=KV//127.0.0.1 create 'test', {NAME => 'data', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}
2017-06-20 16:23:49,463 INFO  [ProcessThread(sid:0 cport:-1):] server.PrepRequestProcessor: Got user-level KeeperException when processing sessionid:0x15cc51a8c440000 type:create cxid:0x2ca zxid:0x47 txntype:-1 reqpath:n/a Error Path:/hbase/table-lock/test Error:KeeperErrorCode = NoNode for /hbase/table-lock/test
2017-06-20 16:23:54,615 INFO  [RegionOpenAndInitThread-test-1] regionserver.HRegion: creating HRegion test HTD == 'test', {NAME => 'data', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} RootDir = hdfs://172.**.**.168/var/folders/sm/814w032j2q3d9npm7c4509xm0000gn/T/hbase-KV/hbase/.tmp Table name == test
2017-06-20 16:23:55,041 INFO  [RegionOpenAndInitThread-test-1] regionserver.HRegion: Closed test,,1497956029330.a5c5e9076c1e38f4255f4dc8eea50f97.
2017-06-20 16:23:55,164 INFO  [ProcedureExecutor-1] hbase.MetaTableAccessor: Added 1
2017-06-20 16:23:55,273 INFO  [ProcedureExecutor-1] zookeeper.ZKTableStateManager: Moving table test state from null to ENABLING
2017-06-20 16:23:55,278 INFO  [ProcedureExecutor-1] master.AssignmentManager: Assigning 1 region(s) to localhost,64720,1497955472691
2017-06-20 16:23:55,285 INFO  [ProcedureExecutor-1] master.RegionStates: Transition {a5c5e9076c1e38f4255f4dc8eea50f97 state=OFFLINE, ts=1497956035278, server=null} to {a5c5e9076c1e38f4255f4dc8eea50f97 state=PENDING_OPEN, ts=1497956035285, server=localhost,64720,1497955472691}
2017-06-20 16:23:55,290 INFO  [PriorityRpcServer.handler=14,queue=0,port=64720] regionserver.RSRpcServices: Open test,,1497956029330.a5c5e9076c1e38f4255f4dc8eea50f97.
2017-06-20 16:23:55,303 INFO  [AM.ZK.Worker-pool2-t10] master.RegionStates: Transition {a5c5e9076c1e38f4255f4dc8eea50f97 state=PENDING_OPEN, ts=1497956035285, server=localhost,64720,1497955472691} to {a5c5e9076c1e38f4255f4dc8eea50f97 state=OPENING, ts=1497956035303, server=localhost,64720,1497955472691}
2017-06-20 16:23:55,307 INFO  [StoreOpener-a5c5e9076c1e38f4255f4dc8eea50f97-1] hfile.CacheConfig: Created cacheConfig for data: blockCache=LruBlockCache{blockCount=0, currentSize=867896, freeSize=844179528, maxSize=845047424, heapSize=867896, minSize=802795072, minFactor=0.95, multiSize=401397536, multiFactor=0.5, singleSize=200698768, singleFactor=0.25}, cacheDataOnRead=true, cacheDataOnWrite=false, cacheIndexesOnWrite=false, cacheBloomsOnWrite=false, cacheEvictOnClose=false, cacheDataCompressed=false, prefetchOnOpen=false
2017-06-20 16:23:55,307 INFO  [StoreOpener-a5c5e9076c1e38f4255f4dc8eea50f97-1] compactions.CompactionConfiguration: size [134217728, 9223372036854775807, 9223372036854775807); files [3, 10); ratio 1.200000; off-peak ratio 5.000000; throttle point 2684354560; major period 604800000, major jitter 0.500000, min locality to compact 0.000000
2017-06-20 16:23:55,319 INFO  [RS_OPEN_REGION-localhost:64720-1] regionserver.HRegion: Onlined a5c5e9076c1e38f4255f4dc8eea50f97; next sequenceid=2
2017-06-20 16:23:55,322 INFO  [PostOpenDeployTasks:a5c5e9076c1e38f4255f4dc8eea50f97] regionserver.HRegionServer: Post open deploy tasks for test,,1497956029330.a5c5e9076c1e38f4255f4dc8eea50f97.
2017-06-20 16:23:55,325 INFO  [PostOpenDeployTasks:a5c5e9076c1e38f4255f4dc8eea50f97] hbase.MetaTableAccessor: Updated row test,,1497956029330.a5c5e9076c1e38f4255f4dc8eea50f97. with server=localhost,64720,1497955472691
2017-06-20 16:23:55,327 INFO  [AM.ZK.Worker-pool2-t11] master.RegionStates: Transition {a5c5e9076c1e38f4255f4dc8eea50f97 state=OPENING, ts=1497956035303, server=localhost,64720,1497955472691} to {a5c5e9076c1e38f4255f4dc8eea50f97 state=OPEN, ts=1497956035327, server=localhost,64720,1497955472691}
2017-06-20 16:23:55,329 INFO  [ProcedureExecutor-1] zookeeper.ZKTableStateManager: Moving table test state from ENABLING to ENABLED

任何建议,可能是什么问题?为什么需要这么长时间?

0 个答案:

没有答案