hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] noslowerdna commented on a change in pull request #666: HADOOP-16221 add option to fail operation on metadata write failure
Date Mon, 01 Apr 2019 21:46:55 GMT
noslowerdna commented on a change in pull request #666: HADOOP-16221 add option to fail operation
on metadata write failure
URL: https://github.com/apache/hadoop/pull/666#discussion_r271063481
 
 

 ##########
 File path: hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
 ##########
 @@ -3053,8 +3065,12 @@ void finishedWrite(String key, long length) {
         S3Guard.putAndReturn(metadataStore, status, instrumentation);
       }
     } catch (IOException e) {
-      LOG.error("S3Guard: Error updating MetadataStore for write to {}:",
-          key, e);
+      if (failOnMetadataWriteError) {
+        throw new MetadataPersistenceException(p.toString(), e);
+      } else {
+        LOG.error("S3Guard: Error updating MetadataStore for write to {}:",
+            key, e);
 
 Review comment:
   would it be helpful to change key -> p here, so that whoever is reading the error log
has the qualified path? also the : at the end of the message string is not necessary

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message