Re: Cassandra Connector Problem (Possible Guava Conflict?)

Posted by Chesnay Schepler on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Cassandra-Connector-Problem-Possible-Guava-Conflict-tp7690p7693.html

Replace the maven shade plugin section in the flink-cassandra pom with the following,
or apply the additions(in bold) manually:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.1</version>
                <executions>
                    <!-- Run shade goal on package phase -->
                    <execution>
                        <id>shade-flink</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration combine.self="override">
                            <artifactSet>
                                <includes>
                                    <include>com.datastax.cassandra:cassandra-driver-core</include>
                                    <include>com.datastax.cassandra:cassandra-driver-mapping</include>
                                    <include>com.google.guava:guava</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>com.google</pattern>
                                    <shadedPattern>org.apache.flink.cassandra.shaded.com.google</shadedPattern>
                                    <excludes>
                                        <exclude>com.google.protobuf.**</exclude>
                                        <exclude>com.google.inject.**</exclude>
                                    </excludes>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

On 26.06.2016 18:00, Eamon Kavanagh wrote:
Hey Chesnay,

Thanks for the response.  Is there anything I can do in the short term to skirt the issue?

On Sun, Jun 26, 2016 at 11:55 AM, Chesnay Schepler <[hidden email]> wrote:
The problem is that the cassandra jar currently contains 2 shaded guavas.
I already have a fix ready that suppressed the root-poms shade plugin configuration inside the cassandra submit.

I will submit that next week.


On 26.06.2016 17:46, Eamon Kavanagh wrote:
Hey everyone,

I'm having an issue using the Flink -> Cassandra connector.  The error message I get is:

Class com.datastax.driver.core.DefaultResultSetFuture does not implement the requested interface org.apache.flink.shaded.com.google.common.util.concurrent.ListenableFuture

I believe the problem is related to this (https://github.com/apache/flink/pull/2133) pull request but it still results in this error.  Does anyone have any advice on how to debug it?

Thanks,
Eamon