Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
S3 bucket name gets added to the S3 endpoint

When trying to access a file from a S3 bucket using Scala, the bucket name gets added to the front of endpoint and the endpoint becomes wrong and 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")
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Enabling the path style URLs solves the issue as there are no virtual hosts configuration done on the server where S3 is installed. fs.s3a.path.style.access(docs) can be set to true to enable path style URLs.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!