Java Code Examples for org.apache.hadoop.security.UserGroupInformation.trimLoginMethod()

The following are Jave code examples for showing how to use trimLoginMethod() of the org.apache.hadoop.security.UserGroupInformation class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: hadoop   File: TopMetrics.java   View Source Code Vote up 5 votes
public void report(long currTime, String userName, String cmd) {
  LOG.debug("a metric is reported: cmd: {} user: {}", cmd, userName);
  userName = UserGroupInformation.trimLoginMethod(userName);
  for (RollingWindowManager rollingWindowManager : rollingWindowManagers
      .values()) {
    rollingWindowManager.recordMetric(currTime, cmd, userName, 1);
    rollingWindowManager.recordMetric(currTime,
        TopConf.ALL_CMDS, userName, 1);
  }
}