CatalogJanitor doesn't work properly when "fs.default.name" isn't set in config 
file.
-------------------------------------------------------------------------------------

                 Key: HBASE-4184
                 URL: https://issues.apache.org/jira/browse/HBASE-4184
             Project: HBase
          Issue Type: Bug
          Components: master
            Reporter: Ming Ma
            Assignee: Ming Ma


In our system, hbase.rootdir is set to a hdfs path and hbase can figure out the 
FileSystem and set "fs.default.name" accordingly on the Configuration object 
and pass around including to RS. That is handled in HMaster.java and 
MasterFileSystem.java.

CatalogJanitor uses deprecated HRegionInfo.getTableDesc. The method creates a 
default configuration and get FileSystem from there. That will be 
RawLocalFileSystem. It returns the following exception.


java.lang.IllegalArgumentException: Wrong FS: hdfs://sea-esxi-0:54310/tmp/hbase/
testtb/.tableinfo, expected: file:///
        at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:454)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:67)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:307)
        at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1085)
        at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1110)
        at 
org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:494)
        at 
org.apache.hadoop.hbase.util.FSUtils.getTableInfoModtime(FSUtils.java:833)
        at 
org.apache.hadoop.hbase.util.FSTableDescriptors.get(FSTableDescriptors.java:127)
        at 
org.apache.hadoop.hbase.util.FSTableDescriptors.get(FSTableDescriptors.java:99)
        at 
org.apache.hadoop.hbase.HRegionInfo.getTableDesc(HRegionInfo.java:560)
        at 
org.apache.hadoop.hbase.master.CatalogJanitor$1.compare(CatalogJanitor.java:118)
        at 
org.apache.hadoop.hbase.master.CatalogJanitor$1.compare(CatalogJanitor.java:110)
        at java.util.TreeMap.put(TreeMap.java:530)        at 
org.apache.hadoop.hbase.master.CatalogJanitor$2.visit(CatalogJanitor.java:138)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to