Skip to content

CloudObjectStorage failed to connect to private COS #48

@gilv

Description

@gilv

I tried to use CloudObjectStorage and connect to my private object storage, but nothing worked.
For example, the following fails:
var credentialsGilCOS = scala.collection.mutable.HashMap[String, String](
"endPoint"->"http://s3-api.us-geo.objectstorage.softlayer.net",
"accessKey"->"AAA",
"secretKey"->"AHA")

var configurationNameGil = "service"
var cosGil = new CloudObjectStorage(sc, credentialsGilCOS, configurationNameGil, "softlayer_cos")
val url = cosGil.url("gvernik", "test1812/a2/data.parquet")
peopleDF.write.format("parquet").save(url)

The following works:
sc.hadoopConfiguration.set("fs.cos.gilv.access.key","AAA")
sc.hadoopConfiguration.set("fs.cos.gilv.secret.key","AHA")
sc.hadoopConfiguration.set("fs.cos.gilv.endpoint","https://s3-api.us-geo.objectstorage.softlayer.net")
sc.hadoopConfiguration.set("fs.cos.gilv.v2.signer.type","false")

peopleDF.write.format("parquet").save("cos://gvernik.gilv/test1812/a2/data.parquet")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions