soMuchToLearnAndShare
soMuchToLearnAndShare

Reputation: 1035

hdfsFileStatus and FileStatus difference

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

Upvotes: 0

Views: 94

Answers (1)

Serhiy
Serhiy

Reputation: 4141

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.

Upvotes: 1

Related Questions