config.getNumKeys());
logger.info("\n\nWorker threads: " + numWorkersConfig + ", Num Keys: " + config.getNumKeys() + "\n\n");
logger.info("\n\nWorker threads: " + numWorkersConfig + ", Num Keys: " + config.getNumKeys() + "\n\n");
@Override public String getConnectionInfo() { int bytesPerCol=coreConfig.getDataSize(); int numColsPerRow=config.getColsPerRow(); int numRowsPerPartition=config.getRowsPerPartition(); int numPartitions= coreConfig.getNumKeys(); int RF = 3; Long numNodes = cluster.getMetadata().getAllHosts() .stream() .collect(groupingBy(Host::getDatacenter,counting())) .values().stream().findFirst().get(); int partitionSizeInBytes = bytesPerCol * numColsPerRow * numRowsPerPartition; long totalSizeInBytes = (long) partitionSizeInBytes * numPartitions * RF; long totalSizeInBytesPerNode = totalSizeInBytes / numNodes; return String.format("Cluster Name - %s : Keyspace Name - %s : CF Name - %s ::: ReadCL - %s : WriteCL - %s ::: " + "DataSize per Node: ~[%s], Total DataSize on Cluster: ~[%s], Num nodes in C* DC: %s, PartitionSize: %s", clusterName, keyspaceName, tableName, config.getReadConsistencyLevel(), config.getWriteConsistencyLevel(), humanReadableByteCount(totalSizeInBytesPerNode), humanReadableByteCount(totalSizeInBytes), numNodes, humanReadableByteCount(partitionSizeInBytes)); } }
@Override public String getConnectionInfo() { int bytesPerCol=coreConfig.getDataSize(); int numColsPerRow=config.getColsPerRow(); int numRowsPerPartition=config.getRowsPerPartition(); int numPartitions= coreConfig.getNumKeys(); int RF = 3; Long numNodes = cluster.getMetadata().getAllHosts() .stream() .collect(groupingBy(Host::getDatacenter,counting())) .values().stream().findFirst().get(); int partitionSizeInBytes = bytesPerCol * numColsPerRow * numRowsPerPartition; long totalSizeInBytes = (long) partitionSizeInBytes * numPartitions * RF; long totalSizeInBytesPerNode = totalSizeInBytes / numNodes; return String.format("Cluster Name - %s : Keyspace Name - %s : CF Name - %s ::: ReadCL - %s : WriteCL - %s ::: " + "DataSize per Node: ~[%s], Total DataSize on Cluster: ~[%s], Num nodes in C* DC: %s, PartitionSize: %s", clusterName, keyspaceName, tableName, config.getReadConsistencyLevel(), config.getWriteConsistencyLevel(), humanReadableByteCount(totalSizeInBytesPerNode), humanReadableByteCount(totalSizeInBytes), numNodes, humanReadableByteCount(partitionSizeInBytes)); } }
private void startWritesInternal(LoadPattern loadPattern, int windowSize, long windowDurationInSec, int bulkSize) { logger.info("Starting NdBenchDriver writes..."); NdBenchOperation operation; operation = new WriteOperation(clientRef.get()); KeyGeneratorFactory keyGeneratorFactory = new KeyGeneratorFactory(); KeyGenerator<String> keyGenerator = keyGeneratorFactory.getKeyGenerator(loadPattern, config.getNumKeys(), windowSize, windowDurationInSec, config.isPreloadKeys(), config.getZipfExponent()); keyGeneratorWriteRef.set(keyGenerator); startOperation(config.isWriteEnabled(), config.getNumWriters(), writeWorkers, tpWriteRef, writeLimiter, operation, keyGenerator, config.isAutoTuneEnabled(), bulkSize); writesStarted.set(true); }
private void startWritesInternal(LoadPattern loadPattern, int windowSize, long windowDurationInSec, int bulkSize) { logger.info("Starting NdBenchDriver writes..."); NdBenchOperation operation; operation = new WriteOperation(clientRef.get()); KeyGeneratorFactory keyGeneratorFactory = new KeyGeneratorFactory(); KeyGenerator<String> keyGenerator = keyGeneratorFactory.getKeyGenerator(loadPattern, config.getNumKeys(), windowSize, windowDurationInSec, config.isPreloadKeys(), config.getZipfExponent()); keyGeneratorWriteRef.set(keyGenerator); startOperation(config.isWriteEnabled(), config.getNumWriters(), writeWorkers, tpWriteRef, writeLimiter, operation, keyGenerator, config.isAutoTuneEnabled(), bulkSize); writesStarted.set(true); }
private void startReadsInternal(LoadPattern loadPattern, int windowSize, long windowDurationInSec, int bulkSize) { logger.info("Starting NdBenchDriver reads..."); NdBenchOperation operation; operation = new ReadOperation(clientRef.get()); KeyGeneratorFactory keyGeneratorFactory = new KeyGeneratorFactory(); KeyGenerator<String> keyGenerator = keyGeneratorFactory.getKeyGenerator(loadPattern, config.getNumKeys(), windowSize, windowDurationInSec, config.isPreloadKeys(), config.getZipfExponent()); keyGeneratorReadRef.set(keyGenerator); startOperation( config.isReadEnabled(), config.getNumReaders(), readWorkers, tpReadRef, readLimiter, operation, keyGenerator, config.isAutoTuneEnabled(), bulkSize); readsStarted.set(true); }
@Test public void testInvokingProcessMethodOnWriteOperationSetsNewRateLimit() throws Exception { Assert.assertEquals(777, config.getNumKeys()); } }
private void startReadsInternal(LoadPattern loadPattern, int windowSize, long windowDurationInSec, int bulkSize) { logger.info("Starting NdBenchDriver reads..."); NdBenchOperation operation; operation = new ReadOperation(clientRef.get()); KeyGeneratorFactory keyGeneratorFactory = new KeyGeneratorFactory(); KeyGenerator<String> keyGenerator = keyGeneratorFactory.getKeyGenerator(loadPattern, config.getNumKeys(), windowSize, windowDurationInSec, config.isPreloadKeys(), config.getZipfExponent()); keyGeneratorReadRef.set(keyGenerator); startOperation( config.isReadEnabled(), config.getNumReaders(), readWorkers, tpReadRef, readLimiter, operation, keyGenerator, config.isAutoTuneEnabled(), bulkSize); readsStarted.set(true); }