Skip to content

Instantly share code, notes, and snippets.

@tariqmislam
tariqmislam / examples
Created Apr 2, 2012
HBase | REST | JSON
View examples
Taken from Karmi via Gist @ gist: 1218928
#!/usr/bin/env bash
#
# ===================================
# Experiments with the HBase REST API
# ===================================
#
# <http://hbase.apache.org/docs/r0.20.4/api/org/apache/hadoop/hbase/rest/package-summary.html>
#
@tariqmislam
tariqmislam / setup
Created Mar 28, 2012
Hadoop | HBase | Zookeeper | Sqoop - Installation
View setup
##########
# For verification, you can display the OS release.
##########
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
##########
@tariqmislam
tariqmislam / instructions and how-to
Created Mar 22, 2012
Setting Up Hadoop 0.20.2 on Windows 7 With Cygwin
View instructions and how-to
=================================================================
SETTING UP SSHD AS A SERVICE FOR RUNNING HADOOP DAEMONS ON WINDOWS 7
=================================================================
Steps:
1. Download 'setup.exe' from Cygwin website
2. Right-click on 'setup.exe'
3. Leave settings as they are, click through until you come to the plugin selection window
3.1 - Make sure that the installation directory is 'C:\cygwin'
@tariqmislam
tariqmislam / global env vars for root
Created Mar 22, 2012
Setting Global Environment Variables on Ubuntu
View global env vars for root
I ran into a situation where I needed to execute something as root, but the executable file needed access to environment variables that I had defined in my .bashrc file.
To fix this, I added those same environment variable definitions from the .bashrc file to my /etc/environment file. Note that you need to remove the 'export' statement at the beginning of each variable you define in /etc/environment.
@tariqmislam
tariqmislam / sqoop query
Created Mar 22, 2012
Querying SQL Server Using Sqoop From Ubuntu VM
View sqoop query
I ran into an issue with importing from SQL Server using Sqoop, where the import/import-all-tables options do not seem to support custom defined schema prefix owners (default is 'dbo', which is not a problem).
This is using the MS SQL Server - Hadoop Connector (sqoop-sqlserver-1.0.tar.gz) found at http://download.microsoft.com. In addition, and you'll find this in the instructions/user guide for the connector, you will need the Microsoft JDBC Driver (sqljdbc_3.0), which will need to be placed into your $SQOOP_HOME/lib directory. This can be downloaded from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21599
All of this is assuming you are running Cloudera's distribution on Ubuntu 11.10 through VMWare Player on Windows 7 64-bit (this is my environment anyway).
Query:
bin/sqoop import --connect 'jdbc:sqlserver://<ip-address>;instanceName=<instance-name>;username=<user-name>;password=<password>;database=<database-name>' --query 'SELECT * FROM [Owner].[prefix].[table-name] WHERE $CONDI
@tariqmislam
tariqmislam / firewall enable_disable instructions
Created Mar 21, 2012
Enabling / Disabling Windows (7) Firewall
View firewall enable_disable instructions
In regedit (Start -> Run -> regedit)...Take a look at the following locations and ensure that the REG_DWORD for "EnableFirewall" is set to a value of 0. In this current revision, do this for all profiles (Domain, Public, etc).
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\SharedAccess\Parameters\FirewallPolicy\DomainPr ofile\EnableFirewall
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Win dowsFirewall\DomainProfile\EnableFirewall
@tariqmislam
tariqmislam / how-to
Created Mar 20, 2012
BCP with SQL Server 2012 and Windows 7 64-bit
View how-to
Interestingly enough, the BCP utility requires that you provide the server name.
So for example if you are doing everything locally, the syntax would be:
bcp Theater.gems.ALLERGIES in ALLERGIES.dat -T -n -S localhost\SQLExpress
This assumes that your instance name is 'SQLExpress' of course. Also be sure that when configuring your instance, you specify windows authentication as the login method.
For remote connections however, remember to create another user through the SQL Authentication Login option.
@tariqmislam
tariqmislam / accumulo_notes (fixed typos secondarynamenode port)
Created Mar 14, 2012 — forked from medined/accumulo_notes
Accumulo Installation and Configuration Steps on a Ubuntu VirtualBox Instance
View accumulo_notes (fixed typos secondarynamenode port)
My goal was to get Accumulo running on a VirtualBox Ubuntu instance. I was successful using the following steps. If a line starts with $ then it is a command-line to execute. Note that you'll need to have sudo privilege. My username was 'ubuntu'. If you are using a different username, you'll need to change the process a little bit. I'll try to point out where.
https://issues.apache.org/jira/browse/ACCUMULO
##########
# Start a new VirtualBox instance using the Ubuntu 11.10
# Desktop ISO with at least 4G RAM and at least 10G of
# disk space.
##########
You can’t perform that action at this time.