Accessing Hive Table Data with MapReduce Accessing Hive Table Data with MapReduce hadoop hadoop

Accessing Hive Table Data with MapReduce


It looks like you don't have hive-site.xml in your eclipse classpath. Hive looks for the metastore server address in your configuration. When it can't find the address, it creates or loads an embedded metastore. This metastore, of course, does not have the table you created.

Edit (In answer to your comment):

Yes you can get values by key, but in order to do that you need the HCatSchema for the table. Do this in the map setup phase...

HCatSchema schema = HCatBaseInputFormat.getTableSchema(context.getConfiguration);

And in the map phase...

value.get('field', schema);