Skip to content

Commit acc4cb0

Browse files
committed
update class desription for the new parameters
1 parent 40f0c9b commit acc4cb0

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

scala/src/main/scala/Osconfig.scala

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

131131
/**
132-
* CloudObjectStorage class sets up a s3d connection between an IBM Spark service
133-
* instance and an IBM Cloud Object Storage instance.
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.
134134
135135
* Constructor arguments:
136136
137137
* sparkcontext: a SparkContext object.
138138
139-
* credentials: a dictionary with the following required keys:
140-
*
141-
* endpoint
142-
143-
* accessKey
144-
145-
* secretKey
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]
143+
* accessKey [required]
144+
* secretKey [required]
145+
* - for cos type "bluemix_cos", here are the required/optional key:
146+
* endpoint [required]
147+
* serviceId [required]
148+
* apiKey OR iamToken depends on the selected authorization method (authMethod) [required]
149+
* iamServiceEndpoint [optional] (default: https://iam.ng.bluemix.net/oidc/token)
150+
* v2SignerType [optional]
146151
147152
* configurationName [optional]: string that identifies this configuration. You can
148153
use any string you like. This allows you to create
149154
multiple configurations to different Object Storage accounts.
150155
if a configuration name is not passed the default one will be used "service".
156+
157+
* cosType [optional]: string that identifies the type of cos to connect to. The supported types of cos
158+
are "softlayer_cos" and "bluemix_cos". "softlayer_cos" will be chosen as default if no cosType is passed.
159+
160+
* authMethod [optional]: string that identifies the type of authorization method to use when connecting to cos. This parameter
161+
is not reqired for softlayer_cos but only needed for bluemix_cos. Two options can be chosen for this params
162+
"api_key" or "iam_token". "api_key" will be chosen as default if the value is not set.
151163
*/
152164
class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
153165
configurationName: String = "", cosType="softlayer_cos",

0 commit comments

Comments
 (0)