Created
May 25, 2012 20:34
-
-
Save jsanda/2790424 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SliceQuery<String,Composite, Integer> sliceQuery = HFactory.createSliceQuery(keyspace, StringSerializer.get(), | |
new CompositeSerializer().get(), IntegerSerializer.get()); | |
sliceQuery.setColumnFamily("metrics_work_queue"); | |
sliceQuery.setKey("raw_metrics"); | |
ColumnSliceIterator<String, Composite, Integer> iterator = new ColumnSliceIterator<String, Composite, Integer>( | |
sliceQuery, (Composite) null, (Composite) null, false); | |
assertTrue(iterator.hasNext()); | |
HColumn<Composite, Integer> actualQueueValue = iterator.next(); | |
HColumn<Composite, Integer> expectedQueueValue = HFactory.createColumn(new Composite(theHour.getMillis(), | |
scheduleId), 0, CompositeSerializer.get(), IntegerSerializer.get()); | |
assertPropertiesMatch("The column in the queue does not match the expected value", expectedQueueValue, | |
actualQueueValue, "clock"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment