Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/622#discussion_r84154532
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java ---
@@ -176,6 +181,23 @@ public void setAutoRead(boolean enableAutoRead) {
}
/**
+ * Sets the client name.
+ *
+ * If not set, default is {@code DrillClient#DEFAULT_CLIENT_NAME}.
+ *
+ * @param name the client name
+ *
+ * @throws IllegalStateException if called after a connection has been
established.
+ * @throws NullPointerException if client name is null
--- End diff --
Old clients won't know to provide a name. The name will thus be null. But,
we throw an NPE in this case. Two issues.
First, is an NPE the right way to communicate to a (new) client that it
failed to follow the (now required) protocol? Should this be translated to some
kind of protocol exception somewhere? If so, how will we know that this is an
NPE from a protocol error vs just a code bug?
Second, where do we handle the case that a client does not provide a name?
There should be a reasonable default (which seems to be the default name, but
this bit is no exactly clear.)
---
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.
---