Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

(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