/** * there are issues with hdfs and running as a remote user InputFormats should be running in the * cluster and should alerday be the right user * * @return true is you are running on the cluster */ @Override public boolean isRunningAsUser() { Configuration cong = new Configuration(); try { // if(true) throw new UnsupportedOperationException("Uncomment when using // version 1.0.*"); UserGroupInformation uig = UserGroupInformation.getCurrentUser(); String userName = uig.getShortUserName(); String user = RemoteUtilities.getUser(); return user.equals(userName); } catch (Exception e) { throw new RuntimeException(e); } // return false; }