This repository was archived by the owner on Dec 14, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
pulsar-flink-connector/src/main/java/org/apache/flink/streaming/connectors/pulsar Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 4040
4141import org .apache .flink .shaded .guava18 .com .google .common .collect .Maps ;
4242
43+ import com .fasterxml .jackson .databind .ObjectMapper ;
44+ import com .fasterxml .jackson .databind .ObjectWriter ;
4345import lombok .extern .slf4j .Slf4j ;
4446import org .apache .pulsar .client .admin .PulsarAdmin ;
4547import org .apache .pulsar .client .api .MessageId ;
@@ -271,6 +273,14 @@ public void open(Configuration parameters) throws Exception {
271273 topic2Producer = new HashMap <>();
272274 }
273275 //super.open(parameters);
276+
277+ try {
278+ ObjectMapper m = new ObjectMapper ();
279+ ObjectWriter w = m .writerWithDefaultPrettyPrinter ();
280+ log .info ("Pulsar sink config: {}" , w .writeValueAsString (properties ));
281+ } catch (IOException e ) {
282+ log .error ("Failed to dump sink config info" , e );
283+ }
274284 }
275285
276286 protected void initializeSendCallback () {
Original file line number Diff line number Diff line change 6262
6363import org .apache .flink .shaded .guava18 .com .google .common .collect .Sets ;
6464
65+ import com .fasterxml .jackson .databind .ObjectMapper ;
66+ import com .fasterxml .jackson .databind .ObjectWriter ;
6567import lombok .extern .slf4j .Slf4j ;
6668import org .apache .pulsar .client .api .MessageId ;
6769import org .apache .pulsar .client .api .PulsarClientException ;
6870import org .apache .pulsar .client .impl .conf .ClientConfigurationData ;
6971import org .apache .pulsar .shade .com .google .common .collect .Maps ;
7072import org .apache .pulsar .shade .org .apache .commons .lang3 .StringUtils ;
7173
74+ import java .io .IOException ;
7275import java .util .ArrayList ;
7376import java .util .HashMap ;
7477import java .util .Iterator ;
@@ -496,6 +499,14 @@ public void open(Configuration parameters) throws Exception {
496499 taskIndex , ownedTopicStarts .size (), ownedTopicStarts );
497500 }
498501 }
502+
503+ try {
504+ ObjectMapper m = new ObjectMapper ();
505+ ObjectWriter w = m .writerWithDefaultPrettyPrinter ();
506+ log .info ("Pulsar source config: {}" , w .writeValueAsString (properties ));
507+ } catch (IOException e ) {
508+ log .error ("Failed to dump source config info" , e );
509+ }
499510 }
500511
501512 protected String getSubscriptionName () {
You can’t perform that action at this time.
0 commit comments