User Log Data Generation

In order to generate a sample log of customer location (100,000 records), please follow the following steps, which are very similar to the above mentioned customer generation.

  1. Clone/Update the source code for the project (we assume this is already done as you have cloned the whole book’s code from git when you started) chapter08/web-generator
  2. Change into the directory containing the project (web-generator) and run the following command to generate the tarball:
mvn install
  1. Change  to a user directory, ~/data-generators as in previous case, and extract contents with the following command:
tar -zxvf <web-generator project>/target/web-generator-1.0-SNAPSHOT-bin.tar.gz
  1. Change to the user directory containing the extracted content and run the following command to generate the records as a spool file (location.log):
java -jar web-generator-1.0-SNAPSHOT.jar location.log 100000
  1. The log thus generated has the following structure of content:
Figure 25: Location Log Content

As we can see above, the location log contents are mostly free flowing and these logs may contain additional fields as required. The only correlation here is the customer identifier.

  1. Copy the generated location.log to the spool directory which would be configured in Flume configuration. This could be the same directory which was created while running Flume examples
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.94.190