Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-4133

key class implements writableComparable and configurable use default configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0, 0.9.3
    • None
    • None

    Description

      key class implments writableComparable and configurable ,setConf be invoked with a default configuration,it should  like mapreduce(org.apache.hadoop.mapred.JobConf#getOutputKeyComparator)

      //org.apache.tez.runtime.library.common.ConfigUtils#getIntermediateOutputKeyComparator
      public static <K> RawComparator<K> getIntermediateOutputKeyComparator(Configuration conf) {
        Class<? extends RawComparator> theClass = conf.getClass(
            TezRuntimeConfiguration.TEZ_RUNTIME_KEY_COMPARATOR_CLASS, null,
            RawComparator.class);
        if (theClass != null)
          return ReflectionUtils.newInstance(theClass, conf);
      // aybe change to 
      // return WritableComparator.get(getIntermediateOutputKeyClass(conf).asSubclass( //WritableComparable.class),conf);
        return WritableComparator.get(getIntermediateOutputKeyClass(conf).asSubclass(
            WritableComparable.class));
      }
      
      public static <K> RawComparator<K> getIntermediateInputKeyComparator(Configuration conf) {
        Class<? extends RawComparator> theClass = conf.getClass(
            TezRuntimeConfiguration.TEZ_RUNTIME_KEY_COMPARATOR_CLASS, null,
            RawComparator.class);
        if (theClass != null)
          return ReflectionUtils.newInstance(theClass, conf);
      // maybe change to 
      // return WritableComparator.get(getIntermediateInputKeyClass(conf).asSubclass( //WritableComparable.class),conf);
        return WritableComparator.get(getIntermediateInputKeyClass(conf).asSubclass(
            WritableComparable.class));
      }
      
      
      
       

       
       
       
       
       
       
       
       
       
       
       

      Attachments

        1. TEZ-4133-2.patch
          4 kB
          bbq
        2. TEZ-4133-1.patch
          4 kB
          bbq

        Issue Links

          Activity

            People

              backkom wang qiang
              backkom wang qiang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: