fix spark read s3 bug (sc.binaryFiles)

This commit is contained in:
limd
2020-08-01 01:08:30 +08:00
parent 28764f237c
commit b41b7ea4d0
2 changed files with 18 additions and 5 deletions

View File

@@ -230,6 +230,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
resp, postErr := client.Do(proxyReq)
if resp.ContentLength == -1 {
writeErrorResponse(w, ErrNoSuchKey, r.URL)
return
}
if postErr != nil {
glog.Errorf("post to filer: %v", postErr)
writeErrorResponse(w, ErrInternalError, r.URL)