Search code examples
pythonapache-sparkibm-cloudibm-cloud-plugin

Add a library in Spark in Bluemix & connect MongoDB , Spark together


1) I have Spark on Bluemix platform, how do I add a library there ?

I can see the preloaded libraries but cant add a library that I want.

Any command line argument that will install a library?

pip install --package is not working there

2) I have Spark and Mongo DB running, but I am not able to connect both of them.

con ='mongodb://admin:ITCW....ssl=true'
ssl1 ="LS0tLS ....." client = MongoClient(con,ssl=True)
db = client.mongo11
collection = db.mongo11
ff=db.sammy.find()

Error I am getting is :
SSL handshake failed: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)


Solution

  • In a Python notebook:

    !pip install <package>

    and then

    import <package>