我读取hbase表的快照时报错

org.apache.hadoop.hbase.snapshot.CorruptedSnapshotException: Couldn't read snapshot info from:hdfs://X.X.X.X:8020/tmp/hbase-hdfs/hbase/.hbase-snapshot/ipcsnapshot/.snapshotinfo
 at org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.readSnapshotInfo(SnapshotDescriptionUtils.java:294)
        at org.apache.hadoop.hbase.snapshot.RestoreSnapshotHelper.copySnapshotForScanner(RestoreSnapshotHelper.java:803)
        at org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormatImpl.setInput(TableSnapshotInputFormatImpl.java:355)
        at org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat.setInput(TableSnapshotInputFormat.java:204)
        at org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableSnapshotMapperJob(TableMapReduceUtil.java:335)
        at com.tagphi.ipscore.ipcproperty.ScanIPCProperty.run(ScanIPCProperty.java:72)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at com.tagphi.ipscore.ipcproperty.ScanIPCProperty.main(ScanIPCProperty.java:46)
        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.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.io.FileNotFoundException: File does not exist: /tmp/hbase-hdfs/hbase/.hbase-snapshot/ipcsnapshot/.snapshotinfo
        at org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:66)
        at org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:56)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsUpdateTimes(FSNamesystem.java:1929)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(FSNamesystem.java:1870)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1850)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1822)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getBlockLocations(NameNodeRpcServer.java:546)
        at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.getBlockLocations(AuthorizationProviderProxyClientProtocol.java:87)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSideTranslatorPB.java:363)
        at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:619)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1060)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2040)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2038)

用此命令检查快照表,没有异常
hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot ipcsnapshot -stats -schema
----------------------------------------
   Name: ipcsnapshot
   Type: DISABLED
  Table: ipcproperty
 Format: 2
Created: 2016-04-12T15:23:1316/04/12 15:38:15 INFO Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
Snapshot Info
----------------------------------------
   Name: ipcsnapshot
   Type: FLUSH
  Table: ipcproperty
 Format: 2
Created: 2016-04-12T15:38:02

Table Descriptor
已邀请:
Caused by: java.io.FileNotFoundException: File does not exist: /tmp/hbase-hdfs/hbase/.hbase-snapshot/ipcsnapshot/.snapshotinfo
可以确认下hdfs快照是否存在,不存在的话可能是建快照有问题,删掉重建试试

存在 - 一句话介绍

hdfs快照目录
 hadoop fs -ls /hbase/.hbase-snapshot/ 下有ipcsnapshot文件夹
用hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot ipcsnapshot -stats -schema检查
得到
Snapshot Info
----------------------------------------
   Name: ipcsnapshot
   Type: FLUSH
  Table: ipcproperty
 Format: 2
Created: 2016-04-12T15:38:02

Table Descriptor
----------------------------------------
'ipcproperty', {NAME =&get; 'sn', DATA_BLOCK_ENCODING =&get; 'NONE', BLOOMFILTER =&get; 'ROW', REPLICATION_SCOPE =&get; '0', VERSIONS =&get; '1', COMPRESSION =&get; 'SNAPPY', MIN_VERSIONS =&get; '0', TTL =&get; 'FOREVER', KEEP_DELETED_CELLS =&get; 'FALSE', BLOCKSIZE =&get; '65536', IN_MEMORY =&get; 'false', BLOCKCACHE =&get; 'true'}
删掉重建呢?文件夹下有异常里所说的那个文件么?

存在 - 一句话介绍

没有/tmp/hbase-hdfs/hbase/.hbase-snapshot/ipcsnapshot/.snapshotinfo
有这个文件/hbase/.hbase-snapshot/ipcsnapshot/.snapshotinfo
日志里能看到这个快照构建时有异常么?

存在 - 一句话介绍

 hadoop fs -ls /hbase/.hbase-snapshot/ 下有ipcsnapshot文件夹
用hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot ipcsnapshot -stats -schema检查
得到
Snapshot Info
----------------------------------------
   Name: ipcsnapshot
   Type: FLUSH
  Table: ipcproperty
 Format: 2
Created: 2016-04-12T15:38:02

Table Descriptor
----------------------------------------
'ipcproperty', {NAME =&get; 'sn', DATA_BLOCK_ENCODING =&get; 'NONE', BLOOMFILTER =&get; 'ROW', REPLICATION_SCOPE =&get; '0', VERSIONS =&get; '1', COMPRESSION =&get; 'SNAPPY', MIN_VERSIONS =&get; '0', TTL =&get; 'FOREVER', KEEP_DELETED_CELLS =&get; 'FALSE', BLOCKSIZE =&get; '65536', IN_MEMORY =&get; 'false', BLOCKCACHE =&get; 'true'}
你好,后面是怎么解决的,我也遇到这样的问题

要回复问题请先登录注册