aboutsummaryrefslogtreecommitdiff
path: root/contrib/native/client/src/include
diff options
context:
space:
mode:
authorParth Chandra <parthc@apache.org>2015-05-08 17:53:39 -0700
committerParth Chandra <parthc@apache.org>2015-05-13 10:48:58 -0700
commitffbb9c7adc6360744bee186e1f69d47dc743f73e (patch)
treecbfa56c6eceab49f9475b8a68f41babc0937f0af /contrib/native/client/src/include
parentd1526f9462f6817a76631464ff332bb99b3bdf28 (diff)
DRILL-2998: Implement heartbeat in C++ client
Diffstat (limited to 'contrib/native/client/src/include')
-rw-r--r--contrib/native/client/src/include/drill/common.hpp3
-rw-r--r--contrib/native/client/src/include/drill/drillClient.hpp7
2 files changed, 9 insertions, 1 deletions
diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp
index 2fa09545c..da411499d 100644
--- a/contrib/native/client/src/include/drill/common.hpp
+++ b/contrib/native/client/src/include/drill/common.hpp
@@ -109,7 +109,8 @@ typedef enum{
CONN_HANDSHAKE_TIMEOUT=5,
CONN_HOSTNAME_RESOLUTION_ERROR=6,
CONN_AUTH_FAILED=7,
- CONN_BAD_RPC_VER=8
+ CONN_BAD_RPC_VER=8,
+ CONN_DEAD=9
} 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 d7bf33c07..4568ca1fc 100644
--- a/contrib/native/client/src/include/drill/drillClient.hpp
+++ b/contrib/native/client/src/include/drill/drillClient.hpp
@@ -101,9 +101,11 @@ class DECLSPEC_DRILL_CLIENT DrillClientConfig{
static void setSocketTimeout(int32_t l);
static void setHandshakeTimeout(int32_t l);
static void setQueryTimeout(int32_t l);
+ static void setHeartbeatFrequency(int32_t l);
static int32_t getSocketTimeout();
static int32_t getHandshakeTimeout();
static int32_t getQueryTimeout();
+ static int32_t getHeartbeatFrequency();
static logLevel_t getLogLevel();
private:
// The logging level
@@ -127,10 +129,14 @@ class DECLSPEC_DRILL_CLIENT DrillClientConfig{
*
* s_queryTimeout: (default 180)
* place a timeout on waiting result of querying.
+ *
+ * s_heartbeatFrequency: (default 30)
+ * Seconds of idle activity after which a heartbeat is sent to the drillbit
*/
static int32_t s_socketTimeout;
static int32_t s_handshakeTimeout;
static int32_t s_queryTimeout;
+ static int32_t s_heartbeatFrequency;
static boost::mutex s_mutex;
};
@@ -215,6 +221,7 @@ class DECLSPEC_DRILL_CLIENT RecordIterator{
void registerSchemaChangeListener(pfnSchemaListener l);
+ bool hasError();
/*
* Returns the last error message
*/