{"id":251,"date":"2009-11-15T02:19:00","date_gmt":"2009-11-15T02:19:00","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=251"},"modified":"2009-11-15T02:19:00","modified_gmt":"2009-11-15T02:19:00","slug":"hive-troubleshooting","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=251","title":{"rendered":"Hive troubleshooting"},"content":{"rendered":"<p>I am playing with Hadoop and Hive via Cloudera RPMs. The development status is very active, meaning it could be hard to track down the errors or find help with a specific one.<\/p>\n<h4>Permission of \/tmp in HDFS<\/h4>\n<pre>\nFAILED: Unknown exception : org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=mathie, access=WRITE, inode=\"tmp\":hadoop:supergroup:rwxrwxr-x\n<\/pre>\n<p>Solution: You need to turn on full write permissions for \/tmp<\/p>\n<pre>\nsudo -u hadoop hadoop fs -chmod 777 \/tmp\n<\/pre>\n<h4>.hivehistory<\/h4>\n<pre>\n[root@r2 tmp]# sudo -u hadoop hive\nHive history file=\/tmp\/hadoop\/hive_job_log_hadoop_200911142019_988931842.txt\njava.io.FileNotFoundException: \/.hivehistory (Permission denied)\n at java.io.FileOutputStream.open(Native Method)\n at java.io.FileOutputStream.<init>(FileOutputStream.java:179)\n at java.io.FileOutputStream.<init>(FileOutputStream.java:131)\n at java.io.FileWriter.<init>(FileWriter.java:73)\n at jline.History.setHistoryFile(History.java:45)\n at jline.History.<init>(History.java:37)\n at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:298)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:597)\n at org.apache.hadoop.util.RunJar.main(RunJar.java:155)\n at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)\n at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)\n at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)\n at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)\n<\/pre>\n<p>It means your $HOME folder is empty and it&#8217;s trying to create \/.hivehistory on the top level, which of course is not possible. Solution: make sure it&#8217;s a real user with a $HOME (&#8220;echo $HOME&#8221; to check) and not via sudo<\/p>\n<h4>\/etc\/hive\/conf\/hive-site.xml<\/h4>\n<pre>\nhive> show tables;\nFAILED: Error in metadata: javax.jdo.JDODataStoreException: SQL exception: Add classes to Catalog \"\", Schema \"APP\"\nNestedThrowables:\njava.sql.SQLNonTransientConnectionException: No current connection.\nFAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask\nTime taken: 3.142 seconds\n<\/pre>\n<p>Even with embedded mode for metastore, if you run into this problem, look like an issue with Cloudera RPM for Hive that uses ${user.name} not being replaced properly.<\/p>\n<p>Solution: change &#8220;${user.name}&#8221; to an regular folder and Hive works fine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am playing with Hadoop and Hive via Cloudera RPMs. The development status is very active, meaning it could be hard to track down the errors or find help with a specific one. Permission of \/tmp in HDFS FAILED: Unknown exception : org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=mathie, access=WRITE, inode=&#8221;tmp&#8221;:hadoop:supergroup:rwxrwxr-x Solution: You need to turn on full [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/251"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=251"}],"version-history":[{"count":0,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/251\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=251"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}