@@ -0,0 +1,2245 @@
+package com.inmobi.databus.files;%0A%0Aimport org.apache.hadoop.fs.FileStatus;%0Aimport org.apache.hadoop.fs.Path;%0A%0Apublic class HadoopStreamFile implements StreamFile %7B%0A%0A  private final String fileName;%0A  private Path parent;%0A  //file creation time%0A  private Long timeStamp;%0A%0A  public HadoopStreamFile(Path parent, String fileName, Long timeStamp) %7B%0A    this.fileName = fileName;%0A    this.parent = parent;%0A    this.timeStamp = timeStamp;%0A  %7D%0A%0A  public static HadoopStreamFile create(FileStatus status) %7B%0A    return new HadoopStreamFile(status.getPath().getParent(),%0A        status.getPath().getName(),  status.getModificationTime());%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    final int prime = 31;%0A    int result = 1;%0A    result = prime * result + ((parent == null) ? 0 : parent.hashCode());%0A    result = prime * result + ((timeStamp == null) ? 0 : timeStamp.hashCode());%0A    result = prime * result + ((fileName == null) ? 0 : fileName.hashCode());%0A    return result;%0A  %7D%0A%0A  @Override%0A  public boolean equals(Object obj) %7B%0A    if (this == obj) %7B%0A      return true;%0A    %7D%0A    if (obj == null) %7B%0A      return false;%0A    %7D%0A    if (getClass() != obj.getClass()) %7B%0A      return false;%0A    %7D%0A    HadoopStreamFile other = (HadoopStreamFile) obj;%0A%0A    if (parent == null) %7B%0A      if (other.parent != null) %7B%0A        return false;%0A      %7D%0A    %7D else if (!parent.equals(other.parent)) %7B%0A      return false;%0A    %7D%0A    if (timeStamp == null) %7B%0A      if (other.timeStamp != null) %7B%0A        return false;%0A      %7D%0A    %7D else if (!timeStamp.equals(other.timeStamp)) %7B%0A      return false;%0A    %7D%0A    if (fileName == null) %7B%0A      if (other.fileName != null) %7B%0A        return false;%0A      %7D%0A    %7D else if (!fileName.equals(other.fileName)) %7B%0A      return false;%0A    %7D%0A    return true;%0A  %7D%0A%0A  public String toString() %7B%0A    return new Path(parent, fileName).toString();%0A  %7D%0A%0A  @Override%0A  public int compareTo(Object o) %7B%0A    HadoopStreamFile other = (HadoopStreamFile)o;%0A    int pComp = parent.compareTo(other.parent);%0A    if ( pComp== 0) %7B%0A      int tComp = timeStamp.compareTo(other.timeStamp);%0A      if ( tComp == 0) %7B%0A        return fileName.compareTo(other.fileName);%0A      %7D else %7B%0A        return tComp;%0A      %7D%0A    %7D else %7B%0A      return pComp;%0A    %7D%0A  %7D%0A%7D%0A

Add HadoopStreamFile