Command line arguments

In order to run the Flink ingestors, we need to compile the code into a standalone executable JAR, using the following command within the project chapter10 folder.

mvn install

This will generate two JAR files for deployment within Flink, one as speed-address-flink-ingestor-SNAPSHOT-1.0.jar and the other as speed-contacts-flink-ingestor-SNAPSHOT-1.0.jar in their respective project folders.

Once the JAR is generated, we will need to deploy it within Flink and pass command line arguments in the following pattern as shown here, so that code has all the required details for execution. The same approach is used while running the Flink pipeline from within the Flink container. The arguments are as shownhereow for address and contacts processing, respectively:

--topic address --bootstrap.servers <kafka-ip-address>:9092 --zookeeper.connect <zk-ip-address>:2181 --group.id 1 --hdfsPath hdfs://<hadoop-namenode-ip-address>:9000/datalake/raw/address --esHost <es-ip-address>  --esPort 9300 --auto.offset.reset earliest

--topic contacts --bootstrap.servers <kafka-ip-address>:9092 --zookeeper.connect <zk-ip-address>:2181 --group.id 1 --hdfsPath hdfs://<hadoop-namenode-ip-address>:9000/datalake/raw/contact --esHost <es-ip-address> --esPort 9300 --auto.offset.reset earliest

In the next section, we will see how we can deploy these JARS inside the Flink container as Flink jobs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.117