path,
offset,
fragmentSize));
}
}
CountInputStream cstream;
if (LOG.isDebugEnabled()) {
cstream = new CountInputStream(stream, counter) {
@Override
public void close() throws IOException {
LOG.debug(MessageFormat.format(
"Start closing input (path={0}, offset={1}, size={2})",
path,
offset,
fragmentSize));
super.close();
LOG.debug(MessageFormat.format(
"Finish closing input (path={0}, offset={1}, size={2})",
path,
offset,
fragmentSize));
}
};
} else {
cstream = new CountInputStream(stream, counter);
}
ModelInput<T> input = streamFormat.createInput(dataType, path.toString(), cstream, offset, fragmentSize);
succeed = true;
return input;
} finally {