Monday, September 7, 2015
Tuesday, August 18, 2015
Aster Express installation on VirtualBox/Mac OS
The following are the instructions to install Aster Express on Virtual Box at Mac Book. We need to take care of the Network configuration (Host-only along with hardcoded MAC Address) to setup the VMWare image on Virtual Box image.
- On Virtual Box, VirtualBox —> Preferences —> Network —> Host-only Networks
- At Adapters, enter 192.168.100.1 at IPv4 Address
- At DHCP Server - DON’T enable (Close all tabs)
- On Virtual Box again, Click NEW to import/create Virtual Machine
- Name as "Aster Queen" and Type as “Linux" and Version “OPEN SUSE (64-bit)”
- Give 2 GB RAM
- At next tab, Use an existing virtual hard drive file – select the downloaded Queen VDMK file
- Once you import/create the VM, open settings before you start the image
- Go to Network —> Adapter 1 —> Attached to: “Host-only adapter"
- At advanced on the same tab, replace MAC Address: with 005056368D90 for Queen Node
- Repeat Step 4 to 10 for Aster Worker node but replace MAC Address with 00505620E180 for Worker Node
You should be able to ping 192.168.100.100 and 192.168.100.150 from your MacBook.
The problem we may face is due to Network Adapter. We are supposed to use Static IP addresses on eth0 but as we are converting VMWare to Virtual Box, it didn’t pick it up directly during the boot. Hence we have updated the Virtual Box setting to pick the Host-Only Networks. However we should also give the exact MAC Address ( 005056368D90 for Queen Node and 00505620E180 for Worker Node) to get the eth0 configured. These MAC addresses are picked up from Aster 6.00.01 version. If the Aster version is changed, you need to find the latest MAC Addresses on those images.
Please follow the rest of instructions from the given installation instructions document as part of Aster Express downloads.
Please find the links below which I found during the investigation. Hope it helps.
https://forums.virtualbox.org/viewtopic.php?f=7&t=9057 – This is the link which gave the solution.
“I've just had exactly this problem; it took me a good couple of hours to track down. The key is that Debian records the MAC address of the network adapter in its udev rules, so you can't change it externally without also changing it internally. This also means that if you copy the vdi to another host (like I did), you need to duplicate the MAC address setting in VirtualBox as well. “.
Friday, July 10, 2015
Presto Tutorial
Java 8 Installation: http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/
$ cd /opt
$ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
$ tar xzf jdk-8u45-linux-x64.tar.gz
$ wget https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.109/presto-server-0.109.tar.gz
$ tar -xvf presto-server-0.109.tar.gz
$ mv presto-server-0.109 /usr/local/presto
$ cd /usr/local/presto
$ mkdir /usr/local/presto/etc
Configuring Presto:
Node Properties:
$ vi etc/node.properties
# The following is a minimal etc/node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/var/presto/data
$ mkdir /var/presto
$ mkdir /var/presto/data
JVM Config:
$ vi etc/jvm.config
# The following provides a good starting point for creating etc/jvm.config:
-server
-Xmx16G
-XX:+UseConcMarkSweepGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p
Config Properties:
$ vi etc/config.properties
# if you are setting up a single machine for testing that will function as both a coordinator and worker, use this configuration:
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8084
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8084
Log Levels:
$ vi etc/log.properties
com.facebook.presto=INFO
Catalog Properties:
$ mkdir etc/catalog
Hive Connector:
$ vi etc/catalog/hive.properties
#Apache Hadoop 1.x: hive-hadoop1
#Apache Hadoop 2.x: hive-hadoop2
#Cloudera CDH 4: hive-cdh4
# Cloudera CDH 5: hive-cdh5
connector.name=hive-hadoop2
hive.metastore.uri=thrift://localhost:9083
Running Presto:
$ bin/launcher start # To run as a daemon (at the background)
$ bin/launcher run # to run in the foreground
$ cd /usr/local/presto/bin
$ wget https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.109/presto-cli-0.109-executable.jar
$ mv presto-cli-0.109-executable.jar presto
$ chmod +x presto
--------------
Hive Demo:
--------------
$ bin/presto --server localhost:8084 --catalog hive --schema default
Hive Tutorial: http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/
> SELECT year, max(runs) FROM batting GROUP BY year;
> SELECT a.year, a.player_id, a.runs from batting a JOIN (SELECT year, max(runs) runs FROM batting GROUP BY year ) b ON (a.year = b.year AND a.runs = b.runs) ;
===================================
Create Kafka Catalog:
https://prestodb.io/docs/current/connector/kafka-tutorial.html
$ vi etc/catalog/kafka.properties
connector.name=kafka
kafka.nodes=localhost:6667
kafka.table-names=test,twitter,tweets
kafka.hide-internal-columns=false
$ bin/presto --server localhost:8084 --catalog kafka --schema default
Queries:
> select count(*) from tweets;
> SELECT DISTINCT json_extract_scalar(_message, '$.created_at') AS raw_date FROM tweets LIMIT 5;
> SELECT created_at, raw_date FROM ( SELECT created_at, json_extract_scalar(_message, '$.created_at') AS raw_date FROM tweets) GROUP BY 1, 2 LIMIT 5;
$ cd /opt
$ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
$ tar xzf jdk-8u45-linux-x64.tar.gz
$ wget https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.109/presto-server-0.109.tar.gz
$ tar -xvf presto-server-0.109.tar.gz
$ mv presto-server-0.109 /usr/local/presto
$ cd /usr/local/presto
$ mkdir /usr/local/presto/etc
Configuring Presto:
Node Properties:
$ vi etc/node.properties
# The following is a minimal etc/node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/var/presto/data
$ mkdir /var/presto
$ mkdir /var/presto/data
JVM Config:
$ vi etc/jvm.config
# The following provides a good starting point for creating etc/jvm.config:
-server
-Xmx16G
-XX:+UseConcMarkSweepGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p
Config Properties:
$ vi etc/config.properties
# if you are setting up a single machine for testing that will function as both a coordinator and worker, use this configuration:
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8084
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8084
Log Levels:
$ vi etc/log.properties
com.facebook.presto=INFO
Catalog Properties:
$ mkdir etc/catalog
Hive Connector:
$ vi etc/catalog/hive.properties
#Apache Hadoop 1.x: hive-hadoop1
#Apache Hadoop 2.x: hive-hadoop2
#Cloudera CDH 4: hive-cdh4
# Cloudera CDH 5: hive-cdh5
connector.name=hive-hadoop2
hive.metastore.uri=thrift://localhost:9083
Running Presto:
$ bin/launcher start # To run as a daemon (at the background)
$ bin/launcher run # to run in the foreground
$ cd /usr/local/presto/bin
$ wget https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.109/presto-cli-0.109-executable.jar
$ mv presto-cli-0.109-executable.jar presto
$ chmod +x presto
--------------
Hive Demo:
--------------
$ bin/presto --server localhost:8084 --catalog hive --schema default
Hive Tutorial: http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/
> SELECT year, max(runs) FROM batting GROUP BY year;
> SELECT a.year, a.player_id, a.runs from batting a JOIN (SELECT year, max(runs) runs FROM batting GROUP BY year ) b ON (a.year = b.year AND a.runs = b.runs) ;
===================================
Create Kafka Catalog:
https://prestodb.io/docs/current/connector/kafka-tutorial.html
$ vi etc/catalog/kafka.properties
connector.name=kafka
kafka.nodes=localhost:6667
kafka.table-names=test,twitter,tweets
kafka.hide-internal-columns=false
$ bin/presto --server localhost:8084 --catalog kafka --schema default
Queries:
> select count(*) from tweets;
> SELECT DISTINCT json_extract_scalar(_message, '$.created_at') AS raw_date FROM tweets LIMIT 5;
> SELECT created_at, raw_date FROM ( SELECT created_at, json_extract_scalar(_message, '$.created_at') AS raw_date FROM tweets) GROUP BY 1, 2 LIMIT 5;
Avro to JSON or JSON to Avro
Avro --> JSON or JSON --> Avro
http://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/
http://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/
$ java -jar ~/avro-tools-1.7.4.jar
$ java -jar ~/avro-tools-1.7.4.jar fromjson
$ java -jar ~/avro-tools-1.7.4.jar fromjson --schema-file twitter.avsc twitter.json > twitter.avro
$ java -jar ~/avro-tools-1.7.4.jar tojson twitter.avro > twitter.json
$ java -jar ~/avro-tools-1.7.4.jar tojson twitter.snappy.avro > twitter.json
Wednesday, July 1, 2015
Error: Failed connecting to Hive metastore: localhost:9083
Error: Failed connecting to Hive metastore: localhost:9083
check if you can telnet 9083 ($ telnet localhost 9083). If it has failed, you need to start the Hive Metastore service with below command.
hive --service metastore
check if you can telnet 9083 ($ telnet localhost 9083). If it has failed, you need to start the Hive Metastore service with below command.
hive --service metastore
Thursday, May 21, 2015
Netcat Example
On terminal 1: nc -l 4444 (and post some messages)
On terminal 2: nc localhost 4444 (to view the posted messages)
guess nc needs to replaced with netcat on different OS. I've used nc on Mac.
Please refer below link for more details.
https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps
On terminal 2: nc localhost 4444 (to view the posted messages)
guess nc needs to replaced with netcat on different OS. I've used nc on Mac.
Please refer below link for more details.
https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps
Tuesday, March 3, 2015
Enable Hive Beeline
set "hive.support.concurrency" property to TRUE via Ambari at Advancedhive-site section in Hive configuration.
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/
-------
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).
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.propertiesbroker.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:
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:
Addexport PATH=/usr/local/apache-maven-3.2.5/bin:$PATHto the~/.bashrcfile 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"
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"
Tuesday, March 18, 2014
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.gzFriday, December 6, 2013
Linux / Unix Commands
Linux / Unix Commands
Remove full directory in Linux: rm -rf directoryMove files from Windows to Linux by using pscp.exe (putty add-on)
pscp.exe notes.txt hduser@linuxIpAddress:/home/hduser/Down
Move files from one server to another:
sudo rcp *.* hduser@192.168.1.102:/home/hduser/Downloads/
to get services and port numbers:
$ netstat -tulpn
Saturday, October 5, 2013
Sqoop
Sqoop
Installation:
For Installation of
Sqoop, MySql and Export and Import:
Problems faced:Prob 1: SQOOP issue on multi-node cluster (13/12/06 15:05:11 ERROR manager.SqlManager: Error executing statement: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure)
Solution: First run mysql --host=localhost --database=test --user=root --password=password to check if you are able to connect to SQL and replace server name with localhost.
If you want to use server name or IP address instead of local host, please follow the below instructions.
Look for the
bind-address setting in my.cnf on the server, and make sure it's listening on the IP address you're targetting. You may also need to ensure skip-networking isn't switched on!Alternatively (and less securely!) the following will set it up to listen on all addresses - local and remote:
bind-address = 0.0.0.0
It means replace bind-address = 127.0.0.1 withbind-address = 0.0.0.0 in my.cnf file.
my.cnf file is available at /etc/mysql folder. Please restart your mysql server
before you try to use ip address or machine name.
Post bind-address change, please execute the below queries to provide permission
to user of all nodes
GRANT ALL ON test.* to ''@'master';
GRANT ALL ON test.* to ''@'slave1';
GRANT ALL ON test.* to ''@'slave2';
(... and more if there are more slaves)Sqoop Commands
sqoop import --connect jdbc:mysql://localhost/test --table mytest -m 1
sqoop import --connect jdbc:mysql://
sqoop import --connect jdbc:mysql://
Tuesday, August 20, 2013
Hadoop
Hello Visitor,
First of all, thank you for visiting my blog.
I've decided to learn Big Data (August 2013) and would like to post my learning or search results in this blog to capture for myself. I'm posting my learning or notes here.
Special Thanks to Swamy Gurram for the Big Data Knowledge sharing and motivation as always.
First link to start Hadoop http://hadoop.apache.org
Single Node Setup: http://hadoop.apache.org/docs/stable/single_node_setup.html
HDFS layer of Hadoop Video: http://www.youtube.com/watch?v=ziqx2hJY8Hg
Daemon: is a computer program that runs as a background process. It is similar to services in Windows OS. More details are http://en.wikipedia.org/wiki/Daemon_(computing)
A simple definition of HDFS: HDFS is the primary distributed storage used by Hadoop applications. A HDFS cluster primarily consists of a NameNode that manages the file system metadata and DataNodes that store the actual data.
Install Hadoop on Ubuntu Linux (Single-Node Cluster):
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
http://www.youtube.com/watch?v=WN2tJk_oL6E
https://www.dropbox.com/s/05aurcp42asuktp/Chiu%20Hadoop%20Pig%20Install%20Instructions.docx
So, I'm able to complete installation within 4 hours (2-3 hours for Linux and 1 hour for Hadoop and Pig).
Installing Eclipse Juno 4.2 in Ubuntu 12.04 or in Ubuntu 12.10
http://akovid.blogspot.co.uk/2012/08/installing-eclipse-juno-42-in-ubuntu.html
Hadoop MapReduce Fundamentals (Highly technical)
1 of 5: http://www.youtube.com/watch?v=7FcMhTTG1Cs (30 mins)
2 of 5: http://www.youtube.com/watch?v=pDGLe4CsrhY (1 hr)
3 of 5: http://www.youtube.com/watch?v=9h_WLsmRfFM (1 hr) - Windows Azure bases
4 of 5: http://www.youtube.com/watch?v=iiIDZTpdcuU (1 hr)
5 of 5: http://www.youtube.com/watch?v=1aen3JsxkuM (20 mins)
Data-Driven Documents - http://d3js.org/ Great graphical representation of data.
Q: Hadoop fs and Hadoop dfs command difference?
A: fs command represents both OS file system and Hadoop file system. dfs command represents only Hadoop file system
Note: The best way to optimize MapReduce is simply to add more nodes (this is whole idea behind the Hadoop)
http://www.youtube.com/watch?v=ba3qqJI6ML4 (ESXi, VSphere Clinet and Virtual OS with explanation) - 40 mins.
http://www.youtube.com/watch?v=ZBl1Tf2A4lA (Just ESXi and VSphere Client) - 10 mins.
Java JDK 7 Installation:
Eclipse Juno Installation:
http://akovid.blogspot.co.uk/2012/08/installing-eclipse-juno-42-in-ubuntu.html
Hive / HCatalog Installation:
$ java -version
$ hadoop version
$ wget http://www.gtlib.gatech.edu/pub/apache/hive/stable/hive-0.11.0-bin.tar.gz
$ jps
$ hadoop fs -mkdir /tmp
$ hadoop fs -mkdir /user/hive/warehouse
$ hadoop fs -chmod g+w /tmp
$ hadoop fs -chmod g+w /user/hive/warehouse
$ tar -xzvf hive-0.11.0-bin.tar.gz
$ mv hive-0.11.0-bin hive
$ cd hive
$ pwd
$ export HIVE_HOME=/home/hduser/hive
$ export PATH=$HIVE_HOME/bin:$PATH
$ hive
Problems during hadoop learning
# Add Java bin/ directory to PATH
export PATH=$PATH:$JAVA_HOME/bin
And restart Ubuntu
2. WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File could only be replicated to 0 nodes, instead of 1 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock (FSNamesystem.java:1639)
Solution: HDFS format is not completed. It might have ended up having message as aborted with message as /app/hadoop/tmp/dfs/name cannot delete, etc. Please make sure you use Y (not small 'y') when you say Yes for HDFS format during the installation.
3. Issues during cloudera Hive / Impala execution: (Error: cause=Permission denied: user=root, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x).
Sol: use hdfs as super user and change permission on HDFS as below
sudo -u hdfs hadoop fs -chown cloudera:root /user/root
Note: hdfs is not having any password (blank password).
Refer below link too ...
http://mail-archives.apache.org/mod_mbox/hadoop-hdfs-user/201308.mbox/%3CCAORpBsgJG1d=FOoYpCxEvKo+Z+yWi5UPrjcbT5y50Q6Heffq9w@mail.gmail.com%3E
Online Courses
1. Hadoop Fundamentals
My first baby step towards BigData. I've finished Hadoop Fundamentals in BigDataUniversity site with 13/20 marks :). It has very basic topics on HDFS, Pig, Hive, JAQL, Hadoop Administration and Flume. The course is sweet and short along with lab practice videos.
http://bigdatauniversity.com/courses/course/view.php?id=516
First of all, thank you for visiting my blog.
I've decided to learn Big Data (August 2013) and would like to post my learning or search results in this blog to capture for myself. I'm posting my learning or notes here.
Special Thanks to Swamy Gurram for the Big Data Knowledge sharing and motivation as always.
First link to start Hadoop http://hadoop.apache.org
Single Node Setup: http://hadoop.apache.org/docs/stable/single_node_setup.html
HDFS layer of Hadoop Video: http://www.youtube.com/watch?v=ziqx2hJY8Hg
Daemon: is a computer program that runs as a background process. It is similar to services in Windows OS. More details are http://en.wikipedia.org/wiki/Daemon_(computing)
A simple definition of HDFS: HDFS is the primary distributed storage used by Hadoop applications. A HDFS cluster primarily consists of a NameNode that manages the file system metadata and DataNodes that store the actual data.
Install Hadoop on Ubuntu Linux (Single-Node Cluster):
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
http://www.youtube.com/watch?v=WN2tJk_oL6E
https://www.dropbox.com/s/05aurcp42asuktp/Chiu%20Hadoop%20Pig%20Install%20Instructions.docx
So, I'm able to complete installation within 4 hours (2-3 hours for Linux and 1 hour for Hadoop and Pig).
Installing Eclipse Juno 4.2 in Ubuntu 12.04 or in Ubuntu 12.10
http://akovid.blogspot.co.uk/2012/08/installing-eclipse-juno-42-in-ubuntu.html
Hadoop MapReduce Fundamentals (Highly technical)
1 of 5: http://www.youtube.com/watch?v=7FcMhTTG1Cs (30 mins)
2 of 5: http://www.youtube.com/watch?v=pDGLe4CsrhY (1 hr)
3 of 5: http://www.youtube.com/watch?v=9h_WLsmRfFM (1 hr) - Windows Azure bases
4 of 5: http://www.youtube.com/watch?v=iiIDZTpdcuU (1 hr)
5 of 5: http://www.youtube.com/watch?v=1aen3JsxkuM (20 mins)
Data-Driven Documents - http://d3js.org/ Great graphical representation of data.
Q: Hadoop fs and Hadoop dfs command difference?
A: fs command represents both OS file system and Hadoop file system. dfs command represents only Hadoop file system
Note: The best way to optimize MapReduce is simply to add more nodes (this is whole idea behind the Hadoop)
Installations
VMWare ESXi Virtualizationhttp://www.youtube.com/watch?v=ba3qqJI6ML4 (ESXi, VSphere Clinet and Virtual OS with explanation) - 40 mins.
http://www.youtube.com/watch?v=ZBl1Tf2A4lA (Just ESXi and VSphere Client) - 10 mins.
Java JDK 7 Installation:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
java -version
TomCat7 Installation:
sudo apt-get updatesudo apt-get install tomcat7sudo service tomcat7 stopSet JAVA_HOME as below by editing the tomcat7 default start-up configuration filesudo nano /etc/default/tomcat7JAVA_HOME=/usr/lib/jvm/jdk1.7.0_09 (or the available Java JDK path in your Linux)for example, JAVA_HOME=/usr/lib/jvm/java-7-oracle (in case of Oracle Java)sudo service tomcat7 start/usr/share/tomcat7/bin/version.shwget localhost:8080Ref: http://hendrelouw73.wordpress.com/2012/11/14/how-to-install-apache-tomcat-7-0-30-on-ubuntu-12-10-linux/
Hadoop Multi-Node-Cluster Instillation (Thanks to Michael G. Noll - You made it so easy) Installation of hadoop-on-ubuntu-linux-multi-node-cluster Eclipse Juno Installation:
http://akovid.blogspot.co.uk/2012/08/installing-eclipse-juno-42-in-ubuntu.html
Hive / HCatalog Installation:
$ java -version
$ hadoop version
$ wget http://www.gtlib.gatech.edu/pub/apache/hive/stable/hive-0.11.0-bin.tar.gz
$ jps
$ hadoop fs -mkdir /tmp
$ hadoop fs -mkdir /user/hive/warehouse
$ hadoop fs -chmod g+w /tmp
$ hadoop fs -chmod g+w /user/hive/warehouse
$ tar -xzvf hive-0.11.0-bin.tar.gz
$ mv hive-0.11.0-bin hive
$ cd hive
$ pwd
$ export HIVE_HOME=/home/hduser/hive
$ export PATH=$HIVE_HOME/bin:$PATH
$ hive
Problems during hadoop learning
1. Hadoop: Cannot use Jps command
Alt + F2, gksudo gedit .bashrc
Alt + F2, gksudo gedit .bashrc
export PATH=$PATH:$JAVA_HOME/bin
And restart Ubuntu
2. WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File could only be replicated to 0 nodes, instead of 1 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock (FSNamesystem.java:1639)
Solution: HDFS format is not completed. It might have ended up having message as aborted with message as /app/hadoop/tmp/dfs/name cannot delete, etc. Please make sure you use Y (not small 'y') when you say Yes for HDFS format during the installation.
3. Issues during cloudera Hive / Impala execution: (Error: cause=Permission denied: user=root, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x).
Sol: use hdfs as super user and change permission on HDFS as below
sudo -u hdfs hadoop fs -chown cloudera:root /user/root
Note: hdfs is not having any password (blank password).
Refer below link too ...
http://mail-archives.apache.org/mod_mbox/hadoop-hdfs-user/201308.mbox/%3CCAORpBsgJG1d=FOoYpCxEvKo+Z+yWi5UPrjcbT5y50Q6Heffq9w@mail.gmail.com%3E
Online Courses
1. Hadoop Fundamentals
My first baby step towards BigData. I've finished Hadoop Fundamentals in BigDataUniversity site with 13/20 marks :). It has very basic topics on HDFS, Pig, Hive, JAQL, Hadoop Administration and Flume. The course is sweet and short along with lab practice videos.
http://bigdatauniversity.com/courses/course/view.php?id=516
Subscribe to:
Posts (Atom)