Reidddddd commented on a change in pull request #528: HBASE-22890 Verify the
files when RegionServer is starting and BucketCache is in file mode
URL: https://github.com/apache/hbase/pull/528#discussion_r319440808
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java
##########
@@ -59,6 +61,43 @@ public FileIOEngine(long capacity, String... filePaths)
throws IOException {
this.fileChannels = new FileChannel[filePaths.length];
this.rafs = new RandomAccessFile[filePaths.length];
this.channelLocks = new ReentrantLock[filePaths.length];
+ init();
+ }
+
+ public FileIOEngine(String algorithmName, String persistencePath,
+ long capacity, String... filePaths) throws IOException {
+ this.sizePerFile = capacity / filePaths.length;
+ this.capacity = this.sizePerFile * filePaths.length;
+ this.filePaths = filePaths;
+ this.fileChannels = new FileChannel[filePaths.length];
+ this.rafs = new RandomAccessFile[filePaths.length];
+ this.channelLocks = new ReentrantLock[filePaths.length];
+ if (persistencePath != null){
+ try {
+ String preFilesKey = FileIOEngineUtils.getPreFilesKey(persistencePath);
+ String filesKey = FileIOEngineUtils.getFilesKey(filePaths,
algorithmName);
+ LOG.info("preFilesKey: "+ preFilesKey + " filesKey: " + filesKey);
Review comment:
More verbose language for logging.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services