[ https://issues.apache.org/jira/browse/HDFS-16605?focusedWorklogId=791588&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-791588 ]
ASF GitHub Bot logged work on HDFS-16605: ----------------------------------------- Author: ASF GitHub Bot Created on: 15/Jul/22 22:04 Start Date: 15/Jul/22 22:04 Worklog Time Spent: 10m Work Description: slfan1989 commented on code in PR #4375: URL: https://github.com/apache/hadoop/pull/4375#discussion_r922543695 ########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/PeriodicService.java: ########## @@ -167,21 +167,18 @@ protected synchronized void startPeriodic() { stopPeriodic(); // Create the runnable service - Runnable updateRunnable = new Runnable() { - @Override - public void run() { - LOG.debug("Running {} update task", serviceName); - try { - if (!isRunning) { - return; - } - periodicInvoke(); - runCount++; - lastRun = Time.now(); - } catch (Exception ex) { - errorCount++; - LOG.warn(serviceName + " service threw an exception", ex); + Runnable updateRunnable = () -> { + LOG.debug("Running {} update task", serviceName); + try { + if (!isRunning) { + return; } + periodicInvoke(); + runCount++; + lastRun = Time.now(); + } catch (Exception ex) { + errorCount++; + LOG.warn(serviceName + " service threw an exception", ex); Review Comment: Thanks for your help reviewing the code, I will fix it. Issue Time Tracking ------------------- Worklog Id: (was: 791588) Time Spent: 4h (was: 3h 50m) > Improve Code With Lambda in hadoop-hdfs-rbf moudle > -------------------------------------------------- > > Key: HDFS-16605 > URL: https://issues.apache.org/jira/browse/HDFS-16605 > Project: Hadoop HDFS > Issue Type: Improvement > Components: rbf > Affects Versions: 3.4.0 > Reporter: fanshilun > Assignee: fanshilun > Priority: Minor > Labels: pull-request-available > Time Spent: 4h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org