* The JUnit entry point for the counting example.
*/
@Test
public void test() throws Exception {
Configuration conf = getTestUtil().getConfiguration();
TweetCube tweetCube = new TweetCube(getHBaseHarness(conf),
SyncLevel.BATCH_ASYNC); // Buffer DB writes and flush when needed
tweetCube.countAll(new TweetIterator(100));
tweetCube.flush();
System.out.println("Total tweets: " + tweetCube.getCount());
System.out.println("Tweets by baraneshgh: " + tweetCube.getUserCount("baraneshgh"));
System.out.println("Tweets retweeting IranTube: " + tweetCube.getRetweetsOf("IranTube"));
System.out.println("Retweets of omidhabibinia by DominiqueRdr: " +
tweetCube.getRetweetsOfBy("omidhabibinia", "DominiqueRdr"));
System.out.println("Uses of hashtag #iran: " + tweetCube.getTagCount("iran"));
DateTime hourOfInterest = new DateTime(2011, 2, 10, 15, 0, 0, 0, DateTimeZone.UTC);
System.out.println("Uses of hashtag #iran during 2011-02-10T15:00Z: " +
tweetCube.getTagHourCount("iran", hourOfInterest));
}