You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/03/16 22:58:41 UTC

[GitHub] [hadoop-ozone] sodonnel commented on a change in pull request #678: HDDS-3179 Pipeline placement based on Topology does not have fallback

sodonnel commented on a change in pull request #678: HDDS-3179 Pipeline placement based on Topology does not have fallback
URL: https://github.com/apache/hadoop-ozone/pull/678#discussion_r393355167
 
 

 ##########
 File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
 ##########
 @@ -99,9 +99,11 @@ boolean meetCriteria(DatanodeDetails datanodeDetails, int nodesRequired) {
       try {
         pipeline = stateManager.getPipeline(pid);
       } catch (PipelineNotFoundException e) {
-        LOG.error("Pipeline not found in pipeline state manager during" +
-            " pipeline creation. PipelineID: " + pid +
-            " exception: " + e.getMessage());
+        if (LOG.isDebugEnabled()) {
 
 Review comment:
   I don't think we need to wrap the debug logs in `if (LOG.isDebugEnabled())` if we use the SLF4J style logs with {} placeholders rather than string interpolation. The log message will only be evaluated if the debug level is set.
   
   For this log, I would suggest using the {} placeholders and let the full stack trace be logged rather than just `e.getMessage()`, eg:
   
   ```
   LOG.debug("Pipeline not found in pipeline state manager during" +
                 " pipeline creation. PipelineID: {}", pid, e);
   ```

----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org