Learn Geek languages like Big data,Hadoop,Hive,Pig,Sqoop ,flume,Cassandra,Hbase,Ruby On Rails,Python,Java and many more.

Tuesday 27 June 2017

dfsadmin tool provide the commands to handle the safe mode.

The commands are-

1. hdfs dfsadmin -safemode get

This command will show if the name node is in safe mode or not
Output will be

Safe mode is ON (if namenode is in safe mode)
Safe mode is OFF (if namenode is not in safe mode)

2 .hdfs dfsadmin -safemode enter

 This command will take the namenode into the safe mode
 Output will be  -

 Safe mode is ON

3.hdfs dfsadmin -safemode leave

This command will force the namenode to come out of safe mode. It will be better if nameode is allowed to come out of safe mode itself.
Output will be -

Safe mode is OFF

Friday 23 June 2017


CODE

#include <iostream>
using namespace std;

int addition (int a, int b)
{
  int r;
  r=a+b;
  return r;
}

int main ()
{
  int z;
  z = addition (5,3);
  cout << "The result is " << z;
}


Output:

The result is 8

CODE:

#include <iostream>
using namespace std;

void printmessage ()
{
  cout << "I'm a function!";
}

int main ()
{
  printmessage ();
}

Output:

I'm a Function!