tomscut commented on code in PR #4402:
URL: https://github.com/apache/hadoop/pull/4402#discussion_r889762386
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java:
##########
@@ -216,16 +216,20 @@ synchronized void shutdown() {
}
}
- 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: {}, "
Review Comment:
Hi @virajjasani , please remove this extra space.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java:
##########
@@ -216,16 +216,20 @@ synchronized void shutdown() {
}
}
- 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: {}, "
Review Comment:
```suggestion
LOG.warn("sync_file_range error. Volume: {}, Capacity: {},
Available space: {}, "
```
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java:
##########
@@ -216,16 +216,20 @@ synchronized void shutdown() {
}
}
- 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: {}, "
Review Comment:
```suggestion
LOG.warn("sync_file_range error. Volume: {}, Capacity: {}, "
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]