HDFS-17526. getMetadataInputStream should use getShareDeleteFileInputStream for windows (#6826). Contributed by Danny Becker
This commit is contained in:
parent
d8ca2dbe34
commit
50fcfd8b29
@ -291,6 +291,12 @@ public URI getMetadataURI() {
|
||||
public LengthInputStream getMetadataInputStream(long offset)
|
||||
throws IOException {
|
||||
final File meta = getMetaFile();
|
||||
if (NativeIO.isAvailable()) {
|
||||
return new LengthInputStream(
|
||||
getFileIoProvider().getShareDeleteFileInputStream(
|
||||
getVolume(), meta, offset),
|
||||
meta.length());
|
||||
}
|
||||
return new LengthInputStream(
|
||||
getFileIoProvider().openAndSeek(getVolume(), meta, offset),
|
||||
meta.length());
|
||||
|
Loading…
Reference in New Issue
Block a user