SlideShare a Scribd company logo
Apache HBase
Farzad Nozarian
4/3/15 @AUT
Purpose
• This guide describes the setup of a standalone HBase instance running
against the local filesystem/HDFS.
• This is not an appropriate configuration for a production instance of
HBase, but will allow you to experiment with HBase.
• This section shows you how to create a table in HBase using the hbase
shell CLI, insert rows into the table, perform put and scan operations
against the table, enable or disable the table, and start and stop HBase.
2
Required Software
• Java™ HBase requires that a JDK be installed.
http://hbase.apache.org/book.html#java
• Choose a download site from this list of Apache Download Mirrors.
• Click on the suggested top link.
• Click on the folder named stable and then download the binary file that ends
in .tar.gz to your local filesystem.
• Be sure to choose the version that corresponds with the version of Hadoop you
are likely to use later. (hbase-0.98.3-hadoop2-bin.tar.gz.)
3
Prepare to Start the Hadoop Cluster (Cont.)
• Like HDFS, HBase has also 3 running mode:
• Standalone HBase (Setup of a standalone HBase instance running against the local filesystem)
• In standalone mode HBase runs all daemons within this single JVM, i.e. the HMaster, a single
HRegionServer, and the ZooKeeper daemon.
• Using HBase with a local filesystem does not guarantee durability.
• Prior to HBase 0.94.x, HBase expected the loopback IP address to be 127.0.0.1. Ubuntu and some other
distributions default to 127.0.1.1 and this will cause problems for you.
• Pseudo-Distributed Local Install
• HBase still runs completely on a single host, but each HBase daemon (HMaster, HRegionServer, and
Zookeeper) runs as a separate process.
• Fully Distributed
4
Prepare to Start the HBase-Standalone
• Unpack the downloaded HBase distribution. In the distribution, edit the
file conf/hbase-env.sh, uncomment the line starting with JAVA_HOME, and
set it to the appropriate location for your operating system:
# set to the root of your Java installation
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0
5
Prepare to Start the HBase-Standalone (Cont.)
• Edit conf/hbase-site.xml, which is the main HBase configuration file.
• At this time, you only need to specify the directory on the local filesystem where HBase and
ZooKeeper write data.
• By default, a new directory is created under /tmp.
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/testuser/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/testuser/zookeeper</value>
</property>
</configuration>
6
Prepare to Start the HBase-Standalone (Cont.)
• The bin/start-hbase.sh script is provided as a convenient way to start
HBase.
• Use the jps command to verify that you have one running process called Hmaster.
• Remember that in standalone mode HBase runs all daemons within this single JVM, i.e. the
HMaster, a single HRegionServer, and the ZooKeeper daemon.
7
Pseudo-Distributed Configuration
• You can re-configure HBase to run in pseudo-distributed mode:
• Stop HBase if it is running.
• Configure HBase:
• Edit the hbase-site.xml configuration.
• This directs HBase to run in distributed mode,
with one JVM instance per daemon.
• Next, change the hbase.rootdir from the local
filesystem to the address of your HDFS instance, using the hdfs://// URI syntax.
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
8
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:8020/hbase</value>
</property>
Lab
Assignment
1. Start HBase daemon;
2. Start HBase shell;
3. Create a Book table …
4. Add information to Book table …
5. Count the number of rows …
6. Retrieve an entire record with ID 1;
7. Only retrieve title and description for record with ID 3
8. Change a record …
9. Display all the records to the screen
10. Display title and author's last name for all the records
11. Display title and description for the first 2 records
12. Explore HBase Web-based management console …
13. Check the detailed status of your cluster via HBase
shell
14. Delete a record …
15. Drop the table Book.
9
1- Start HBase daemon
start-hbase.sh
2- Start HBase shell
hbase shell
10
Create a table called Book whose schema will able to house book's title, description, author's
first and last names. Book's title and description should be grouped as they will saved
retrieved together. Author's first and last name should also be grouped.
(hint: since title and description need to be grouped together and so do author's first and last
name, it would be wise to place them into 2 families such as info and author. Then title and
description will become columns of info family and first and last columns of author family).
3-
create 'Book', {NAME=>'info'}, {NAME=>'author'}
4- Add the following information to Book table:
11
put 'Book', '1', 'info:title', 'Faster than the speed love'
put 'Book', '1', 'info:description', 'Long book about love'
put 'Book', '1', 'author:first', 'Brian'
put 'Book', '1', 'author:last', 'Dog'
put 'Book', '2', 'info:title', 'Long day'
put 'Book', '2', 'info:description', 'Story about Monday'
put 'Book', '2', 'author:first', 'Emily'
put 'Book', '2', 'author:last', 'Blue'
put 'Book', '3', 'info:title', 'Flying Car'
put 'Book', '3', 'info:description', 'Novel about airplanes'
put 'Book', '3', 'author:first', 'Phil'
put 'Book', '3', 'author:last', 'High'
12
Count the number of rows. Make sure that every row is printed to
the screen as it being counted.
5-
count 'Book', INTERVAL => 1
6- Retrieve an entire record with ID 1
get 'Book', '1'
7- Only retrieve title and description for record with ID 3.
get 'Book', '3', {COLUMNS=>['info:title', 'info:description']}
13
Change the last name of an author for the record with title Long
Day to Happy.
8-
put 'Book', '2', 'author:last', 'Happy'
# to verify select the record
get 'Book', '2', {COLUMNS=>'author:last'}
# to display both versions
get 'Book', '2', {COLUMNS=>'author:last', VERSIONS=>3}get 'Book', '3',
{COLUMNS=>['info:title', 'info:description']}
• Display the record on the screen to verify the change.
• Display both new and old value. You should be able to see both Blue and
Happy. Why is that?
14
scan 'Book'
9- Display all the records to the screen.
scan 'Book', {COLUMNS=>['info:title', 'author:last']}
scan 'Book', {COLUMNS=>['info:title','info:description'], LIMIT=>'2'}
or
scan 'Book', {COLUMNS=>['info:title','info:description'],
STOPROW=>'3'}
10- Display title and author's last name for all the records.
11- Display title and description for the first 2 records.
15
Book table is hosted via 1 Region Server and there is only 1 Region.
There are no start or end keys for that region because there is only 1
region. It has 2 families info and author. There is no compression set
for both families, and replication is set to 3.
13- Check the detailed status of your cluster via HBase shell.
status 'detailed'
Explore HBase Web-based management console, try and learn as
much as you can about your new table.
12-
16
Delete a record whose title is Flying Car, and validate the record was
deleted by scanning all the records or by attempting to select the record.
delete 'Book', '3', 'info:title'
14-
delete 'Book', '3', 'info:title'
delete 'Book', '3', 'info:description'
delete 'Book', '3', 'author:first'
delete 'Book', '3', 'author:last'
15- Drop the table Book.
disable 'Book'
drop 'Book'
References:
hbase.apache.org
(http://hbase.apache.org/book.html)
17

More Related Content

What's hot

Cassandra Database
Cassandra DatabaseCassandra Database
Cassandra Database
YounesCharfaoui
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache Cassandra
DataStax
 
MYSQL
MYSQLMYSQL
SQL
SQLSQL
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ram Kedem
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Rapid Upgrades with Pg_Upgrade
Rapid Upgrades with Pg_UpgradeRapid Upgrades with Pg_Upgrade
Rapid Upgrades with Pg_Upgrade
EDB
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
Tiji Thomas
 
html-table
html-tablehtml-table
html-table
Dhirendra Chauhan
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Beat Signer
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
1. SQL Basics - Introduction
1. SQL Basics - Introduction1. SQL Basics - Introduction
1. SQL Basics - Introduction
Varun A M
 
Sql Antipatterns Strike Back
Sql Antipatterns Strike BackSql Antipatterns Strike Back
Sql Antipatterns Strike Back
Karwin Software Solutions LLC
 
SQL: Creating and Altering Tables
SQL: Creating and Altering TablesSQL: Creating and Altering Tables
SQL: Creating and Altering Tables
RJ Podeschi
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
Basic html
Basic htmlBasic html
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
Ravinder Kamboj
 
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
CloudxLab
 

What's hot (20)

Cassandra Database
Cassandra DatabaseCassandra Database
Cassandra Database
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache Cassandra
 
MYSQL
MYSQLMYSQL
MYSQL
 
SQL
SQLSQL
SQL
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Mysql
MysqlMysql
Mysql
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Rapid Upgrades with Pg_Upgrade
Rapid Upgrades with Pg_UpgradeRapid Upgrades with Pg_Upgrade
Rapid Upgrades with Pg_Upgrade
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
html-table
html-tablehtml-table
html-table
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
1. SQL Basics - Introduction
1. SQL Basics - Introduction1. SQL Basics - Introduction
1. SQL Basics - Introduction
 
Sql Antipatterns Strike Back
Sql Antipatterns Strike BackSql Antipatterns Strike Back
Sql Antipatterns Strike Back
 
SQL: Creating and Altering Tables
SQL: Creating and Altering TablesSQL: Creating and Altering Tables
SQL: Creating and Altering Tables
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 
Basic html
Basic htmlBasic html
Basic html
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
 
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
 

Viewers also liked

Apache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce TutorialApache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce Tutorial
Farzad Nozarian
 
Shark - Lab Assignment
Shark - Lab AssignmentShark - Lab Assignment
Shark - Lab Assignment
Farzad Nozarian
 
Apache HDFS - Lab Assignment
Apache HDFS - Lab AssignmentApache HDFS - Lab Assignment
Apache HDFS - Lab Assignment
Farzad Nozarian
 
Apache Storm Tutorial
Apache Storm TutorialApache Storm Tutorial
Apache Storm Tutorial
Farzad Nozarian
 
Intro to MapReduce
Intro to MapReduceIntro to MapReduce
Intro to MapReduce
Delhi/NCR HUG
 
Object Based Databases
Object Based DatabasesObject Based Databases
Object Based Databases
Farzad Nozarian
 
Big Data Processing in Cloud Computing Environments
Big Data Processing in Cloud Computing EnvironmentsBig Data Processing in Cloud Computing Environments
Big Data Processing in Cloud Computing Environments
Farzad Nozarian
 
Big Data and Cloud Computing
Big Data and Cloud ComputingBig Data and Cloud Computing
Big Data and Cloud ComputingFarzad Nozarian
 
Apache Spark Tutorial
Apache Spark TutorialApache Spark Tutorial
Apache Spark Tutorial
Farzad Nozarian
 
S4: Distributed Stream Computing Platform
S4: Distributed Stream Computing PlatformS4: Distributed Stream Computing Platform
S4: Distributed Stream Computing Platform
Farzad Nozarian
 
Analysing of big data using map reduce
Analysing of big data using map reduceAnalysing of big data using map reduce
Analysing of big data using map reduce
Paladion Networks
 
Big data Clustering Algorithms And Strategies
Big data Clustering Algorithms And StrategiesBig data Clustering Algorithms And Strategies
Big data Clustering Algorithms And Strategies
Farzad Nozarian
 
Apache HBase - Introduction & Use Cases
Apache HBase - Introduction & Use CasesApache HBase - Introduction & Use Cases
Apache HBase - Introduction & Use Cases
Data Con LA
 
An Introduction to MapReduce
An Introduction to MapReduceAn Introduction to MapReduce
An Introduction to MapReduceFrane Bandov
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce Fundamentals
Lynn Langit
 
Hw09 Practical HBase Getting The Most From Your H Base Install
Hw09   Practical HBase  Getting The Most From Your H Base InstallHw09   Practical HBase  Getting The Most From Your H Base Install
Hw09 Practical HBase Getting The Most From Your H Base InstallCloudera, Inc.
 
MapReduce in Simple Terms
MapReduce in Simple TermsMapReduce in Simple Terms
MapReduce in Simple Terms
Saliya Ekanayake
 
Intro to HBase
Intro to HBaseIntro to HBase
Intro to HBase
alexbaranau
 

Viewers also liked (18)

Apache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce TutorialApache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce Tutorial
 
Shark - Lab Assignment
Shark - Lab AssignmentShark - Lab Assignment
Shark - Lab Assignment
 
Apache HDFS - Lab Assignment
Apache HDFS - Lab AssignmentApache HDFS - Lab Assignment
Apache HDFS - Lab Assignment
 
Apache Storm Tutorial
Apache Storm TutorialApache Storm Tutorial
Apache Storm Tutorial
 
Intro to MapReduce
Intro to MapReduceIntro to MapReduce
Intro to MapReduce
 
Object Based Databases
Object Based DatabasesObject Based Databases
Object Based Databases
 
Big Data Processing in Cloud Computing Environments
Big Data Processing in Cloud Computing EnvironmentsBig Data Processing in Cloud Computing Environments
Big Data Processing in Cloud Computing Environments
 
Big Data and Cloud Computing
Big Data and Cloud ComputingBig Data and Cloud Computing
Big Data and Cloud Computing
 
Apache Spark Tutorial
Apache Spark TutorialApache Spark Tutorial
Apache Spark Tutorial
 
S4: Distributed Stream Computing Platform
S4: Distributed Stream Computing PlatformS4: Distributed Stream Computing Platform
S4: Distributed Stream Computing Platform
 
Analysing of big data using map reduce
Analysing of big data using map reduceAnalysing of big data using map reduce
Analysing of big data using map reduce
 
Big data Clustering Algorithms And Strategies
Big data Clustering Algorithms And StrategiesBig data Clustering Algorithms And Strategies
Big data Clustering Algorithms And Strategies
 
Apache HBase - Introduction & Use Cases
Apache HBase - Introduction & Use CasesApache HBase - Introduction & Use Cases
Apache HBase - Introduction & Use Cases
 
An Introduction to MapReduce
An Introduction to MapReduceAn Introduction to MapReduce
An Introduction to MapReduce
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce Fundamentals
 
Hw09 Practical HBase Getting The Most From Your H Base Install
Hw09   Practical HBase  Getting The Most From Your H Base InstallHw09   Practical HBase  Getting The Most From Your H Base Install
Hw09 Practical HBase Getting The Most From Your H Base Install
 
MapReduce in Simple Terms
MapReduce in Simple TermsMapReduce in Simple Terms
MapReduce in Simple Terms
 
Intro to HBase
Intro to HBaseIntro to HBase
Intro to HBase
 

Similar to Apache HBase - Lab Assignment

03 h base-2-installation_andshell
03 h base-2-installation_andshell03 h base-2-installation_andshell
03 h base-2-installation_andshell
dntth0601
 
8a. How To Setup HBase with Docker
8a. How To Setup HBase with Docker8a. How To Setup HBase with Docker
8a. How To Setup HBase with Docker
Fabio Fumarola
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
Amal Abid
 
Linux apache installation
Linux apache installationLinux apache installation
Linux apache installationDima Gomaa
 
RBASH (1).pdf
RBASH (1).pdfRBASH (1).pdf
RBASH (1).pdf
ElhadiAymane
 
RBASH.pptx
RBASH.pptxRBASH.pptx
RBASH.pptx
ElhadiAymane
 
RBASH.pdf
RBASH.pdfRBASH.pdf
RBASH.pdf
ElhadiAymane
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guide
Naveed Bashir
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase client
Shashwat Shriparv
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Nag Arvind Gudiseva
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopAiden Seonghak Hong
 
Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8
Kaan Aslandağ
 
Bash shell
Bash shellBash shell
Bash shellxylas121
 
Wordpress install setup
Wordpress install setupWordpress install setup
Wordpress install setup
Mohammed Nayeem
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
عطاءالمنعم اثیل شیخ
 
Hadoop - Apache Hbase
Hadoop - Apache HbaseHadoop - Apache Hbase
Hadoop - Apache Hbase
Vibrant Technologies & Computers
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
Subhas Kumar Ghosh
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
Sri Ram
 

Similar to Apache HBase - Lab Assignment (20)

03 h base-2-installation_andshell
03 h base-2-installation_andshell03 h base-2-installation_andshell
03 h base-2-installation_andshell
 
8a. How To Setup HBase with Docker
8a. How To Setup HBase with Docker8a. How To Setup HBase with Docker
8a. How To Setup HBase with Docker
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
 
Linux apache installation
Linux apache installationLinux apache installation
Linux apache installation
 
RBASH (1).pdf
RBASH (1).pdfRBASH (1).pdf
RBASH (1).pdf
 
RBASH.pptx
RBASH.pptxRBASH.pptx
RBASH.pptx
 
RBASH.pdf
RBASH.pdfRBASH.pdf
RBASH.pdf
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guide
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase client
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing Hadoop
 
Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8
 
Drupal from scratch
Drupal from scratchDrupal from scratch
Drupal from scratch
 
Bash shell
Bash shellBash shell
Bash shell
 
Wordpress install setup
Wordpress install setupWordpress install setup
Wordpress install setup
 
Hbase
HbaseHbase
Hbase
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
Hadoop - Apache Hbase
Hadoop - Apache HbaseHadoop - Apache Hbase
Hadoop - Apache Hbase
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 

Apache HBase - Lab Assignment

  • 2. Purpose • This guide describes the setup of a standalone HBase instance running against the local filesystem/HDFS. • This is not an appropriate configuration for a production instance of HBase, but will allow you to experiment with HBase. • This section shows you how to create a table in HBase using the hbase shell CLI, insert rows into the table, perform put and scan operations against the table, enable or disable the table, and start and stop HBase. 2
  • 3. Required Software • Java™ HBase requires that a JDK be installed. http://hbase.apache.org/book.html#java • Choose a download site from this list of Apache Download Mirrors. • Click on the suggested top link. • Click on the folder named stable and then download the binary file that ends in .tar.gz to your local filesystem. • Be sure to choose the version that corresponds with the version of Hadoop you are likely to use later. (hbase-0.98.3-hadoop2-bin.tar.gz.) 3
  • 4. Prepare to Start the Hadoop Cluster (Cont.) • Like HDFS, HBase has also 3 running mode: • Standalone HBase (Setup of a standalone HBase instance running against the local filesystem) • In standalone mode HBase runs all daemons within this single JVM, i.e. the HMaster, a single HRegionServer, and the ZooKeeper daemon. • Using HBase with a local filesystem does not guarantee durability. • Prior to HBase 0.94.x, HBase expected the loopback IP address to be 127.0.0.1. Ubuntu and some other distributions default to 127.0.1.1 and this will cause problems for you. • Pseudo-Distributed Local Install • HBase still runs completely on a single host, but each HBase daemon (HMaster, HRegionServer, and Zookeeper) runs as a separate process. • Fully Distributed 4
  • 5. Prepare to Start the HBase-Standalone • Unpack the downloaded HBase distribution. In the distribution, edit the file conf/hbase-env.sh, uncomment the line starting with JAVA_HOME, and set it to the appropriate location for your operating system: # set to the root of your Java installation export JAVA_HOME=/usr/lib/jvm/jdk1.7.0 5
  • 6. Prepare to Start the HBase-Standalone (Cont.) • Edit conf/hbase-site.xml, which is the main HBase configuration file. • At this time, you only need to specify the directory on the local filesystem where HBase and ZooKeeper write data. • By default, a new directory is created under /tmp. <configuration> <property> <name>hbase.rootdir</name> <value>file:///home/testuser/hbase</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/testuser/zookeeper</value> </property> </configuration> 6
  • 7. Prepare to Start the HBase-Standalone (Cont.) • The bin/start-hbase.sh script is provided as a convenient way to start HBase. • Use the jps command to verify that you have one running process called Hmaster. • Remember that in standalone mode HBase runs all daemons within this single JVM, i.e. the HMaster, a single HRegionServer, and the ZooKeeper daemon. 7
  • 8. Pseudo-Distributed Configuration • You can re-configure HBase to run in pseudo-distributed mode: • Stop HBase if it is running. • Configure HBase: • Edit the hbase-site.xml configuration. • This directs HBase to run in distributed mode, with one JVM instance per daemon. • Next, change the hbase.rootdir from the local filesystem to the address of your HDFS instance, using the hdfs://// URI syntax. <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> 8 <property> <name>hbase.rootdir</name> <value>hdfs://localhost:8020/hbase</value> </property>
  • 9. Lab Assignment 1. Start HBase daemon; 2. Start HBase shell; 3. Create a Book table … 4. Add information to Book table … 5. Count the number of rows … 6. Retrieve an entire record with ID 1; 7. Only retrieve title and description for record with ID 3 8. Change a record … 9. Display all the records to the screen 10. Display title and author's last name for all the records 11. Display title and description for the first 2 records 12. Explore HBase Web-based management console … 13. Check the detailed status of your cluster via HBase shell 14. Delete a record … 15. Drop the table Book. 9
  • 10. 1- Start HBase daemon start-hbase.sh 2- Start HBase shell hbase shell 10 Create a table called Book whose schema will able to house book's title, description, author's first and last names. Book's title and description should be grouped as they will saved retrieved together. Author's first and last name should also be grouped. (hint: since title and description need to be grouped together and so do author's first and last name, it would be wise to place them into 2 families such as info and author. Then title and description will become columns of info family and first and last columns of author family). 3- create 'Book', {NAME=>'info'}, {NAME=>'author'}
  • 11. 4- Add the following information to Book table: 11 put 'Book', '1', 'info:title', 'Faster than the speed love' put 'Book', '1', 'info:description', 'Long book about love' put 'Book', '1', 'author:first', 'Brian' put 'Book', '1', 'author:last', 'Dog' put 'Book', '2', 'info:title', 'Long day' put 'Book', '2', 'info:description', 'Story about Monday' put 'Book', '2', 'author:first', 'Emily' put 'Book', '2', 'author:last', 'Blue' put 'Book', '3', 'info:title', 'Flying Car' put 'Book', '3', 'info:description', 'Novel about airplanes' put 'Book', '3', 'author:first', 'Phil' put 'Book', '3', 'author:last', 'High'
  • 12. 12 Count the number of rows. Make sure that every row is printed to the screen as it being counted. 5- count 'Book', INTERVAL => 1 6- Retrieve an entire record with ID 1 get 'Book', '1' 7- Only retrieve title and description for record with ID 3. get 'Book', '3', {COLUMNS=>['info:title', 'info:description']}
  • 13. 13 Change the last name of an author for the record with title Long Day to Happy. 8- put 'Book', '2', 'author:last', 'Happy' # to verify select the record get 'Book', '2', {COLUMNS=>'author:last'} # to display both versions get 'Book', '2', {COLUMNS=>'author:last', VERSIONS=>3}get 'Book', '3', {COLUMNS=>['info:title', 'info:description']} • Display the record on the screen to verify the change. • Display both new and old value. You should be able to see both Blue and Happy. Why is that?
  • 14. 14 scan 'Book' 9- Display all the records to the screen. scan 'Book', {COLUMNS=>['info:title', 'author:last']} scan 'Book', {COLUMNS=>['info:title','info:description'], LIMIT=>'2'} or scan 'Book', {COLUMNS=>['info:title','info:description'], STOPROW=>'3'} 10- Display title and author's last name for all the records. 11- Display title and description for the first 2 records.
  • 15. 15 Book table is hosted via 1 Region Server and there is only 1 Region. There are no start or end keys for that region because there is only 1 region. It has 2 families info and author. There is no compression set for both families, and replication is set to 3. 13- Check the detailed status of your cluster via HBase shell. status 'detailed' Explore HBase Web-based management console, try and learn as much as you can about your new table. 12-
  • 16. 16 Delete a record whose title is Flying Car, and validate the record was deleted by scanning all the records or by attempting to select the record. delete 'Book', '3', 'info:title' 14- delete 'Book', '3', 'info:title' delete 'Book', '3', 'info:description' delete 'Book', '3', 'author:first' delete 'Book', '3', 'author:last' 15- Drop the table Book. disable 'Book' drop 'Book'