Class HdfsUtils

java.lang.Object
org.apache.storm.hdfs.common.HdfsUtils

public class HdfsUtils extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static ArrayList<org.apache.hadoop.fs.Path>
    listFilesByModificationTime(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path directory, long olderThan)
    list files sorted by modification time that have not been modified since 'olderThan'. if 'olderThan' is <= 0 then the filtering is disabled
    static org.apache.hadoop.fs.FSDataOutputStream
    tryCreateFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file)
    Returns null if file already exists. throws if there was unexpected problem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HdfsUtils

      public HdfsUtils()
  • Method Details

    • listFilesByModificationTime

      public static ArrayList<org.apache.hadoop.fs.Path> listFilesByModificationTime(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path directory, long olderThan) throws IOException
      list files sorted by modification time that have not been modified since 'olderThan'. if 'olderThan' is <= 0 then the filtering is disabled
      Throws:
      IOException
    • tryCreateFile

      public static org.apache.hadoop.fs.FSDataOutputStream tryCreateFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file) throws IOException
      Returns null if file already exists. throws if there was unexpected problem
      Throws:
      IOException