Posts

Showing posts from 2015

HDFS performance,tuning, and robustness

HDFS performance,tuning, and robustness 5   questions 1.  Name the configuration file which holds HDFS tuning parameters mapred-site.xml core-site.xml hdfs-site.xml 2.  Name the parameter that controls the replication factor in HDFS dfs.block.replication dfs.replication.count dfs.replication replication.xml 3.  Check answers that apply when replication is lowered HDFS is less robust Less likely that data will be local to more workers Aggregate I/O rate will be worse HDFS will have more space available 4.  Check answers that apply when NameNode fails to receive heartbeat from a DataNode DataNode is marked dead NameNode will attempt to restart DataNode No new I/O is sent to particular DataNode that missed heartbeat check Blocks below replication factor are re-replicated on other Dat

Hive Bike Share Assignment Passed

1. Utilizing the Bay Area Bike Share database (both Year 1 & 2, Aug. 2013- Aug. 2015)- what is the most popular start station based on trip data? Embarcadero at Sansome Market at 4th San Francisco Caltrain Townsend at 7th -- Run this in HIVE Editor -- SELECT startterminal, startstation, COUNT(1) AS count  FROM bay_area_bike_share GROUP BY startterminal, startstation  ORDER BY count DESC LIMIT 10 2. Utilizing the Bay Area Bike Share database (Year 1 only, Aug. 2013- Feb 2014) - Which is the least popular(least used) start station in the Bike share trips data? (Hint: Use the count of start station, group and order in ascending order) Townsend at 7th Mezes Park Market at 4th Embarcadero at Sansome -- Run this in HIVE Editor -- SELECT startstation, COUNT(1) AS count  FROM bay_area_bike_share GROUP BY startstation  ORDER BY count ASC LIMIT 10 3. Utilizing the Bay Area Bike Share database (for Year 1 only, Aug. 2013 - Aug

How To Install Java on Ubuntu with Apt-Get

How To Install Java on Ubuntu with Apt-Get   Java   Ubuntu Introduction As a lot of articles and programs require to have Java installed, this article will guide you through the process of installing and managing different versions of Java. Installing default JRE/JDK This is the recommended and easiest option. This will install OpenJDK 6 on Ubuntu 12.04 and earlier and on 12.10+ it will install OpenJDK 7. Installing Java with  apt-get  is easy. First, update the package index: sudo apt-get update Then, check if Java is not already installed: java -version If it returns "The program java can be found in the following packages", Java hasn't been installed yet, so execute the following command: sudo apt-get install default-jre This will install the Java Runtime Environment (JRE). If you instead need the Java Development Kit (JDK), which is usually needed to compile Java applications (for example  Apache Ant ,  Apache Maven ,  Eclipse and  IntelliJ

How to Install PHP and Wordpress in Ubuntu and Start a Website

Image
How to Install PHP and Wordpress in Ubuntu and Start a Website of your own at localhost. Download the XAMP file from bitnami xampp-linux-1.8.3-2-installer.run save file to Desktop. open terminal Ctrl+Alt+T cd Desktop sudo chmod +x xampp-linux-1.8.3-2-installer.run sudo ./xampp-linux-1.8.3-2-installer.run the GUI will start. Go on doing Ok Ok. And you are ready with PHP. Download the wordpress file of bitnami  bitnami-wordpress-4.3.1-1-module-linux-installer.run save it to Desktop open terminal cd Desktop sudo chmod +x bitnami-wordpress-4.3.1-1-module-linux-installer.run sudo ./bitnami-wordpress-4.3.1-1-module-linux-installer.run And its all done. To stop the XAMPP service: sudo /opt/lampp/lampp stop To start the XAMPP service: sudo /opt/lampp/lampp start And to Restart sudo /opt/lampp/lampp restart To open the page of XAMPP, whenever you want, type in the address bar of your browser: http://localhost/xampp/ Kindly comment for any explan

How to install LAMP server for PHP in Ubuntu

Image
Installing LAMP On Ubuntu For Newbies In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux. sudo apt-get install lamp-server^ Install Apache To start off we will install Apache. Open up the Terminal (Applications > Accessories > Terminal). (Ctrl+T also works) Copy/Paste the following line of code into Terminal and then press enter: sudo apt-get install apache2 The Terminal will then ask you for you're password, type it and then press enter. Testing Apache To make sure everything installed correctly we will now test Apache to ensure it is working properly. Open up any web browser and then enter the following into the web address: http://localhost/ You should see a folder entitled apache2-default/. Open it and you will see a message saying "It works!" , congrats to you! Install PHP In this part we will

HackerRank Introduction Challenges - Java

HackerRank Introduction Challenges - Java Welcome to Java! Problem Statement Welcome to the world of Java! Just print "Hello World." and "Hello Java." in two separate lines to complete this challenge. The code stub in the editor already creates the main function and solution class. All you have to do is copy and paste the following lines inside the main function. System.out.println("Hello World."); System.out.println("Hello Java."); Sample Output Hello World. Hello Java. Download Code Here Java Stdin and Stdout 1 Problem Statement In most of the Hackerrank challenges, you need to read input from stdin (standard input) and write your output in stdout (standard output). One way to take input from stdin is to use Scanner class and reading from System.in. You can write your output to stdout simply using System.out.printf function. In this problem you need to read 3 integers from stdin and print them