Affects Version/s: None
Fix Version/s: None
From Mohammad Islam:
I set "default.app.topology.name" in gateway-site.xml to "uber" (my default topology name).
It worked fine if I gave the full URL. The command looks like this "curl http://<KNOX_GW_URL>/gateway/uber/webhdfs/v1/?op=GETHOMEDIRECTORY'".
However, when I tried with command "curl http://<KNOX_GW_URL>/webhdfs/v1/?op=GETHOMEDIRECTORY'". I got the HTTP error code 500. I looked into gateway.log file and found quite a few error related to rewrite. The exact error messages are shown below:
After that, I modified the webhdfs/2.4.0/rewrite.xml by rewriting the following pattern and it worked for short URL but long URL faces the same issue.
Overall, the rewrite pattern may be the issue. We will need to support for both short and long URL. May be, we can add multiple rewrite rules for each route in service.xml.
Is there any other cleaner way which may work for all cases such as webhdfs, yarn, hive, UIs etc?