aboutsummaryrefslogtreecommitdiff
path: root/contrib/native/client/src/include
diff options
context:
space:
mode:
authorParth Chandra <parthc@apache.org>2016-02-12 15:42:53 -0800
committerParth Chandra <parthc@apache.org>2016-03-07 17:49:50 -0800
commitdf0f0af3d963c1b65eb01c3141fe84532c53f5a5 (patch)
tree1aee84f184cddafb7e89815a87dbf29d9fadaf20 /contrib/native/client/src/include
parenta2fec78695df979e240231cb9d32c7f18274a333 (diff)
DRILL-4313: C++ Client - Thread safe Logging. Improved Drill bit selection.
- Update random drill bit selection. Shuffle the list initially, then round robin. Add Utility methods to get random numbers and to shuffle and add vectors. Whitespace cleanup - Add Git properties to build and print to log. - Add interface to get error based on query handle. - Add support for Pooled connections. Allows switching between pooled and unpooled connections based on environment variables
Diffstat (limited to 'contrib/native/client/src/include')
-rw-r--r--contrib/native/client/src/include/drill/common.hpp9
-rw-r--r--contrib/native/client/src/include/drill/drillClient.hpp7
2 files changed, 14 insertions, 2 deletions
diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp
index bb8e2b4a3..a617dc71f 100644
--- a/contrib/native/client/src/include/drill/common.hpp
+++ b/contrib/native/client/src/include/drill/common.hpp
@@ -45,6 +45,11 @@
#define MEM_CHUNK_SIZE 64*1024; // 64K
#define MAX_MEM_ALLOC_SIZE 256*1024*1024; // 256 MB
+#define MAX_BATCH_SIZE 65536; // see RecordBatch.java
+#define ENABLE_CONNECTION_POOL_ENV "DRILL_ENABLE_CONN_POOL"
+#define DEFAULT_MAX_CONCURRENT_CONNECTIONS 10
+#define MAX_CONCURRENT_CONNECTIONS_ENV "DRILL_MAX_CONN"
+
#ifdef _DEBUG
#define EXTRA_DEBUGGING
#define CODER_DEBUGGING
@@ -110,7 +115,9 @@ typedef enum{
CONN_HOSTNAME_RESOLUTION_ERROR=6,
CONN_AUTH_FAILED=7,
CONN_BAD_RPC_VER=8,
- CONN_DEAD=9
+ CONN_DEAD=9,
+ CONN_NOTCONNECTED=10,
+ CONN_ALREADYCONNECTED=11
} connectionStatus_t;
typedef enum{
diff --git a/contrib/native/client/src/include/drill/drillClient.hpp b/contrib/native/client/src/include/drill/drillClient.hpp
index 4568ca1fc..a74f4bdc7 100644
--- a/contrib/native/client/src/include/drill/drillClient.hpp
+++ b/contrib/native/client/src/include/drill/drillClient.hpp
@@ -53,6 +53,7 @@ namespace exec{
namespace Drill{
//struct UserServerEndPoint;
+class DrillClientImplBase;
class DrillClientImpl;
class DrillClientQueryResult;
class FieldMetadata;
@@ -340,6 +341,10 @@ class DECLSPEC_DRILL_CLIENT DrillClient{
std::string& getError();
/*
+ * Returns the error message associated with the query handle
+ */
+ const std::string& getError(QueryHandle_t handle);
+ /*
* Applications using the async query submit method can register a listener for schema changes
*
*/
@@ -369,7 +374,7 @@ class DECLSPEC_DRILL_CLIENT DrillClient{
static DrillClientInitializer s_init;
static DrillClientConfig s_config;
- DrillClientImpl * m_pImpl;
+ DrillClientImplBase * m_pImpl;
};
} // namespace Drill