Support Questions

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

Exercise 3 : no response from intermediate_access_logs table creation query

avatar
Explorer
Hi, 

Not getting any response When I execute below query. Its more than 3 hrs now and no response yet. I am running this query on Quick Start VM.

Could you please help me with this issue.

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
Explorer

Resolved the issue. Issue is because Zookeeper service is not running.

View solution in original post

7 REPLIES 7

avatar
New Contributor

This is what i get when executing the query:

 

Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:hdfs://quickstart.cloudera:8020/user/hive/warehouse/original_access_logs is not a directory or unable to create one) (state=08S01,code=1)
0: jdbc:hive2://quickstart:10000/default>

avatar
New Contributor

This worked for me:

--remove existing directory

sudo -u hdfs hadoop fs rm /user/hive/warehouse/original_access_logs

 

--create the directory again

 

--see the results. must be drwxr ...

hadoop fs -ls /user/hive/warehouse

--Found 9 items
drwxr-xr-x - cloudera hive 0 2015-10-03 18:51 /user/hive/warehouse/categories
drwxr-xr-x - cloudera hive 0 2015-10-03 18:52 /user/hive/warehouse/customers
drwxr-xr-x - cloudera hive 0 2015-10-03 18:53 /user/hive/warehouse/departments
drwxr-xr-x - cloudera hive 0 2015-10-03 18:53 /user/hive/warehouse/order_items
drwxr-xr-x - cloudera hive 0 2015-10-03 18:54 /user/hive/warehouse/orders
drwxr-xr-x - hdfs hive 0 2015-10-03 21:17 /user/hive/warehouse/original_access_logs
drwxr-xr-x - hdfs hive 0 2015-10-03 19:33 /user/hive/warehouse/originala_access_logs
drwxr-xr-x - cloudera hive 0 2015-10-03 18:55 /user/hive/warehouse/products
drwxrwxrwx - admin hive 0 2015-10-03 20:37 /user/hive/warehouse/tokenized_access_logs

avatar
Explorer

No luck with the solution. Verified the permissions 9drwxr )

 

Any help?

avatar
Explorer

It took around 4 Hrs to finish the query with errors.

 

I got an error saying that Failed to acquire locks

avatar
Explorer

Resolved the issue. Issue is because Zookeeper service is not running.

avatar
New Contributor
Sorry for the delay. Glad you find the solution.

avatar
Explorer
 
No problem and thanks a log for all your prompt replies to my queries