standalone hbase(0.94)에서 table create하다가 hang 발생한 경우를 해결한 사례이다.


create 'xxxx', { NAME => 'c', BLOOMFILTER => 'ROWCOL', VERSIONS => '1', COMPRESSION => 'GZ', TTL => '-1', BLOCKCACHE => 'false'}

(hang)



/var/log/hbase에서 다음 로그가 남겨졌다.



ERROR org.apache.hadoop.hbase.master.handler.CreateTableHandler: Error trying to create the table nfeeds

java.io.IOException: Exception in renameDirForFileSystem

        at org.apache.hadoop.hbase.HBaseFileSystem.renameDirForFileSystem(HBaseFileSystem.java:161)

        at org.apache.hadoop.hbase.master.handler.CreateTableHandler.handleCreateTable(CreateTableHandler.java:184)

        at org.apache.hadoop.hbase.master.handler.CreateTableHandler.process(CreateTableHandler.java:127)

        at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:175)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)



원인은 hbase 디렉토리에 동일한 테이블의 이름을 가진 디렉토리가 있는데, 특정 이유(권한 또는 기타 등등) rename이 되지 않으면서 에러가 발생한다. 수동으로 작업한다.


cd /tmp/hbase-hbase/hbase

rm -rf xxxx/



다시 table 생성을 시도하지만 생성되지 않는다. zookeeper에 테이블 정보가 남아 있다. zk에서 해당 테이블을 삭제한다. 


[zk: 장비:2181(CONNECTED) 4] ls /hbase/table

[xxxx]

[zk: 장비:2181(CONNECTED) 4] delete /hbase/table/xxxx



다시 table 생성을 시도하지만 생성되지 않는다. hbase 내부 캐시가 있는 듯 하다. 재시작한 후, 테이블 생성을 할 수 있었다.


sudo service hbase-master restart 



Posted by '김용환'
,