Thursday, February 12, 2015

Useful links

Easy steps to install Hadoop on MacBook Pro (Yosemite)

http://amodernstory.com/2014/09/23/installing-hadoop-on-mac-osx-yosemite/

-------




Tuesday, February 10, 2015

Kafka and Strom

Errors in Hortonworks Kafka example on HDP2.2:

http://hortonworks.com/hadoop-tutorial/simulating-transporting-realtime-events-stream-apache-kafka/

When you try to start Producer command, please make sure you given IP Address (as it is unable to resolve localhost) and port number has to be changed to 6667 (not 9092).


AS IS:
$ java -cp target/Tutorial-1.0-SNAPSHOT.jar com.hortonworks.tutorials.tutorial1.TruckEventsProducer localhost:9092 localhost:2181 &

TO BE:
$ java -cp target/Tutorial-1.0-SNAPSHOT.jar com.hortonworks.tutorials.tutorial1.TruckEventsProducer 10.0.2.15:6667 10.0.2.15:2181 &


The Kafka broker port number can be referred at /usr/hdp/2.2.0.0-2041/kafka/config/server.properties

broker.id=0
    port=6667

=================================================================

Sunday, February 8, 2015

Lessons learned during POC


Issues / learning’s during SkyNet POC

Learning 1: BZip2Codec configuration for Hadoop Cluster

Go to Ambari / core-site.xml and add org.apache.hadoop.io.compress.BZip2Codec to io.compression.codecs

Learning 2: Enable Tez


Use the following instructions to enable Tez for Hive Queries:

Copy the hive-exec-0.13.0.jar to HDFS at the following location: /apps/hive/install/hive-exec-0.13.0.jar.

    $ su - hive
    $ hadoop fs -mkdir /apps/hive/install
    $ hadoop fs -copyFromLocal /usr/lib/hive/lib/hive-exec-* /apps/hive/install/hive-exec-0.13.0.jar

Enable Hive to use Tez DAG APIs. On the Hive client machine, add the following to your Hive script or execute it in the Hive shell:

    set hive.execution.engine=tez;

Disabling Tez for Hive Queries: Use the following instructions to disable Tez for Hive queries:

On the Hive client machine, add the following to your Hive script or execute it in the Hive shell:

set hive.execution.engine=mr;


Learning 3: Flume from Ambari directly

In latest Ambari, we can start Flume directly with configuration file content.

Learning 4: Flume-Ng command to start service from CLI in debug mode

$ bin/flume-ng agent --conf ./conf/ -f conf/flumeSkyNet.conf -Dflume.root.logger=DEBUG,console -n agentADSB

Learning 5: Finding Hadoop Echo Systems version from Ambari

Admin à Cluster (Hue interface à About is the other way to find from Hue interface)


Issue 1: Could not resolve org.apache.hcatalog.pig.HCatStorer  - Error in HDP2.2.

At the end of the "pig script" section, there is a text box that says "pig arguments".
Type -useHCatalog and then press Enter
It should highlight in gray and add a new empty text box
Use org.apache.hive.hcatalog.pig.HCatLoader(); instead of "org.apache.hcatalog.pig.HCatLoader();"


Issue 2: cannot access /usr/lib/hive/lib/slf4j-api-*.jar: No such file or directory

1. find / -name slf4j-api-*.jar
2. cp /usr/lib/hive/lib/

Issue 3: Pig 'bytearray' type in column 0(0-based) cannot map to HCat 'STRING'type.  Target filed must be of HCat type {BINARY}

Change pig type to chararray

Issue 4: Column names should all be in lowercase. Invalid name found: airGround

Change column names to lowercase in pig

Issue 5: Permissions issues with Linux scripts and HDFS permissions due to root id and hue id

Make sure the automated process has correct permissions to read / write / execute

Issue 6: Flume: “[ERROR - org.apache.flume.source.NetcatSource.start(NetcatSource.java:167)] Unable to bind to socket.” during the source connectivity


In Progress ….

Wednesday, January 21, 2015

Maven Installation

Maven Installation

Step 1: Go to http://maven.apache.org/download.cgi and copy the latest download url. Run the below command for Maven 3.2.5 version.

$ wget http://mirror.ox.ac.uk/sites/rsync.apache.org/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz

Step 2:
$ tar xvf apache-maven-3.2.5-bin.tar.gz 
 
Step 3:
$ mv apache-maven-3.2.5 /usr/local/ 
 
Step 4:  
Add export PATH=/usr/local/apache-maven-3.2.5/bin:$PATH to the ~/.bashrc file to auto set the values for $PATH.
 
Step 5: 
$ mvn -version 

Monday, July 21, 2014

ESXi Installation - No Network adapters were detected

I'm trying to install ESXi 5.1 Host and create virtual OS. I'm getting error as "No Network adapters were detected".

It is unable to detect my LAN Cable port (Network Adapter). My desktop is Intel and I can find my Network Adapter name as "Intel 82579V Gigabit Network Connection" from Computer Management --> Divice Manager --> Network Adapters.

Please follow the below to fix the issue.

http://www.v-front.de/p/esxi-customizer.html#download

3 simple steps.

Step 1: Download ESXi-Customizer
Step 2: Download ESXi ISO file
Step 3: download Network adapter for your computer from VMWare drivers download forum for your computer. Below is the link
http://www.vmware.com/resources/compatibility/detail.php?deviceCategory=io&productid=20594&deviceCategory=io&details=1&partner=46&releases=202&vioSolutions=Standard%20-%20IO%20Devices&page=1&display_interval=10&sortColumn=Partner&sortOrder=Asc

Please ask me if you have any questios in this process to fix the "No Network adapters were detected issue"

Saturday, December 7, 2013

MapReduce

Java / MapReduce


sudo mkdir wordcount_classes

hduser@namenode:~/work$ sudo javac -classpath /usr/local/hadoop/hadoop-core-1.1.2.jar -d wordcount_classes WordCount.java

Jar file creation:
sudo jar -cvf wordcount.jar -C wordcount_classes/ .

hduser@namenode:~/work$ hadoop fs -put file01 /user/hduser/wordcount/input

hadoop fs -rmr /user/hduser/wordcount/output

hadoop jar wordcount.jar org.myorg.WordCount /user/hduser/wordcount/input /user/hduser/wordcount/output


Flume Installation:

wget http://mirror.catn.com/pub/apache/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz