@@ -53,7 +53,8 @@ def url(self, container_name, object_name):
53
53
54
54
class softlayer2d (object ):
55
55
56
- def __init__ (self , sparkcontext , name , auth_url , tenant , username , password ):
56
+ def __init__ (self , sparkcontext , name , auth_url , tenant , username , password ,
57
+ swift2d_driver = 'com.ibm.stocator.fs.ObjectStoreFileSystem' ):
57
58
'''
58
59
sparkcontext is a SparkContext object.
59
60
name is a string that can be anything other than an empty string.
@@ -65,6 +66,7 @@ def __init__(self, sparkcontext, name, auth_url, tenant, username, password):
65
66
66
67
prefix = "fs.swift2d.service." + name
67
68
hconf = sparkcontext ._jsc .hadoopConfiguration ()
69
+ hconf .set ("fs.swift2d.impl" , swift2d_driver )
68
70
hconf .set (prefix + ".auth.url" , auth_url )
69
71
hconf .set (prefix + ".username" , username )
70
72
hconf .set (prefix + ".tenant" , tenant )
@@ -120,7 +122,8 @@ def url(self, container_name, object_name):
120
122
121
123
class bluemix2d (object ):
122
124
123
- def __init__ (self , sparkcontext , credentials ):
125
+ def __init__ (self , sparkcontext , credentials ,
126
+ swift2d_driver = 'com.ibm.stocator.fs.ObjectStoreFileSystem' ):
124
127
'''
125
128
sparkcontext is a SparkContext object.
126
129
@@ -144,6 +147,7 @@ def __init__(self, sparkcontext, credentials):
144
147
145
148
prefix = "fs.swift2d.service." + credentials ['name' ]
146
149
hconf = sparkcontext ._jsc .hadoopConfiguration ()
150
+ hconf .set ("fs.swift2d.impl" , swift2d_driver )
147
151
hconf .set (prefix + ".auth.url" , credentials ['auth_url' ]+ '/v3/auth/tokens' )
148
152
hconf .set (prefix + ".auth.endpoint.prefix" , "endpoints" )
149
153
hconf .set (prefix + ".auth.method" ,"keystoneV3 " )
0 commit comments