HIVE-10760 : Templeton: HCatalog Get Column for Non-existent column returns Server Error (500) rather than Not Found(404) (Lekha Thota via Sushanth Sowmyan)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ac755ebe Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ac755ebe Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ac755ebe Branch: refs/heads/llap Commit: ac755ebe26361a4647d53db2a28500f71697b276 Parents: ff405a3 Author: Sushanth Sowmyan <khorg...@gmail.com> Authored: Wed May 27 15:22:05 2015 -0700 Committer: Sushanth Sowmyan <khorg...@gmail.com> Committed: Wed May 27 15:22:58 2015 -0700 ---------------------------------------------------------------------- .../java/org/apache/hive/hcatalog/templeton/HcatDelegator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/ac755ebe/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java ---------------------------------------------------------------------- diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java index cd9128e..8a4758c 100644 --- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java +++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java @@ -766,7 +766,7 @@ public class HcatDelegator extends LauncherDelegator { Object o = res.getEntity(); final Map fields = (o != null && (o instanceof Map)) ? (Map) o : null; if (fields == null) - throw new SimpleWebException(HttpStatus.INTERNAL_SERVER_ERROR_500, "Internal error, unable to find column " + throw new SimpleWebException(HttpStatus.NOT_FOUND_404, "Internal error, unable to find column " + column); @@ -781,7 +781,7 @@ public class HcatDelegator extends LauncherDelegator { } } if (found == null) - throw new SimpleWebException(HttpStatus.INTERNAL_SERVER_ERROR_500, "unable to find column " + column, + throw new SimpleWebException(HttpStatus.NOT_FOUND_404, "unable to find column " + column, new HashMap<String, Object>() { { put("description", fields);