Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

(Zeppelin) pyspark read hive TypeError: 'JavaPackage' object is not callable

avatar
Explorer

when i tried to running this note

%spark2.pyspark
import pyspark
from pyspark_llap import HiveWarehouseSession
hive = HiveWarehouseSession.session(spark).build()
df = hive.execute(" show databases ")

 

the result is 

 

File "/tmp/spark-00e8a412-9248-4a78-803f-3ca9d8ddac2d/userFiles-2f95cdc1-3caa-42d7-8356-5b022b67b3b9/pyspark_hwc-1.0.0.3.1.0.0-78.zip/pyspark_llap/sql/session.py", line 228, in session return HiveWarehouseBuilder.session(session) File "/tmp/spark-00e8a412-9248-4a78-803f-3ca9d8ddac2d/userFiles-2f95cdc1-3caa-42d7-8356-5b022b67b3b9/pyspark_hwc-1.0.0.3.1.0.0-78.zip/pyspark_llap/sql/session.py", line 44, in session jvm.com.hortonworks.spark.sql.hive.llap.HiveWarehouseBuilder.session(jsparkSession)) TypeError: 'JavaPackage' object is not callable

 

how do i fix it ? thanks

1 ACCEPTED SOLUTION

avatar
Explorer

i solved it by re configure spark.jars & spark.submit.Pyfiles in spark interpreters

View solution in original post

4 REPLIES 4

avatar
Master Collaborator

HI @myzard Is the Hive warehouse connector configured with the interpterter? If so, ensure that HWC is configured correctly with the settings mentioned in the below doc.

https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.0/integrating-hive/content/hive_zeppelin_configu...

avatar
Explorer

yes i already did that but still 

TypeError: 'JavaPackage' object is not callable

avatar
Master Collaborator

@myzard Can you share the screenshot of interpreter settings

avatar
Explorer

i solved it by re configure spark.jars & spark.submit.Pyfiles in spark interpreters