@@ -129,25 +129,37 @@ class bluemix(sc: SparkContext, name: String, creds: HashMap[String, String],
129
129
}
130
130
131
131
/**
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 .
134
134
135
135
* Constructor arguments:
136
136
137
137
* sparkcontext: a SparkContext object.
138
138
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]
146
151
147
152
* configurationName [optional]: string that identifies this configuration. You can
148
153
use any string you like. This allows you to create
149
154
multiple configurations to different Object Storage accounts.
150
155
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.
151
163
*/
152
164
class CloudObjectStorage (sc : SparkContext , credentials : HashMap [String , String ],
153
165
configurationName : String = " " , cosType= " softlayer_cos" ,
0 commit comments