Details
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
- relates to
-
HDFS-16647 Delete unused NameNode#FS_HDFS_IMPL_KEY
-
- Resolved
-
- links to