Open alexanderdean opened 10 years ago
To workaround this I've changed the schema definition to a class:
/**
* Holds our HBase schema for lookups into the
* API Transactions table.
*/
class ApiTransactionSchema(implicit conf: Configuration) extends Schema {
And then select the appropriate Hadoop Configuration
in my calling code:
implicit val conf = // Still to write
val ats = new ApiTransactionSchema
val txn = ats.ApiTransactionTable.query2...
I must be missing something much cleaner though - what do you guys do?
I'm confused by the schema design found in the HPaste test suite:
This approach is tightly-coupling a test Hadoop configuration into the schema object. Obviously this is fine for a project which will never be run on a real cluster, but what's the recommended approach for a schema which will be used "in anger", i.e. needs to support
LocalCluster.getTestConfiguration
and the real Hadoop cluster'sConfiguration
? (Bearing in mind that implicit values in Scala can't cross object boundaries.)