Skip to content

Commit 8957767

Browse files
committed
Fix bugs
1 parent e4ce937 commit 8957767

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

r/sparkr/R/osconfig.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,12 @@ CloudObjectStorage <- setRefClass("CloudObjectStorage",
159159
SparkR:::callJMethod(hConf, "set", paste(prefix, "iam.token", sep='.'), credentials['iamToken'][[1]])
160160
}
161161

162-
if ("iamServiceEndpoint" %in% credentials) {
162+
if ("iamServiceEndpoint" %in% names(credentials)) {
163+
print('true')
163164
SparkR:::callJMethod(hConf, "set", paste(prefix, "iam.endpoint", sep='.'), credentials['iamServiceEndpoint'][[1]])
164165
}
165166

166-
if ("v2SignerType" %in% credentials) {
167+
if ("v2SignerType" %in% names(credentials)) {
167168
SparkR:::callJMethod(hConf, "set", paste(prefix, "v2.signer.type", sep='.'), credentials['v2SignerType'][[1]])
168169
}
169170
}
@@ -181,7 +182,7 @@ CloudObjectStorage <- setRefClass("CloudObjectStorage",
181182

182183
# check the existence of all required values in credentials
183184
for (key in requiredKeys) {
184-
if (!key %in% credentials) {
185+
if (!key %in% names(credentials)) {
185186
stop(paste("Invalid input: missing required input [", key, "]!", sep=''))
186187
}
187188
}

0 commit comments

Comments
 (0)