Skip to content
marmbrus edited this page Sep 13, 2011 · 1 revision

Using PIQL from the console

scala> import edu.berkeley.cs.scads.piql._
scala> import edu.berkeley.cs.scads.piql.modeling.Experiments._
scala> val executor = new ParallelExecutor
scala> val findUser = testScadrClient.users.where("username".a === (0.?)).toPiql()
INF [20110912-21:47:12.539] comm: [run-main] Opening Zookeeper Connection to zoo1.millennium.berkeley.edu,zoo2.millennium.berkeley.edu,zoo3.millennium.berkeley.edu with timeout 30000
INF [20110912-21:47:13.392] comm: [run-main-EventThread] Connected to Zookeeper at zoo1.millennium.berkeley.edu,zoo2.millennium.berkeley.edu,zoo3.millennium.berkeley.edu
findUser: edu.berkeley.cs.scads.piql.OptimizedQuery = edu.berkeley.cs.scads.piql.OptimizedQuery@6ffe8d15
scala> findUser("User0000000001")
res4: edu.berkeley.cs.scads.piql.package.QueryResult = List(ArrayBuffer(User(User0000000001)))
Clone this wiki locally