You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by paul-rogers <gi...@git.apache.org> on 2016/12/28 02:17:26 UTC

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

GitHub user paul-rogers opened a pull request:

    https://github.com/apache/drill/pull/707

    DRILL-5157: Multiple Snappy versions on class path

    Multiple Snappy versions on class path; causes unit test failures.
    
    Drill's pom.xml files bring in multiple Snappy versions. Drill itself brings in a very old version that has a known problem loading the snappy native library. Other libraries bring in a newer version. The one that ends up first on the class path is non-deterministic, leading to random test failures.
    
    This fix updates the Snappy library to the latest and adds dependency management to exclude older versions brought in by Avro and Parquet.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paul-rogers/drill DRILL-5157

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/707.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #707
    
----
commit 909efcec92c4a259d139dfc4008c431969d061f7
Author: Paul Rogers <pr...@maprtech.com>
Date:   2016-12-28T01:21:09Z

    DRILL-5157: Multiple Snappy versions on class path
    
    Multiple Snappy versions on class path; causes unit test failures.
    
    This fix updates the Snappy library and adds dependency management to
    exclude older versions brought in by Avro and Parquet.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/707#discussion_r102118993
  
    --- Diff: pom.xml ---
    @@ -1772,6 +1799,28 @@
                 <artifactId>sqlline</artifactId>
                 <version>${sqlline.version}</version>
               </dependency>
    +          <dependency>
    +          	<groupId>org.apache.avro</groupId>
    +          	<artifactId>avro</artifactId>
    +          	<version>1.7.4</version>
    +          	<exclusions>
    +          		<exclusion>
    +          			<groupId>org.xerial.snappy</groupId>
    +          			<artifactId>snappy-java</artifactId>
    +          		</exclusion>
    +          	</exclusions>
    +          </dependency>
    +          <dependency>
    +          	<groupId>org.apache.parquet</groupId>
    +          	<artifactId>parquet-hadoop</artifactId>
    +          	<version>1.8.1-drill-r0</version>
    --- End diff --
    
    Fixed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/707
  
    @bitblender - The general problem with jar dependencies is that each Maven project depends on a different version of library x. However, the JVM can load only one version (if everything goes into the global class loader, as in Drill.) So, we have to exclude all the random versions to ensure that a single version is included. In general, we must assume that newer versions are compatible with old versions. Else, we're in a world of hurt. (Guava is a good example: Guava removes symbols that used to exist, so that a newer version is not usable by code that needs an older one.)
    
    All we can do is test to ensure that 1) we have a single version of the library, and 2) everything works with that version. The nature of this PR is that we violated item 1: we have multiple snappy versions. The one that gets used depends on how the class path is formed: one goes first in production, a different one in the IDE.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/707
  
    Result:
    
    ```
    [INFO] |  +- org.apache.avro:avro:jar:1.7.4:provided
    [INFO] |  |  +- (org.xerial.snappy:snappy-java:jar:1.0.4.1:provided - omitted for conflict with 1.1.2.6)
    ...
    \- org.xerial.snappy:snappy-java:jar:1.1.2.6:compile
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/707#discussion_r97454311
  
    --- Diff: pom.xml ---
    @@ -1772,6 +1799,28 @@
                 <artifactId>sqlline</artifactId>
                 <version>${sqlline.version}</version>
               </dependency>
    +          <dependency>
    +          	<groupId>org.apache.avro</groupId>
    +          	<artifactId>avro</artifactId>
    +          	<version>1.7.4</version>
    +          	<exclusions>
    +          		<exclusion>
    +          			<groupId>org.xerial.snappy</groupId>
    +          			<artifactId>snappy-java</artifactId>
    +          		</exclusion>
    +          	</exclusions>
    +          </dependency>
    +          <dependency>
    +          	<groupId>org.apache.parquet</groupId>
    +          	<artifactId>parquet-hadoop</artifactId>
    +          	<version>1.8.1-drill-r0</version>
    --- End diff --
    
    Use ${parquet.version}


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/707
  
    @jinfengni - please review the revisions.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/707#discussion_r97454285
  
    --- Diff: pom.xml ---
    @@ -1331,6 +1336,28 @@
                 </exclusions>
               </dependency>
               <dependency>
    +          	<groupId>org.apache.avro</groupId>
    +          	<artifactId>avro</artifactId>
    +          	<version>1.7.4</version>
    +          	<exclusions>
    +          		<exclusion>
    +          			<groupId>org.xerial.snappy</groupId>
    +          			<artifactId>snappy-java</artifactId>
    +          		</exclusion>
    +          	</exclusions>
    +          </dependency>
    +          <dependency>
    +          	<groupId>org.apache.parquet</groupId>
    +          	<artifactId>parquet-hadoop</artifactId>
    +          	<version>1.8.1-drill-r0</version>
    --- End diff --
    
    Can we use ${parquet.version} here, which is defined in the beginning of root/pom.xml?  It will save effort, in case Drill changes version number for parquet library. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/707
  
    Merged into master by @jinfengni , but he omitted the magic message to close the PR. Closing manually.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers closed the pull request at:

    https://github.com/apache/drill/pull/707


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #707: DRILL-5157: Multiple Snappy versions on class path

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on the issue:

    https://github.com/apache/drill/pull/707
  
    +1
    
    LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/707#discussion_r102117453
  
    --- Diff: pom.xml ---
    @@ -1331,6 +1336,28 @@
                 </exclusions>
               </dependency>
               <dependency>
    +          	<groupId>org.apache.avro</groupId>
    +          	<artifactId>avro</artifactId>
    +          	<version>1.7.4</version>
    --- End diff --
    
    hive-exec-shade includes Avro 1.7.5. java-exec uses 1.7.7. Hive-exec uses ${avro.version} -- which is not set anywhere that I can find.
    
    The key here is to exclude snappy, so I moved the exclusion into java-exec.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #707: DRILL-5157: Multiple Snappy versions on class path

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/707#discussion_r97454444
  
    --- Diff: pom.xml ---
    @@ -1331,6 +1336,28 @@
                 </exclusions>
               </dependency>
               <dependency>
    +          	<groupId>org.apache.avro</groupId>
    +          	<artifactId>avro</artifactId>
    +          	<version>1.7.4</version>
    --- End diff --
    
    Where did you get "1.7.4"?  Seems java-exec/pom.xml says that Drill uses 1.7.7. 
     


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---