过程:
在首次配置 hbase-site.xml 内容有误的状况下启动了 hbase。后续屡次启动后依然报错,内容如下。
谬误起因:HBase split 出现异常,WALs 目录下有残留的 splitting 文件,将其删除后重新启动就行了
解决办法:
hdfs dfs -rm -r /hbase/WALs/*
2022-08-25 10:56:03,408 INFO [PEWorker-7] master.SplitLogManager: Started splitting 1 logs in [hdfs://localhost:8020/hbase/WALs/localhost,16020,1661394447685-splitting] for [localhost,16020,1661394447685]
2022-08-25 10:56:03,930 INFO [main-EventThread] coordination.SplitLogManagerCoordination: Task /hbase/splitWAL/WALs%2Flocalhost%2C16020%2C1661394447685-splitting%2Flocalhost%252C16020%252C1661394447685.1661395053086 acquired by localhost,16020,1661396052489
2022-08-25 10:56:03,950 INFO [main-EventThread] coordination.SplitLogManagerCoordination: Task /hbase/splitWAL/WALs%2Flocalhost%2C16020%2C1661394447685-splitting%2Flocalhost%252C16020%252C1661394447685.1661395053086 entered state=ERR localhost,16020,1661396052489
2022-08-25 10:56:03,951 WARN [main-EventThread] coordination.SplitLogManagerCoordination: Error splitting /hbase/splitWAL/WALs%2Flocalhost%2C16020%2C1661394447685-splitting%2Flocalhost%252C16020%252C1661394447685.1661395053086
2022-08-25 10:56:03,951 WARN [PEWorker-7] master.SplitLogManager: error while splitting logs in [hdfs://localhost:8020/hbase/WALs/localhost,16020,1661394447685-splitting] installed = 1 but only 0 done
2022-08-25 10:56:03,951 WARN [PEWorker-7] procedure.ServerCrashProcedure: Failed state=SERVER_CRASH_SPLIT_LOGS, retry pid=3, state=RUNNABLE:SERVER_CRASH_SPLIT_LOGS, locked=true; ServerCrashProcedure server=localhost,16020,1661394447685, splitWal=true, meta=true; cycles=104
java.io.IOException: error or interrupted while splitting logs in [hdfs://localhost:8020/hbase/WALs/localhost,16020,1661394447685-splitting] Task = installed = 1 done = 0 error = 1
at org.apache.hadoop.hbase.master.SplitLogManager.splitLogDistributed(SplitLogManager.java:267)
at org.apache.hadoop.hbase.master.MasterWalManager.splitLog(MasterWalManager.java:401)
at org.apache.hadoop.hbase.master.MasterWalManager.splitLog(MasterWalManager.java:386)
at org.apache.hadoop.hbase.master.MasterWalManager.splitLog(MasterWalManager.java:283)
at org.apache.hadoop.hbase.master.procedure.ServerCrashProcedure.splitLogs(ServerCrashProcedure.java:253)
at org.apache.hadoop.hbase.master.procedure.ServerCrashProcedure.executeFromState(ServerCrashProcedure.java:159)
at org.apache.hadoop.hbase.master.procedure.ServerCrashProcedure.executeFromState(ServerCrashProcedure.java:59)
at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:184)
at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:966)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1723)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.executeProcedure(ProcedureExecutor.java:1462)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$1200(ProcedureExecutor.java:78)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$WorkerThread.run(ProcedureExecutor.java:2039)
2022-08-25 10:56:03,956 INFO [PEWorker-8] master.SplitLogManager: Started splitting 1 logs in [hdfs://localhost:8020/hbase/WALs/localhost,16020,1661394447685-splitting] for [localhost,16020,1661394447685]
2022-08-25 10:56:04,779 INFO [main-EventThread] coordination.SplitLogManagerCoordination: Task /hbase/splitWAL/WALs%2Flocalhost%2C16020%2C1661394447685-splitting%2Flocalhost%252C16020%252C1661394447685.1661395053086 acquired by localhost,16020,1661396052489
2022-08-25 10:56:04,800 INFO [main-EventThread] coordination.SplitLogManagerCoordination: Task /hbase/splitWAL/WALs%2Flocalhost%2C16020%2C1661394447685-splitting%2Flocalhost%252C16020%252C1661394447685.1661395053086 entered state=ERR localhost,16020,1661396052489
2022-08-25 10:56:04,800 WARN [main-EventThread] coordination.SplitLogManagerCoordination: Error splitting /hbase/splitWAL/WALs%2Flocalhost%2C16020%2C1661394447685-splitting%2Flocalhost%252C16020%252C1661394447685.1661395053086
2022-08-25 10:56:04,800 WARN [PEWorker-8] master.SplitLogManager: error while splitting logs in [hdfs://localhost:8020/hbase/WALs/localhost,16020,1661394447685-splitting] installed = 1 but only 0 done