Closed mattnworb closed 9 years ago
Matt, I will close this one. There was another bug related to this. Just throwing an exception if keyspace/table does not exist was not good enough. The java driver connection used to fetch metadata was left open, what caused the job to hang (and not fail).
I've done a patch in https://github.com/spotify/hdfs2cass/pull/10.
I'm glad there is a better fix than mine :) I was simply assuming that throwing any RuntimeException would abort the job.
If someone tries to import data to a cassandra column family that doesn't actually exist (maybe they forgot to create the table), the Crunch job fails with a NullPointerException at the
tableMetadata.getColumns()
line since there is no metadata for the table. Throw a more descriptive error message in this case.