0
votes

what is the main difference between the 2 classes. mainly, what situation would i use one and not the other?

org.apache.hadoop.hdfs.protocol package http://www.sching.com/javadoc/hadoop/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.html

org.apache.hadoop.fs package https://hadoop.apache.org/docs/r2.6.1/api/org/apache/hadoop/fs/FileStatus.html

1

1 Answers

1
votes

HdfsFileStatus is marked with @InterfaceAudience.Private and @InterfaceStability.Evolving annotations (check the source code). The first annotation means it intended to be used for internal Hadoop implementations. The second annotation means the file might be changing (backwards compatible support might not be available between releases). Basically you should not use HdfsFileStatus in your code.