From 82187140e66ee57d3e92c98b5f334974ca48cfee Mon Sep 17 00:00:00 2001 From: Simon Laing Date: Wed, 22 Jan 2020 13:27:05 +0000 Subject: [PATCH] fix(#1639): Update tests and documentation for jar rename --- .gitignore | 2 +- Dockerfile | 4 ++-- docs/DeveloperGuide.md | 2 +- docs/GettingStarted.md | 8 ++++---- docs/UserGuide.md | 2 +- .../generator/orchestrator/endtoend/JarExecuteTests.java | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 160b5e0ec..9b14e7903 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ node_modules/ classes/ profiler/ target/ -bin/generator.jar +bin/datahelix.jar .idea/sonarlint # Eclipse files diff --git a/Dockerfile b/Dockerfile index 7226aaf4e..48d3e3272 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,6 @@ RUN gradle fatJar FROM openjdk:8u212-jre-alpine WORKDIR /root -COPY --from=build /root/orchestrator/build/libs/generator.jar . +COPY --from=build /root/orchestrator/build/libs/datahelix.jar . -ENTRYPOINT ["java", "-jar", "generator.jar"] +ENTRYPOINT ["java", "-jar", "datahelix.jar"] diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index da6faa772..5cb5a0b57 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -68,7 +68,7 @@ Checklist before raising an issue: DataHelix uses Java 1.8 which can be downloaded from this [link](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) -DataHelix uses [gradle](https://gradle.org/) to automate the build and test process. To build the project run `gradle build` from the root folder of the project. If it was successful then the created jar file can be found in the path _orchestrator/build/libs/generator.jar_ . +DataHelix uses [gradle](https://gradle.org/) to automate the build and test process. To build the project run `gradle build` from the root folder of the project. If it was successful then the created jar file can be found in the path _orchestrator/build/libs/datahelix.jar_ . [Guice](https://github.com/google/guice) is used in DataHelix for Dependency Injection (DI). It is configured in the 'module' classes, which all extend `AbstractModule`, and injected with the `@inject` annotation. diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 9f9f58698..0d9aa5f3f 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -51,10 +51,10 @@ When manually writing profiles, we recommend using a text editor which can valid ## Running the generator -Now place the `generator.jar` file (downloaded from the [GitHub releases page](https://github.com/finos/datahelix/releases/)) in the same folder as the profile, open up a terminal, and execute the following: +Now place the `datahelix.jar` file (downloaded from the [GitHub releases page](https://github.com/finos/datahelix/releases/)) in the same folder as the profile, open up a terminal, and execute the following: ``` -$ java -jar generator.jar --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv +$ java -jar datahelix.jar --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv ``` The generator is a command line tool which reads a profile, and outputs data in CSV or JSON format. The `--max-rows=100` option tells the generator to create 100 rows of data, and the `--replace` option tells it to overwrite previously generated files. The compulsory `--profile-file` option specifies the name of the input profile, and the `--output-path` option specifies the location to write the output to. In `generate` mode `--output-path` is optional; the generator will default to standard output if it is not supplied. By default the generator outputs progress, in rows per second, to the standard error output. This can be useful when generating large volumes of data. @@ -62,7 +62,7 @@ The generator is a command line tool which reads a profile, and outputs data in Use ``` -$ java -jar generator.jar --help +$ java -jar datahelix.jar --help ``` or see [the User Guide](UserGuide.md#command-line-arguments) to find the full range of command line arguments. @@ -248,7 +248,7 @@ The mode is specified via the `--generation-type` option. The generator has been designed to be fast and efficient, allowing you to generate large quantities of test and simulation data. If you supply a large number for the `--max-rows` option, the data will be streamed to the output file, with the progress / velocity reported during generation. ``` -$ java -jar generator.jar --max-rows=10000 --replace --profile-file=profile.json --output-path=output.csv +$ java -jar datahelix.jar --max-rows=10000 --replace --profile-file=profile.json --output-path=output.csv Generation started at: 16:41:44 Number of rows | Velocity (rows/sec) | Velocity trend diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 2c38e58b3..1e583d15d 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -768,7 +768,7 @@ Profiles can be run against a jar using the command line. Currently the only mode fully supported by the data helix is generate mode. An example command would be something like ```shell script -java -jar generator.jar --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv +datahelix --max-rows=100 --replace --profile-file=profile.json --output-path=output.csv ``` it is also possible to execute the generator using a wrapper script: diff --git a/orchestrator/src/test/java/com/scottlogic/datahelix/generator/orchestrator/endtoend/JarExecuteTests.java b/orchestrator/src/test/java/com/scottlogic/datahelix/generator/orchestrator/endtoend/JarExecuteTests.java index 446f71b0b..dbbf3442b 100644 --- a/orchestrator/src/test/java/com/scottlogic/datahelix/generator/orchestrator/endtoend/JarExecuteTests.java +++ b/orchestrator/src/test/java/com/scottlogic/datahelix/generator/orchestrator/endtoend/JarExecuteTests.java @@ -61,7 +61,7 @@ private Process setupProcess(final String profile) throws IOException { ProcessBuilder pb = new ProcessBuilder( "java", "-jar", - "build/libs/generator.jar", + "build/libs/datahelix.jar", profile, "--max-rows=1", "--quiet");