Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Pylon] WebHDFS library compatibility #2134

Merged
merged 2 commits into from
Feb 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/pylon/src/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ http {
location ~ ^/webhdfs/api(.*)$ {
proxy_pass {{WEBHDFS_URI}}/webhdfs$1$is_args$args;
proxy_intercept_errors on;
error_page 307 = @handle_webhdfs_api_redirect;
error_page 307 @handle_webhdfs_api_redirect;
}
location ~ ^/webhdfs/webhdfs {
rewrite ^/webhdfs/webhdfs(.*)$ /webhdfs/api$1 last;
}
location @handle_webhdfs_api_redirect {
if ($upstream_http_location ~ ^http://([^/]+):(\d+)/(.*)$) {
return 307 $scheme://$http_host/a/$1:$2/$3;
add_header Location $scheme://$http_host/a/$1:$2/$3;
return 300 "";
}
}

Expand Down