/** * {@inheritDoc} */ public HClient createClient(CassandraHost ch) { params = SSLHelper.getTSSLTransportParameters(); if ( params != null ) { log.info("SSL enabled for client<->server communications."); if ( log.isDebugEnabled() ) { log.debug("Properties:"); log.debug(" ssl.truststore = {}", System.getProperty("ssl.truststore")); log.debug(" ssl.protocol = {}", System.getProperty("ssl.protocol")); log.debug(" ssl.store.type = {}", System.getProperty("ssl.store.type")); log.debug(" ssl.cipher.suites = {}", System.getProperty("ssl.cipher.suites")); log.debug("Creation of new client for host: " + ch.getIp()); } } return params == null ? new HThriftClient(ch) : new HThriftClient(ch, params); }
/** * Execute MultigetSliceQuery with the set of (maxRowCountPerQuery) keys * provided and keep the result in global variable queryResult (List<Rows<K, * N, V>>) * * @param param */ private void runMultigetSliceQuery(final List<K> param) { MultigetSliceQuery<K, N, V> multigetSliceQuery = HFactory .createMultigetSliceQuery(keyspace, keySerializer, nameSerializer, valueSerializer); multigetSliceQuery.setColumnFamily(columnFamily); multigetSliceQuery.setKeys(param); multigetSliceQuery.setRange(start, finish, reversed, maxColumnCount); QueryResult<Rows<K, N, V>> result = multigetSliceQuery.execute(); queryResult.add(result.get()); // Add current query execution time to internal variable // totalExecutionTimeMicro. When parallelism is enabled, this value might not be correct // always due to available system resources and thread implementation totalExecutionTimeMicro.addAndGet(result.getExecutionTimeMicro()); // Add current query execution time to internal variable // totalExecutionTimeNano. When parallelism is enabled, this value might not be correct // always due to available system resources and thread implementation totalExecutionTimeNano.addAndGet(result.getExecutionTimeNano()); //Add host used to the list m_hostsUsed.put(result.getHostUsed().getIp(), result.getHostUsed()); }
/** * {@inheritDoc} */ public HClient createClient(CassandraHost ch) { if ( log.isDebugEnabled() ) { log.debug("Creation of new client for host: " + ch.getIp()); } return new HThriftClient(ch); }
/** * {@inheritDoc} */ public HClient createClient(CassandraHost ch) { params = SSLHelper.getTSSLTransportParameters(); if ( params != null ) { log.info("SSL enabled for client<->server communications."); if ( log.isDebugEnabled() ) { log.debug("Properties:"); log.debug(" ssl.truststore = {}", System.getProperty("ssl.truststore")); log.debug(" ssl.protocol = {}", System.getProperty("ssl.protocol")); log.debug(" ssl.store.type = {}", System.getProperty("ssl.store.type")); log.debug(" ssl.cipher.suites = {}", System.getProperty("ssl.cipher.suites")); log.debug("Creation of new client for host: " + ch.getIp()); } } return params == null ? new HThriftClient(ch) : new HThriftClient(ch, params); }
/** * Execute MultigetSliceQuery with the set of (maxRowCountPerQuery) keys * provided and keep the result in global variable queryResult (List<Rows<K, * N, V>>) * * @param param */ private void runMultigetSliceQuery(final List<K> param) { MultigetSliceQuery<K, N, V> multigetSliceQuery = HFactory .createMultigetSliceQuery(keyspace, keySerializer, nameSerializer, valueSerializer); multigetSliceQuery.setColumnFamily(columnFamily); multigetSliceQuery.setKeys(param); multigetSliceQuery.setRange(start, finish, reversed, maxColumnCount); QueryResult<Rows<K, N, V>> result = multigetSliceQuery.execute(); queryResult.add(result.get()); // Add current query execution time to internal variable // totalExecutionTimeMicro. When parallelism is enabled, this value might not be correct // always due to available system resources and thread implementation totalExecutionTimeMicro.addAndGet(result.getExecutionTimeMicro()); // Add current query execution time to internal variable // totalExecutionTimeNano. When parallelism is enabled, this value might not be correct // always due to available system resources and thread implementation totalExecutionTimeNano.addAndGet(result.getExecutionTimeNano()); //Add host used to the list m_hostsUsed.put(result.getHostUsed().getIp(), result.getHostUsed()); }