• Register
1 vote
294 views

Problem :

Currently I am using Hadoop 2.7.1 and apache-hive-1.2.1 versions installed on my ubuntu 14.0.

1. Why below error is occurring ?

2. Do I need to do metastore installation ?

3. When we are typing the hive command on terminal how the xml's internally getting called and what is the flow of the xml's?

4. Do I need to do any other configuration's ?

When I am trying to write the hive command on my ubuntu 14.0 terminal it is throwing the following exception to me :

$ hive
Logging initialized using configuration in jar:file:/usr/local/hive/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:530)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:680)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:630)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:70)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:52)
at java.lang.reflect.Method.invoke(Method.java:530)
at org.apache.hadoop.util.RunJar.run(RunJar.java:230)
at org.apache.hadoop.util.RunJar.main(RunJar.java:145)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1725)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:144)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112)
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3300)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3210)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
... 8 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:73)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:56)
at java.lang.reflect.Constructor.newInstance(Constructor.java:431)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1541)
... 14 more
Caused by: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetException

Provided my environment variables in ~/.bashrc file; Still the above error persist

#HIVE home directory configuration
export HIVE_HOME=/usr/local/hive/apache-hive-1.2.1-bin
export PATH="$PATH:$HIVE_HOME/bin"
7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

If you are just wondering around in just local mode then you can drop metastore DB and reinstate it as follows :

rm -rf metastore_db/

$HIVE_HOME/bin/schematool -initSchema -dbType derby

 

38.6k points

Related questions

0 votes
1 answer 60 views
60 views
Problem : Is there any way to rectify this problem: Failed: execution error, return code 1 from org.apache.hadoop.hive.ql.exec.movetask?
asked Jun 13 Siam55 110k points
0 votes
1 answer 100 views
100 views
Problem: I have tried, hive.execution.engine as mr and as well as spark, but no luck. Please help me out.
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 44 views
44 views
Problem: Support is needed because I have been unable to find a solution : Org.apache.hadoop.hive.metastore.hivemetaexception: failed to get schema version.
asked Jun 14 asha 121k points
0 votes
1 answer 206 views
206 views
Problem: What caused the error, " failed: execution error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.teztask " ?
asked Apr 11 salim1 60.6k points
0 votes
1 answer 20 views
20 views
Problem: Working on this, however have no luck, need help : Partitioning and bucketing in hive with examples
asked May 23 Sawyer Parviz 167k points
0 votes
1 answer 27 views
27 views
Problem: How to fix this error > Error: org.apache.hadoop.hbase.pleaseholdexception: master is initializing
asked May 1 ummeshani 10.8k points
1 vote
1 answer 77 views
77 views
Problem: I followed instruction from this "http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html" to install hadoop on my machine but it is not working properly . Whenever I try to check the hadoop version I get this error : Error: could not find or load main ... Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
asked Apr 24 Raj Tyagi 16k points
0 votes
1 answer 9 views
9 views
Problem: Spark is 100x faster than MapReduce due to
asked Jul 16 Sawyer Parviz 167k points
0 votes
1 answer 7 views
7 views
Problem: I'm completely stuck here : User: root is not allowed to impersonate admin.
asked May 26 Irenka Kiri 85.5k points
0 votes
1 answer 10 views
10 views
Problem: Lets assume, yesterday I loaded data for partition_dates : 01-01, 02-01 till 10-01 When I load data today, I see partition_dates as : 01-01, 03-01 till 11-01, meaning 02-01 partition is not available. But hive is not overwriting or deleting this 02-01 partition. How can I achieve this functionality dynamically?
asked Apr 26 anika11 32.2k points