FAQ
*Hi,
I have installed hadoop-0.19.2 on my system and I am using Hive to
access the data on HDFS. But when I starting the hadoop server and trying to
print the data stored in the table using hive CLI, it is throwing the
following exception.*

*hive> select * from <table_name>;
FAILED: Unknown exception : org.apache.hadoop.ipc.RemoteException:
org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create
directory /tmp/hive-hadoop/756358679. Name node is in safe mode.*
The ratio of reported blocks 0.1667 has not reached the threshold 0.9990.
Safe mode will be turned off automatically.
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:1773)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:1747)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.mkdirs(NameNode.java:471)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
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:481)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:894)

*To temporary solve this problem , I am turning Name node from safe mode to
unsafe mode by firing a command "hadoop dfsadmin -safemode leave" on hadoop.

Can someone explain me why this problem is happening and what is the
permanent solution of this problem. Also what are disadvantageous of
running the Name node in an unsafe mode.

Thanking You
Mohan Agarwal
*

Search Discussions

  • Mohan Agarwal at Nov 20, 2009 at 5:16 am
    *Hi,
    I have installed hadoop-0.19.2 on my system and I am using Hive to
    access the data on HDFS. But when I starting the hadoop server and trying to
    print the data stored in the table using hive CLI, it is throwing the
    following exception.*

    *hive> select * from <table_name>;
    FAILED: Unknown exception : org.apache.hadoop.ipc.RemoteException:
    org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create
    directory /tmp/hive-hadoop/756358679. Name node is in safe mode.*
    The ratio of reported blocks 0.1667 has not reached the threshold 0.9990.
    Safe mode will be turned off automatically.
    at org.apache.hadoop.hdfs.server.
    namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:1773)
    at
    org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:1747)
    at
    org.apache.hadoop.hdfs.server.namenode.NameNode.mkdirs(NameNode.java:471)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    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:481)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:894)

    *To temporary solve this problem , I am turning Name node from safe mode to
    unsafe mode by firing a command "hadoop dfsadmin -safemode leave" on hadoop.

    Can someone explain me why this problem is happening and what is the
    permanent solution of this problem. Also what are disadvantageous of
    running the Name node in an unsafe mode.

    Thanking You
    Mohan Agarwal
    *
  • Edward Capriolo at Nov 20, 2009 at 2:36 pm

    On Fri, Nov 20, 2009 at 12:15 AM, Mohan Agarwal wrote:
    Hi,
    I have installed hadoop-0.19.2 on my system and I am using Hive to
    access the data on HDFS. But when I starting the hadoop server and trying to
    print the data stored in the table using hive CLI, it is throwing the
    following exception.

    hive> select * from <table_name>;
    FAILED: Unknown exception : org.apache.hadoop.ipc.RemoteException:
    org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create
    directory /tmp/hive-hadoop/756358679. Name node is in safe mode.
    The ratio of reported blocks 0.1667 has not reached the threshold 0.9990.
    Safe mode will be turned off automatically.
    at org.apache.hadoop.hdfs.server.
    namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:1773)
    at
    org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:1747)
    at
    org.apache.hadoop.hdfs.server.namenode.NameNode.mkdirs(NameNode.java:471)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    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:481)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:894)

    To temporary solve this problem , I am turning Name node from safe mode to
    unsafe mode by firing a command "hadoop dfsadmin -safemode leave" on hadoop.

    Can someone explain me why this problem is happening and what is the
    permanent solution of this problem. Also what are disadvantageous of
    running the Name node in an unsafe mode.

    Thanking You
    Mohan Agarwal
    The nameNode is in safemode for a period of 30 seconds after startup
    then it should automatically leave safemode as the message suggests.

    FAILED: Unknown exception : org.apache.hadoop.ipc.RemoteException:
    org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot
    create directory /tmp/hive-hadoop/756358679. Name node is in safe
    mode.

    The ratio of reported blocks 0.1667 has not reached the threshold
    0.9990. Safe mode will be turned off automatically.

    If your name node does not leave safemode you should run fsck
    "bin/hadoop namenode fsck /" and see if anything is wrong with the
    system causing it to stay in safemode.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedNov 20, '09 at 5:10a
activeNov 20, '09 at 2:36p
posts3
users2
websitehive.apache.org

2 users in discussion

Mohan Agarwal: 2 posts Edward Capriolo: 1 post

People

Translate

site design / logo © 2021 Grokbase