taklwu commented on pull request #88:
URL: 
https://github.com/apache/hbase-operator-tools/pull/88#issuecomment-849308745


   @joshelser I added unit tests to make sure we use the filesystem defined in 
`hbase.rootdir` instead of `fs.defaultFS`.  if you're looking for end-to-end 
unit tests for `HBaseFsck` (currently does not exist for any functions in that 
class), I'd like to create a separate JIRAs for those are being used by `HBCK2` 
and limit the scope of this PR.
   
   @z-york , I did that in IDE and but here is what you request for a proof. 
   
   * without my change, we found 13 lines with `FileSystem.get`, 2 lines in 
README is stacktrace and is not related to this change  
   
   ```
   $ git checkout rel/1.1.0
   $ grep -R "^.*\bFileSystem\.get" .
   ./README.md:        at 
org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2799)
   ./README.md:        at 
org.apache.hadoop.fs.FileSystem.get(FileSystem.java:389)
   ./src/test/java/org/apache/hbase/TestHBCKFsTableDescriptors.java:    
FileSystem fs = FileSystem.get(UTIL.getConfiguration());
   ./src/test/java/org/apache/hbase/TestHBCKFsTableDescriptors.java:    
FileSystem fs = FileSystem.get(UTIL.getConfiguration());
   ./src/test/java/org/apache/hbase/TestHBCKFsTableDescriptors.java:    
FileSystem fs = FileSystem.get(UTIL.getConfiguration());
   
./src/test/java/org/apache/hbase/TestHBCKFsTableDescriptorForceCreation.java:   
 FileSystem fs = FileSystem.get(UTIL.getConfiguration());
   
./src/test/java/org/apache/hbase/TestHBCKFsTableDescriptorForceCreation.java:   
 FileSystem fs = FileSystem.get(UTIL.getConfiguration());
   
./src/test/java/org/apache/hbase/TestHBCKFsTableDescriptorForceCreation.java:   
 FileSystem fs = FileSystem.get(UTIL.getConfiguration());
   ./src/main/java/org/apache/hbase/hbck1/HBaseFsck.java:    FileSystem fs = 
FileSystem.get(getConf());
   ./src/main/java/org/apache/hbase/hbck1/HBaseFsck.java:          
CommonFSUtils.delete(FileSystem.get(getConf()), waldir, true));
   ./src/main/java/org/apache/hbase/hbck1/HBaseFsck.java:        FileSystem fs 
= FileSystem.get(conf);
   ./src/main/java/org/apache/hbase/hbck1/HBaseFsck.java:        FileSystem fs 
= FileSystem.get(conf);
   ./src/main/java/org/apache/hbase/hbck1/HFileCorruptionChecker.java:    
this.fs = FileSystem.get(conf);
   
   $ grep -R "^.*\bFileSystem\.get" . | wc -l
         13
          
   ```
   
   * with my change, we don't find `FileSystem.get` in any java classes   
   
   ```
   $ grep -R "^.*\bFileSystem\.get" .
   ./README.md:        at 
org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2799)
   ./README.md:        at 
org.apache.hadoop.fs.FileSystem.get(FileSystem.java:389)
   $ grep -R "^.*\bFileSystem\.get" . | wc -l
          2
   ```  


-- 
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]


Reply via email to