Pre-Requisites of Big Data Project:
hadoop-2.6.0
hbase-1.1.2
phoenix-4.7.0
flume-1.6.0
tomcat-7
java-1.7
NOTE: Make sure that install all the above components
You can follow this link to install above components
---------------------------------------------------------------------------------
Follow the below instructions to work with Big Data Project
---------------------------------------------------------------------------------
Project Download Links:
`hadoop-2.6.0.tar.gz ` ==> link
`hbase-1.1.2-bin.tar.gz ` ==> link
`phoenix-4.7.0-HBase-1.1-bin.tar.gz ` ==> link
`apache-flume-1.6.0-bin.tar.gz ` ==> link
`apache-tomcat-7.0.70.tar.gz ` ==> link
`kalyan.war` ==> link
`flume-phoenix.conf` ==> link
`phoenix-flume-4.7.0-HBase-1.1.jar` ==> link
`json-path-2.2.0.jar` ==> link
---------------------------------------------------------------------------------
Start the hbase
Start the phoenix
---------------------------------------------------------------------------------
CREATE TABLE users(userid bigint PRIMARY KEY, username varchar, password varchar, email varchar, country varchar, state varchar, city varchar, date varchar);
CREATE TABLE IF NOT EXISTS productlog(userid bigint not null, username varchar, email varchar, date varchar not null, product varchar not null, transaction varchar, country varchar, state varchar, city varchar CONSTRAINT pk PRIMARY KEY (userid, date, product));
---------------------------------------------------------------------------------
export TOMCAT_HOME=/home/hadoop/work/apache-tomcat-7.0.70
export PATH=$TOMCAT_HOME/bin:$PATH
export JAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
$TOMCAT_HOME/bin/startup.sh
---------------------------------------------------------------------------------
java -cp $TOMCAT_HOME/webapps/kalyan/kalyan.jar:$TOMCAT_HOME/webapps/kalyan/WEB-INF/lib/* com.orienit.kalyan.utils.GenerateUsers <no.of.users>
java -cp $TOMCAT_HOME/webapps/kalyan/kalyan.jar:$TOMCAT_HOME/webapps/kalyan/WEB-INF/lib/* com.orienit.kalyan.utils.GenerateUsers 100
---------------------------------------------------------------------------------
Generate sample product logs to work with `Big Data Project` using below commands
java -cp $TOMCAT_HOME/webapps/kalyan/kalyan.jar:$TOMCAT_HOME/webapps/kalyan/WEB-INF/lib/* com.orienit.kalyan.utils.GenerateProductLog <path of the log file> <no.of.logs>
java -cp $TOMCAT_HOME/webapps/kalyan/kalyan.jar:$TOMCAT_HOME/webapps/kalyan/WEB-INF/lib/* com.orienit.kalyan.utils.GenerateProductLog /tmp/product.log 10000
---------------------------------------------------------------------------------
(This is one of my contribution to Apache)
---------------------------------------------------------------------------------
flume-phoenix.sources = execsource
flume-phoenix.sinks = phoenixsink
flume-phoenix.channels = memorychannel
flume-phoenix.sources.execsource.type = exec
flume-phoenix.sources.execsource.command = tail -F /tmp/product.log
flume-phoenix.sources.execsource.channels = memorychannel
flume-phoenix.sinks.phoenixsink.type = org.apache.phoenix.flume.sink.PhoenixSink
flume-phoenix.sinks.phoenixsink.channel = memorychannel
flume-phoenix.sinks.phoenixsink.batchSize = 10
flume-phoenix.sinks.phoenixsink.zookeeperQuorum = localhost
flume-phoenix.sinks.phoenixsink.table = productlog
flume-phoenix.sinks.phoenixsink.ddl = CREATE TABLE IF NOT EXISTS productlog(userid bigint not null, username varchar, email varchar, date varchar not null, product varchar not null, transaction varchar, country varchar, state varchar, city varchar CONSTRAINT pk PRIMARY KEY (userid, date, product))
flume-phoenix.sinks.phoenixsink.serializer = json
flume-phoenix.sinks.phoenixsink.serializer.columnsMapping = {"userid":"userid", "username":"username", "email":"email", "date":"date", "product":"product", "transaction":"transaction", "country":"country", "state":"state", "city":"city"}
flume-phoenix.sinks.phoenixsink.serializer.partialSchema = true
flume-phoenix.sinks.phoenixsink.serializer.columns=userid,username,email,date,product,transaction,country,state,city
flume-phoenix.channels.memorychannel.type = memory
flume-phoenix.channels.memorychannel.capacity = 1000
flume-phoenix.channels.memorychannel.transactionCapacity = 100
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
export JAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
$FLUME_HOME/bin/flume-ng agent -n flume-phoenix --conf $FLUME_HOME/conf -f $FLUME_HOME/conf/flume-phoenix.conf -Dflume.root.logger=DEBUG,console
---------------------------------------------------------------------------------
http://localhost:8080/kalyan/home
---------------------------------------------------------------------------------
$TOMCAT_HOME/bin/shutdown.sh
---------------------------------------------------------------------------------

This article offers a practical walkthrough of an end-to-end Big Data project, covering Hadoop, HBase, Apache Phoenix, Flume, and Tomcat integration. The step-by-step setup instructions and database table creation examples help readers understand how different components work together to build a data processing application.
ReplyDeleteHands-on implementation is an effective way for students to strengthen their understanding of distributed storage, data ingestion, and large-scale processing. Exploring Big Data Projects can help learners discover practical project ideas and apply Big Data technologies to real-world scenarios.
Big Data technologies also provide a foundation for building data-driven applications and analytical solutions. Students interested in combining data processing with analytics can explore Data Science Projects for Final Year to gain further exposure to practical implementation.
ReplyDelete