Code Monkey home page Code Monkey logo

Comments (4)

vsmelov avatar vsmelov commented on August 21, 2024 1

Sorry.
I just solved this problem removing
rm $SPARK_PATH/jars/clickhouse-jdbc-0.1-SNAPSHOT-jar-with-dependencies.jar

and using
cp clickhouse-jdbc-0.1-SNAPSHOT.jar $SPARK_PATH/jars/

and putting these jars to $SPARK_PATH/jars/
https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2
https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.4

from clickhouse-java.

vsmelov avatar vsmelov commented on August 21, 2024

The problem begin to arise exactly when I put jar to spark jars dir

cp clickhouse-jdbc-0.1-SNAPSHOT-jar-with-dependencies.jar $SPARK_PATH/jars/

After this, even when I just read file in pyspark (commenting all clickhouse code) it gives me

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.7.3

So it crushes pyspark.
When I remove clickhouse-jdbc-0.1-SNAPSHOT-jar-with-dependencies.jar from $SPARK_PATH/jars/ my program begins to load DataFrame, but of course it cannot dump it to clickhouse.

from clickhouse-java.

serebrserg avatar serebrserg commented on August 21, 2024

Hello.
The problem is that current driver implementation has dependencies. In fact jackson isn't used for actual JDBC interface but for some specific methods, so it doesn't really matter which jackson version is provided.
Ideally drivers must be free of dependencies, but is not the case now and it needs a lot of effort.
You've found out the correct workaround.
You may need to add some other dependencies the same way if Spark doesn't provide ones and if you need the features provided by these dependencies: lz4, guava, joda-time.

from clickhouse-java.

zhicwu avatar zhicwu commented on August 21, 2024

Jackson was replaced by Gson(for better performance), and the latter is an optional dependency(because there's a simple JSON parser in jdbc driver).

from clickhouse-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.