Java Code Examples for org.apache.hadoop.security.token.TokenSelector

The following examples show how to use org.apache.hadoop.security.token.TokenSelector. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: hadoop   Source File: ContainerManagerSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(ContainerManagementProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return NMTokenSelector.class;
    }
  };

}
 
Example 2
Source Project: hadoop   Source File: SchedulerSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(ApplicationMasterProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return AMRMTokenSelector.class;
    }
  };
}
 
Example 3
Source Project: hadoop   Source File: ClientRMSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(ApplicationClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return RMDelegationTokenSelector.class;
    }
  };
}
 
Example 4
Source Project: hadoop   Source File: ClientTimelineSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(ApplicationHistoryProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return TimelineDelegationTokenSelector.class;
    }
  };
}
 
Example 5
Source Project: hadoop   Source File: LocalizerSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(LocalizationProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      LOG.debug("Using localizerTokenSecurityInfo");
      return LocalizerTokenSelector.class;
    }
  };
}
 
Example 6
Source Project: hadoop   Source File: TestClientToAMTokens.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
Example 7
Source Project: hadoop   Source File: MRClientSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(MRClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
Example 8
Source Project: hadoop   Source File: ClientHSSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(HSClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientHSTokenSelector.class;
    }
  };  }
 
Example 9
Source Project: big-c   Source File: ContainerManagerSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(ContainerManagementProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return NMTokenSelector.class;
    }
  };

}
 
Example 10
Source Project: big-c   Source File: SchedulerSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(ApplicationMasterProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return AMRMTokenSelector.class;
    }
  };
}
 
Example 11
Source Project: big-c   Source File: ClientRMSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(ApplicationClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return RMDelegationTokenSelector.class;
    }
  };
}
 
Example 12
Source Project: big-c   Source File: ClientTimelineSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(ApplicationHistoryProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return TimelineDelegationTokenSelector.class;
    }
  };
}
 
Example 13
Source Project: big-c   Source File: LocalizerSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(LocalizationProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      LOG.debug("Using localizerTokenSecurityInfo");
      return LocalizerTokenSelector.class;
    }
  };
}
 
Example 14
Source Project: big-c   Source File: TestClientToAMTokens.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
Example 15
Source Project: big-c   Source File: MRClientSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(MRClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
Example 16
Source Project: big-c   Source File: ClientHSSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol
      .equals(HSClientProtocolPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientHSTokenSelector.class;
    }
  };  }
 
Example 17
Source Project: incubator-tez   Source File: DAGClientSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(DAGClientAMProtocolBlockingPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
Example 18
Source Project: tez   Source File: DAGClientSecurityInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  if (!protocol.equals(DAGClientAMProtocolBlockingPB.class)) {
    return null;
  }
  return new TokenInfo() {

    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }

    @Override
    public Class<? extends TokenSelector<? extends TokenIdentifier>>
        value() {
      return ClientToAMTokenSelector.class;
    }
  };
}
 
Example 19
Source Project: hadoop   Source File: TestSaslRPC.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  return new TokenInfo() {
    @Override
    public Class<? extends TokenSelector<? extends 
        TokenIdentifier>> value() {
      return TestTokenSelector.class;
    }
    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }
  };
}
 
Example 20
Source Project: big-c   Source File: TestSaslRPC.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
  return new TokenInfo() {
    @Override
    public Class<? extends TokenSelector<? extends 
        TokenIdentifier>> value() {
      return TestTokenSelector.class;
    }
    @Override
    public Class<? extends Annotation> annotationType() {
      return null;
    }
  };
}