@@ -174,11 +174,11 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
174
174
175
175
hadoopConf.set(prefix + " .endpoint" , credentials(" endPoint" ))
176
176
177
- if (cos_type == " softlayer_cos" ) {
177
+ if (cosType == " softlayer_cos" ) {
178
178
// softlayer cos case
179
179
hadoopConf.set(prefix + " .access.key" , credentials(" accessKey" ))
180
180
hadoopConf.set(prefix + " .secret.key" , credentials(" secretKey" ))
181
- } else if (cos_type == " bluemix_cos" ) {
181
+ } else if (cosType == " bluemix_cos" ) {
182
182
// bluemix cos case
183
183
hadoopConf.set(prefix + " .iam.service.id" , credentials(" serviceId" ))
184
184
if (authMethod == " api_key" ) {
@@ -204,7 +204,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
204
204
}
205
205
}
206
206
207
- private def _validate_credentials (credentials : HashMap [String , String ], cosType : String , authMethod : String ) {
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 : String , authMethod : String ) : Array {
218
+ private def _get_required_key_array (cosType : String , authMethod : String ) : Array [ String ] = {
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