HBASE-23939 Remove unused variables from HBaseSaslRpcServer (#1239)

Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Jan Hentschel <janh@apache.org>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
Wellington Ramos Chevreuil 2020-03-06 10:05:04 +00:00 committed by GitHub
parent 4ef326be15
commit 9c67abef18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View File

@ -349,8 +349,7 @@ abstract class ServerRpcConnection implements Closeable {
try { try {
if (saslServer == null) { if (saslServer == null) {
saslServer = saslServer =
new HBaseSaslRpcServer( new HBaseSaslRpcServer(provider, rpcServer.saslProps, rpcServer.secretManager);
rpcServer.getConf(), provider, rpcServer.saslProps, rpcServer.secretManager);
RpcServer.LOG.debug("Created SASL server with mechanism={}", RpcServer.LOG.debug("Created SASL server with mechanism={}",
provider.getSaslAuthMethod().getAuthMethod()); provider.getSaslAuthMethod().getAuthMethod());
} }

View File

@ -27,7 +27,6 @@ import javax.security.sasl.Sasl;
import javax.security.sasl.SaslException; import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer; import javax.security.sasl.SaslServer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.security.provider.AttemptingUserProvidingSaslServer; import org.apache.hadoop.hbase.security.provider.AttemptingUserProvidingSaslServer;
import org.apache.hadoop.hbase.security.provider.SaslServerAuthenticationProvider; import org.apache.hadoop.hbase.security.provider.SaslServerAuthenticationProvider;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
@ -35,8 +34,6 @@ import org.apache.hadoop.security.token.SecretManager;
import org.apache.hadoop.security.token.SecretManager.InvalidToken; import org.apache.hadoop.security.token.SecretManager.InvalidToken;
import org.apache.hadoop.security.token.TokenIdentifier; import org.apache.hadoop.security.token.TokenIdentifier;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* A utility class that encapsulates SASL logic for RPC server. Copied from * A utility class that encapsulates SASL logic for RPC server. Copied from
@ -45,12 +42,10 @@ import org.slf4j.LoggerFactory;
@InterfaceAudience.Private @InterfaceAudience.Private
public class HBaseSaslRpcServer { public class HBaseSaslRpcServer {
private static final Logger LOG = LoggerFactory.getLogger(HBaseSaslRpcServer.class);
private final AttemptingUserProvidingSaslServer serverWithProvider; private final AttemptingUserProvidingSaslServer serverWithProvider;
private final SaslServer saslServer; private final SaslServer saslServer;
public HBaseSaslRpcServer(Configuration conf, SaslServerAuthenticationProvider provider, public HBaseSaslRpcServer(SaslServerAuthenticationProvider provider,
Map<String, String> saslProps, SecretManager<TokenIdentifier> secretManager) Map<String, String> saslProps, SecretManager<TokenIdentifier> secretManager)
throws IOException { throws IOException {
serverWithProvider = provider.createServer(secretManager, saslProps); serverWithProvider = provider.createServer(secretManager, saslProps);