Support Questions

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

Who agreed with this topic

Access to WebHCat

avatar
Expert Contributor

Hi Guys,

 

I am using  CDH 5.7, VirtualBOx QuickStart.

 

I am trying to get an access to my data through WebHcat. I am trying to open in browser foloriwng uri:

 

http://localhost:50111/templeton/v1/ddl/database/default/table?user.name=cloudera

 

As a result I obtain in browser:

{"error":"FAILED: SemanticException Operation not supported.","errorDetail":"org.apache.hadoop.hive.ql.parse.SemanticException: Operation not supported.\n\tat org.apache.hive.hcatalog.cli.SemanticAnalysis.HCatSemanticAnalyzer.preAnalyze(HCatSemanticAnalyzer.java:153)\n\tat org.apache.hadoop.hive.ql.Driver.compile(Driver.java:449)\n\tat org.apache.hadoop.hive.ql.Driver.compile(Driver.java:311)\n\tat org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1194)\n\tat org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1289)\n\tat org.apache.hadoop.hive.ql.Driver.run(Driver.java:1120)\n\tat org.apache.hadoop.hive.ql.Driver.run(Driver.java:1108)\n\tat org.apache.hive.hcatalog.cli.HCatDriver.run(HCatDriver.java:43)\n\tat org.apache.hive.hcatalog.cli.HCatCli.processCmd(HCatCli.java:291)\n\tat org.apache.hive.hcatalog.cli.HCatCli.processLine(HCatCli.java:245)\n\tat org.apache.hive.hcatalog.cli.HCatCli.main(HCatCli.java:183)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:606)\n\tat org.apache.hadoop.util.RunJar.run(RunJar.java:221)\n\tat org.apache.hadoop.util.RunJar.main(RunJar.java:136)\n","errorCode":40000,"sqlState":"42000","database":"default"}

In webhcat.log I found following information:

 

INFO  | 05 Aug 2016 21:30:45,234 | org.eclipse.jetty.server.Server | jetty-7.6.0.v20120127
INFO  | 05 Aug 2016 21:30:45,326 | org.eclipse.jetty.server.handler.ContextHandler | started o.e.j.s.ServletContextHandler{/,null}
INFO  | 05 Aug 2016 21:30:45,613 | com.sun.jersey.server.impl.application.WebApplicationImpl | Initiating Jersey application, version 'Jersey: 1.14 09/09/2012 05:39 PM'
WARN  | 05 Aug 2016 21:30:46,122 | org.apache.hadoop.util.NativeCodeLoader | Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
INFO  | 05 Aug 2016 21:30:46,416 | org.apache.hive.hcatalog.templeton.tool.HDFSCleanup | Next execution: Sat Aug 06 00:28:28 PDT 2016
INFO  | 05 Aug 2016 21:30:46,424 | com.sun.jersey.api.wadl.config.WadlGeneratorLoader | Loading wadlGenerator com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport
INFO  | 05 Aug 2016 21:30:46,911 | org.eclipse.jetty.server.AbstractConnector | Started SelectChannelConnector@0.0.0.0:50111
INFO  | 05 Aug 2016 21:30:46,918 | org.apache.hive.hcatalog.templeton.Main | Templeton listening on port 50111
WARN  | 05 Aug 2016 21:31:10,133 | org.apache.hadoop.security.authentication.server.AuthenticationFilter | AuthenticationToken ignored: org.apache.hadoop.security.authentication.util.SignerException: Invalid signature
INFO  | 05 Aug 2016 21:31:10,166 | org.apache.hive.hcatalog.templeton.HcatDelegator | Main.getAppConfigInstance().get(AppConfig.UNIT_TEST_MODE)=null
INFO  | 05 Aug 2016 21:31:10,173 | org.apache.hive.hcatalog.templeton.ExecServiceImpl | Running: /usr/bin/python /usr/lib/hive-hcatalog/bin/hcat.py -e "use default; show tables like '*';" -D hive.ddl.output.format=json -D hive.format=json
INFO  | 05 Aug 2016 21:31:10,174 | org.apache.hive.hcatalog.templeton.ExecServiceImpl | Env HADOOP_PREFIX=/usr
INFO  | 05 Aug 2016 21:31:10,174 | org.apache.hive.hcatalog.templeton.ExecServiceImpl | Env JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
INFO  | 05 Aug 2016 21:31:10,174 | org.apache.hive.hcatalog.templeton.ExecServiceImpl | Env HADOOP_USER_NAME=hive
INFO  | 05 Aug 2016 21:31:10,174 | org.apache.hive.hcatalog.templeton.ExecServiceImpl | Env HIVE_HOME=/usr/lib/hive
INFO  | 05 Aug 2016 21:31:15,954 | org.apache.hive.hcatalog.templeton.ExecServiceImpl | Command: /usr/bin/python /usr/lib/hive-hcatalog/bin/hcat.py -e "use default; show tables like '*';" -D hive.ddl.output.format=json -D hive.format=json failed. res=ExecBean(stdout={"error":"FAILED: SemanticException Operation not supported.","errorDetail":"org.apache.hadoop.hive.ql.parse.SemanticException: Operation not supported.\n\tat org.apache.hive.hcatalog.cli.SemanticAnalysis.HCatSemanticAnalyzer.preAnalyze(HCatSemanticAnalyzer.java:153)\n\tat org.apache.hadoop.hive.ql.Driver.compile(Driver.java:449)\n\tat org.apache.hadoop.hive.ql.Driver.compile(Driver.java:311)\n\tat org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1194)\n\tat org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1289)\n\tat org.apache.hadoop.hive.ql.Driver.run(Driver.java:1120)\n\tat org.apache.hadoop.hive.ql.Driver.run(Driver.java:1108)\n\tat org.apache.hive.hcatalog.cli.HCatDriver.run(HCatDriver.java:43)\n\tat org.apache.hive.hcatalog.cli.HCatCli.processCmd(HCatCli.java:291)\n\tat org.apache.hive.hcatalog.cli.HCatCli.processLine(HCatCli.java:245)\n\tat org.apache.hive.hcatalog.cli.HCatCli.main(HCatCli.java:183)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:606)\n\tat org.apache.hadoop.util.RunJar.run(RunJar.java:221)\n\tat org.apache.hadoop.util.RunJar.main(RunJar.java:136)\n","errorCode":40000,"sqlState":"42000"}, stderr=which: no /usr/lib/hadoop/bin/hadoop in ((null))
dirname: missing operand
Try `dirname --help' for more information.
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/lib/hive/logs/hcat.log (No such file or directory)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
	at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
	at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
	at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
	at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(LogUtils.java:127)
	at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:77)
	at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
	at org.apache.hive.hcatalog.cli.HCatCli.main(HCatCli.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
log4j:ERROR Either File or DatePattern options are not set for appender [DRFA].
FAILED: SemanticException Operation not supported.
, exitcode=64)

 WHen I send a following GET: http://localhost:50111/templeton/v1/status, an answer is correct:

{"status":"ok","version":"v1"}

How to deal with such a problem.........

Who agreed with this topic