Skip to content

Commit c23bfe1

Browse files
committed
update description and readme file
1 parent d2e53d8 commit c23bfe1

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

scala/README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,10 @@ within a DSX Jupyter notebook, you can obtain your account credentials in the fo
133133
If your Object Storage was created with a Softlayer account, each part of the credentials will
134134
be found as text that you can copy and paste into the example code below.
135135

136-
### Softlayer Cloud Object Storage / Data Science Experience
136+
### Softlayer IBM Cloud Object Storage / Data Science Experience
137137
```scala
138138
import com.ibm.ibmos2spark.CloudObjectStorage
139139

140-
// The credentials HashMap may be created for you with the
141-
// "insert to code" link in your DSX notebook.
142-
143140
var credentials = scala.collection.mutable.HashMap[String, String](
144141
"endPoint"->"https://identity.open.softlayer.com",
145142
"accessKey"->"xx",
@@ -161,15 +158,12 @@ var dfData1 = spark.
161158
load(cos.url(bucketName, objectname))
162159
```
163160

164-
### Bluemix Cloud Object Storage / Data Science Experience
161+
### Bluemix IBM Cloud Object Storage / Data Science Experience
165162
The class CloudObjectStorage allows you to connect to bluemix cos. You can connect to
166163
bluemix using api keys as follows:
167164
```scala
168165
import com.ibm.ibmos2spark.CloudObjectStorage
169166

170-
// The credentials HashMap may be created for you with the
171-
// "insert to code" link in your DSX notebook.
172-
173167
var credentials = scala.collection.mutable.HashMap[String, String](
174168
"endPoint"->"xxx",
175169
"apiKey"->"xxx",

scala/src/main/scala/Osconfig.scala

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,21 @@ class bluemix(sc: SparkContext, name: String, creds: HashMap[String, String],
129129
}
130130

131131
/**
132-
* This class allows you to connect to a cloud object storage (COS) instance. It also support
133-
connecting to a cos instance that is being hosted on bluemix.
132+
* This class allows you to connect to an IBM cloud object storage (COS) instance. It also support
133+
connecting to a COS instance that is being hosted on bluemix.
134134
135135
* Constructor arguments:
136136
137137
* sparkcontext: a SparkContext object.
138138
139-
* credentials: a dictionary with the following required keys to connect to cos.
140-
The required keys differ according to the type of cos.
141-
* - for cos type "softlayer_cos" the following key are required:
142-
* endpoint [required]
139+
* credentials: a dictionary with the following required keys to connect to COS.
140+
The required keys differ according to the type of COS.
141+
* - for COS type "softlayer_cos" the following key are required:
142+
* endPoint [required]
143143
* accessKey [required]
144144
* secretKey [required]
145-
* - for cos type "bluemix_cos", here are the required/optional key:
146-
* endpoint [required]
145+
* - for COS type "bluemix_cos", here are the required/optional key:
146+
* endPoint [required]
147147
* serviceId [required]
148148
* apiKey OR iamToken depends on the selected authorization method (authMethod) [required]
149149
* iamServiceEndpoint [optional] (default: https://iam.ng.bluemix.net/oidc/token)
@@ -154,10 +154,10 @@ class bluemix(sc: SparkContext, name: String, creds: HashMap[String, String],
154154
multiple configurations to different Object Storage accounts.
155155
if a configuration name is not passed the default one will be used "service".
156156
157-
* cosType [optional]: string that identifies the type of cos to connect to. The supported types of cos
157+
* cosType [optional]: string that identifies the type of COS to connect to. The supported types of COS
158158
are "softlayer_cos" and "bluemix_cos". "softlayer_cos" will be chosen as default if no cosType is passed.
159159
160-
* authMethod [optional]: string that identifies the type of authorization method to use when connecting to cos. This parameter
160+
* authMethod [optional]: string that identifies the type of authorization method to use when connecting to COS. This parameter
161161
is not reqired for softlayer_cos but only needed for bluemix_cos. Two options can be chosen for this params
162162
"api_key" or "iam_token". "api_key" will be chosen as default if the value is not set.
163163
*/
@@ -179,7 +179,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
179179
hadoopConf.set(prefix + ".access.key", credentials("accessKey"))
180180
hadoopConf.set(prefix + ".secret.key", credentials("secretKey"))
181181
} else if (cosType == "bluemix_cos") {
182-
// bluemix cos case
182+
// bluemix COS case
183183
hadoopConf.set(prefix + ".iam.service.id", credentials("serviceId"))
184184
if (authMethod == "api_key") {
185185
hadoopConf.set(prefix + ".iam.api.key", credentials("apiKey"))

0 commit comments

Comments
 (0)