Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,12 @@ public void shutdown() {
LOG.warn("Error closing logs ", ie);
}
}
if (authServer != null) {
authServer.shutdown();
}
if (authLearner != null) {
authLearner.shutdown();
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ public void authenticate(Socket sock, String hostname) {
return; // simply return don't require auth
}

@Override
public void shutdown() {
// no-op
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ public void authenticate(final Socket sock, final DataInputStream din) {
// simply return don't require auth
}

@Override
public void shutdown() {
// no-op
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ public interface QuorumAuthLearner {
*/
void authenticate(Socket sock, String hostname) throws IOException;

/**
* Shutdown the learner and release resources.
*/
void shutdown();
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ public interface QuorumAuthServer {
*/
void authenticate(Socket sock, DataInputStream din) throws IOException;

/**
* Shut down the server and release resources.
*/
void shutdown();
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ public void authenticate(Socket sock, String hostName) throws IOException {
}
}

@Override
public void shutdown() {
if (learnerLogin != null) {
learnerLogin.shutdown();
}
}

private void checkAuthStatus(Socket sock, QuorumAuth.Status qpStatus) throws SaslException {
if (qpStatus == QuorumAuth.Status.SUCCESS) {
LOG.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ public void authenticate(Socket sock, DataInputStream din) throws SaslException
}
}

@Override
public void shutdown() {
if (serverLogin != null) {
serverLogin.shutdown();
}
}

private byte[] receive(DataInputStream din) throws IOException {
QuorumAuthPacket authPacket = new QuorumAuthPacket();
BinaryInputArchive bia = BinaryInputArchive.getArchive(din);
Expand Down
Loading