Project

General

Profile

Sample-hbase-mail-digester » History » Revision 6

Revision 5 (Henning Blohm, 02.08.2014 14:28) → Revision 6/24 (Henning Blohm, 02.08.2014 14:30)

h1. Sample that combines HBase with full-stack Spring and Hibernate usage 

 This sample consists of an application that loads large Mbox archive files and extracts email addresses using a map reduce job. Extracted email addresses are then written to a relational database and offered for editing. 

 Being a full stack sample it shows how to design a multi-module application with a service tier that can be seamlessly used from a Web app as well as from an application-level map-reduce job. 

 *Note*: This sample still uses v2.2 of z2 - so making sure the correct versions are specified below is crucial. 
 *Note*: Due to HBase, you will need to run this on Linux or Mac OS. 

 h2. Install 

 Here is the quick guide to getting things up and running. This follows closely [[How_to_run_a_sample]] and [[Install_prepacked_CDH4]]. 

 h3. Checkout 

 Create some installation folder and check out the z2 core and the HBase distribution, as well as the sample application.  

 <pre><code class="bash"> 
 git clone -b v2.2 http://git.z2-environment.net/z2-base.core 
 git clone -b v2.2 http://git.z2-environment.net/z2-samples.cdh4-base 
 git clone -b master http://git.z2-environment.net/z2-samples.hbase-mail-digester 
 </code></pre> 

 (Note: Do not use your shared git folder, if you have any, as the neighborhood of these projects may be inspected by z2 later on). 

 h3. Prepare 

 We need to apply some minimal configuration for HBase. At first, please follow [[Install_prepacked_CDH4]] on how to configure your HBase checkout. There are a few steps that need to be taken once only but still have to. 

 Assuming HBase has started and all processes show as described, there is one last thing to get running before starting the actual application: 

 {{include(How to run Java db)}} 

 h2. h3. Start 

 Now that all databases are up we can start the application simply by running: 

 <pre><code class="bash"> 
 # on Linux / Mac OS: 
 cd z2-base.core/run/bin 
 ./gui.sh 

 # on Windows: 
 cd z2-base.core\run\bin 
 gui.bat 
 </code></pre> 

 as always. At first startup this will download some significant amount of dependencies (Spring, Vaadin, etc.). So go and get yourself some coffee.... 

 When started, go to http://localhost:8080/digester-admin. You should see this: 

 !start.png! 
 !job.png! 
 !counts.png!