Skip to content

Commit cacf806

Browse files
committed
f
1 parent 8d9d27b commit cacf806

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaSink.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.apache.iotdb.pipe.api.event.dml.insertion.TabletInsertionEvent;
4141
import org.apache.iotdb.pipe.api.exception.PipeException;
4242

43+
import org.apache.tsfile.common.conf.TSFileConfig;
4344
import org.apache.tsfile.utils.Pair;
4445
import org.apache.tsfile.write.record.Tablet;
4546
import org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider;
@@ -347,7 +348,7 @@ private void customizeClient(final String nodeUrl, final PipeParameters paramete
347348
Arrays.asList(CONNECTOR_OPC_UA_SECURITY_DIR_KEY, SINK_OPC_UA_SECURITY_DIR_KEY),
348349
CONNECTOR_OPC_UA_SECURITY_DIR_DEFAULT_VALUE
349350
+ File.separatorChar
350-
+ UUID.fromString(nodeUrl)));
351+
+ UUID.nameUUIDFromBytes(nodeUrl.getBytes(TSFileConfig.STRING_CHARSET))));
351352

352353
client = new IoTDBOpcUaClient(nodeUrl, policy, provider);
353354
new ClientRunner(client, securityDir, password).run();

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ public void run() {
123123
future.get(
124124
PipeConfig.getInstance().getPipeConnectorHandshakeTimeoutMs(), TimeUnit.MICROSECONDS);
125125
} catch (final Exception e) {
126-
throw new PipeException("Error running client example.", e);
126+
throw new PipeException("Error running client example: " + e.getMessage());
127127
}
128128
} catch (final Exception e) {
129-
throw new PipeException("Error getting client.", e);
129+
throw new PipeException("Error getting client: " + e.getMessage());
130130
}
131131
}
132132
}

0 commit comments

Comments
 (0)