Wednesday, October 22, 2014

Failed Cluster Installation on Initial Hadoop Cluster Installation via Cloudera Manager

At this point I think you may be able to start a new cluster installation from a fresh Cloudera Manager install: http://192.168.1.201:7180/cmf/express-wizard/. I’m not sure about that, but I’ll update later if it is indeed the case.


BTW, the “Abort Installation” button on the Cluster Installation (step 3) applies to hosts whose installation has NOT completed successfully. It won’t roll back all your hosts, in the case where just one host is unhappy for some reason. I’ve seen a fairly regular occurrence of just one host having some intermittent network problem for example, that results in the express-wizard getting hung up waiting on that machine, but that machine doesn’t know to tell the wizard anything. So you could be sitting there forever. In that case, just click that “Abort Installation” button. You should then see buttons replace it about rolling back failed hosts and then attempt reinstall on failed hosts.





Tuesday, October 21, 2014

Installing Cloudera stack

Cloudera Manager will set all the Hadoop stuff up for you. However, by default it will do it with an embedded PostGres DB, which they say will not scale well as you grow your cluster. Also, it may be harder to do backups and such. It seems that’s the only significant blocker from simply saying “just run the Cloudera Manager auto-installer”.


I figured I’d install MySQL, which is one of their supported DB platforms. But we don’t really have to do that until the Cloudera Manager cluster setup is to the point where you’re setting up the Hive metastore (step 3 of “Cluster Setup”, well into the whole shebang). The installation instructions seem to make a big deal about having to have the databases and such figured out before you ever run the Cloudera Manager installer…. you don’t – you can just install them when the Cloudera Manager gets to the database setup step.


The URL I’m at has “step=showDbTestConnStep” in it. I see “Database Setup”, with options for “Use Custom Database” and “Use Embedded Database”. At this point I went to the node that has the hive role and installed mysql this way:

yum install mysql-server -y

chkconfig mysqld on

/usr/bin/mysql_secure_installation


I did a CentOS minimal install, so I got some errors Cloudera not being able to find the JDBC driver to connect to the mysql database, so I did this to install it, and things were happy.

sudo yum install mysql-connector-java


After all this I got an error saying Cloudera couldn’t find the specified database, so I did this to simply create it:

mysql

create database hive;





Installing Hadoop via Cloudera Manager

After installing things on a few nodes I saw this message when Cloudera Manager was “checking things for correctness”:


Cloudera recommends setting /proc/sys/vm/swappiness to 0. Current setting is 60. Use the sysctl command to change this setting at runtime and edit /etc/sysctl.conf for this setting to be saved after a reboot. You may continue with installation, but you may run into issues with Cloudera Manager reporting that your hosts are unhealthy because they are swapping. The following hosts are affected:


From http://ift.tt/1dXvcEy


Run this on each node: sudo sysctl -w vm.swappiness=0





Monday, October 20, 2014

Notes on Installing Cloudera Manager on CentOS 6.5

I did a minimal install, so here were the necessary things:


1. Disable SELINUX

– nano /etc/selinux/config

– set it to “disabled”

2. install python

– yum install python

3. install wget (to get cloudera-manager installer)

– yum install wget

4. install nano (because I like it)

– yum install nano

5. allow root to log in remotely (Cloudera Manager requires this)

6. disable iptables

– only because I’m running all machines within a locked-down subnet

– yeah, scary with allowing root to log in remotely


Likely convenient things:

1. set a common hosts file for all machines:

– list out all the IPs and hostnames for each machine in this file

– this is where you can specify the fully qualified domain name as well as host names

– Cloudera Manager will work more seemlessly in various ways

– You can have Cloudera Manager search for nodes to add by these host names

2. set up SSH keys so Cloudera Manager can use those instead of SSH passwords (

– though it can use SSH passwords as well


Note that when Cloudera Manager sets up a host, it will download 500+ MBs of install packages on each machine. In my case, the YUM install logs showed this:


Transaction Summary

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

Install 117 Package(s)


Total download size: 513 M

Installed size: 894 M

Downloading Packages:





Sunday, October 19, 2014

VMWare Workstation 10 – first try

If you want to use “bridged” connections, where the VMs appear as any other machine directly attached to your router (and dhcp server), you may need to go Edit > Virtual Network Editor > select the “Bridged” Type row, then below in the “Bridged to:” drop-down, select your NIC that is your main internet connection. I’ve tried loads of different virtualization and VPN solutions, so I have about 12 different network connections.


Once I did the above, my VMs set to “bridged” NICs got an IP from my dhcp server just fine.





Monday, October 13, 2014

Importing data from SQL Server to Cloudera Hadoop via Sqoop2

Critical points that may or may not be obvious:


1. If you’re using the Sqoop stuff in the web-based interface, you’re actually using Sqoop2


2. You have to download and install the JDBC driver for SQL Server yourself

– curl -L ‘http://ift.tt/1CfDcMU; | tar xz

– sudo cp sqljdbc_4.0/enu/sqljdbc4.jar /var/lib/sqoop2/

– while you’re at it, you may as well put it in the sqoop directory too: sudo cp sqljdbc_4.0/enu/sqljdbc4.jar /var/lib/sqoop/


3. Sqoop2 home directory is /var/lib/sqoop2/ (maybe not…….)


4. restart Sqoop2 service after copying in the JDBC driver file:

– sudo service sqoop2-server restart


5. connection string in “Manage Connections” is like this: jdbc:sqlserver://192.168.1.102


6. for an action, leave schema and table name fields blank and just paste in your TSQL query, then append this to the end of it: +and+${CONDITIONS}. Don’t mess with the boundary query stuff until some other time (Sqoop2 will automatically query for the min/max of the Partition column name you provide).


7. if you mess with the connection you create in Hue/Sqoop2, note you have to type in the password


8. if you get errors, don’t fight it – you have to log in via SSH and look at /var/log/sqoop2/sqoop2.log





Wednesday, October 8, 2014

Hyper-V and VirtualBox on the same computer

You can only run one or the other; not both at the same time. When I tried running a VM on VirtualBox on my Windows 8.1 machine, I got this error:


“vt-x is not available”


This post in the VirtualBox forums was my first indication that you can’t have 2 hypervisors running at the same time: http://ift.tt/1vRwgFG


This post is a solution that has worked for me:


http://ift.tt/1dQvWhx


In short, you create a new boot profile that disables Hyper-V in Windows 8.1 (covered in the Hanselman blog post). It’s actually kinda slick. When you click “restart”, hold down the Shift key and the menu will come up where you can select a different boot profile.