After you have created an archiving application using the Data Archiving Library, you may want to run the application locally to test it before deploying it as a pipeline in the HERE Workspace. There are two ways you can run the application locally:
The following information shows how to run the SDK example apps using both these methods.
Download Flink 1.13.5 and start a local cluster:
tar -xvf flink-1.13.5-bin-scala_2.12.tgz
chmod 777 flink-1.13.5
Download the HERE Data SDK examples project.
Fill in the necessary information in the following file:
credentials.properties file containing the credentials to allow the example application to access the input and output catalogs and place the file in the
~/.here/ folder. For instructions, see the Identity & Access Management Guide.
Make sure that the credentials you use to generate the
credentials.properies file provide read permission to the input stream layer and read/write permission to the index layer. The credentials should match those in the
Alternatively, you can place the
credentials.properties file in the folder:
Note that the
~/.here/ folder takes priority over the
examples/data-archive/java/avro-example/src/main/resources/ folder. The format for the
credentials.properties file is:
here.client.id = <Client Id>
here.access.key.id = <Access Key Id>
here.access.key.secret = <Access Key Secret>
here.token.endpoint.url = <Token Endpoint>
Go to your example project root folder (
examples/data-archive/java/avro-example) and run the following command:
mvn clean install
This command builds the JAR file to upload to the local Flink cluster. The output JAR file should be generated in the folder:
Go to your local Flink UI at
http://localhost:8081. Click the left menu Submit new job, then Add New to upload the JAR file (has to be platform jar file).
- To run the application, click the checkbox on the left to select your uploaded JAR file.
- Set the Entry class field to
com.here.platform.dal.DALMain, then click Submit.
- Go to "Running job" in the left menu to check whether your job is successfully running. You can also look at the Logs tab inside each job to see the generated logs. There is a
log4j.properties file inside
src/test/resource that you can copy to the