Apache Log Simulator
This sample application demonstrates how to write an application that can read and store apache log file information. The tables are organized to partition the data based on an interval, a 15 minute period, that can be easily queried to see how often an asset file is called, its size and the bandwidth utilization. This can be done on a single asset or against all assets. The application will display apache bandwidth statistics and VoltDB throughput statistics.
Sample requires VoltDB 2.8.4 or higher. Maven 2
Running the application requires either two or three consoles depending on how deep you want to go.
You must first have the VoltDB Client and Procedure libraries installed into the maven local repository. Go into the /voltdb directory and run:
mvn install:install-file -Dfile=./voltdb-188.8.131.52.jar -DgroupId=org.voltdb \ -DartifactId=VoltDB -Dversion=184.108.40.206 -Dpackaging=jar mvn install:install-file -Dfile=./voltdbclient-220.127.116.11.jar -DgroupId=org.voltdb \ -DartifactId=VoltDBClient -Dversion=18.104.22.168 -Dpackaging=jar
Building the application from the sample's root directory by running:
mvn clean install package
Open two console windows. In both, execute:
To run the server:
cd ./procedures ./run.sh
To run the client:
cd ./client ./run.sh
The application will run for two minutes, populating the database with bandwidth data.
You can alter the command line for the client to point to a cluster or change the runtime. The application takes the following command line parameters: --displayinterval How often to display transaction statistics. --password Volt password --runtime Runtime in seconds. --servers Comma separated list volt servers to conenct to. server[:port] --user Volt user name