Step 17: Verify that Kerberos Security is Working

After you have Kerberos credentials, you can verify that Kerberos security is working on your cluster by trying to run MapReduce jobs. To confirm, try launching a sleep or a pi job from the provided Hadoop examples (/usr/lib/hadoop/hadoop-examples.jar).

To verify that Kerberos security is working:

  1. Acquire Kerberos credentials for your user account.
    $ kinit USERNAME@YOUR-LOCAL-REALM.COM 
  2. Enter a password when prompted.
  3. Submit a sample pi calculation as a test MapReduce job. Use the following command if you use a package-based setup for Cloudera Manager:
    $ hadoop jar /usr/lib/hadoop-0.20/hadoop-0.20.2*examples.jar pi 10 10000
    Number of Maps = 10
    Samples per Map = 10000
    ...
    Job Finished in 38.572 seconds
    Estimated value of Pi is 3.14120000000000000000
    If you have a parcel-based setup, use the following command instead:
    $ hadoop jar /opt/cloudera/parcels/CDH/lib/hadoop-0.20-mapreduce/hadoop-examples.jar pi 10 10000
    Number of Maps = 10
    Samples per Map = 10000
    ...
    Job Finished in 30.958 seconds
    Estimated value of Pi is 3.14120000000000000000

You have now verified that Kerberos security is working on your cluster.