This is a scala client for Cloudera Impala. You can use it like this:
import com.daniellesucher.impala.{Cursor, ImpalaClient}
val client = ImpalaClient("host", 21000)
client.execute("SHOW TABLES")
// => merchants users...
You can also use a cursors to iterate over the rows. This lets you pass in any function you like, and avoid loading the entire result set into memory at once.
import com.daniellesucher.impala.{Cursor, ImpalaClient}
val client = ImpalaClient("host", 21000)
val cursor = client.query("SELECT zip, income FROM zipcode_incomes ORDER BY income DESC")
cursor.foreach { row: Seq[ImpalaValue] =>
// whatever makes you happy
}
cursor.close