Practical 1-4
Practical 1-4
INSTALLATION OF HADOOP
AIM:
ALOGORITHM:
X. No :2
AMBARISERVER
AIM:
To monitor and manage Hadoop resources and processes using Ambari server.
ALOGORITHM:
Step I :Open any weh browser (Firefox Chrome Fdge) after running the Hadoop
IHDP in the Virtual Box
Step 8: Ifany problem occurs and persists while working. give Start All
Components or Restart All Components under services
Sten 9: For using the Web Client Terminal for running all commands, navigate to
http:/ localhost:4200:
Step 10: The Ambari Server is ready4Q orchestrate and monitor the Hadoop
cluster.
RESULT:
Thus Hadoop resgurces ani processcr are monitored and managed using
Ambari server.
ABD U!LAH Vs
x. No :3
APACHE SÌ0OP
22)o3/23
AIM:
ALGORITHM:
Step I:0pen any web browser (Firefos/ Chrome/ Edge) after running the Hadoop
HDP in the Virtual Box
Step 9. :create a new table using commands create table student(name varchar(40),.
age int ):
Step 10.: View the schema of the creted table using the cOmmand describe
student:
Step 15 : import the student table to HDES in a particular directory using the
command sqoop import -connect jdbc:mysql://localhost/samp --username root --
password hadoop -table student -ml -driver com.mysql.jdbe.Driver -target-dir
istud folder
Step 16: view the contents using the command hadoop fs -cat /stud folder/part-m
AIM:
To create a database and work using HIVE QL functions from Apache hive.
ALGORITHM:
Step I:0Open any web browser (Firefos/ Chrome/ Edge) alter running the Hadoop
HDP in the Virtual Box
following code create table student(pine string.age int. ml int.m2 int,m3 int ):
Step 12 : Preview the schema yr thetabl ereated using command describe student:
Sten 13: Insert three or more student records using insert query.
Step 15: Retrieve the list of students using where clause. group by and sort by
values.
Step 15: Drop the schema just created using command drop schema student:
Step 16: Databases can be deleted or dropped using the command drop database
stud:
RESULT:
Thus the database was created and wok using HIVE QL functions from Apache
hive was created and verified successfully
202 2 ol2 4o/oz
Ex. No 4 (6)
ADVANCED HIVE
AIM:
To create a database and work using HIVE QL functions from Apache hive.
ALGORITHM:
Step 1 :Open any web browser (Firefox/ Chrome/ Edge) after running the Hadoop
HDP in the Virtual Box
http://localhost:8888/
Step 3: For using the Web Client Terminal for running all commands, navigate to
http://localhost:4200/.
Step 4: Type the username and password for Web Client Terminal to be root and
hadoop
Step 5:In, the Web Client Terminal, type and enter hive.
Step 8: create a product database using the command create database prod :
Step 9: Use the created databáse for managing the tables using
command use prod;
Step 10: List down all the tables using the command show tables;
Step 11 : Create a new product data to add the student records to the Tables. A
table can be created using the following code create table products(prodid
int, prodname string,prodprice float);
Step 12 : Preview the schema of the table created using command describe student;
Step 13: Insert three or more student records using insert query.
Step 14:Retrieve all the list of students from the table using the command select
from products;
Step 16: Rename a Partitionjn the existing Table using the following
command:
ALTER TABLE <table name> PARTITION partition spec RENAME TO
PARTITION
partition_spec,
Step 17: Create bucketed Table for toy airoplane of product code 10725 and create
cluster of 5 buckets
Step 20: Drop the schema just created using command drop
schema products;
Step 21: Databases can be deleted or dropped using the command drop database
prod;
RESULT: