Using R, Unable to Read Image files on Azure DataLakeStore -


using r, trying read image files using webhdfs api on azure datalakestore. not working.

however, can read text files using webhdfs api sitting next image file, using same code, no issues. also, can read image files openly available on internet.

1. code read jpg on datalakestore (doesnt work) using webhdfs api

a <- get("https://.azuredatalakestore.net/webhdfs/v1//pic.jpg?op=open&read=true", add_headers(authorization = "bearer "))

a$status_code == 403

or

a <- get("https://.azuredatalakestore.net/webhdfs/v1//pic.jpg", add_headers(authorization = "bearer "))

a$status_code == 400

2. code read jpg on open web (works fine)

a <- get("http://cran.r-project.org/rlogo.jpg")

a$status_code == 200 x <- content(a)

plot(0:1, 0:1, type = "n")

rasterimage(x, 0, 0, 1, 1)

3. code read text (sitting next image file on datalakestore (works fine) using webhdfs api

a <- get("https://.azuredatalakestore.net/webhdfs/v1//testfile3.txt?op=open&read=true", add_headers(authorization = "bearer ")) a$status_code == 200


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -