Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10906

getContentSummary() for HarFileSystem throws IllegalArgumentException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      As HarFileSystem does not implement getContentSummary(), the implementation from FilterFileSystem is inherited by default. However, FilterFileSystem.getContentSummary() does not work for the HarFileSystem because the method attempts to use HarFileSystem's underlying FS to call getContentSummary(). In the case where the the underlying filesystem is HDFS, an exception similar to the following is thrown:

      java.lang.IllegalArgumentException: Wrong FS: har://hdfs-example.com:9000/tmp/data.har, expected: hdfs://example.com:9000
              at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:352)
              at org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:99)
              at org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:155)
              at org.apache.hadoop.hdfs.DistributedFileSystem.getContentSummary(DistributedFileSystem.java:232)
              at org.apache.hadoop.fs.FilterFileSystem.getContentSummary(FilterFileSystem.java:287)
              at org.apache.hadoop.fs.FilterFileSystem.getContentSummary(FilterFileSystem.java:287)
      

      One solution is to implement HarFileSystem.getContentSummary() using code similar to FileSystem.getContentSummary().

      Attachments

        Activity

          People

            Unassigned Unassigned
            pauly Paul Yang
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: