diff --git a/hoodie-common/src/main/java/com/uber/hoodie/common/util/FSUtils.java b/hoodie-common/src/main/java/com/uber/hoodie/common/util/FSUtils.java index 18ec2b3fb..e4c97f75b 100644 --- a/hoodie-common/src/main/java/com/uber/hoodie/common/util/FSUtils.java +++ b/hoodie-common/src/main/java/com/uber/hoodie/common/util/FSUtils.java @@ -112,7 +112,7 @@ public class FSUtils { } public static long getFileSize(FileSystem fs, Path path) throws IOException { - return fs.listStatus(path)[0].getLen(); + return fs.getFileStatus(path).getLen(); } public static String getFileId(String fullFileName) {