[ 
https://issues.apache.org/jira/browse/YARN-9951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994539#comment-16994539
 ] 

Peter Bacsko commented on YARN-9951:
------------------------------------

Minor comments from me:
{noformat}
   if (copy_file(cred_file_source, cred_file, cred_file_dest,
         S_IRUSR | S_IWUSR) != 0) {
     exit_code = COULD_NOT_CREATE_CREDENTIALS_COPY;
     fprintf(ERRORFILE, "Failed to copy file\n");
     goto cleanup;
   }
 
     if (copy_file(keystore_file_source, keystore_file, keystore_file_dest,
           S_IRUSR | S_IWUSR) != 0) {
       exit_code = COULD_NOT_CREATE_KEYSTORE_COPY;
       fprintf(ERRORFILE, "Failed to copy file\n");
       goto cleanup;
     }
 
     if (copy_file(truststore_file_source, truststore_file, 
truststore_file_dest,
           S_IRUSR | S_IWUSR) != 0) {
       exit_code = COULD_NOT_CREATE_TRUSTSTORE_COPY;
       fprintf(ERRORFILE, "Failed to copy file\n");
       goto cleanup;
     }
   }
 {noformat}

Although we set the proper exit code, I'd rewrite the error messages to 
explicitly mention what file we failed to copy, eg. "Failed to copy keystore".

> Unify Error Messages in container-executor
> ------------------------------------------
>
>                 Key: YARN-9951
>                 URL: https://issues.apache.org/jira/browse/YARN-9951
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: nodemanager
>    Affects Versions: 3.2.0
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>         Attachments: YARN-9951.1.patch
>
>
> [https://github.com/apache/hadoop/blob/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/container-executor.c]
>  
> Has several different ways for reporting errors:
>  
>  # Couldn't
>  # Can't
>  # Could not
>  # Failed to
>  # Unable to
>  # Other
>  
> I think "Failed to" is the best verbage.  Contractions are hard for 
> non-native English speaking folks.  "Failed" is to the point. and more likely 
> to grep logs for 'fail' than I am 'unable' or 'could not'.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to