[
https://issues.apache.org/jira/browse/DRILL-5968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254432#comment-16254432
]
ASF GitHub Bot commented on DRILL-5968:
---------------------------------------
Github user superbstreak commented on a diff in the pull request:
https://github.com/apache/drill/pull/1037#discussion_r151282112
--- Diff: contrib/native/client/src/include/drill/userProperties.hpp ---
@@ -28,6 +28,20 @@ class DECLSPEC_DRILL_CLIENT DrillUserProperties{
static const std::map<std::string, uint32_t> USER_PROPERTIES;
DrillUserProperties(){};
+
+ /// @brief Insert or update property value associate with the
property key if the value is
+ /// empty or key is undefined. This function is useful for setting
default property.
+ ///
+ /// @param in_propName The property name.
+ /// @param in_propValue The property value.
+ void SetDefaultProperty(const std::string& in_propName, const
std::string& in_propValue)
+ {
+ // If the element value is empty (newly inserted or user
defined), then update.
+ if (m_properties[in_propName].empty())
--- End diff --
If the value doesn't exist, the original implementation with the
setProperty(2) would also insert a new key. Not sure if that was intended or
not.
> C++ Client should set service_host to the connected host if service_host is
> empty
> ---------------------------------------------------------------------------------
>
> Key: DRILL-5968
> URL: https://issues.apache.org/jira/browse/DRILL-5968
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Parth Chandra
>
> In the ODBC driver -
> The krbSpnConfigurationsRequired parameter in odbc.ini is not working as
> expected. If I set the following:
> AuthenticationType=Kerberos
> UID=
> PWD=
> DelegationUID=
> KrbServiceName=
> KrbServiceHost=maprsasl
> krbSpnConfigurationsRequired=1
> I could connect successfully. I was expecting to get an error message. If
> only either KrbServiceHost is missing or both KrbServiceHost and
> KrbServiceName are missing then I get the expected error message.
> Turning off the parameter, I was able to connect using the following setting:
> AuthenticationType=Kerberos
> UID=
> PWD=
> DelegationUID=
> KrbServiceName=
> KrbServiceHost=maprsasl
> krbSpnConfigurationsRequired=0
> However, if either KrbServiceHost or both KrbServiceHost and KrbServiceName
> are missing, I would get the following error message:
> 1: SQLDriverConnect = [MapR][Drill] (30) User authentication failed. Server
> message: DrillClientImpl::handleAuthentication: Authentication failed.
> [Details: Encryption: enabled ,MaxWrappedSize: 32768 ,WrapSizeLimit: 0,
> Error: -1]. Check connection parameters? (30) SQLSTATE=28000
> 1: ODBC_Connect = [MapR][Drill] (30) User authentication failed. Server
> message: DrillClientImpl::handleAuthentication: Authentication failed.
> [Details: Encryption: enabled ,MaxWrappedSize: 32768 ,WrapSizeLimit: 0,
> Error: -1]. Check connection parameters? (30) SQLSTATE=28000
> The Drill C++ Client should set service_host to the connected host (if
> direct) if service_host is empty (similar logic for zookeeper connection).
> Going through the source code, looks like this logic was removed by this
> commit:
> https://github.com/apache/drill/commit/f246c3cad7f44baeb8153913052ebc963c62276a#diff-8e6df071d8ca863fcfa578892944c1dcL123
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)