scala - S3 bucket name gets added to the S3 endpoint -


when trying access file s3 bucket using scala, bucket name gets added front of endpoint , endpoint becomes wrong , in-accessible.

libraries:

librarydependencies += "org.apache.spark" % "spark-core_2.11" % "2.0.0" librarydependencies += "org.apache.spark" % "spark-sql_2.11" % "2.0.0" librarydependencies += "org.apache.hadoop" % "hadoop-aws" % "2.8.0" 

code:

sc.hadoopconfiguration.set("fs.s3a.endpoint", "[endpoint]") sc.textfile("s3a://[bucket_name]/testa.txt") 

enabling path style urls solves issue there no virtual hosts configuration done on server s3 installed. fs.s3a.path.style.access(docs) can set true enable path style urls.


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -