Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-1727

Hadoop default config override pig.properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.8.0
    • impl
    • None
    • Reviewed

    Description

      In GenericOptionsParser work, we have these lines:

      GenericOptionsParser parser = new GenericOptionsParser(args);
      Configuration conf = parser.getConfiguration();    
      
      Properties properties = new Properties();
      properties.putAll(ConfigurationUtil.toProperties(conf));
      PropertiesUtil.loadDefaultProperties(properties);
      

      conf contains two sources: one from hadoop default config files (core-site.xml, hdfs-site.xml, mapred-site.xml), the other is from hadoop related command line options. Override conf over pig property files is wrong for the default hadoop configuration part. We shall not bring default hadoop configuration in. The following code illustrate how to do that:

      Configuration conf = new Configuration(false);
      GenericOptionsParser parser = new GenericOptionsParser(conf, args);
      conf = parser.getConfiguration();
      

      Attachments

        1. PIG-1727.patch
          1 kB
          Richard Ding

        Activity

          People

            rding Richard Ding
            daijy Daniel Dai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: