<s>
Apache	B-General_Concept
Hive	I-General_Concept
is	O
a	O
data	O
warehouse	O
software	O
project	O
built	O
on	O
top	O
of	O
Apache	B-Application
Hadoop	I-Application
for	O
providing	O
data	O
query	O
and	O
analysis	O
.	O
</s>
<s>
Hive	O
gives	O
an	O
SQL-like	O
interface	B-Application
to	O
query	O
data	O
stored	O
in	O
various	O
databases	O
and	O
file	O
systems	O
that	O
integrate	O
with	O
Hadoop	B-Application
.	O
</s>
<s>
Traditional	O
SQL	B-Language
queries	O
must	O
be	O
implemented	O
in	O
the	O
MapReduce	B-Operating_System
Java	B-Language
API	O
to	O
execute	O
SQL	B-Language
applications	O
and	O
queries	O
over	O
distributed	O
data	O
.	O
</s>
<s>
Hive	O
provides	O
the	O
necessary	O
SQL	B-Language
abstraction	O
to	O
integrate	O
SQL-like	O
queries	O
(	O
HiveQL	O
)	O
into	O
the	O
underlying	O
Java	B-Language
without	O
the	O
need	O
to	O
implement	O
queries	O
in	O
the	O
low-level	O
Java	B-Language
API	O
.	O
</s>
<s>
Since	O
most	O
data	O
warehousing	O
applications	O
work	O
with	O
SQL-based	O
querying	O
languages	O
,	O
Hive	O
aids	O
portability	O
of	O
SQL-based	O
applications	O
to	O
Hadoop	B-Application
.	O
</s>
<s>
While	O
initially	O
developed	O
by	O
Facebook	O
,	O
Apache	B-General_Concept
Hive	I-General_Concept
is	O
used	O
and	O
developed	O
by	O
other	O
companies	O
such	O
as	O
Netflix	O
and	O
the	O
Financial	O
Industry	O
Regulatory	O
Authority	O
(	O
FINRA	O
)	O
.	O
</s>
<s>
Amazon	O
maintains	O
a	O
software	O
fork	O
of	O
Apache	B-General_Concept
Hive	I-General_Concept
included	O
in	O
Amazon	B-Application
Elastic	I-Application
MapReduce	I-Application
on	O
Amazon	B-Application
Web	I-Application
Services	I-Application
.	O
</s>
<s>
Apache	B-General_Concept
Hive	I-General_Concept
supports	O
analysis	O
of	O
large	O
datasets	O
stored	O
in	O
Hadoop	B-Application
's	O
HDFS	B-Application
and	O
compatible	O
file	O
systems	O
such	O
as	O
Amazon	B-General_Concept
S3	I-General_Concept
filesystem	O
and	O
Alluxio	B-Application
.	O
</s>
<s>
It	O
provides	O
a	O
SQL-like	O
query	O
language	O
called	O
HiveQL	O
with	O
schema	O
on	O
read	O
and	O
transparently	O
converts	O
queries	O
to	O
MapReduce	B-Operating_System
,	O
Apache	O
Tez	O
and	O
Spark	B-Language
jobs	O
.	O
</s>
<s>
All	O
three	O
execution	O
engines	O
can	O
run	O
in	O
Hadoop	B-Application
's	O
resource	O
negotiator	O
,	O
YARN	B-Application
(	O
Yet	O
Another	O
Resource	O
Negotiator	O
)	O
.	O
</s>
<s>
Different	O
storage	O
types	O
such	O
as	O
plain	O
text	O
,	O
RCFile	O
,	O
HBase	B-Language
,	O
ORC	O
,	O
and	O
others	O
.	O
</s>
<s>
Metadata	O
storage	O
in	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
,	O
significantly	O
reducing	O
the	O
time	O
to	O
perform	O
semantic	O
checks	O
during	O
query	O
execution	O
.	O
</s>
<s>
Operating	O
on	O
compressed	O
data	O
stored	O
into	O
the	O
Hadoop	B-Application
ecosystem	O
using	O
algorithms	O
including	O
DEFLATE	B-Algorithm
,	O
BWT	B-Algorithm
,	O
snappy	B-Language
,	O
etc	O
.	O
</s>
<s>
Built-in	O
user-defined	B-Language
functions	I-Language
(	O
UDFs	O
)	O
to	O
manipulate	O
dates	O
,	O
strings	O
,	O
and	O
other	O
data-mining	O
tools	O
.	O
</s>
<s>
SQL-like	O
queries	O
(	O
HiveQL	O
)	O
,	O
which	O
are	O
implicitly	O
converted	O
into	O
MapReduce	B-Operating_System
or	O
Tez	O
,	O
or	O
Spark	B-Language
jobs	O
.	O
</s>
<s>
By	O
default	O
,	O
Hive	O
stores	O
metadata	O
in	O
an	O
embedded	O
Apache	B-Language
Derby	I-Language
database	O
,	O
and	O
other	O
client/server	O
databases	O
like	O
MySQL	B-Application
can	O
optionally	O
be	O
used	O
.	O
</s>
<s>
Apache	B-General_Concept
Parquet	I-General_Concept
can	O
be	O
read	O
via	O
plugin	O
in	O
versions	O
later	O
than	O
0.10	O
and	O
natively	O
starting	O
at	O
0.13	O
.	O
</s>
<s>
The	O
data	O
is	O
stored	O
in	O
a	O
traditional	O
RDBMS	B-Application
format	O
.	O
</s>
<s>
Compiler	B-Language
:	O
Performs	O
compilation	B-Language
of	O
the	O
HiveQL	O
query	O
,	O
which	O
converts	O
the	O
query	O
to	O
an	O
execution	O
plan	O
.	O
</s>
<s>
This	O
plan	O
contains	O
the	O
tasks	O
and	O
steps	O
needed	O
to	O
be	O
performed	O
by	O
the	O
Hadoop	B-Application
MapReduce	B-Operating_System
to	O
get	O
the	O
output	O
as	O
translated	O
by	O
the	O
query	O
.	O
</s>
<s>
The	O
compiler	B-Language
converts	O
the	O
query	O
to	O
an	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
(	O
AST	O
)	O
.	O
</s>
<s>
After	O
checking	O
for	O
compatibility	O
and	O
compile	B-Language
time	O
errors	O
,	O
it	O
converts	O
the	O
AST	O
to	O
a	O
directed	O
acyclic	O
graph	O
(	O
DAG	O
)	O
.	O
</s>
<s>
The	O
DAG	O
divides	O
operators	O
to	O
MapReduce	B-Operating_System
stages	O
and	O
tasks	O
based	O
on	O
the	O
input	O
query	O
and	O
data	O
.	O
</s>
<s>
Executor	O
:	O
After	O
compilation	B-Language
and	O
optimization	O
,	O
the	O
executor	O
executes	O
the	O
tasks	O
.	O
</s>
<s>
It	O
interacts	O
with	O
the	O
job	O
tracker	O
of	O
Hadoop	B-Application
to	O
schedule	O
tasks	O
to	O
be	O
run	O
.	O
</s>
<s>
CLI	O
,	O
UI	O
,	O
and	O
Thrift	B-Protocol
Server	I-Protocol
:	O
A	O
command-line	B-Application
interface	I-Application
(	O
CLI	O
)	O
provides	O
a	O
user	B-Application
interface	I-Application
for	O
an	O
external	O
user	O
to	O
interact	O
with	O
Hive	O
by	O
submitting	O
queries	O
,	O
instructions	O
and	O
monitoring	O
the	O
process	O
status	O
.	O
</s>
<s>
Thrift	B-Protocol
server	I-Protocol
allows	O
external	O
clients	O
to	O
interact	O
with	O
Hive	O
over	O
a	O
network	O
,	O
similar	O
to	O
the	O
JDBC	B-Language
or	O
ODBC	B-Application
protocols	O
.	O
</s>
<s>
While	O
based	O
on	O
SQL	B-Language
,	O
HiveQL	O
does	O
not	O
strictly	O
follow	O
the	O
full	O
SQL-92	B-Language
standard	O
.	O
</s>
<s>
HiveQL	O
offers	O
extensions	O
not	O
in	O
SQL	B-Language
,	O
including	O
multitable	O
inserts	O
and	O
create	O
table	O
as	O
select	O
.	O
</s>
<s>
HiveQL	O
lacked	O
support	O
for	O
transactions	B-General_Concept
and	O
materialized	B-Application
views	I-Application
,	O
and	O
only	O
limited	O
subquery	O
support	O
.	O
</s>
<s>
Internally	O
,	O
a	O
compiler	B-Language
translates	O
HiveQL	O
statements	O
into	O
a	O
directed	O
acyclic	O
graph	O
of	O
MapReduce	B-Operating_System
,	O
Tez	O
,	O
or	O
Spark	B-Language
jobs	O
,	O
which	O
are	O
submitted	O
to	O
Hadoop	B-Application
for	O
execution	O
.	O
</s>
<s>
While	O
Hive	O
is	O
a	O
SQL	B-Language
dialect	O
,	O
there	O
are	O
a	O
lot	O
of	O
differences	O
in	O
structure	O
and	O
working	O
of	O
Hive	O
in	O
comparison	O
to	O
relational	O
databases	O
.	O
</s>
<s>
The	O
differences	O
are	O
mainly	O
because	O
Hive	O
is	O
built	O
on	O
top	O
of	O
the	O
Hadoop	B-Application
ecosystem	O
,	O
and	O
has	O
to	O
comply	O
with	O
the	O
restrictions	O
of	O
Hadoop	B-Application
and	O
MapReduce	B-Operating_System
.	O
</s>
<s>
Transactions	B-General_Concept
are	O
key	O
operations	O
in	O
traditional	O
databases	O
.	O
</s>
<s>
As	O
any	O
typical	O
RDBMS	B-Application
,	O
Hive	O
supports	O
all	O
four	O
properties	O
of	O
transactions	B-General_Concept
(	O
ACID	O
)	O
:	O
Atomicity	B-General_Concept
,	O
Consistency	B-General_Concept
,	O
Isolation	B-General_Concept
,	O
and	O
Durability	B-General_Concept
.	O
</s>
<s>
Transactions	B-General_Concept
in	O
Hive	O
were	O
introduced	O
in	O
Hive	O
0.13	O
but	O
were	O
only	O
limited	O
to	O
the	O
partition	O
level	O
.	O
</s>
<s>
Hive	O
0.14	O
and	O
later	O
provides	O
different	O
row	O
level	O
transactions	B-General_Concept
such	O
as	O
INSERT	O
,	O
DELETE	O
and	O
UPDATE	O
.	O
</s>
<s>
Enabling	O
INSERT	O
,	O
UPDATE	O
,	O
DELETE	O
transactions	B-General_Concept
require	O
setting	O
appropriate	O
values	O
for	O
configuration	O
properties	O
such	O
as	O
hive.support.concurrency	O
,	O
hive.enforce.bucketing	O
,	O
and	O
hive.exec.dynamic.partition.mode	O
.	O
</s>
<s>
Hive	O
v0.7.0	O
added	O
integration	O
with	O
Hadoop	B-Application
security	O
.	O
</s>
<s>
Hadoop	B-Application
began	O
using	O
Kerberos	B-Protocol
authorization	O
support	O
to	O
provide	O
security	O
.	O
</s>
<s>
Kerberos	B-Protocol
allows	O
for	O
mutual	O
authentication	O
between	O
client	O
and	O
server	O
.	O
</s>
<s>
The	O
previous	O
versions	O
of	O
Hadoop	B-Application
had	O
several	O
issues	O
such	O
as	O
users	O
being	O
able	O
to	O
spoof	O
their	O
username	O
by	O
setting	O
the	O
hadoop.job.ugi	O
property	O
and	O
also	O
MapReduce	B-Operating_System
operations	O
being	O
run	O
under	O
the	O
same	O
user	O
:	O
hadoop	B-Application
or	O
mapred	O
.	O
</s>
<s>
With	O
Hive	O
v0.7.0	O
'	O
s	O
integration	O
with	O
Hadoop	B-Application
security	O
,	O
these	O
issues	O
have	O
largely	O
been	O
fixed	O
.	O
</s>
<s>
TaskTracker	O
jobs	O
are	O
run	O
by	O
the	O
user	O
who	O
launched	O
it	O
and	O
the	O
username	O
can	O
no	O
longer	O
be	O
spoofed	O
by	O
setting	O
the	O
hadoop.job.ugi	O
property	O
.	O
</s>
<s>
Permissions	O
for	O
newly	O
created	O
files	O
in	O
Hive	O
are	O
dictated	O
by	O
the	O
HDFS	B-Application
.	O
</s>
<s>
The	O
Hadoop	B-Application
distributed	O
file	O
system	O
authorization	O
model	O
uses	O
three	O
entities	O
:	O
user	O
,	O
group	O
and	O
others	O
with	O
three	O
permissions	O
:	O
read	O
,	O
write	O
and	O
execute	O
.	O
</s>
