Created on 08-11-2017 09:15 AM - edited 09-16-2022 05:05 AM
There are a few other post on the same topic however none of the suggested fixes have worked. This query (which I am using HUE Hive) just hangs. I also started the Zookeeper as suggested in another post, but it did not help. I did let it run over night and it produced the following error:
Error while processing statement: FAILED: Error in acquiring locks: Locks on the underlying objects cannot be acquired. retry after some time
Anyone know a solution?
CREATE EXTERNAL TABLE intermediate_access_logs (
ip STRING,
date STRING,
method STRING,
url STRING,
http_version STRING,
code1 STRING,
code2 STRING,
dash STRING,
user_agent STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
'input.regex' = '([^ ]*) - - \\[([^\\]]*)\\] "([^\ ]*) ([^\ ]*) ([^\ ]*)" (\\d*) (\\d*) "([^"]*)" "([^"]*)"',
'output.format.string' = "%1$$s %2$$s %3$$s %4$$s %5$$s %6$$s %7$$s %8$$s %9$$s")
LOCATION '/user/hive/warehouse/original_access_logs';
Created 08-16-2017 03:56 PM
I don't have time at the moment to check the QuickStart VM but let's check the /usr/lib/ hive/lib location (rather than ~/parcels or ~/lib). Also, the ADD JAR command has to be run from within Beeline.
Created 08-15-2017 01:30 PM
Hi jbatspv,
Have all instances of HiveServer2 been restarted already?
Created 08-16-2017 09:53 AM
In the Cloudera Management Service Actions under the CDH 5 Packages dashboard I restarted the service. This fixed the issue and I was able to complete this step successfully as well, but get another error described below.
CREATE EXTERNAL TABLE tokenized_access_logs (
ip STRING,
date STRING,
method STRING,
url STRING,
http_version STRING,
code1 STRING,
code2 STRING,
dash STRING,
user_agent STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LOCATION '/user/hive/warehouse/tokenized_access_logs';
I did however get the following error when I hit this line of code. Any ideas?
ADD JAR {{lib_dir}}/hive/lib/hive-contrib.jar;
Error while processing statement: java.net.URISyntaxException: Illegal character in path at index 0: {{lib_dir}}/hive/lib/hive-contrib.jar
Created 08-16-2017 10:24 AM
Based on another article I have tried the following combinations but all issue and error that the hive-contrib.jar does not exist.
ADD JAR /hive/lib/hive-contrib.jar;
ADD JAR /home/cloudera/lib/hive-contrib.jar;
ADD JAR /opt/cloudera/parcels/CDH/lib/hive/hive-contrib.jar;
Created 08-16-2017 10:49 AM
Hi jbatspv,
Which code/script is running?
Does hive-contrib.jar exist under /lib/hive/lib?
Created 08-16-2017 01:42 PM
Which code/script is running? How can I tell?
I ran this but got similar error.
ADD JAR /lib/hive/lib/hive-contrib.jar;
Error while processing statement: /lib/hive/lib/hive-contrib.jar does not exist
Really appreciate you work with me on this!!
Created 08-16-2017 02:22 PM
Sure, glad to help.
Does hive-contrib.jar exist at /opt/cloudera/parcels/CDH/lib/hive/lib/hive-contrib.jar? You can navigate to this directory to verify.
Was the ADD JAR command run with Beeline?
What's the full error output?
Created 08-16-2017 03:12 PM
Created 08-16-2017 03:56 PM
I don't have time at the moment to check the QuickStart VM but let's check the /usr/lib/ hive/lib location (rather than ~/parcels or ~/lib). Also, the ADD JAR command has to be run from within Beeline.
Created 08-17-2017 05:00 AM
I found the file hive-contrib.jar the command ls /usr/lib/have/lib via the terminal window. I ran ADD JAR /usr/lib/hive/lib/hive-contrib.jar; from the HUE Hive and it worked! I also was able to run the last statement successfully INSERT OVERWRITE TABLE tokenized_access_logs SELECT * FROM intermediate_access_logs;
I have now been able to complete exercise 2!!
Big thanks for the help!