Support Questions
Find answers, ask questions, and share your expertise

Accessing Hive via WebHCat : can't get any data

Accessing Hive via WebHCat : can't get any data

Explorer

Hello,

Kerberized HDP-2.6.1.0 cluster with Hive 1.2.1000.

I can't seem to get any data when I query Hive via WebHCat. Executing queries via Hive shell works fine.

$ hive
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.

Logging initialized using configuration in file:/etc/hive/2.6.1.0-129/0/hive-log4j.properties
WARNING: Directory for Hive history file: /home/svcfeeder does not exist.   History will not be available during this session.

hive> show databases;
OK
default
dev
Time taken: 2.261 seconds, Fetched: 2 row(s)

hive> use default;
OK
Time taken: 0.253 seconds

hive> show tables;
OK
test1
test2
offices
Time taken: 0.277 seconds, Fetched: 3 row(s)

hive> select * from offices limit 3;
OK
TESTA  AA AB
TESTB  BA BB
TESTC  CA CC
Time taken: 0.57 seconds, Fetched: 3 row(s)
curl --negotiate -i -u : 'http://srv-namenode-01.local.net:50111/templeton/v1/status'
HTTP/1.1 401 Authentication required
WWW-Authenticate: Negotiate
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 1314
Server: Jetty(7.6.0.v20120127)

HTTP/1.1 200 OK
WWW-Authenticate: Negotiate XXXXXXXXXXXXXXXXXXXXXXXXX
Set-Cookie: hadoop.auth="u=svcfeeder&p=xxxx@HDP.LOCAL&t=kerberos&e=1503234234922&s=xxxxxx="; Path=/; HttpOnly
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(7.6.0.v20120127)

{"version":"v1","status":"ok"}
curl --negotiate -i -u: -d execute="select+*+from+offices+limit+3;" -d statusDir="/tmp/test.out" 'http://srv-namenode-01.local.net:50111/templeton/v1/hive'

HTTP/1.1 401 Authentication required
WWW-Authenticate: Negotiate
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 1312
Server: Jetty(7.6.0.v20120127)

HTTP/1.1 200 OK
WWW-Authenticate: Negotiate XXXXXXXXXXXXXXXXXXXXXXXXX
Set-Cookie: hadoop.auth="u=svcfeeder&p=xxxx@HDP.LOCAL&t=kerberos&e=150323423731&s=xxxxxx="; Path=/; HttpOnly
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(7.6.0.v20120127)

{"id":"job_1503845958062_0014"}

I can see two jobs fired from the ResourceManager UI: TempletonControllerJob by MAPREDUCE and HIVE-xxx by TEZ. Both are successfully finished after some minutes, but /tmp/test.out is empty.

Did I miss something?

Thank you.