Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
If the data.tx.snapshot.dir doesn't exist, the TransactionStateCache fails to startup since the refreshState() during startup() will throw FileNotFoundException and it will cause the Service to stop. But it is handled by just logging a message during every refresh.
Stack Trace:
Exception in thread "DefaultTransactionStateCache STARTING" java.lang.RuntimeException: java.io.FileNotFoundException: File /cdap/tx.snapshot does not exist. at com.google.common.base.Throwables.propagate(Throwables.java:160) at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:47) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.FileNotFoundException: File /cdap/tx.snapshot does not exist. at org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:805) at org.apache.hadoop.hdfs.DistributedFileSystem.access$700(DistributedFileSystem.java:106) at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:863) at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:859) at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) at org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:859) at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1515) at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1555) at org.apache.tephra.persist.HDFSTransactionStateStorage.listSnapshotFiles(HDFSTransactionStateStorage.java:199) at org.apache.tephra.persist.HDFSTransactionStateStorage.getLatestSnapshotInputStream(HDFSTransactionStateStorage.java:164) at org.apache.tephra.persist.HDFSTransactionStateStorage.getLatestTransactionVisibilityState(HDFSTransactionStateStorage.java:152) at org.apache.tephra.coprocessor.TransactionStateCache.refreshState(TransactionStateCache.java:154) at org.apache.tephra.coprocessor.TransactionStateCache.startUp(TransactionStateCache.java:73) at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43) ... 1 more 17/02/05 06:18:05 INFO regionserver.HRegion: Onlined 0ea0b5e2fddd004fadeb3fe26acc4f11; next sequenceid=2