-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6050/
-----------------------------------------------------------

(Updated July 19, 2012, 11:47 p.m.)


Review request for hcatalog, Ashutosh Chauhan, Francis Liu, Rohini Palaniswamy, 
and Mithun Radhakrishnan.


Description
-------

If an MR job using HCatOutputFormat fails, and 
FileOutputCommitterContainer::abortJob() is called, one would expect that 
partitions aren't created/registered with HCatalog.

When using dynamic-partitions, one sees that this behaves correctly. But when 
static-partitions are used, partitions are created regardless of whether the 
Job succeeded or failed.
(This manifested as a failure when the job is repeated. The retry-job fails to 
launch since the partitions already exist from the last failed run.)

This is a result of bad code in FileOutputCommitter::cleanupJob(), which seems 
to do an unconditional partition-add. This can be fixed by adding a check for 
the output directory before adding partitions (in the !dynamicParititoning 
case), since the directory is removed in abortJob().

We'll have a patch for this shortly. As an aside, we ought to move the 
partition-creation into commitJob(), where it logically belongs. cleanupJob() 
is deprecated and common to both success and failure code paths.


This addresses bug hcatalog-451.
    https://issues.apache.org/jira/browse/hcatalog-451


Diffs
-----

  
/trunk/src/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java 
1363556 
  /trunk/src/test/org/apache/hcatalog/mapreduce/HCatMapReduceTest.java 1363556 
  /trunk/src/test/org/apache/hcatalog/mapreduce/TestHCatPartitioned.java 
1363556 

Diff: https://reviews.apache.org/r/6050/diff/


Testing
-------

Added a unit test and all the existing tests pass. 


Thanks,

Vandana Ayyalasomayajula

Reply via email to