M C (Mac)
08/09/2023, 11:45 AMM C (Mac)
08/09/2023, 11:57 AMprivate static TrackingFsDataInputStream openStream(
final Path file, final Configuration config, final long seekPosition)
throws IOException {
final FileSystem fs = file.getFileSystem();
final long fileLength = fs.getFileStatus(file).getLen(); <---
final int fetchSize =
MathUtils.checkedDownCast(config.get(StreamFormat.FETCH_IO_SIZE).getBytes());
if (fetchSize <= 0) {
throw new IllegalConfigurationException(
String.format(
"The fetch size (%s) must be > 0, but is %d",
StreamFormat.FETCH_IO_SIZE.key(), fetchSize));
}