@@ -129,10 +129,15 @@ bluemix <- setRefClass("bluemix",
129
129
# ' @export CloudObjectStorage
130
130
# ' @exportClass CloudObjectStorage
131
131
CloudObjectStorage <- setRefClass(" CloudObjectStorage" ,
132
- fields = list (configName = " character" ),
132
+ fields = list (configName = " character" , cosType = " character " , authMethod = " character " ),
133
133
methods = list (
134
- initialize = function (... , sparkContext , credentials , configurationName = " " ) {
134
+ initialize = function (... , sparkContext , credentials , configurationName = " " ,
135
+ cosType = " softlayer_cos" , authMethod = " api_key" ) {
135
136
137
+ # validate input
138
+ validateInput(credentials , cosType , authMethod )
139
+
140
+ # set up hadoop config
136
141
137
142
if (is.null(credentials [" endpoint" ][[1 ]])) {
138
143
stop(" Attribute endpoint in credentials is missing!" )
@@ -164,6 +169,10 @@ CloudObjectStorage <- setRefClass("CloudObjectStorage",
164
169
return (" service" )
165
170
},
166
171
172
+ validateInput = function (credentials , cosType , authMethod ) {
173
+
174
+ },
175
+
167
176
url = function (bucketName , objectName ) {
168
177
serviceName = getConfigName()
169
178
return (paste(" cos://" , bucketName , " ." , serviceName , " /" , objectName , sep = " " ))
0 commit comments