Skip to content

Commit d2e53d8

Browse files
committed
Fix bugs
1 parent b8f1ca1 commit d2e53d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scala/src/main/scala/Osconfig.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
174174

175175
hadoopConf.set(prefix + ".endpoint", credentials("endPoint"))
176176

177-
if (cos_type == "softlayer_cos") {
177+
if (cosType == "softlayer_cos") {
178178
// softlayer cos case
179179
hadoopConf.set(prefix + ".access.key", credentials("accessKey"))
180180
hadoopConf.set(prefix + ".secret.key", credentials("secretKey"))
181-
} else if (cos_type == "bluemix_cos") {
181+
} else if (cosType == "bluemix_cos") {
182182
// bluemix cos case
183183
hadoopConf.set(prefix + ".iam.service.id", credentials("serviceId"))
184184
if (authMethod == "api_key") {
@@ -204,7 +204,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
204204
}
205205
}
206206

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) = {
208208
val requiredKeys = _get_required_key_array(cosType, authMethod)
209209

210210
// check the existence of all required values in credentials
@@ -215,7 +215,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
215215
}
216216
}
217217

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] = {
219219
val required_key_softlayer_cos = Array("endPoint", "accessKey", "secretKey")
220220
val required_key_list_iam_api_key = Array("endPoint", "apiKey", "serviceId")
221221
val required_key_list_iam_token = Array("endPoint", "iamToken", "serviceId")

0 commit comments

Comments
 (0)