Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-574

Hive should use ClassLoader from hadoop Configuration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.3.0
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      See HIVE-338.
      Hive should always use the getClassByName method from hadoop Configuration, so that we choose the correct ClassLoader. Examples include all plug-in interfaces, including UDF/GenericUDF/UDAF, SerDe, and FileFormats. Basically the following code snippet shows the idea:

      package org.apache.hadoop.conf;
      public class Configuration implements Iterable<Map.Entry<String,String>> {
         ...
        /**
         * Load a class by name.
         * 
         * @param name the class name.
         * @return the class object.
         * @throws ClassNotFoundException if the class is not found.
         */
        public Class<?> getClassByName(String name) throws ClassNotFoundException {
          return Class.forName(name, true, classLoader);
        }
      

        Attachments

        1. HIVE-574.1.patch
          9 kB
          Zheng Shao
        2. HIVE-574.2.patch
          18 kB
          Zheng Shao
        3. HIVE-574.3.patch
          20 kB
          Zheng Shao

          Issue Links

            Activity

              People

              • Assignee:
                zshao Zheng Shao
                Reporter:
                zshao Zheng Shao
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: