Search in sources :

Example 1 with QualityOfProtection

use of org.apache.hadoop.security.SaslRpcServer.QualityOfProtection in project hadoop by apache.

the class TestSaslRPC method data.

@Parameters
public static Collection<Object[]> data() {
    Collection<Object[]> params = new ArrayList<>();
    for (QualityOfProtection qop : QualityOfProtection.values()) {
        params.add(new Object[] { new QualityOfProtection[] { qop }, qop, null });
    }
    params.add(new Object[] { new QualityOfProtection[] { QualityOfProtection.PRIVACY, QualityOfProtection.AUTHENTICATION }, QualityOfProtection.PRIVACY, null });
    params.add(new Object[] { new QualityOfProtection[] { QualityOfProtection.PRIVACY, QualityOfProtection.AUTHENTICATION }, QualityOfProtection.AUTHENTICATION, "org.apache.hadoop.ipc.TestSaslRPC$AuthSaslPropertiesResolver" });
    return params;
}
Also used : QualityOfProtection(org.apache.hadoop.security.SaslRpcServer.QualityOfProtection) ArrayList(java.util.ArrayList) Parameters(org.junit.runners.Parameterized.Parameters)

Example 2 with QualityOfProtection

use of org.apache.hadoop.security.SaslRpcServer.QualityOfProtection in project hadoop by apache.

the class TestSaslRPC method getQOPNames.

static String getQOPNames(QualityOfProtection[] qops) {
    StringBuilder sb = new StringBuilder();
    int i = 0;
    for (QualityOfProtection qop : qops) {
        sb.append(org.apache.hadoop.util.StringUtils.toLowerCase(qop.name()));
        if (++i < qops.length) {
            sb.append(",");
        }
    }
    return sb.toString();
}
Also used : QualityOfProtection(org.apache.hadoop.security.SaslRpcServer.QualityOfProtection)

Aggregations

QualityOfProtection (org.apache.hadoop.security.SaslRpcServer.QualityOfProtection)2 ArrayList (java.util.ArrayList)1 Parameters (org.junit.runners.Parameterized.Parameters)1