Skip to content

Commit 206ecf8

Browse files
dockerzhangvernedeng
authored andcommitted
[INLONG-4816][DataProxy] Add warn log when there is no TubeMQ info when start for the first time (apache#4817)
1 parent 9a136a6 commit 206ecf8

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/TubeSink.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,16 @@ private TubeClientConfig initTubeConfig(String masterUrl) throws Exception {
259259
* @throws FlumeException if an RPC client connection could not be opened
260260
*/
261261
private void initCreateConnection() throws FlumeException {
262-
// synchronized (tubeSessionLock) {
262+
// check the TubeMQ address
263+
if (masterHostAndPortLists == null || masterHostAndPortLists.isEmpty()) {
264+
logger.warn("Failed to get TubeMQ Cluster, make sure register TubeMQ to manager successfully.");
265+
return;
266+
}
263267
// if already connected, just skip
264268
if (sessionFactories != null) {
265269
return;
266270
}
267271
sessionFactories = new HashMap<>();
268-
Preconditions.checkState(masterHostAndPortLists != null && !masterHostAndPortLists.isEmpty(),
269-
"No tube service url specified");
270272
for (String masterUrl : masterHostAndPortLists) {
271273
createConnection(masterUrl);
272274
}

inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/pulsar/PulsarClientService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void setConfigLogMetric(StreamConfigLogMetric streamConfigLogMetric) {
136136
}
137137

138138
public void initCreateConnection(CreatePulsarClientCallBack callBack) {
139-
if (pulsarUrl2token.isEmpty()) {
139+
if (pulsarUrl2token == null || pulsarUrl2token.isEmpty()) {
140140
logger.warn("Failed to get Pulsar Cluster, make sure register pulsar to manager successfully.");
141141
return;
142142
}

pom.xml

-6
Original file line numberDiff line numberDiff line change
@@ -1007,12 +1007,6 @@
10071007
<artifactId>iceberg-flink-runtime-1.13</artifactId>
10081008
<version>${iceberg.flink.version}</version>
10091009
</dependency>
1010-
<dependency>
1011-
<groupId>org.apache.iceberg</groupId>
1012-
<artifactId>iceberg-flink-runtime-1.13</artifactId>
1013-
<version>${iceberg.flink.version}</version>
1014-
</dependency>
1015-
10161010
<dependency>
10171011
<groupId>org.apache.flink</groupId>
10181012
<artifactId>flink-table-planner-blink_${flink.scala.binary.version}</artifactId>

0 commit comments

Comments
 (0)