This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch client-opc
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/client-opc by this push:
new 77c9cd3239e clean-sit
77c9cd3239e is described below
commit 77c9cd3239e87aa0cc55d0b3d9aad2175732d6cd
Author: Caideyipi <[email protected]>
AuthorDate: Tue Dec 23 14:28:39 2025 +0800
clean-sit
---
.../sink/protocol/opcua/client/ClientRunner.java | 24 ++++------------------
.../opcua/client/IoTDBKeyStoreLoaderClient.java | 2 +-
2 files changed, 5 insertions(+), 21 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java
index 90027bab38b..9a4ab45eaed 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java
@@ -50,8 +50,6 @@ public class ClientRunner {
Security.addProvider(new BouncyCastleProvider());
}
- private final CompletableFuture<OpcUaClient> future = new
CompletableFuture<>();
-
private final IoTDBOpcUaClient configurableUaClient;
private final Path securityDir;
private final String password;
@@ -104,29 +102,15 @@ public class ClientRunner {
try {
final OpcUaClient client = createClient();
- future.whenCompleteAsync(
- (c, ex) -> {
- if (ex != null) {
- logger.warn("Error running opc client: ", ex);
- }
-
- try {
- client.disconnect().get();
- } catch (final InterruptedException | ExecutionException e) {
- Thread.currentThread().interrupt();
- logger.warn("Error disconnecting: ", e);
- }
- });
-
try {
configurableUaClient.run(client);
- future.get(
- PipeConfig.getInstance().getPipeConnectorHandshakeTimeoutMs(),
TimeUnit.MICROSECONDS);
} catch (final Exception e) {
- throw new PipeException("Error running opc client: " + e.getMessage());
+ throw new PipeException(
+ "Error running opc client: " + e.getClass().getSimpleName() + ": "
+ e.getMessage());
}
} catch (final Exception e) {
- throw new PipeException("Error getting opc client: " + e.getMessage());
+ throw new PipeException(
+ "Error getting opc client: " + e.getClass().getSimpleName() + ": " +
e.getMessage());
}
}
}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/IoTDBKeyStoreLoaderClient.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/IoTDBKeyStoreLoaderClient.java
index 2d95f174cb7..b81bf1d7732 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/IoTDBKeyStoreLoaderClient.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/IoTDBKeyStoreLoaderClient.java
@@ -66,7 +66,7 @@ class IoTDBKeyStoreLoaderClient {
.setOrganizationalUnit("dev")
.setLocalityName("Beijing")
.setStateName("China")
- .setCountryCode("UN")
+ .setCountryCode("CN")
.setApplicationUri("urn:apache:iotdb:opc-ua-client")
.addDnsName("localhost")
.addIpAddress("127.0.0.1");