Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7929#discussion_r36226523
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -62,6 +63,39 @@ private[hive] class ClientWrapper(
       extends ClientInterface
       with Logging {
     
    +  overrideHadoopShims()
    +
    +  // !! HACK ALERT !!
    +  //
    +  // This method is used to workaround CDH Hadoop versions like 
2.0.0-mr1-cdh4.1.1.
    +  //
    +  // Internally, Hive `ShimLoader` tries to load different versions of 
Hadoop shims by checking
    +  // version information gathered from Hadoop jar files.  If the major 
version number is 1,
    +  // `Hadoop20SShims` will be loaded.  Otherwise, if the major version 
number is 2, `Hadoop23Shims`
    +  // will be chosen.  However, CDH Hadoop versions like 2.0.0-mr1-cdh4.1.1 
have 2 as major version
    +  // number, but contain Hadoop 1 code.  This confuses Hive `ShimLoader` 
and loads wrong version of
    --- End diff --
    
    @vanzin Thanks for the explanation, then I guess it would be sufficient to 
special case 2.0.x and 2.1.x CDH versions. (Or dropping CDH4 support as you 
mentioned offline.)
    
    @srowen I've updated the comment to reflect the facts (hopefully).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to