HDFS-16618. sync_file_range error should include more volume/file info (#4402)
Signed-off-by: Tao Li <tomscut@apache.org>
This commit is contained in:
parent
132fbbe228
commit
516a2a8e44
@ -216,16 +216,20 @@ synchronized void shutdown() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void submitSyncFileRangeRequest(FsVolumeImpl volume,
|
public void submitSyncFileRangeRequest(FsVolumeImpl volume, final ReplicaOutputStreams streams,
|
||||||
final ReplicaOutputStreams streams, final long offset, final long nbytes,
|
final long offset, final long nbytes, final int flags) {
|
||||||
final int flags) {
|
execute(volume, () -> {
|
||||||
execute(volume, new Runnable() {
|
try {
|
||||||
@Override
|
streams.syncFileRangeIfPossible(offset, nbytes, flags);
|
||||||
public void run() {
|
} catch (NativeIOException e) {
|
||||||
try {
|
try {
|
||||||
streams.syncFileRangeIfPossible(offset, nbytes, flags);
|
LOG.warn("sync_file_range error. Volume: {}, Capacity: {}, Available space: {}, "
|
||||||
} catch (NativeIOException e) {
|
+ "File range offset: {}, length: {}, flags: {}", volume, volume.getCapacity(),
|
||||||
LOG.warn("sync_file_range error", e);
|
volume.getAvailable(), offset, nbytes, flags, e);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
LOG.warn("sync_file_range error. Volume: {}, Capacity: {}, "
|
||||||
|
+ "File range offset: {}, length: {}, flags: {}", volume, volume.getCapacity(),
|
||||||
|
offset, nbytes, flags, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user