Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/8218#discussion_r37155796
--- Diff:
network/common/src/main/java/org/apache/spark/network/client/TransportClient.java
---
@@ -85,6 +86,24 @@ public SocketAddress getSocketAddress() {
}
/**
+ * Returns the ID used by the client to authenticate itself when
authentication is enabled.
+ *
+ * @return The client ID.
+ */
+ public String getClientId() {
+ return clientId;
+ }
+
+ /**
+ * Sets the authenticated client ID. This is meant to be used by the
authentication layer;
+ * trying to set a different client ID after it's been set will result
in an exception.
+ */
+ public void setClientId(String id) {
+ Preconditions.checkState(clientId == null, "Client ID has already been
set.");
--- End diff --
If I understand correctly, this will never get called when you aren't using
authentication, right? Maybe drop in a comment here explaining that, and on
`getClientId` that it will return `null` without authentication?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]