diff --git a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/HCatBaseInputFormat.java b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/HCatBaseInputFormat.java index dbbdd61..9caff7a 100644 --- a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/HCatBaseInputFormat.java +++ b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/HCatBaseInputFormat.java @@ -105,6 +105,9 @@ public static void setOutputSchema(Job job, HCatSchema hcatSchema) public List getSplits(JobContext jobContext) throws IOException, InterruptedException { Configuration conf = jobContext.getConfiguration(); + // Set up recursive reads for sub-directories. + // (Otherwise, sub-directories produced by Hive UNION operations won't be readable.) + conf.setBoolean("mapred.input.dir.recursive", true); //Get the job info from the configuration, //throws exception if not initialized