Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15289 Allow viewfs mounts with HDFS/HCFS scheme and centralized mount table
  3. HDFS-15533

Provide DFS API compatible class(ViewDistributedFileSystem), but use ViewFileSystemOverloadScheme inside

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.3.1, 3.4.0
    • dfs, viewfs
    • None
    • Reviewed

    Description

      I have been working on a thought from last week is that, we wanted to provide DFS compatible APIs with mount functionality. So, that existing DFS applications can work with out class cast issues.

      When we tested with other components like Hive and HBase, I noticed some classcast issues.

      HBase example:
      java.lang.ClassCastException: org.apache.hadoop.fs.viewfs.ViewFileSystemOverloadScheme cannot be cast to org.apache.hadoop.hdfs.DistributedFileSystemjava.lang.ClassCastException: org.apache.hadoop.fs.viewfs.ViewFileSystemOverloadScheme cannot be cast to org.apache.hadoop.hdfs.DistributedFileSystem at org.apache.hadoop.hbase.util.FSUtils.getDFSHedgedReadMetrics(FSUtils.java:1748) at org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapperImpl.<init>(MetricsRegionServerWrapperImpl.java:146) at org.apache.hadoop.hbase.regionserver.HRegionServer.handleReportForDutyResponse(HRegionServer.java:1594) at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:1001) at java.lang.Thread.run(Thread.java:748)
      Hive:
      |io.AcidUtils|: Failed to get files with ID; using regular API: Only supported for DFS; got class org.apache.hadoop.fs.viewfs.ViewFileSystemOverloadScheme

      SO, here the implementation details are like follows:

      We extended DistributedFileSystem and created a class called " ViewDistributedFileSystem"
      This vfs=ViewFirstibutedFileSystem, try to initialize ViewFileSystemOverloadScheme. If success call will delegate to  vfs. If fails to initialize due to no mount points, or other errors, it will just fallback to regular DFS init. If users does not configure any mount, system will behave exactly like today's DFS. If there are mount points, vfs functionality will come under DFS.

      I have a patch and will post it in some time.

       

       

       

      Attachments

        Issue Links

          Activity

            People

              umamaheswararao Uma Maheswara Rao G
              umamaheswararao Uma Maheswara Rao G
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: