Skip to content

Commit b8f1ca1

Browse files
committed
Fix function signature
1 parent f9902c2 commit b8f1ca1

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
@@ -162,8 +162,8 @@ class bluemix(sc: SparkContext, name: String, creds: HashMap[String, String],
162162
"api_key" or "iam_token". "api_key" will be chosen as default if the value is not set.
163163
*/
164164
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") {
167167

168168
// check for valid credentials
169169
_validate_credentials(credentials, cosType, authMethod)
@@ -204,7 +204,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
204204
}
205205
}
206206

207-
private def _validate_credentials(credentials, cosType, authMethod) {
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, authMethod) : Array {
218+
private def _get_required_key_array(cosType : String, authMethod : String) : Array {
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)