Skip to content

Commit ed2da1b

Browse files
committed
add scala named args
1 parent 49af699 commit ed2da1b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scala/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ var bucketName = "myBucket"
146146
var objectname = "mydata.csv"
147147

148148
var configurationName = "cos_config_name" // you can choose any string you want
149-
var cos = new CloudObjectStorage(sc, credentials, configurationName)
149+
var cos = new CloudObjectStorage(sc=sc, credentials=credentials, configurationName=configurationName)
150150
var spark = SparkSession.
151151
builder().
152152
getOrCreate()
@@ -173,7 +173,9 @@ var bucketName = "myBucket"
173173
var objectname = "mydata.csv"
174174

175175
var configurationName = "cos_config_name" // you can choose any string you want
176-
var cos = new CloudObjectStorage(sc, credentials, configurationName, "bluemix_cos")
176+
var cos = new CloudObjectStorage(sc=sc, credentials=credentials,
177+
configurationName=configurationName,
178+
cosType="bluemix_cos")
177179
var spark = SparkSession.
178180
builder().
179181
getOrCreate()
@@ -200,7 +202,10 @@ var bucketName = "myBucket"
200202
var objectname = "mydata.csv"
201203

202204
var configurationName = "cos_config_name" // you can choose any string you want
203-
var cos = new CloudObjectStorage(sc, credentials, configurationName, "bluemix_cos", "iam_token")
205+
var cos = new CloudObjectStorage(sc=sc, credentials=credentials,
206+
configurationName=configurationName,
207+
cosType="bluemix_cos",
208+
authMethod="iam_token")
204209
var spark = SparkSession.
205210
builder().
206211
getOrCreate()

0 commit comments

Comments
 (0)