[ https://issues.apache.org/jira/browse/HIVE-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated HIVE-4580: ----------------------------------- Status: Open (was: Patch Available) On a clean checkout 7 out of 9 tests in TestWebHCatE2e failed for me, with following trace: {code} listDataBases Failure GET http://localhost:50111/templeton/v1/ddl/database?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> junit.framework.AssertionFailedError: GET http://localhost:50111/templeton/v1/ddl/database?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.listDataBases(TestWebHCatE2e.java:92) 0.037 invalidPath Success 0.008 dropTableNoSuchDB Failure DELETE http://localhost:50111/templeton/v1/ddl/database/no_such_db/table/t1?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<404> but was:<401> junit.framework.AssertionFailedError: DELETE http://localhost:50111/templeton/v1/ddl/database/no_such_db/table/t1?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<404> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.dropTableNoSuchDB(TestWebHCatE2e.java:112) 0.008 dropTableNoSuchDbIfExists Failure DELETE http://localhost:50111/templeton/v1/ddl/database/no_such_db/table/t1?user.name=johndoe&ifExists=true {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<404> but was:<401> junit.framework.AssertionFailedError: DELETE http://localhost:50111/templeton/v1/ddl/database/no_such_db/table/t1?user.name=johndoe&ifExists=true {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<404> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.dropTableNoSuchDbIfExists(TestWebHCatE2e.java:125) 0.008 dropTableIfExists Failure DELETE http://localhost:50111/templeton/v1/ddl/database/default/table/no_such_table?user.name=johndoe&ifExists=true {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> junit.framework.AssertionFailedError: DELETE http://localhost:50111/templeton/v1/ddl/database/default/table/no_such_table?user.name=johndoe&ifExists=true {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.dropTableIfExists(TestWebHCatE2e.java:136) 0.007 createDataBase Failure PUT http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> junit.framework.AssertionFailedError: PUT http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.createDataBase(TestWebHCatE2e.java:149) 0.051 createTable Failure PUT http://localhost:50111/templeton/v1/ddl/database/default/table/test_table?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> junit.framework.AssertionFailedError: PUT http://localhost:50111/templeton/v1/ddl/database/default/table/test_table?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<200> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.createTable(TestWebHCatE2e.java:166) 0.045 describeNoSuchTable Failure GET http://localhost:50111/templeton/v1/ddl/database/default/table/no_such_table?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<404> but was:<401> junit.framework.AssertionFailedError: GET http://localhost:50111/templeton/v1/ddl/database/default/table/no_such_table?user.name=johndoe {"error":"Unable to access program: ${env.HCAT_PREFIX}/bin/hcat"} expected:<404> but was:<401> at org.apache.hcatalog.templeton.TestWebHCatE2e.describeNoSuchTable(TestWebHCatE2e.java:176) {code} Seems like environment is not setup correctly for tests to run. > Change DDLTask to report errors using canonical error messages rather than > http status codes > -------------------------------------------------------------------------------------------- > > Key: HIVE-4580 > URL: https://issues.apache.org/jira/browse/HIVE-4580 > Project: Hive > Issue Type: Bug > Components: HCatalog > Affects Versions: 0.11.0 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Fix For: 0.12.0 > > Attachments: HIVE-4580.1.patch, HIVE-4580.2.patch, HIVE-4580.patch > > Original Estimate: 40h > Remaining Estimate: 40h > > org.apache.hadoop.hive.ql.exec.DDLTask handles DDL operations in Hive. > Some operations (those exposed as REST API by Templeton) in this class, write > a JSON object to stdout (on failure) which includes "error" and "errorCode" > fields. "errorCode" is set to values like 404, 500, etc. i.e. Http Status > codes. I believe this was done to support Templeton REST API. This is not > the right place to introduce Http codes. > DDLTask should use canonical error messages defined in > org.apache.hadoop.hive.ql.ErrorMsg and propagate it up to HCatCli which can > decide how to encode the error and to which stream. In particular it can > create a parseable JSON object which Templeton can then interpret. JSON > object can also be generated here for errors from the parser/resolver (e.g. > trying to describe a table which doesn't exist). > Then Templeton can map the canonical error code to appropriate Http Code. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira