@@ -162,8 +162,8 @@ class bluemix(sc: SparkContext, name: String, creds: HashMap[String, String],
162
162
"api_key" or "iam_token". "api_key" will be chosen as default if the value is not set.
163
163
*/
164
164
class CloudObjectStorage (sc : SparkContext , credentials : HashMap [String , String ],
165
- configurationName : String = " " , cosType= " softlayer_cos" ,
166
- authMethod= " api_key" ) {
165
+ configurationName : String = " " , cosType : String = " softlayer_cos" ,
166
+ authMethod : String = " api_key" ) {
167
167
168
168
// check for valid credentials
169
169
_validate_credentials(credentials, cosType, authMethod)
@@ -204,7 +204,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
204
204
}
205
205
}
206
206
207
- private def _validate_credentials (credentials, cosType, authMethod) {
207
+ private def _validate_credentials (credentials : HashMap [ String , String ], cosType : String , authMethod : String ) {
208
208
val requiredKeys = _get_required_key_array(cosType, authMethod)
209
209
210
210
// check the existence of all required values in credentials
@@ -215,7 +215,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
215
215
}
216
216
}
217
217
218
- private def _get_required_key_array (cosType, authMethod) : Array {
218
+ private def _get_required_key_array (cosType : String , authMethod : String ) : Array {
219
219
val required_key_softlayer_cos = Array (" endPoint" , " accessKey" , " secretKey" )
220
220
val required_key_list_iam_api_key = Array (" endPoint" , " apiKey" , " serviceId" )
221
221
val required_key_list_iam_token = Array (" endPoint" , " iamToken" , " serviceId" )
0 commit comments