mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Fix for writes from Apache Spark. (#4074)
- Due to usage of amazon SDK, spark expects md5sum of empty string to be returned when it does PUT on a directory. - The fix returns md5sum of a empty string for the above mentioned case. - This fixes the issue of Apache Spark not being able to write into Minio.
This commit is contained in:
committed by
Harshavardhana
parent
a4209c10ea
commit
929a13f33f
@@ -34,6 +34,9 @@ const (
|
||||
|
||||
// Buckets meta prefix.
|
||||
bucketMetaPrefix = "buckets"
|
||||
|
||||
// Md5Sum of empty string.
|
||||
emptyStrMd5Sum = "d41d8cd98f00b204e9800998ecf8427e"
|
||||
)
|
||||
|
||||
// Global object layer mutex, used for safely updating object layer.
|
||||
@@ -67,6 +70,10 @@ func dirObjectInfo(bucket, object string, size int64, metadata map[string]string
|
||||
// return success.
|
||||
md5Sum := metadata["md5Sum"]
|
||||
delete(metadata, "md5Sum")
|
||||
if md5Sum == "" {
|
||||
md5Sum = emptyStrMd5Sum
|
||||
}
|
||||
|
||||
return ObjectInfo{
|
||||
Bucket: bucket,
|
||||
Name: object,
|
||||
|
||||
Reference in New Issue
Block a user