Sign inSign up

dekobon/product-record-ingestor

By dekobon

Updated over 6 years ago

Product Information Ingestion Library Exercise

Image
0

351

dekobon/product-record-ingestor repository overview

Build Status

Product Information Ingestion Library Exercise

Overview

This project is an implementation of the Swiftly Systems coding exercise in Java using the JDK 11.

For information regarding the design of the application please see the design documentation.

Build and Test

In order to build this project you need the following:

From command line, go to the project source directory

$ mvn clean package verify
Running Benchmarks

This repository uses git-lfs to track test data files. You will need to enable git-lfs if you want to access the large test data file used for benchmarking.

The easiest way to invoke the benchmark is to run it explicitly using maven failsafe (integration test plugin) by:

mvn -Dit.test=ProductRecordParseBenchmark verify
Running the Application
Running the JAR file

To run the application as-is with all embedded dependencies, first build the application using Maven and then execute the JAR file as follows from within the project root:

$ java -jar ./target/swiftly-exercise-1.0-SNAPSHOT-jar-with-dependencies.jar <path-or-url-to-data-file>
Running directly from Maven

To build, test, and execute the application all as a single step, you can run the following command in Maven from within the project root:

$ mvn clean package exec:java -Dexec.args="<path-or-url-to-data-file>"
Running from Docker

To run the application from Docker, execute Docker with an additional parameter specifying the location of the data file:

docker run --rm -it product-record-ingestor '<path-or-url-to-data-file>'

Note that in this example, we execute with -it to give us an active terminal in the foreground and with --rm to clean up the container after execution has finished.

If you want to test out the application with an existing remote data file, you can run the following:

docker run --rm -it dekobon/product-record-ingestor 'https://media.githubusercontent.com/media/dekobon/product-record-ingestor-exercise/master/src/integration/resources/large-sample.txt'

Author

This project is solely the work of Elijah Zupancic.

License

This project is licensed under the MPLv2. Please see the LICENSE.txt file for more details.

Tag summary

Content type

Image

Digest

Size

74.7 MB

Last updated

over 6 years ago

docker pull dekobon/product-record-ingestor