hbase

Lanuch Hbase Mapreduce Job

Lanuch Hbase Mapreduce Job Add all the required jars to a variable separated by(,) like jar=a,b in my case I want to supply all hbase jars to job 1 2 3 4 5 jar=/home/hadoop/Desktop/techsquids/repos/techsquids/map-reduce/target/map-reduce-1.0-SNAPSHOT.jar classpath=$jar for f in $HBASE_HOME/lib/*.jar;do classpath="${classpath},$f" donejar=/home/hadoop/Desktop/techsquids/repos/techsquids/map-reduce/target/map-reduce-1.0-SNAPSHOT.jar classpath=$jar for f in $HBASE_HOME/lib/*.jar;do classpath="${classpath},$f" done Next prepare…

Hbase tips and tricks

Hbase tips and tricks irbrc file-irbrc configuration to save all command history of all hbase shell invocations. minimal configuration of irbrc- more ~/.irbrc require ‘irb/ext/save-history’ IRB.conf[:SAVE_HISTORY] = 100 IRB.conf[:HISTORY_FILE] = "#{ENV[‘HOME’]}/.irb_history" Kernel.at_exit do IRB.conf[:AT_EXIT].each do |i| i.call end endmore ~/.irbrc require ‘irb/ext/save-history’ IRB.conf[:SAVE_HISTORY] = 100 IRB.conf[:HISTORY_FILE] = "#{ENV[‘HOME’]}/.irb_history" Kernel.at_exit do…

Hive Query Over Hbase

Hive Query Over Hbase- 1- Launch the hbase shell- hbase shell 2- Create employee table with column family ‘cf’- create ’employees’, ‘cf’ 3- Load the sample data in employees table- put ’employees’,’1001′,’cf:name’,’mike’ put ’employees’,’1001′,’cf:country’,’USA’ put ’employees’,’1002′,’cf:name’,’sky’ put ’employees’,’1002′,’cf:country’,’Canada’ put ’employees’,’1003′,’cf:name’,’sara’ put ’employees’,’1003′,’cf:country’,’aus’ 4- Launch the hive cli & run below…