GitHub user Susmit07 added a comment to the discussion: S3 multipart upload for 
parquet

In nutshell the doc to b eupdated with:

```
// Function to upload small files using putObject with content length
    private def uploadSmallFileToS3(contentLength: Long): Future[_] = {
      val hdfsSource: Source[ByteString, _] = streamHDFSFile

      // Define the S3 putObject with content length
      val s3Headers = S3Headers.empty
      val s3PutObject = S3.putObject(
        bucket,
        bucketKey,
        hdfsSource,
        contentLength,
        ContentTypes.`application/octet-stream`,
        s3Headers
      )

      // Run the stream to upload the file using putObject
      s3PutObject.runWith(Sink.head).flatMap(objectMetadata => {
        println(s"Uploaded successfully with ETag: ${objectMetadata.eTag}")
        Future.successful(Done)
      })
    }
```

application.conf (src/resource)

```
s3 {
  region = "us-west-2"
  endpoint = ""
  credentials {
    access-key-id = ""
    secret-access-key = ""
  }
 # very important else bucket discovery fails.
  path-style-access = true
  marker {
    bucket = ${S3_MARKER_BUCKET}
  }
  sink {
    bucket = ""
  }
  ssl-enabled = true
}
```


GitHub link: 
https://github.com/apache/pekko-connectors/discussions/870#discussioncomment-10996643

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to