A Java Hdfs client example and full Kerberos example for call hadoop commands directly in java code or on your local machine.