aboutsummaryrefslogtreecommitdiff
path: root/contrib/native/client/src/include
diff options
context:
space:
mode:
authorParth Chandra <parthc@apache.org>2017-07-24 12:55:02 -0700
committerParth Chandra <parthc@apache.org>2017-10-11 19:27:48 -0700
commitf246c3cad7f44baeb8153913052ebc963c62276a (patch)
treee9a9457ae955876e4805f14ed0bc7db1dc253bc4 /contrib/native/client/src/include
parentfacbb92ba319373dd8b8baa171ac1d7978c926c5 (diff)
DRILL-5431: SSL Support (C++) - Update DrillClientImpl to use Channel implementation
Also remove ChannelContextFactory and merge it into ChannelFactory
Diffstat (limited to 'contrib/native/client/src/include')
-rw-r--r--contrib/native/client/src/include/drill/common.hpp7
-rw-r--r--contrib/native/client/src/include/drill/drillConfig.hpp22
-rw-r--r--contrib/native/client/src/include/drill/userProperties.hpp9
3 files changed, 10 insertions, 28 deletions
diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp
index 012bd1974..d8e2da78d 100644
--- a/contrib/native/client/src/include/drill/common.hpp
+++ b/contrib/native/client/src/include/drill/common.hpp
@@ -165,6 +165,10 @@ typedef enum{
RET_FAILURE=1
} ret_t;
+// Connect string protocol types
+#define PROTOCOL_TYPE_ZK "zk"
+#define PROTOCOL_TYPE_DIRECT "drillbit"
+#define PROTOCOL_TYPE_DIRECT_2 "local"
// User Property Names
#define USERPROP_USERNAME "userName"
@@ -173,7 +177,8 @@ typedef enum{
#define USERPROP_USESSL "enableTLS"
#define USERPROP_TLSPROTOCOL "TLSProtocol" //TLS version
#define USERPROP_CERTFILEPATH "certFilePath" // pem file path and name
-#define USERPROP_CERTPASSWORD "certPassword" // Password for certificate file
+// TODO: support truststore protected by password.
+// #define USERPROP_CERTPASSWORD "certPassword" // Password for certificate file.
#define USERPROP_DISABLE_HOSTVERIFICATION "disableHostVerification"
#define USERPROP_DISABLE_CERTVERIFICATION "disableCertVerification"
#define USERPROP_USESYSTEMTRUSTSTORE "useSystemTrustStore" //Windows only, use the system trust store
diff --git a/contrib/native/client/src/include/drill/drillConfig.hpp b/contrib/native/client/src/include/drill/drillConfig.hpp
index 669267d86..46bbbb2d2 100644
--- a/contrib/native/client/src/include/drill/drillConfig.hpp
+++ b/contrib/native/client/src/include/drill/drillConfig.hpp
@@ -21,27 +21,7 @@
#define DRILL_CONFIG_H
#include "drill/common.hpp"
-#include <boost/thread.hpp>
-
-
-
-#if defined _WIN32 || defined __CYGWIN__
- #ifdef DRILL_CLIENT_EXPORTS
- #define DECLSPEC_DRILL_CLIENT __declspec(dllexport)
- #else
- #ifdef USE_STATIC_LIBDRILL
- #define DECLSPEC_DRILL_CLIENT
- #else
- #define DECLSPEC_DRILL_CLIENT __declspec(dllimport)
- #endif
- #endif
-#else
- #if __GNUC__ >= 4
- #define DECLSPEC_DRILL_CLIENT __attribute__ ((visibility ("default")))
- #else
- #define DECLSPEC_DRILL_CLIENT
- #endif
-#endif
+#include <boost/thread/mutex.hpp>
namespace exec{
namespace shared{
diff --git a/contrib/native/client/src/include/drill/userProperties.hpp b/contrib/native/client/src/include/drill/userProperties.hpp
index 3490dce7a..62a04f787 100644
--- a/contrib/native/client/src/include/drill/userProperties.hpp
+++ b/contrib/native/client/src/include/drill/userProperties.hpp
@@ -36,20 +36,17 @@ class DECLSPEC_DRILL_CLIENT DrillUserProperties{
size_t size() const { return m_properties.size(); }
- //const std::string& keyAt(size_t i) const { return m_properties.at(i).first; }
-
- //const std::string& valueAt(size_t i) const { return m_properties.at(i).second; }
-
const bool isPropSet(const std::string& key) const{
bool isSet=true;
- auto f= m_properties.find(key);
+ std::map<std::string, std::string>::const_iterator f=m_properties.find(key);
if(f==m_properties.end()){
isSet=false;
}
return isSet;
}
+
const std::string& getProp(const std::string& key, std::string& value) const{
- auto f= m_properties.find(key);
+ std::map<std::string, std::string>::const_iterator f=m_properties.find(key);
if(f!=m_properties.end()){
value=f->second;
}