You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/12/12 03:47:48 UTC

(iotdb) branch IOTDB-6199 updated: fix checkstyle

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch IOTDB-6199
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/IOTDB-6199 by this push:
     new 52fb4a1bafd fix checkstyle
52fb4a1bafd is described below

commit 52fb4a1bafd74522f740b4ab53ae4ce0e833991f
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Tue Dec 12 11:47:40 2023 +0800

    fix checkstyle
---
 .../src/main/java/org/apache/iotdb/session/NodesSupplier.java      | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/NodesSupplier.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/NodesSupplier.java
index 0ce4af5bc9a..e48bdca2ab0 100644
--- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/NodesSupplier.java
+++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/NodesSupplier.java
@@ -22,8 +22,6 @@ package org.apache.iotdb.session;
 import org.apache.iotdb.common.rpc.thrift.TEndPoint;
 import org.apache.iotdb.isession.INodeSupplier;
 import org.apache.iotdb.isession.SessionDataSet;
-import org.apache.iotdb.rpc.IoTDBConnectionException;
-import org.apache.iotdb.rpc.StatementExecutionException;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -81,6 +79,7 @@ public class NodesSupplier implements INodeSupplier, Runnable {
 
   private ThriftConnection client;
 
+  @SuppressWarnings("unsafeThreadSchedule")
   public static NodesSupplier createNodeSupplier(
       List<TEndPoint> endPointList,
       ScheduledExecutorService executorService,
@@ -183,7 +182,7 @@ public class NodesSupplier implements INodeSupplier, Runnable {
           zoneId,
           version);
       return true;
-    } catch (IoTDBConnectionException e) {
+    } catch (Exception e) {
       LOGGER.warn("Failed to create connection with {}.", endPoint, e);
       close();
       return false;
@@ -213,7 +212,7 @@ public class NodesSupplier implements INodeSupplier, Runnable {
       // replace the older ones.
       availableNodes = new CopyOnWriteArraySet<>(res);
       return true;
-    } catch (IoTDBConnectionException | StatementExecutionException e) {
+    } catch (Exception e) {
       LOGGER.warn("Failed to fetch data node list from {}.", client.endPoint, e);
       return false;
     }