You can use org.apache.hadoop.hdfs.DistributedFileSystem#isInSafeMode() API call to check if the NameNode is in safe-mode. It returns a simple boolean result.
On Fri, Aug 15, 2014 at 10:26 PM, Satyam Singh <[email protected]> wrote: > Hi Users, > > > > Usually read operation is allowed when namenode is in safemode, due to this > my application is showing faulty behaviour. > > I don't want to do even read operation during safemode state of namenode, > but for this i have to check status of namenode before reading. I couldn't > find any api which show namenode current status. > > Please help how can i fix this problem. > > > > Regards, > Satyam -- Harsh J
