Author: akbarsahmed

Install RazorSQL on Ubuntu 12.04 LTS x64

Leave a comment
Postgresql

Introduction RazorSQL is a GUI tool for working with Postgresql. Install RazorSQL First, create the razorsql directory. mkdir ~/Downloads/razorsql Download RazorSQL into the ~/Downloads/navicat directory. Open a web browser to http://www.razorsql.com/download_linux.html. Click Download next to Linux (64-bit). After the download completes, open a command prompt and enter the following commands. I have assumed that you downloaded the .zip file to the Downloads/razorsql directory. cd ~/Downloads/razorsql unzip razorsql5_6_4_linux_x64.zip mv razorsql ~/bin/ cd ~/bin/razorsql chmod 755 razorsql.sh […]

Enable TCP/IP Connections to Postgresql 9.1

Leave a comment
Postgresql

Introduction The default installation of Postgresql does not allow TCP/IP connections, which also means JDBC connections wont’ work. Enable TCP/IP Connections cd /etc/postgresql/9.1/main Let’s make a backup of the original config file. sudo cp postgresql.conf postgresql.conf.org sudo vi postgresql.conf Find the line that contains #listen_addresses = 'localhost' and change it to: listen_addresses = 'localhost' If you want to allow remote connections, then you need to set listen_address to something like (assuming your machine’s IP Address […]

Initial Configuration of Postgresql on Ubuntu 12.04 LTS

Leave a comment
Postgresql

Introduction After installing Postgresql on Ubuntu, you will need to complete a few basic setup steps. Set the Password for the postgres User The first step is to update the password for the postgres user. sudo -u postgres psql postgres Then enter the following command at the postgres=# prompt. \password postgres Create a Database If you exited the postgres=# prompt, then enter the following command to connect to Postgresql. However, if your prompt still looks […]

Install Postgresql on Ubuntu 12.04 LTS

comment 1
Postgresql

Introduction Postgresql is an open source object relational database. It is often thought of as an alternative to MySQL. In this post I’ll provide the steps required to install Postgresql on a developer laptop, assuming that work will be done in both SQL and Python. You can learn more at: Postgresql web site Postgresql on Wikipedia Installation Open a command prompt and enter the following commands. sudo apt-get install postgresql postgresql-common postgresql-contrib \ postgresql-client postgresql-client-common […]

How to write professional emails (Top 10 list)

Leave a comment
Uncategorized

I was going through my old notes as I’m cleaning our my closet. I came across the following notes, that I like a lot, on how to write a professional email. Use email macros to both improve your efficiency in replying to email, and to improve quality. End each sentence with the correct punctuation. Write short sentences. Each sentence should discuss only one topic. Use bulleted lists to simplify that information you are trying to […]

How to add numbers with Pig

Leave a comment
Hadoop

Introduction We’re going to start with a very simple Pig script that reads a file that contains 2 numbers per line separated by a comma. The Pig script will first read the line, store each of the 2 numbers in separate variables, and will then add the numbers together. Create the Sample Input File cd vi pig-practice01.txt Paste the following into pig-practice01.txt. 5 1 6 4 3 2 1 1 9 2 3 8 Create […]

Install Pig 0.9.2 for CDH4 on Ubuntu 12.04 LTS x64

Leave a comment
Hadoop

Introduction Installing Pig is drop dead simple. Installation sudo apt-get install pig Check the Pig version. pig --version Setup the Environment We’re going to set the environment variables system-wide for Pig programming. sudo vi /etc/environment Paste the following environment variables into the environment file. HADOOP_MAPRED_HOME="/usr/lib/hadoop-mapreduce" PIG_CONF_DIR="/etc/pig/conf" source /etc/environment That’s it. You can now start to write and run pig jobs.

Install Pentaho Analysis Services (Mondrian) 3.4.1 with MySQL on Ubuntu 12.04 LTS

comments 4
Pentaho

Introduction Pentaho Analysis Services is called Mondrian, which is the name I’ll use for the remainder of this post. Mondrian is Pentaho’s OLAP server. In this post I’ll provide step-by-step instructions on how to install Mondrian 3.4.1 Ubuntu Linux 12.04 LTS x64. We’ll use MySQL as the database. Download Let’s first create a directory to download Mondrian into. mkdir -p ~/Downloads/pentaho/analysis cd ~/Downloads/pentaho/analysis To download the Mondrian either run the following command, or follow the […]

How to view files in HDFS (hadoop fs -ls)

Leave a comment
Hadoop

Introduction The hadoop fs -ls command allows you to view the files and directories in your HDFS filesystem, much as the ls command works on Linux / OS X / *nix. Default Home Directory in HDFS A user’s home directory in HDFS is located at /user/userName. For example, my home directory is /user/akbar. List the Files in Your Home Directory hadoop fs -ls defaults to /user/userName, so you can leave the path blank to view […]

hdfs dfsadmin -metasave

Leave a comment
Hadoop

Introduction hdfs dfsadmin -metasave provides additional information compared to hdfs dfsadmin -report. With hdfs dfsadmin -metasave provides information about blocks, including> blocks waiting for replication blocks currently being replication total number of blocks hdfs dfsadmin -metasave filename.txt Run the command with sudo -u hdfs prefixed to ensure you don’t get a permission denied error. CDH4 runs the namenode as the hdfs user by default. However if you have changed the ssudo -u hdfs hdfs dfsadmin […]