Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Exercise 2 : Long time running + error from intermediate_access_logs table creation query

avatar
Contributor

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';

1 ACCEPTED SOLUTION

avatar
Rising Star

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.

View solution in original post

12 REPLIES 12

avatar
Rising Star

Absolutely! You could also mark the solution for anyone else that comes across this issue in the future.

 

Cheers

avatar
New Contributor
I added the jar file and still my query is running for the last 8 minutes.

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';

Any other setting change needs to be done?

avatar
Explorer

I had the same problem - create external table intermediate_access_logs hanging.

 

The solution which helped in my case was increasing memory in my virtual machine (VirtualBox). I've set VM memory to 20GB. I did not experiment, I don't know what is the working minimum. What I can tell is that 20GB works.