Return-Path: X-Original-To: apmail-drill-commits-archive@www.apache.org Delivered-To: apmail-drill-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 056FD17EAB for ; Wed, 6 May 2015 05:26:18 +0000 (UTC) Received: (qmail 13747 invoked by uid 500); 6 May 2015 05:26:17 -0000 Delivered-To: apmail-drill-commits-archive@drill.apache.org Received: (qmail 13704 invoked by uid 500); 6 May 2015 05:26:17 -0000 Mailing-List: contact commits-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@drill.apache.org Delivered-To: mailing list commits@drill.apache.org Received: (qmail 13647 invoked by uid 99); 6 May 2015 05:26:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 05:26:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6BD2DE3596; Wed, 6 May 2015 05:26:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: parthc@apache.org To: commits@drill.apache.org Date: Wed, 06 May 2015 05:26:24 -0000 Message-Id: <7f836947853a4758a483845afb721e2b@git.apache.org> In-Reply-To: <5e8b37a2711f4b418d6cc2fad7f48f6c@git.apache.org> References: <5e8b37a2711f4b418d6cc2fad7f48f6c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [8/9] drill git commit: DRILL-2885: Return more precise error codes on handshake failures in C++ client DRILL-2885: Return more precise error codes on handshake failures in C++ client Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/0e161417 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/0e161417 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/0e161417 Branch: refs/heads/master Commit: 0e161417715652339580c4c6b1f630676b260997 Parents: 60c0f86 Author: norrislee Authored: Fri May 1 16:20:32 2015 -0700 Committer: Parth Chandra Committed: Tue May 5 19:29:18 2015 -0700 ---------------------------------------------------------------------- contrib/native/client/src/clientlib/drillClientImpl.cpp | 4 ++-- contrib/native/client/src/include/drill/common.hpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/0e161417/contrib/native/client/src/clientlib/drillClientImpl.cpp ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/clientlib/drillClientImpl.cpp b/contrib/native/client/src/clientlib/drillClientImpl.cpp index 5bbbeb8..eca0e75 100644 --- a/contrib/native/client/src/clientlib/drillClientImpl.cpp +++ b/contrib/native/client/src/clientlib/drillClientImpl.cpp @@ -340,14 +340,14 @@ connectionStatus_t DrillClientImpl::validateHandshake(DrillUserProperties* prope case exec::user::RPC_VERSION_MISMATCH: DRILL_LOG(LOG_TRACE) << "Invalid rpc version. Expected " << DRILL_RPC_VERSION << ", actual "<< m_handshakeVersion << "." << std::endl; - return handleConnError(CONN_HANDSHAKE_FAILED, + return handleConnError(CONN_BAD_RPC_VER, getMessage(ERR_CONN_BAD_RPC_VER, DRILL_RPC_VERSION, m_handshakeVersion, this->m_handshakeErrorId.c_str(), this->m_handshakeErrorMsg.c_str())); case exec::user::AUTH_FAILED: DRILL_LOG(LOG_TRACE) << "Authentication failed." << std::endl; - return handleConnError(CONN_HANDSHAKE_FAILED, + return handleConnError(CONN_AUTH_FAILED, getMessage(ERR_CONN_AUTHFAIL, this->m_handshakeErrorId.c_str(), this->m_handshakeErrorMsg.c_str())); http://git-wip-us.apache.org/repos/asf/drill/blob/0e161417/contrib/native/client/src/include/drill/common.hpp ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp index 6662754..2fa0954 100644 --- a/contrib/native/client/src/include/drill/common.hpp +++ b/contrib/native/client/src/include/drill/common.hpp @@ -107,7 +107,9 @@ typedef enum{ CONN_INVALID_INPUT=3, CONN_ZOOKEEPER_ERROR=4, CONN_HANDSHAKE_TIMEOUT=5, - CONN_HOSTNAME_RESOLUTION_ERROR=6 + CONN_HOSTNAME_RESOLUTION_ERROR=6, + CONN_AUTH_FAILED=7, + CONN_BAD_RPC_VER=8 } connectionStatus_t; typedef enum{