File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -1296,19 +1296,19 @@ public void switchDataNode(Node node) throws IOException{
1296
1296
isConnected = true ;
1297
1297
break ;
1298
1298
}
1299
- }
1300
-
1301
- if (nodes_ .isEmpty ()){
1302
- log .error ("Connect to " + node .hostName + ":" + node .port + " failed." );
1303
- throw new RuntimeException ("Connect to " + node .hostName + ":" + node .port + " failed." );
1304
- }
1299
+ } else {
1300
+ if (nodes_ .isEmpty ()){
1301
+ log .error ("Connect to " + node .hostName + ":" + node .port + " failed." );
1302
+ throw new RuntimeException ("Connect to " + node .hostName + ":" + node .port + " failed." );
1303
+ }
1305
1304
1306
- int index = nodeRandom_ .nextInt (nodes_ .size ());
1307
- if (connectNode (nodes_ .get (index ))) {
1308
- if (nodes_ .size () > 1 )
1309
- log .info ("Switch to node: " + nodes_ .get (index ).hostName + ":" + nodes_ .get (index ).port + " successfully." );
1310
- isConnected = true ;
1311
- break ;
1305
+ int index = nodeRandom_ .nextInt (nodes_ .size ());
1306
+ if (connectNode (nodes_ .get (index ))) {
1307
+ if (nodes_ .size () > 1 )
1308
+ log .info ("Switch to node: " + nodes_ .get (index ).hostName + ":" + nodes_ .get (index ).port + " successfully." );
1309
+ isConnected = true ;
1310
+ break ;
1311
+ }
1312
1312
}
1313
1313
1314
1314
try {
You can’t perform that action at this time.
0 commit comments