Skip to content

Commit 43bfd8a

Browse files
author
Michael Fero
committed
Merge remote-tracking branch 'dse/unified_driver'
2 parents c6a297d + b442f59 commit 43bfd8a

28 files changed

Lines changed: 96 additions & 72 deletions

.build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ SHA=$(echo ${GIT_COMMIT} | cut -c1-7)
2727

2828
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
2929
if [ "${OS_NAME}" = "osx" ]; then
30+
LIB_SUFFIX="dylib"
3031
PROCS=$(sysctl -n hw.logicalcpu)
3132
. ${SCRIPT_DIR}/.build.osx.sh
3233
else
34+
LIB_SUFFIX="so"
3335
PROCS=$(grep -e '^processor' -c /proc/cpuinfo)
3436
. ${SCRIPT_DIR}/.build.linux.sh
3537
fi
@@ -79,7 +81,6 @@ build_driver() {
7981
fi
8082
cmake -DCMAKE_BUILD_TYPE=Release \
8183
-D${driver_prefix}_BUILD_SHARED=On \
82-
-D${driver_prefix}_BUILD_STATIC=On \
8384
-D${driver_prefix}_BUILD_EXAMPLES=On \
8485
-D${driver_prefix}_BUILD_UNIT_TESTS=On \
8586
-D${driver_prefix}_BUILD_INTEGRATION_TESTS=${BUILD_INTEGRATION_TESTS} \
@@ -91,11 +92,13 @@ build_driver() {
9192

9293
check_driver_exports() {(
9394
set +e #Disable fail fast for this subshell
94-
local driver_library=${1}
95+
local driver_library="${1}.${LIB_SUFFIX}"
9596
if [ -f ${driver_library} ]; then
9697
declare -a MISSING_FUNCTIONS
98+
local symbols_file=$(mktemp /tmp/driver_exports.XXXXXX)
99+
nm ${driver_library} > $symbols_file
97100
for function in "${@:2}"; do
98-
nm ${driver_library} | grep ${function} > /dev/null
101+
grep ${function} $symbols_file > /dev/null
99102
if [ $? -ne 0 ]
100103
then
101104
MISSING_DEFINITION+=("${function}")

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ if(CASS_BUILD_TESTS)
5555
endif()
5656

5757
if(CASS_BUILD_INTEGRATION_TESTS OR CASS_BUILD_UNIT_TESTS)
58-
set(CASS_BUILD_STATIC ON) # Required for tests
5958
set(CASS_USE_OPENSSL ON) # Required for tests
6059
set(CASS_USE_KERBEROS ON) # Required for tests
6160
endif()

build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build:
4646
4747
FUNCTIONS+=($(grep -Eoh '(^cass_\s*(\w+)\s*\()|(^dse_\s*(\w+)\s*\()' include/dse.h | awk -F '(' '{print $1}'));
4848
FUNCTIONS+=($(grep -Eoh '^cass_\s*(\w+)\s*\(' include/cassandra.h | awk -F '(' '{print $1}'))
49-
check_driver_exports 'build/libcassandra_static.a' "${FUNCTIONS[@]}"
49+
check_driver_exports 'build/libcassandra' "${FUNCTIONS[@]}"
5050
5151
build/cassandra-unit-tests --gtest_output=xml:unit-test-results.xml
5252

examples/dse/date_range/date_range.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,8 @@ CassError insert_into_collections(CassSession* session, const char* key, const D
228228
const CassDataType* udt_type = NULL;
229229
CassUserType* udt = NULL;
230230

231-
const char** item = NULL;
232231
const char* query =
233232
"INSERT INTO examples.drcoll (key, coll_value, tuple_value, udt_value) VALUES (?, ?, ?, ?);";
234-
int ind = 0;
235-
236233
statement = cass_statement_new(query, 4);
237234

238235
cass_statement_bind_string(statement, 0, key);

examples/dse/geotypes/geotypes.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,13 @@ void select_line_string(CassSession* session, const char* key) {
316316
if (cass_future_error_code(future) == CASS_OK) {
317317
const CassResult* result = cass_future_get_result(future);
318318
if (result && cass_result_row_count(result) > 0) {
319-
cass_uint32_t i, num_points;
320319
const CassRow* row = cass_result_first_row(result);
321320
const CassValue* value = cass_row_get_column_by_name(row, "linestring");
322321

323322
DseLineStringIterator* iterator = dse_line_string_iterator_new();
324323

325324
dse_line_string_iterator_reset(iterator, value);
326325

327-
num_points = dse_line_string_iterator_num_points(iterator);
328-
329326
printf("%s: ", key);
330327
print_line_string(iterator);
331328
printf(")\n");

examples/dse/gssapi/gssapi_proxy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ void connect_and_run(const char* hosts, const char* proxy_user) {
141141

142142
int main(int argc, char* argv[]) {
143143
/* Setup and connect to cluster */
144-
CassFuture* connect_future = NULL;
145144
char* hosts = "127.0.0.1";
146145
if (argc > 1) {
147146
hosts = argv[1];

examples/dse/proxy_execution/proxy_execution.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ CassError connect_session(CassSession* session, const CassCluster* cluster) {
108108

109109
int main(int argc, char* argv[]) {
110110
/* Setup and connect to cluster */
111-
CassFuture* connect_future = NULL;
112111
CassCluster* cluster = cass_cluster_new();
113112
CassSession* session = cass_session_new();
114113
char* hosts = "127.0.0.1";

examples/perf/perf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ CassCluster* create_cluster(const char* hosts) {
138138
cass_cluster_set_num_threads_io(cluster, NUM_IO_WORKER_THREADS);
139139
cass_cluster_set_queue_size_io(cluster, 10000);
140140
cass_cluster_set_core_connections_per_host(cluster, 1);
141-
cass_cluster_set_max_connections_per_host(cluster, 2);
142-
cass_cluster_set_max_requests_per_flush(cluster, 10000);
143141
return cluster;
144142
}
145143

src/dse_auth.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
limitations under the License.
1515
*/
1616

17+
#include "dse.h"
18+
1719
#include "dse_auth.hpp"
1820
#include "logger.hpp"
1921

@@ -26,6 +28,21 @@ using namespace datastax;
2628
using namespace datastax::internal;
2729
using namespace datastax::internal::enterprise;
2830

31+
extern "C" {
32+
33+
CassError
34+
dse_gssapi_authenticator_set_lock_callbacks(DseGssapiAuthenticatorLockCallback lock_callback,
35+
DseGssapiAuthenticatorUnlockCallback unlock_callback,
36+
void* data) {
37+
#ifdef HAVE_KERBEROS
38+
return DseGssapiAuthenticator::set_lock_callbacks(lock_callback, unlock_callback, data);
39+
#else
40+
return CASS_ERROR_LIB_NOT_IMPLEMENTED;
41+
#endif
42+
}
43+
44+
} // extern "C"
45+
2946
bool DsePlainTextAuthenticator::initial_response(String* response) {
3047
if (class_name_ == DSE_AUTHENTICATOR) {
3148
response->assign(PLAINTEXT_AUTH_MECHANISM);

src/gssapi/dse_auth_gssapi.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ using namespace datastax::internal::enterprise;
4040
static void dse_gssapi_authenticator_nop_lock(void* data) {}
4141
static void dse_gssapi_authenticator_nop_unlock(void* data) {}
4242

43-
extern "C" {
44-
45-
CassError
46-
dse_gssapi_authenticator_set_lock_callbacks(DseGssapiAuthenticatorLockCallback lock_callback,
47-
DseGssapiAuthenticatorUnlockCallback unlock_callback,
48-
void* data) {
49-
return DseGssapiAuthenticator::set_lock_callbacks(lock_callback, unlock_callback, data);
50-
}
51-
52-
} // extern "C"
53-
5443
struct GssapiBuffer {
5544
public:
5645
gss_buffer_desc buffer;

0 commit comments

Comments
 (0)