I have Bluemix Spark notebooks that I want to share with others. I'd like them to be able to run the notebooks using data on the object storage associated with my Spark instance (so they don't need to load the data themselves).
I'm using the following to configure object storage in a Scala notebook (this code was taken from another stackoverflow post).
def setConfig(name:String, dsConfiguration:String) : Unit = {
val pfx = "fs.swift.service." + name
val settings:Map[String,String] = dsConfiguration.split("\\n").
map(l=>(l.split(":",2)(0).trim(), l.split(":",2)(1).trim()))(breakOut)
val conf = sc.getConf
conf.set(pfx + "auth.url", settings.getOrElse("auth_url",""))
conf.set(pfx + "tenant", settings.getOrElse("tenantId", ""))
conf.set(pfx + "username", settings.getOrElse("username", ""))
conf.set(pfx + "password", settings.getOrElse("password", ""))
conf.set(pfx + "apikey", settings.getOrElse("password", ""))
conf.set(pfx + "auth.endpoint.prefix", "endpoints")
}
setConfig("spark", YOUR_DATASOURCE)
I'm able to successfully access data on my own object storage using the following in Scala notebooks running on my ownluemix Spark service.
val data = sc.textFile("swift://notebooks.spark/mydata.data")
However, others who I've shared the notebook with are not able to access the data on my object storage, using the same object storage configuration shown above, when running the notebook in their own Bluemix Spark service.
How can others running Spark notebooks on their own Bluemix Spark service access data on object storage associated with my Bluemix Spark service.