UGI – UserGroupInformation

Using user group information for hadoop job submitting.

        UserGroupInformation ugi = UserGroupInformation.createRemoteUser("hdfs");

        try {

            ugi.doAs(new PrivilegedExceptionAction() {
                public Void run() throws Exception {
                    //TO-DO
                }
            });

        } catch (Exception e) {
            e.printStackTrace();
        }

Leave a Reply

Your email address will not be published. Required fields are marked *