Created
February 28, 2012 17:05
-
-
Save zznate/1933702 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
class TimeseriesIterator implements Iterable<HColumn<Long,Long>> { | |
private ColumnSliceIterator<String,Long,Long> sliceIterator; | |
TimeseriesIterator(String key) { | |
SliceQuery<String,Long,Long> sliceQuery = | |
HFactory.createSliceQuery(tutorialKeyspace, StringSerializer.get(), | |
LongSerializer.get(), LongSerializer.get()); | |
sliceQuery.setColumnFamily(TimeseriesInserter.CF_TIMESERIES_SINGLE_ROW); | |
sliceQuery.setKey(key); | |
sliceIterator = new ColumnSliceIterator<String,Long,Long>(sliceQuery,0L,Long.MAX_VALUE,false); | |
} | |
public Iterator<HColumn<Long, Long>> iterator() { | |
return sliceIterator; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment