Search in sources :

Example 1 with GetGroupsForUserRequestProto

use of org.apache.hadoop.tools.proto.GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto in project hadoop by apache.

the class GetUserMappingsProtocolClientSideTranslatorPB method getGroupsForUser.

@Override
public String[] getGroupsForUser(String user) throws IOException {
    GetGroupsForUserRequestProto request = GetGroupsForUserRequestProto.newBuilder().setUser(user).build();
    GetGroupsForUserResponseProto resp;
    try {
        resp = rpcProxy.getGroupsForUser(NULL_CONTROLLER, request);
    } catch (ServiceException se) {
        throw ProtobufHelper.getRemoteException(se);
    }
    return resp.getGroupsList().toArray(new String[resp.getGroupsCount()]);
}
Also used : ServiceException(com.google.protobuf.ServiceException) GetGroupsForUserResponseProto(org.apache.hadoop.tools.proto.GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto) GetGroupsForUserRequestProto(org.apache.hadoop.tools.proto.GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 GetGroupsForUserRequestProto (org.apache.hadoop.tools.proto.GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto)1 GetGroupsForUserResponseProto (org.apache.hadoop.tools.proto.GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto)1