You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by to...@apache.org on 2022/06/07 09:10:50 UTC
[hadoop] branch branch-3.3 updated: HDFS-16618. sync_file_range error should include more volume/file info (#4402)
This is an automated email from the ASF dual-hosted git repository.
tomscut pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new 516a2a8e440 HDFS-16618. sync_file_range error should include more volume/file info (#4402)
516a2a8e440 is described below
commit 516a2a8e440378c868ddb02cb3ad14d0d879037f
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Tue Jun 7 01:53:45 2022 -0700
HDFS-16618. sync_file_range error should include more volume/file info (#4402)
Signed-off-by: Tao Li <to...@apache.org>
---
.../fsdataset/impl/FsDatasetAsyncDiskService.java | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java
index 9e4ce26a950..138037456bc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java
@@ -216,16 +216,20 @@ class FsDatasetAsyncDiskService {
}
}
- public void submitSyncFileRangeRequest(FsVolumeImpl volume,
- final ReplicaOutputStreams streams, final long offset, final long nbytes,
- final int flags) {
- execute(volume, new Runnable() {
- @Override
- public void run() {
+ public void submitSyncFileRangeRequest(FsVolumeImpl volume, final ReplicaOutputStreams streams,
+ final long offset, final long nbytes, final int flags) {
+ execute(volume, () -> {
+ try {
+ streams.syncFileRangeIfPossible(offset, nbytes, flags);
+ } catch (NativeIOException e) {
try {
- streams.syncFileRangeIfPossible(offset, nbytes, flags);
- } catch (NativeIOException e) {
- LOG.warn("sync_file_range error", e);
+ LOG.warn("sync_file_range error. Volume: {}, Capacity: {}, Available space: {}, "
+ + "File range offset: {}, length: {}, flags: {}", volume, volume.getCapacity(),
+ 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);
}
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org