void CassandraStore::configure(pStoreConf configuration, pStoreConf parent) { Store::configure(configuration, parent); // Error checking is done on open() if (!configuration->getString("remote_host", remoteHost)) { LOG_OPER("[%s] Bad Config - remote_host not set", categoryHandled.c_str()); } if (!configuration->getInt("remote_port", remotePort)) { remotePort = DEFAULT_CASSANDRA_PORT; } if (!configuration->getInt("timeout", timeout)) { timeout = DEFAULT_SOCKET_TIMEOUT_MS; } configuration->getBool("category_as_cf_name", categoryAsCfName); if (!configuration->getString("keyspace", keyspace)) { LOG_OPER("[%s] Bad Config - Keyspace not set", categoryHandled.c_str()); } if (configuration->getString("column_family", columnFamily) && categoryAsCfName) { LOG_OPER("[%s] Bad Config - category_is_cf_name = 'yes' and column_family set", categoryHandled.c_str()); } string consistencyLevel_; if (configuration->getString("consistency_level", consistencyLevel_)) { if (0 == consistencyLevel_.compare("one")) { consistencyLevel = org::apache::cassandra::ConsistencyLevel::ONE; } else if (0 == consistencyLevel_.compare("quorum")) { consistencyLevel = org::apache::cassandra::ConsistencyLevel::QUORUM; } else if (0 == consistencyLevel_.compare("local_quorum")) { consistencyLevel = org::apache::cassandra::ConsistencyLevel::LOCAL_QUORUM; } else if (0 == consistencyLevel_.compare("each_quorum")) { consistencyLevel = org::apache::cassandra::ConsistencyLevel::EACH_QUORUM; } else if (0 == consistencyLevel_.compare("all")) { consistencyLevel = org::apache::cassandra::ConsistencyLevel::ALL; } else if (0 == consistencyLevel_.compare("any")) { consistencyLevel = org::apache::cassandra::ConsistencyLevel::ANY; } else { LOG_OPER("[%s] [cassandra] unknown Consistency Level <%s> assuming QUORUM", categoryHandled.c_str(), consistencyLevel_.c_str()); consistencyLevel = org::apache::cassandra::ConsistencyLevel::QUORUM; } } else { LOG_OPER("[%s] [cassandra] unknown Consistency Level <%s> assuming QUORUM", categoryHandled.c_str(), consistencyLevel_.c_str()); consistencyLevel = org::apache::cassandra::ConsistencyLevel::QUORUM; } }