[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-08-04 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1205937429

   The failed UT 
`org.apache.hadoop.hdfs.server.balancer.TestBalancerWithHANameNodes.testBalancerWithObserverWithFailedNode`
 works well locally.


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-08-04 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1205113551

   @ferhui Sir, thanks for your review.
   
   > CI reported that 'This branch has conflicts that must be resolved'
   
   I have fixed this conflict.  This conflict is in `EditLogTailer.java` which 
has modified by HDFS-16642.


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-08-02 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1203488819

   @ferhui Thanks for your review. I have updated this patch based on the 
latest trunk. Please help me review it again, thanks.
   
   


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-23 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1193144300

   > can correct them in the classes you modified.
   
   @ferhui I have corrected them, please help me review it again. Thanks~


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-22 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1192649976

   Copy, I will correct them. Thanks~


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-21 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1192231376

   > After completing this pr, can you help summarize the precautions in the 
process of using logger, so that other partners can refer to it later?
   
   @slfan1989 Sure, I will summarize it.


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-21 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1192230791

   can remove isDebugEnabled from those clauses without '+'
   ---
   Do you mean correct all classes in hadoop-hdfs module?
   
   In this patch, I just modified the classes that are used frequently by the 
namenode.


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-20 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1190973192

   @slfan1989 ping. Can you push this PR forward?


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-13 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1183206857

   > I have one question to ask, that is why some code should remove 
LOG.isDebugEnabled()?
   
   @slfan1989 Thanks for your review.  If you have any other questions or good 
ideas, please let me know. Thanks 


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-07 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1178595411

   @goiri thanks for your review, I learned a lot and have updated the patch. 
Please help me review it again.


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [hadoop] ZanderXu commented on pull request #4529: HDFS-16648. Add isDebugEnabled check for debug logs in some classes

2022-07-05 Thread GitBox


ZanderXu commented on PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#issuecomment-1175795921

   > What are we saving by doing this?
   In [PR-4480](https://github.com/apache/hadoop/pull/4480#event-6923776715), I 
do a performance stress test about it. And found that adding isDebugEnabled 
before strings concatenation is helpful for performance.
   Please refer to the stress test code and results. 
   Test code:
   ```
   org.slf4j.Logger LOG = LoggerFactory.getLogger("Test");
   Block b = new Block();
   DatanodeInfo dn = new DatanodeInfo(EMPTY_DATANODE_ID);
   List staleNodes = new ArrayList<>();
   staleNodes.add(dn);
   long beginTime1 = Time.monotonicNowNanos();
   for (int i = 0; i < 1; i++) {
 LOG.debug("BLOCK* invalidateBlocks: postponing " +
 "invalidation of {} on {} because {} replica(s) are located on 
" +
 "nodes with potentially out-of-date block reports",
 b, dn, staleNodes);
   }
   long endTime1 = Time.monotonicNowNanos();
   LOG.info("Time1: {}", endTime1 - beginTime1);
   
   long beginTime2 = Time.monotonicNowNanos();
   for (int i = 0; i < 1; i++) {
 if (LOG.isDebugEnabled()) {
   LOG.debug("BLOCK* invalidateBlocks: postponing " +
   "invalidation of {} on {} because {} replica(s) are located 
on " +
   "nodes with potentially out-of-date block reports",
   b, dn, staleNodes);
 }
   }
   long endTime2 = Time.monotonicNowNanos();
   LOG.info("Time2: {}", endTime2 - beginTime2);
   
   long beginTime3 = Time.monotonicNowNanos();
   for (int i = 0; i < 1; i++) {
 LOG.debug("BLOCK* invalidateBlocks: postponing invalidation of {}", b);
   }
   long endTime3 = Time.monotonicNowNanos();
   LOG.info("Time3: {}", endTime3 - beginTime3);
   ```
And the result is:
   | - | Time1(ns) | Time2(ns) | Time3(ns) |
   | :-| : | :: | :: |
   | First Run | 353681417 | 287066916 | 270287253 |
   | Second Run | 356797081 | 308013207 | 266873810 |
   | Third Run | 366995010 | 287111940 | 259907404 |
   | Avg | 359157836 | 294064021 | 265689489 |
   


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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