Emailing Hive PDF
Emailing Hive PDF
Introduction to Hive
BRIEF CONTENTS
"Information is-the oil ofthe 21st century, and analytics is the combustion engi.ne."
- Peter Sondergaard, Gartner Research
WHAT'S IN STORE?
We assume that you are al ready fam iliar with commercial database system~. In this ~hapter, We WiU
use that knowledge as our base to build a structure on Hadoop for effective analysts. We will d' try t()
importance of Hive with the help of use cases. We will also enrich your knowledge by working ;.cuhSs the
It t,.
.
We suggest you refer to some of the learning resources suggested at the end of this chapter and als
0 co"'
pIete t he .. ,...1est Me" exercises.
· ·••-
Hadoop Map Reduce can be used to resolve these issues. However we will still have t d al .th
below constraints: 0 e Wl the
1. W:ri~ing complex MapReduce jobs in Java can be tedious and error prone.
2. Jommg across large datasets is quite tricky.
.
-- figure 9.1 Hive - a data warehousing tool.
Hive provides HQL (Hive Query Language) which is similar to SQL. Hive compiles SQL queries into,
MapReduce jobs and then runs the job in the Hadoop Cluster. Hive provides extensive data type functions ·
and formats for data summarization and analysis. :..
Database
Tables
-
Partitions
•
Columns
•
[SJ
. .. I. •
Figure 9.5
Data units as arranged in a Hive.
• 233
OB
1·"@
111
\ ·i
::·i1i.. . .
Directory
-~-
Partitions
Rows
· Fifes
Figure 9.~6emblance
( of Hive structure with database .
•' . ' • ••
' "'"'"'
t.Hiye•server (Thrift) . -1
.Driver
..
Hive service JVM
Figure 9,10
Remote M
etastore.
L
• 235
t-li"'
~TYPES
9.1 ~ - a-ta_ r_yp_e_s _ _ _ _ _ _ _ _ _ _ _ _ _ __
1/pri111itNe u
9.3·1 •·N~·~~·~i~ ·o~i~ ·ry~·~ ·. ·······. ·. ·····. ·. ·.... ·····. ···· T .. · · · · · · · .. · · .. .. · · · · · · · .. · · · · ·
BOOLEAN
BINARY Only available starting with Hive
····· ······· ············· ········ ······ ········ ····· ··· ······ ·· ··· ··· ···· ······ ·· ···· ····· ··· ······ ·· ·
..Instea~ ofonly parciti?ning the table horizo~tally like t~e .row-oriented DBMS (row-store),
aaons tlus table first honzonrally and then vemcally to senal1ze the data. Based on the user-spe . de Par
R~i'I.
firsr me cable is partitioned into multiple row groups horizontally. Depicted in Table 9.2, the tab~16ed 11alue
Table 9. I is partitioned into two row groups by considering three rows as the size of each row e shown in
Next, in every row group RCFile partitions the data vertically like column-store. So the
serialized as shown in Table 9.3. _ e WI]J be
:?· .
Table 9.1 Atable with four columns
··,i .... ·:.~.'.ii ......... :·:c:i:·.:... ·:.. ·,·,i ... ;..... .
11 12 13 14
21 22 23 24
31. 32 33 34
41 42 43 44
51 52 53 54
·····························································
Table 9.2 Table with two row groups
.'i ~~· G~~~·p· 1·................... :..................... .·R~~· ·2 ········································
C1 C2 C3 C4 C1 C2 C3 C4
11 12 13 14
41 42 43
21 22 23 24 44
54
.?: .......... 32 33 34
51 52 53
··················································:······•· ..
······················· ························
~e
olJE~ LANGUAGE (HQL)
HIV
q,S uage provides basic SQL like operations. Here are few of the tasks .
,.,, \ang which HQL can d
·1
11e•, l d •· o eas, y
q d manage tab es an partmons. ·
create an jous Relational, Arithmetic, and Logical Operators.
l• rc var
z S11PP 0 functions.
1 ' EJualte d the contents of a table to a local directory or result of queries to HDFS d'
: pown oa _ irectory.
4
oDL (Data Definition Language) Statements
1
9, 5• cacernents are used co build and modify the tables and other objects in the database. The DDL com-
fhCSC s as follows:
ds are
111
aJI e1Drop/Alter Database
Creat
1, C ace/Drop/Truncate Table
z, ~:er Table/Partition/_Column
:· Create/Drop/Alter View
,6.. Show
· Create/Drop/Alter Index ,
7. Describe
. .2 DML (Data Manipulation Language) Statements
95
These statements are used to retrieve, store, modify, delete, and update _data in database. The DML
commands are as follows:
L r•bles
=
..
I
Objective: To describe the "STUDENT" table.
Act:
DESCRIBE STUDENT;
Outcome:
hi ve> DESCRIBE STUDENT·
OK I
roll no int
name .
gpa str1ng
lime talc . 0 16 float
hive I en. . 3 seconds• Fetched: 3 row(s)
-~
tve.as s own below·.
-~ ·· '
::-.:::::-----. -~,tudrnts.db .
--------
·.
I
._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _•_24_1
. II co
~11ctJO
Qutcollle:
. CREATE EXTERNAL TABLE IF NO: E~ISTS EXT_5TUDENT(ro1lno INT,name STRING,gpa FLOAT) ROW FORMA~
i,,ve" "!TED FIELDS TERMINATED BY \t LOCATION •/STUDENT.JNFO'.
~LI~ I I
oK aken: o.123 seconds
Tilllf ti ,J
I
hive> ,l' ~-- "" ~~""'~"°"'¥ ~rj~
Act:
. . /
LOAD·DAT~JPCAL~TH '/root/hivedemos/studen~.tsy;.- OVERWRITE INTO~-
~_STUDENT; . . · _
Note: Local keyword is used to load the data from the local file system. To load the data from HDFS,
remove local key word from the statement.
Outcome:
hive> LOAD DATA LOCAL INPATH '/root/hivedemos/student.tsv' OVERWRITE INTO TABLE EXT_5TUDENT;
Loading data to table students.ext_student .
Table students.ext_student stats: [numFiles=O, numRows=O, totalsize=O, rawoatasize=O]
OK
Time taken: 5.034 seconds
hive> I
Lotatl0&5
=-----------------·-..---
i&JdirfflO<y
8-iii. 201 1
,.,~ ,,__...
~::r::J•d ---- -----
.w.....u----
o..
wua ,-w-w-,
.....
.••1
·~
·
... ,...,. . ,
lllal
,.....
} Ml
j,i;,Jt ""
• 1
•••
llllf'II Jra.1,I , S
..... •J r-• , .,
t""1 .,.., ,_, • I
... ~ 1 1 •
~:::==:.;~.B~~~,i". . . /
WAD DATA WCAL INPATH '/root/hivedemos/studentinfo.csv' INTO TABLE
STUDENT_INFO; '>:, -;. r
Outcome:
:hive> CREATE TABL£ STUDfNT_INFO (ro11no INT,name Stdng, sub ARRAY<STRING>.,marks MAP<STRING,FLOAT>)
l
> ROW FORMAT DELIMITED FI£LDS TERMINATED BY ', '
> COLL£CTION IT£MS T£RMINAT£D BY ';'
> MAP K£YS TERMINATED BY '! '; .
foK
'Time taken: 0.112 seconds
ihive>
...., I
_ _,,....,.,._,,..,.,......,_,_,,,_,,,_,,_"""1iil,~~~~'ffl'if?'&~~~'?tf"tfl®'~~~f.b.,;;w.~TC,]
1hive> LOAD DATA LOCAL INPATH '/root/hivedemos/studentinfo.csv' INTO TABLE STUDENTJNFO·
Loading data to table students.student_info '
1Table students.student_info stats: [numFiles=l, totalsize=109J
OK
lTime taken: 0. 397 seconds
1,hjye~ ,
. _ _ - . . ,_ _ _ _ _ _ _ _
T ~~--~-----~-%______ :i
~c1:
sELECf * front STUDENT_INFO;
"' Cf NMffi,SUB FROM STUDENT INFO·
s~ 11 - ,
//'fo retrieve value of Markl
sELECf NAME, ~['Markl'] from STUDENT_INFO;
// 'fo retrieve subordinate (array) value
sELECf N~,SUB[0) FROM STUDEft_ITJNFO;
0utco01e:
hive> SELECT • from STUDENT_INFO;
O~l John r::sm~th::. ::Jones::1 {'.:Markl'.'.:45, "Mark2":46, "Mark3":43}
1 Jack [ sm1th , Jones ] { Markl :46 , "Mark2":47 ,"Mark3":42}
};,ne
002 taken: O. 04~ seconds, Fetched: 2 row(s)
hive> SELECT NAME' SUB FROM STUDENT_INFO;
OK ["smith", "Jones"]
John ["5 ·th" "Jones") ·
Jack taken: m10.061' seconds, Fetched: 2, row(s)
rime
hive> I
1 from STUO~_INFO;
hive> SELECT NAME, MARKS[ Markl']
OK
John 45
Jack 46 2 row(s)
Time taken: 0. 06 seconds, Fetched :
hive> I
!hive> SELECT NAME,SUB(0] FROM STUDENTJNFO;
OK
John Smith
Jack smith
Time taken: 0.071 seconds, Fetched: 2 row(s)
hive> I
.,.;,;.;.,..,;:,_,,--~~,Nf#,~~"">"<,"@.~~~•,;l';.;>Mi/"-s!!"."Si'<i!i&-"li»'<·"'<"'"~''-'""'"'""""
•
9.5.6 Partitions
In Hive, the query reads the entire dataset even though a where clause filter is specified on a particular
column. This becomes a bottleneck in most of the MapReduce jobs as it involves huge degree ofl/0. So it
is necessary to reduce 1/0 required by the MapReduce job to improve the performance of the query. A very
common method to reduce 1/0 is data partitioning.
Partitions split the larger dataset into more meaningful chunks.
Hive provides two kinds of partitions: Static Partition and Dynamic Partition.
244 •
Outcome:
lhi ve> INSERT OVERWRITE TABLE STATICPART_STUDENT PARTITION (gpa =4.0) SELECT rollno,name from EXT_STlJDENT
~ ere gpa=4.0; . -1,
iQuery
/Tota IO = =root_201502Z4230404_4500d58a-cb21-4912-ba40-788e5cf8f9da
1 fobs 3
Hive creates the folder for the value specified in the partition.
Cotltau of clrttfo,y fliKt'llwll'lrdl!!!w:1,tudtnr..db
Local logs
l.,;adir<ao,y
--- ---------
Conttnts ot directory 1i,,...11. ,••• 'wg,,,hh....
U12Wll!Yri~~sratlc_J11rt student
·g;;· - - - - - -- --- - - - - - - - - - - -
- .
Goto : IJSerlhivelw~,t
---=- -
Local logs ----------- - - - - - - - __ _ _ _ __
~~ttory
• , l
~
ObJ"'...n
· e more static partition based on "gpa" column using the
· "alter" statement.
ice: .
,u:r£ll TABLE STATIC_PART~STUDENT ADD PAIITI 3
ouico01e:
.
h,ve> ALTER TABLE STATICJ>ART_STUDENT ADD PARTITION ( gpa=3. 5) ; \)1
$~Ill! tlalcen: o.166 seconds \]
hive> - - - - - - - - - - - - - - - - - - - - - ~
coa1t11ts of dlrtd0 l'Y ~ s f u d e n t , . d b/stattc_part_studcnt
~ l_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
•
9.5.6.2 Dynamic Partition
Dynamic partition have columns whose values are known only at E,~ Time.
I ,
.. - - - - - - -
Outcome: ·
hi,o CREATE TABLE lF NOT EXlSlS DYNNULPART_5TUl)OIT( ,.11 no INT,.... ,;rnrnG) PARTITl011£D BY (gpa FLOAT) R . '
:= FORMAT DELIMIT<D HELDS TEI04INATED BY '\t'; \1
ioe taken, 0.166 seconds •.
hWe> I
•
246.
7 -
________________Bi~g::.:
Da:.::"''"d-'ln~
al}'ti1:1
~ --·----
Note: Create partition for all values.
""'r;I'·;/s·7 Bucketing
. .. . ·· db .
h is a subtle difference between parnnon an ucketmg. In
. . iI arcmon However, t ere Th' l d .
Bucketing 1s s1m ar to P · .. c h unique value of the column. 1s may ea to situations
.. d to create pamuon ror eac . . B k . . h'
a paranon, you nee . d f titians This can be avoided by usmg uc etmg m w 1ch you
d up with thousan s O par · . . • d'
where you may en k A bucket is a file whereas a partmon ts a uectory.
can limit the number of buc ets to create.
I
Objective: To learn about bucket in hive.
Act:
CLUSTE~ to~
• 247
Outcome: V. V • • wvvvu-w
f ~;> -~~;E TABLE IF NOT EXISTS STUDENT (rollno INT,name STRING,grade FLOAT)
'{1 1 > ROW FORMAT DELIMITED F.IELDS TERMINATED BY • \ t, ;
r
ive> FROM STUDENT
> INSERT OVERWRITE TABLE STUDENT_BUCKET
> SELECT rollno,name,grade;
Local logs
l&idirtctory
&m.2015.
hive>
> SELECT DISTINCT GRADE FROM STUDENT BUCKET
> TABLESAMPLE (BUCKET 1 OUT OF 3 ON GRADE) i
OK
4.0
4.2
Time taken: 21.117 seconds, Fetched: 2 row(sl
hive> I
fill
-----
248 •
4
Big Dara and Anal .
----------------------------=-----=~
9.5.8 Views
In H' . . 6
Views are purely logical object.
ive, view support is available only in version startmg from 0 · ·
• . •
ObJecttve: To create a view table name
d "STUDENT VIEW''.
-
.,I
Act: e FROM _EXT_STUDENT;
CREATE VIEW STUDENT_VIEW AS SELECT rollno, nam
EXT-STUDENT;
Outcome: llno,name FRDM
T VIEW AS SELECT ro
~~~~me
Ti vie~>taken:
JCtR:E:A~
TE.0.606
:V:I :EW
~ seconds
STU
:: DE: N
::..
__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .,~=-=-=-=-=-=-=-=-=-=-=-=-:..;j
_!,i ive> I
~ ---
EW"
I Objective: Querying the view "STUDENT_VI .
Act:
r
SELECT* FROM STUDENT_VIEW LIMIT 4;
Outcome:
hive> SELECT* FRoM STUDENT_VIEW LIMIT 4;
OK
1001 .John
1002 .Jack
1 003 smith
1004 Scott d Fetched: 4 row(s)
ime taken: 0.279 secon s,
hive> I
•
Objective: To drop the view "STUDENT_VIE
w·
Act:
DROP VIEW STUDENT_VIEW;
Outcome:
ive> DROP VIEW STUDENT_VIEW;
K
ime taken: 0.452 seconds
ive> I
•
9.5. 9 Sub-Query
In Hive, sub-queries are supported only in the FROM clause (Hive 0.12). You need to specify name for sub-
query because every table in a FROM clause has a name. The columns in the sub-query select list should have
unique names. The columns in the subquery select list are available to the outer query just like columns of a table.
. jO~ ,o t-11\'C
Ji
t
\frite a sub-query to count occurrence of similar words . h fil
•~ , int e e.
rK
O. taken -• 2. 697 seconds .,
r,me
hive;, •- - - - - - - - - - - - - - -.................____________..:.)
TE TABLE word_count AS .
hive;, CR~~CT word, count (1~ AS <;:ount _FROM
,. ~~ELECT explode (split (lrne , ')) AS word FROM docs) w
,. GROUP BY word
: ORDER BY word;
.
. I
. ELECT * FROM word_count;
hive> s .
OK 2
H~dOOP 2
HWe • 1
1ntroduc1~g 1
1ntroduct1on
pig 1
session 3
welcome 1
to 2
Time taken: 0.062 seconds, Fetched: 8 row(s)
hive> I
Note: The explode() function takes an array as input and outputs the elements of the array as
separate rows.
In Hive 0.13, sub-queries are supported in the where clause as well.
•
9.5.10 Joins
joins in Hive is similar to the SQL Join.
Objective: To create JOIN between Student and Department tables where we use RollNo from both
the tables as the join key.
250 •
Act:
CREATE 't\llLE If NCYf J!l(l~ SfllDJll'IT(,ollno INT.name STRIN
FORMAT pEL)MITED fIJ!LPS ~NATED BY 'It'; G,gpa Fr.o
WAD DATA I,Oc,\L filll',u-fl '/,ootJhrt'<"...,os/stUdent.uv' OVER
STUDEN'll WRITE IN'r O\>,
CREA1£ TABLE Jf NCYf J!l(]S'I'S DEPAJlTMI!Nf(rollno
INT,de . O 't"ll
ROW poJIM,U' oJ!LIMl11!D fIELDS 'fllJlMINATED BY 'It'; ptno tnt,na,ne s I.I!
LOAD D.4.~ J.()C,\L fi\11',u-fl '/,ootfjm,edentos!departm•nt.tsv' 0 't~~
TABLE D . E P ~ ' VERWJu'f£ I
sEI.fiCf ....,u,, , a.•""'•• a.gpa, b.deptno fllOM STUDENT a JOIN DEi! . ho~
0
.,..,u,,o • b,,ollnOl 'ARTMENi:
STRING ' g pa FLOAT) ROW F
0urconie:
h; v,, cR£ATE TABLE JF NOT EXJSTS s-ruJJENT(rollno JNT,nan>e """'- D~
EL IMT1'£D FIELDS TERMINATED BY '\t';
K
·ine taken: 0.115 seconds INTO TABLE -._,..., .
h ive> I STllOE);-r
~i ve> LOAD 0A TA LoCAL JNPATU '/ root/h; vedemo5 /student. ts v' OVERWRITE
rawoatas·1 Ze:Q]
K • - • a s,ze,145
Loading data to table students.student
able students.student stats: [numFiles=l numRows-0 tot 1 ·
_..,..,____ lJ~.
Ti oe taken, o.723 seconds '
INT ,deptno int,name STRING) ROW-Fo
--. •
hi ve> I RM •
8
hi ve> CREATE TABLE IF NOT EXISTS DEPARTMENT(rollno
T OELD4ITED FIELDS TERMINATED BY '\t' ·
OK '
1me taken: 0.099 seconds
hwe> I DEPA l
d' •
RlMENT' root/bwedemos/department . t sv . OVE_,TE
iF
hive> LOAD DATA LOCAL INPATH '/ .
· 1~ ~t~;!~,td!:):~~~d~!~; ~•f;,';,;;'\'~!s-1 • numR ows, O totals·
rawDatas·ize==O]
INTO. TABLE
l
hive>
1ve> 1
SELECT a.rollno an · - - - -FROM
- - STUDENT
----- a - --
JOIN -RTMENT
DEPA - - --
b -ON
- -a.- ··-· . .. • ; .•
rolloo , b.colloo; ' · """• a.gpa, b.deptno iJ
!
U"
1001 · John 3 0
1002
1003
1004
J k
/c
4·
·0
m, th 4 · 5
101
102
103
1005 Scot~ 4. 2 104
1006 Josh, 3 .5 105
Alex 4 5
1 007 David 4 - 2 101
1008 Jame 4· 104
Time taken·
hive> I
. 0i 102 'Fetched: 8 row(s)
· lS.282 seconds
<
9.s.1 · A9gregation
Hive supports aggregation fu nct1ons
. like avg, count, etc.
. }-{Jve r-;3
1110
~~, ,_10
1
111
·ce the average and count aggregation function.
, , 'fo wri
obj~·
f.c': <gpa) FROM STUDENT;
S~Cf i~nt(*) FROM STUDENT;
~cr,o-
tcO'°e: (gpa) FROM STUDENT;
0" sELECi av9 .
•ve.,.
roK 9996~8~~~~i seconds, Fetched; 1 row(s) 8\
1
38 ,3 99taken • _ _ _ _ _ _ _ _ _ _ Tl
fii,e • - --..:.J
~;ve'l' avg(gpa) FROM STUDENT;
~1
5ELECi
l~;ve'l'
oK
10
. .
taken-
ri !111? • -----------=--
26
_218 seconds, Fetched: 1 row(s)
T ,
•
Group By and Having
9,5
\
/ a column or columns can be grouped on the basis of values contained therein by using "Group By"·
10
Data. ,, clause is used to filter out groups NOT meeting the specified condition
"I-iaVIOg '
\I
~ g r o u p by and having function.
Act: .
SELECT rollno, name,gp·a FROM STUDENT GROIJP BY rollno,name,gpa HAVING gpa >
4.0; .
Outcome:
1003 smith 4. 5
1004 Scott 4 . 2
1006 Alex 4. 5
1007 David 4. 2
rime taken: 78. 972 seconds , Fetched: 4 row(s)
hi
•
1
,9/2CFILE IMPLEMENTATION
\(
RCFile (Record Columnar File) is a data placement structure that determines how to store relational tables
on computer clusters .
.i-;~~t--~~-:: : ~~
::::,~:~ff@·~f::: -.:. - -··- -· ·.
_............
--··············-"'-------. _...........- --·-·········
~ ;r~> . . . .
I
I,
,,
SerDe stands for Serializer/Deserializer.
. th l . onvert unstructured data into records.
1. Contams e og1c to c
1I 2. Implemented using Java. ..
3, Serializers are used at the time of wntmg.
4. Deserializers are used at query time (SELECT Statement).
Deserializer interface rakes a binary representation or string of a record, converts it into a java object that
Hive can then manipulate. Serializer rakes a java object that Hive has been working with and translates it
into something that Hive can write to HDFS.
ath-5
$1' ._ 1 s:inJsample;
fJtOlYJ.
s£LECf * FROM xpath_table;
teo01e: .
0U £ATE TABLE XMLSAMPLE(xmldata string);
nive" CR l
0~ kn: o.244 seconds [3
,,rirne
ve> tl
La e_ _ _ __..........................,,,~~~a,.w~maw~.w,w~
1
LOAD DATA LOCAL INPAdTH '/root/hivedemos/input xml' INTO TABLE XMLSAMPLE·, \
11;ve~ data to table stu ents.xmlsample ·
~~:~t~tudents.xmlsample stats: (numFiles=l, tota1Size=l94]
o. 889 seconds
~~me taken: l':l
hive,.J~ - - -
~ - --- _, ~f.ffi!@l'!fa~N,Zffi?Mt.@Mm:WM$&tE~£.S'"~~ ·
. CRfATE TABLE ~path...table ~s
h1ve,. SELECT xpath...int(xmldata, employee/empid •)
l ,.
,.
;
I0hive,.
~ John
x ath_str1ng(xm1data, :employee/name'),
x~ath_str1ng(xml data, employee/designation')
FROM xmlsample;
01
iooz
.
smith Analyst
taken·· 0.064 seconds, Fetched: 2 row(s)
r,me
hive> I
Outcome:
h ive> i'DO JAR /root / hivedemos/Uppercase.jar;· .
Added (/ root/hivedemos/Uppercase.jar] to class path
Added ,..,,,
hM> resources: (/root/hivedemos/Uppercase.jarJ
""'"'""'" ,uNCTION ,oupP<'<~• AS ' C - • · · -1 e. hiv•. udf. MyUppe,C~• • ;
I I
Ti me
OK taken: 0.014 seconds
h~ I - - - - - - - - - - - - - - - - - - - - - - - - -·- - - - - - - -
REMIND ME •
• H~ve ~s a Data Warehousing tool. .. I
• Hive 1s used to query structured data built on top qf tfadoop.
• Hiv~ provides HQL (Hive Query Language} which is similar to SQL.
• A
t blHive databa~
d contains d tables. Each table is c6rtstitutecf of
fi Id several . rows a n d co1umns. In Hive
·
a es are store as a o er an partition tables are stored as a sub-directory '
• Bucketed tables are stored as a file. ·
POINT ME (BOOKS)
Ii'.
~ Veil
er ME (INTERNET ResouRces>
~org/wiki/RCFde
, b"1':Is•I/e/JJ~lri.apacbe,org/
cw-- ch rg/conftuence/
n8 .display /Hive/Dyn....... : p ..
b"1'. ,~.apa e.o co uence/displa /Hi .........c artitJons
' ~111"':,~.apach•·org/conlluence/displ y/H"ve/LanguageManaal+DDL
' b"1's: r ..rtlfied BigData Developer. ay ive/LanguageManual+DML
, ~"'j.
,
I.JO' YO &g Q § 4 0¢£4 3! ::;;:;::•
~ - - - - - - - -- - - - -
~atch Me····· ·· .. .... .............. .... .,...... ... .... .... ,: ·: ...... ...........
, .... •·· ···~·A
. ...... ... .... .. .. ..
· ColurnnB
HOL Web Logs
oatabase struct, map
crnpleX Data Types Set of records
0
Hive APPlication Hive Query Language
Table............................................
····· ··········· ···· ···Namespace
··· ················· ··········
··Answers:
c~i~.~~·A -· 0 o O IO o O O I O O O O O O O o 0
· · · .. ._.. ·:........ -_
0 0 I O O O O I O
·,~tJ~~·~...:. ,. ......... .
o O O 0
_;_------_.;,---_.__-'-"'-::-___::..:___::..:_ ____;L........:~ ~ ~ ~ - - - -
Hive Query L~nguage
HQL .
Database Namespace
complex Data Types struct, map
Hive Application Web Logs
Table Set of records
······························· ··········· ··························································
8, Fill Me
1. The metastore consists of _ _ _ _ and a _ _ __
2. The most commonly used interface to interact with Hive is _ _ __
3, The default metastore for Hive is - - - -
4. Metastore contains _ _ _ _ of Hive tables.
5. ____ is responsible for compilation, optimization, and execution of Hive queries.
Answers:
4. System Catalog
I. Metaservices, database S. Driver
2. Command Line Interface
3. Derby