rwebhdfs icon indicating copy to clipboard operation
rwebhdfs copied to clipboard

Error when writing file

Open catronro opened this issue 10 years ago • 1 comments
trafficstars

I am trying to write a file to HDFS using this package...when I submit the write_file command I get the below back. Is this a syntax error on my part or an issue with the package?

COMMAND: write_file(hdfs, "/db/src/components/dataout.csv", "./getcomponentdata/dataout.csv")

ERROR:

Request failed: Bad Request

Apache Tomcat/6.0.37 - Error report

HTTP Status 400 - Data upload requests must have content-type set to 'application/octet-stream'

<HR size="1" noshade="noshade">

type Status report

message Data upload requests must have content-type set to 'application/octet-stream'

d

catronro avatar Sep 25 '15 15:09 catronro

Are you using httpfs rather than webhdfs? It looks like to be same issue described here: https://issues.cloudera.org/browse/HUE-679

It should be a relatively easy fix but I don't have a webhdfs handy for me test right now. I pushed a commit that hopefully should fix the issue. Can you run the following and help me test?

devtools::install_github("saurfang/rwebhdfs@write_file")

saurfang avatar Sep 27 '15 19:09 saurfang