HCatalog – writing data to Hive tables from Java MapReduce computations

HCatalog also allows us to write data to Hive tables from Java MapReduce computations using the HCatOutputFormat. In this recipe, we'll be looking at how to write data to a Hive table using a Java MapReduce computation. This recipe extends the computation of the previous HCatalog – performing Java MapReduce computations on data mapped to Hive tables recipe by adding table write capability.

Getting ready

Make sure HCatalog is installed with Hive in your system.

How to do it...

This section demonstrates how to write data to a Hive table using a MapReduce computation. Perform the following steps:

  1. Follow the Hive batch mode – using a query file recipe of this chapter to create and ...

Get Hadoop MapReduce v2 Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.