比较hadoop hdfs中的时间戳

比较hadoop hdfs中的时间戳,hadoop,hdfs,Hadoop,Hdfs,我对hadoop非常陌生,我手头有一个问题。有没有办法比较HDFS中两个文件之间的时间戳 非常感谢您的帮助 使用该方法返回对象,通过该方法可以获取文件的修改时间 FileSystem fs = FileSystem.get(conf); long ts1 = fs.getFileStatus(new Path("/path/to/file1")).getModifiedTime(); long ts2 = fs.getFileStatus(new Path("/path/to/file2")).

我对hadoop非常陌生,我手头有一个问题。有没有办法比较HDFS中两个文件之间的时间戳

非常感谢您的帮助

使用该方法返回对象,通过该方法可以获取文件的修改时间

FileSystem fs = FileSystem.get(conf);
long ts1 = fs.getFileStatus(new Path("/path/to/file1")).getModifiedTime();
long ts2 = fs.getFileStatus(new Path("/path/to/file2")).getModifiedTime();