Class GetContentSummaryOperation

java.lang.Object
org.apache.hadoop.fs.s3a.impl.AbstractStoreOperation
org.apache.hadoop.fs.s3a.impl.ExecutingStoreOperation<org.apache.hadoop.fs.ContentSummary>
org.apache.hadoop.fs.s3a.impl.GetContentSummaryOperation
All Implemented Interfaces:
org.apache.hadoop.fs.statistics.IOStatisticsSource, org.apache.hadoop.util.functional.CallableRaisingIOE<org.apache.hadoop.fs.ContentSummary>

public class GetContentSummaryOperation extends ExecutingStoreOperation<org.apache.hadoop.fs.ContentSummary> implements org.apache.hadoop.fs.statistics.IOStatisticsSource
GetContentSummary operation. It is optimized for s3 and performs a deep tree listing, inferring directory counts from the paths returned. The Operation serves up IOStatistics; this counts the cost of all the list operations, but not the initial HEAD probe to see if the path is a file.
  • Constructor Details

  • Method Details

    • getIOStatistics

      public org.apache.hadoop.fs.statistics.IOStatistics getIOStatistics()
      Specified by:
      getIOStatistics in interface org.apache.hadoop.fs.statistics.IOStatisticsSource
    • execute

      @RetryTranslated public org.apache.hadoop.fs.ContentSummary execute() throws IOException
      Return the ContentSummary of a given path.
      Specified by:
      execute in class ExecutingStoreOperation<org.apache.hadoop.fs.ContentSummary>
      Returns:
      the summary.
      Throws:
      FileNotFoundException - if the path does not resolve
      IOException - failure
    • getDirSummary

      public org.apache.hadoop.fs.ContentSummary getDirSummary(org.apache.hadoop.fs.Path dir) throws IOException
      Return the ContentSummary of a given directory.
      Parameters:
      dir - dir to scan
      Returns:
      the content summary
      Throws:
      FileNotFoundException - if the path does not resolve
      IOException - IO failure
      FileNotFoundException - the path does not exist
      IOException - failure