Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

 

 

 

 

 

 

Apache HCatalog's behaviour can be modified through use of a few config parameters specified in jobs submitted to it. This document details all the various knobs that users have available to them, and what they accomplish. 

...

PropertyDefaultDescription
 hcat.pig.storer.external.locationNot setAn override to specify where HCatStorer will write to, defined from pig jobs, either directly by user, or by using org.apache.hive.hcatalog.pig.HCatStorerWrapper. HCat will write to this specified directory, rather than writing to the table/partition directory specified/calculatable by the metadata. This will be used in lieu of the table directory if this is a table-level write (unpartitioned table write) or in lieu of the partition directory if this is a partition-level write. This parameter is used only for non-dynamic-partitioning jobs which have multiple write destinations.
 hcat.dynamic.partitioning.custom.patternNot set

For dynamic partitioning jobs, simply specifying a custom directory is not good enough, since it writes to multiple destinations, and thus, instead of a directory specification, it requires a pattern specification. That's where this parameter comes in. For example, if one had a table that was partitioned by keys country and state, with a root directory location of /apps/hive/warehouse/geo/ , then a dynamic partition write into it that writes partitions (country=US,state=CA) & (country=IN,state=KA) would create two directories: /apps/hive/warehouse/geo/country=US/state=CA/ and /apps/hive/warehouse/geo/country=IN/state=KA/ . If we wanted a different patterned location, and specified hcat.dynamic.partitioning.custom.pattternpattern="/ext/geo/${country}-${state}", it would create the following two partition dirs: /ext/geo/US-CA and /ext/geo/IN-KA . Thus, it allows us to specify a custom dir location pattern for all the writes, and will interpolate each variable it sees when attempting to create a destination location for the partitions. 

 

...