diff options
author | Xiao Meng <xiaom.cs@gmail.com> | 2014-07-11 16:26:16 -0700 |
---|---|---|
committer | Jacques Nadeau <jacques@apache.org> | 2014-08-11 21:32:22 -0700 |
commit | 323084b0b9ff53d9f0737748dc920ad9ca4611d0 (patch) | |
tree | aeff790f03f34c6d253503d8b889cf850b1d33ea /contrib/native/client/src/include | |
parent | 441886430e8cc77b60b7b90123fd2443304b7924 (diff) |
DRILL-1137: C++ Client. Support setting default schema in the connection phase.
Diffstat (limited to 'contrib/native/client/src/include')
-rw-r--r-- | contrib/native/client/src/include/drill/drillClient.hpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/contrib/native/client/src/include/drill/drillClient.hpp b/contrib/native/client/src/include/drill/drillClient.hpp index 6d59afb5d..d03f88dad 100644 --- a/contrib/native/client/src/include/drill/drillClient.hpp +++ b/contrib/native/client/src/include/drill/drillClient.hpp @@ -185,8 +185,35 @@ class DECLSPEC_DRILL_CLIENT DrillClient{ // change the logging level static void initLogging(const char* path, logLevel_t l); - /* connects the client to a Drillbit UserServer. */ - connectionStatus_t connect(const char* connectStr); + /** + * Connect the client to a Drillbit using connection string and default schema. + * + * The connection string format can be found in comments of + * [DRILL-780](https://issues.apache.org/jira/browse/DRILL-780) + * + * To connect via zookeeper, use the format: + * "zk=zk1:port[,zk2:p2,...][/<path_to_drill_root>/<cluster_id>]". + * + * e.g. + * ``` + * zk=localhost:2181 + * zk=localhost:2181/drill/drillbits1 + * zk=localhost:2181,zk2:2181/drill/drillbits1 + * ``` + * + * To connect directly to a drillbit, use the format "local=host:port". + * + * e.g. + * ``` + * local=127.0.0.1:31010 + * ``` + * + * @param[in] connectStr: connection string + * @param[in] defaultSchema: default schema (set to NULL and ignore it + * if not specified) + * @return connection status + */ + connectionStatus_t connect(const char* connectStr, const char* defaultSchema=NULL); /* test whether the client is active */ bool isActive(); |