MultigetSliceIterator implements Iterator<Row<K, N, V>> { public int getThreadCountUsed() { return threadCount; } MultigetSliceIterator(boolean reversed, Keyspace keyspace,
			Serializer<K> keySerializer, Serializer<N> nameSerializer,
			Serializer<V> valueSerializer, String columnFamily,
			List<K> rowKeys, N start, N finish);  MultigetSliceIterator(boolean reversed, Keyspace keyspace,
			Serializer<K> keySerializer, Serializer<N> nameSerializer,
			Serializer<V> valueSerializer, String columnFamily,
			List<K> rowKeys, N start, N finish, int maxColumnCountPerRow);  MultigetSliceIterator(boolean reversed, int maxRowCountPerQuery,
			Keyspace keyspace, Serializer<K> keySerializer,
			Serializer<N> nameSerializer, Serializer<V> valueSerializer,
			String columnFamily, List<K> rowKeys, N start, N finish,
			int maxColumnCountPerRow);  MultigetSliceIterator(boolean reversed, int maxRowCountPerQuery,
			Keyspace keyspace, Serializer<K> keySerializer,
			Serializer<N> nameSerializer, Serializer<V> valueSerializer,
			String columnFamily, List<K> rowKeys, N start, N finish);  MultigetSliceIterator(boolean reversed, Keyspace keyspace,
			Serializer<K> keySerializer, Serializer<N> nameSerializer,
			Serializer<V> valueSerializer, String columnFamily,
			List<K> rowKeys, N start, N finish, int maxThreadCount,
			int maxRowCountPerQuery, int maxColumnCountPerRow); @Override boolean hasNext(); @Override Row<K, N, V> next(); @Override void remove(); long getTotalExecutionTimeMicro(); long getTotalExecutionTimeNano(); String getHostsUsed(); int getThreadCountUsed(); int getRowCountPerQueryUsed();  }
@Test public void testGetThreadCountUsed() { LinkedList<String> KEYS= new LinkedList<String>(); for (int j = 0; j < 100; j++) { KEYS.add(KEY+j); } Random randomGen= new Random(); int threadCount=randomGen.nextInt(8), maxRowCountPerQuery=randomGen.nextInt(50), maxColumnCountPerRow=100; MultigetSliceIterator<String, UUID, String> it= new MultigetSliceIterator<String, UUID, String>(false,keyspace, se,us,se, CF, KEYS, null,null, threadCount,maxRowCountPerQuery,maxColumnCountPerRow); Map<UUID, String> results = new HashMap<UUID, String>(); while (it.hasNext()) { Row<String,UUID, String> r = it.next(); for (HColumn<UUID, String> c : r.getColumnSlice().getColumns()) { results.put(c.getName(), c.getValue()); } } if(it.getThreadCountUsed() <= threadCount){ assertTrue("Threads used:"+it.getThreadCountUsed(),true); } else { assertFalse("Threads used count is more than maxThreadCount specified",true); } }