[
https://issues.apache.org/jira/browse/HDFS-16605?focusedWorklogId=791603&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-791603
]
ASF GitHub Bot logged work on HDFS-16605:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Jul/22 23:36
Start Date: 15/Jul/22 23:36
Worklog Time Spent: 10m
Work Description: slfan1989 commented on code in PR #4375:
URL: https://github.com/apache/hadoop/pull/4375#discussion_r922577518
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterClientRejectOverload.java:
##########
@@ -206,33 +206,30 @@ private void testOverloaded(int expOverloadMin, int
expOverloadMax,
for (int i = 0; i < numOps; i++) {
// Stagger the operations a little (50ms)
final int sleepTime = i * 50;
- Future<?> future = exec.submit(new Runnable() {
- @Override
- public void run() {
- DFSClient routerClient = null;
- try {
- Thread.sleep(sleepTime);
- routerClient = new DFSClient(address, conf);
- String clientName = routerClient.getClientName();
- ClientProtocol routerProto = routerClient.getNamenode();
- routerProto.renewLease(clientName, null);
- } catch (RemoteException re) {
- IOException ioe = re.unwrapRemoteException();
- assertTrue("Wrong exception: " + ioe,
- ioe instanceof StandbyException);
- assertExceptionContains("is overloaded", ioe);
- overloadException.incrementAndGet();
- } catch (IOException e) {
- fail("Unexpected exception: " + e);
- } catch (InterruptedException e) {
- fail("Cannot sleep: " + e);
- } finally {
- if (routerClient != null) {
- try {
- routerClient.close();
- } catch (IOException e) {
- LOG.error("Cannot close the client");
- }
+ Future<?> future = exec.submit(() -> {
+ DFSClient routerClient = null;
+ try {
+ Thread.sleep(sleepTime);
+ routerClient = new DFSClient(address, conf);
+ String clientName = routerClient.getClientName();
+ ClientProtocol routerProto = routerClient.getNamenode();
+ routerProto.renewLease(clientName, null);
+ } catch (RemoteException re) {
+ IOException ioe = re.unwrapRemoteException();
+ assertTrue("Wrong exception: " + ioe,
Review Comment:
I will fix it.
Issue Time Tracking
-------------------
Worklog Id: (was: 791603)
Time Spent: 4h 20m (was: 4h 10m)
> 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 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]