private int getValueSize() { if (config.isUseVariableDataSize()) { return vvRandom.nextInt( Math.abs(config.getDataSizeUpperBound() - config.getDataSizeLowerBound())) + config.getDataSizeLowerBound(); } return config.getDataSize(); }
@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 int getValueSize() { if (config.isUseVariableDataSize()) { return vvRandom.nextInt( Math.abs(config.getDataSizeUpperBound() - config.getDataSizeLowerBound())) + config.getDataSizeLowerBound(); } return config.getDataSize(); }
@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)); } }
esConfig.getBulkWriteBatchSize(), esConfig.isRandomizeStrings() ? dataGenerator : new FakeWordDictionaryBasedDataGenerator(dataGenerator, coreConfig.getDataSize()));