2

When I try to run the "hive" command from the shell I get the following error:

'Exception in thread "main" java.io.IOException: Mkdirs failed to create /tmp/hadoop-USERNAME/hadoop-unjar1448268252380539144 at org.apache.hadoop.util.RunJar.ensureDirectory(RunJar.java:100) at org.apache.hadoop.util.RunJar.main(RunJar.java:162)'.

But when I try and select query in PHP script, we received the following error:

'FAILED: Hive Internal Error: java.lang.RuntimeException(org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /tmp/hive-root/hive_2015-06-29_18-03-29_493_5508174623301334280. Name node is in safe mode. Resources are low on NN. Safe mode must be turned off manually. at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:2140) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:2114) at org.apache.hadoop.hdfs.server.namenode.NameNode.mkdirs(NameNode.java:892) at sun.reflect.GeneratedMethodAccessor2286.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:557)'

sbrahma
  • 21
  • 2

2 Answers2

0

This was due the cluster automatically entered in safe mode. We fixed it by freeing/adding some disk space.

fgalan
  • 11,732
  • 9
  • 46
  • 89
frb
  • 3,738
  • 2
  • 21
  • 51
0

the "df -h" commands shows:

tmpfs 4,9G 0 4,9G 0% /dev/shm

The partition is free. The problem, unexpecedly, is gone even if I have not erased any data. There are another problem on hive instance. When I try to launch a select query on some fields the hive cli map reduced returns this error:

Ended Job = job_201409031055_6624 with errors Error during job, obtaining debugging information... Examining task ID: task_201409031055_6624_m_000002 (and more) from job job_201409031055_6624

Task with the most failures(4):

Task ID: task_201409031055_6624_m_000000

URL:

http://cosmosmaster-gi:50030/taskdetails.jsp?jobid=job_201409031055_6624&tipid=task_201409031055_6624_m_000000

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask MapReduce Jobs Launched: Job 0: Map: 1 HDFS Read: 0 HDFS Write: 0 FAIL Total MapReduce CPU Time Spent: 0 msec

sbrahma
  • 21
  • 2