Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I am able to see HIVE TABLES without HIVE METASTORE SERVICE?

Solved Go to solution
Highlighted

I am able to see HIVE TABLES without HIVE METASTORE SERVICE?

Team, I just got below question which lead me into great confusion, Please clarify me.

I have "Hive-server & Metastore" running on one machine and
"DataBase" (mysql) is running on Other Machine.


"Hive Server & Metastore" config looks like below:
==================================================
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://DBSERVER.intranet.bit/hive</value>
</property>

<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>

<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>

<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>XXXXXXXXXXXX</value>
</property>

<property>
<name>datanucleus.autoCreateSchema</name>
<value>false</value>
</property>

<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>

<property>
<name>hive.exec.scratchdir</name>
<value>/tmp/hive-${user.name}</value>
<description>Scratch space for Hive jobs</description>
</property>

<property>
<name>hive.stats.autogather</name>
<value>false</value>
</property>

 

QUESTION Here :

I brought down the Metastore Service (/etc/init.d/metastore stop) on the hive server,
Then I ran the command "Hive", Still I am able to see all the tables. (kindly Refer below command output)
If i can access tables without Metastore service , Why there is "Metastore Service" ?
Am i missing anything ?

 

/etc/hive/conf# hive
Logging initialized using configuration in file:/etc/hive/conf.dist/hive-log4j.properties
Hive history file=/tmp/root/hive_job_log_aa0f2d2c-459c-43b5-8be4-da89a45e8473_558641078.txt
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/lib/hive/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
hive> show tables;
OK
impre
impre_map
impre_summary
live_test
sau_metrics
sau_metrics_test
bundle_events
bundle_events_total
cfu_for_crash_frequency
dau_by_geo
installs
crash_frequency
flume_test

Also , i brought down the Hive (/etc/init.d/hive-server stop & /etc/init.d/hive-metastore stop),
Still i am successfully read the HIVE table.
Am i missing anything here ?

KIndly share your veiw, and Correct me if my understanding is wrong.
How "hive" command is allowing me to view HIVE tables after brought down "metastore" Service ?
if this is true, I can connect "HIVE DB(mysql)" without Metastore service ?

 

Best Regards,
Bommuraj

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: I am able to see HIVE TABLES without HIVE METASTORE SERVICE?

Master Guru
Hive will contact a Hive MetaStore Service iff there's a "hive.metastore.uris" property in hive-site.xml. Your XML doesn't have one.

Your XML carries the JDO properties of the DB instead, and is thereby the "local" mode config described at http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/c...

View solution in original post

2 REPLIES 2
Highlighted

Re: I am able to see HIVE TABLES without HIVE METASTORE SERVICE?

Master Guru
Hive will contact a Hive MetaStore Service iff there's a "hive.metastore.uris" property in hive-site.xml. Your XML doesn't have one.

Your XML carries the JDO properties of the DB instead, and is thereby the "local" mode config described at http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/c...

View solution in original post

Re: I am able to see HIVE TABLES without HIVE METASTORE SERVICE?

Thank you Harsh !!!

Don't have an account?
Coming from Hortonworks? Activate your account here