IBM Bluemix set_hadoop_config error

2016-08-03T10:10:12

Whenever I try the setup procedure for Apache spark data analytics, I get this error.

In

def set_hadoop_config(credentials):
    prefix = "fs.swift.service." + credentials['name'] 
    hconf = sc._jsc.hadoopConfiguration()
    hconf.set(prefix + ".auth.url", credentials['auth_url']+'/v3/auth/tokens')
    hconf.set(prefix + ".auth.endpoint.prefix", "endpoints")
    hconf.set(prefix + ".tenant", credentials['project_id'])
    hconf.set(prefix + ".username", credentials['user_id'])
    hconf.set(prefix + ".password", credentials['password'])
    hconf.setInt(prefix + ".http.port", 8080)
    hconf.set(prefix + ".region", credentials['region'])
    hconf.setBoolean(prefix + ".public", True)

In

credentials['name'] = 'keystone'
set_hadoop_config(credentials)

Out

---------------------------------------------------------------------------
 NameError                                 Traceback (most recent call last)
<ipython-input-6-976c35e1d85e> in <module>()
----> 1 credentials['name'] = 'keystone'
      2 set_hadoop_config(credentials)

NameError: name 'credentials' is not defined

Does anyone know how to solve this problem? I am stuck

Copyright License:
Author:「Suyeon Byun」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/38733247/ibm-bluemix-set-hadoop-config-error

About “IBM Bluemix set_hadoop_config error” questions

I am getting the following error when I try to run one of the samples that is given for the Apache Spark service on IBM Bluemix: NameErrorTraceback (most recent call last) &lt;ipython-input-5-
Whenever I try the setup procedure for Apache spark data analytics, I get this error. In def set_hadoop_config(credentials): prefix = "fs.swift.service." + credentials['name'] hconf = sc...
I get the following error when linking IBM id to Bluemix: IBM Bluemix Failure during registration An error occurred. Try again in a few minutes. If you continue to have problems, click the foll...
I am trying to create something in IBM Bluemix. Stuck at the beginning. I installed the Extension lib x_15 from openNTF. In the DDE preferences I selected the UK Bluemix server. Entered my credenti...
I have been using the IBM Bluemix console, the new version lately. I am unable to find the Dashboard view as available in the classic version of IBM Bluemix console. Please help in identifying the
When following https://www.ibm.com/developerworks/cloud/library/cl-bluemix-minecraft-watson-trs-4/ and run docker push command. I received the following error: Error response from daemon: 405
I am getting an error dialog "Account Not Active" when I try to login to IBM Bluemix with my IBM ID and then it automatically logs me out. Attached is the error dialog screen. Could anyone please h...
I am exploring IBM Bluemix platform and checking whether it support IBM PMQ as a Predictive Analytics service in Bluemix. Or it is not added to Bluemix suite.
I'm trying to deploy an app on IBM Cloud (Bluemix) from a Github repository (https://github.com/IBM/watson-vehicle-damage-analyzer). When I deploy the app I choose London as location. The project ...
When pushing to the Bluemix registry, I get the following error: 47c2386f248c: Waiting 2be95f0d8a0c: Waiting 2df9b8def18a: Waiting unauthorized: authentication required I've got the cs and cr

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.