Ver código fonte

HUE-679 File upload to HttpFS doesn't work

Romain Rigaux 13 anos atrás
pai
commit
af7b6e6fe2
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

+ 2 - 1
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

@@ -458,7 +458,8 @@ class WebHdfs(Hdfs):
 
     # Now talk to the real thing. The redirect url already includes the params.
     client = self._make_client(next_url, self.security_enabled)
-    return resource.Resource(client).invoke(method, data=data)
+    headers = {'Content-Type': 'application/octet-stream'}
+    return resource.Resource(client).invoke(method, data=data, headers=headers)
 
 
   def _get_redirect_url(self, webhdfs_ex):