I am getting this warning when doing s3 GET Object request
WARN S3AbortableInputStream: Not all bytes were read from the
S3ObjectInputStream, aborting HTTP connection. This is likely an error
and may result in sub-optimal behavior. Request only the bytes you
need via a ranged GET or drain the input stream after use
I do not have a clear understanding of what needs to be done.
Below is the code snippet I am using
try {
s3obj = s3Client.getObject(s3Bucket, objectSummary.getKey)
val name = s3obj.getKey.substring(dirPath.length + 1)
val filename = name.replace(".xml", "")
endpoints += base_url + filename
} catch {
case e@(_: IOException |_ : JSONException | _: Exception) =>
println(e)
} finally {
if (s3obj != null)
s3obj.close()
}