File tree 1 file changed +20
-0
lines changed
OpinionAggregation/src/main/scala/cs4624/microblog/test
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ package cs4624 .microblog .test
2
+
3
+ import cs4624 .common .App
4
+ import cs4624 .microblog .sources .HBaseMicroblogDataSource
5
+ import cs4624 .microblog .sources .HBaseMicroblogDataSource .Default
6
+
7
+ import java .time ._
8
+
9
+ import org .apache .hadoop .hbase .client .ConnectionFactory
10
+
11
+ object QueryTest extends App {
12
+ implicit val con = ConnectionFactory .createConnection()
13
+ val dataSource = new HBaseMicroblogDataSource (Default )
14
+
15
+ val start = LocalDate .of(2014 , 12 , 11 ).atStartOfDay().toInstant(ZoneOffset .UTC )
16
+ val end = LocalDate .of(2014 , 12 , 15 ).atStartOfDay().toInstant(ZoneOffset .UTC )
17
+
18
+ val posts = dataSource.query(startTime = start, endTime = end).filter(_.symbols.contains(" VRNG" )).foreach(println)
19
+ }
20
+
You can’t perform that action at this time.
0 commit comments