Running an Application
There are multiple Grainite applications available in the
samplesrepository. If you haven't already, please clone it before proceeding (run
git clone https://gitlab.com/grainite/samples).
Below, we will run a Java application on Grainite. Before running it or any of the other Java apps in the samples repository, we'll need to compile them first using a build tool.
Change into the
samplesdirectory and compile the sample apps therein using the included Maven wrapper:
cd samples && ./mvnw compile package
Running the wordcount sample
# Load the application on Grainite
# Note: GX is an alias set to samples/gx
# Submit traffic
./run.sh <server ip> default load resources/sample1.txt
# Get the word count for 'this'
./run.sh <server ip> default word this
# Get the word count for all words
./run.sh <server ip> default allwords