HIVE-27405 - Throw out the detail error Invalid partition name to the… - #5087
Conversation
| PREHOOK: type: MSCK | ||
| PREHOOK: Output: default@table_external | ||
| FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ddl.DDLTask | ||
| FAILED: Execution Error, return code 40000 from org.apache.hadoop.hive.ql.ddl.DDLTask. Repair: Cannot add partition table_external:day=Foo due to invalid characters in the name |
There was a problem hiding this comment.
The new message is really helpful 👍
| PREHOOK: type: MSCK | ||
| PREHOOK: Output: default@repairtable | ||
| FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ddl.DDLTask | ||
| #### A masked pattern was here #### |
There was a problem hiding this comment.
What's the real execption here?
There was a problem hiding this comment.
real exception is FAILED: Execution Error, return code 40000 from org.apache.hadoop.hive.ql.ddl.DDLTask. org.apache.hadoop.hive.metastore.api.MetastoreException: MSCK is missing partition columns under file:/Users/tarak/IdeaProjects/tarak-Apache-Hive/itests/qtest/target/localfs/warehouse/repairtable/p1=c
since it contained file location details, it is getting masked in test case output as per Masking rules
| LOG.error("Unable to create msck instance.", e); | ||
| return 1; | ||
| throw e; | ||
| } catch (SemanticException e) { |
There was a problem hiding this comment.
Will client get the detail error information in case of SemanticException?
There was a problem hiding this comment.
Yes. Added test case msck_repair_8.q to see how semantic exception is handled
| PREHOOK: type: MSCK | ||
| PREHOOK: Output: default@repairtable | ||
| FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ddl.DDLTask | ||
| #### A masked pattern was here #### |
There was a problem hiding this comment.
Real exception is
FAILED: Execution Error, return code 40000 from org.apache.hadoop.hive.ql.ddl.DDLTask. org.apache.hadoop.hive.metastore.api.MetastoreException: MSCK finds a file rather than a directory when it searches for file:/Users/tarak/IdeaProjects/tarak-Apache-Hive/itests/qtest/target/localfs/warehouse/repairtable/p1=c/datafile
which is getting masked as it contained location of file
| PREHOOK: type: MSCK | ||
| PREHOOK: Output: default@repairtable | ||
| FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ddl.DDLTask | ||
| #### A masked pattern was here #### |
There was a problem hiding this comment.
Real exception
FAILED: Execution Error, return code 40000 from org.apache.hadoop.hive.ql.ddl.DDLTask. org.apache.hadoop.hive.metastore.api.MetastoreException: MSCK finds a file rather than a directory when it searches for file:/Users/tarak/IdeaProjects/tarak-Apache-Hive/itests/qtest/target/localfs/warehouse/repairtable/p1=c/datafile
| PREHOOK: type: MSCK | ||
| PREHOOK: Output: default@repairtable | ||
| FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ddl.DDLTask | ||
| #### A masked pattern was here #### |
There was a problem hiding this comment.
Real exception is
FAILED: Execution Error, return code 40000 from org.apache.hadoop.hive.ql.ddl.DDLTask. org.apache.hadoop.hive.metastore.api.MetastoreException: Unexpected partition key p2 found at file:/Users/tarak/IdeaProjects/tarak-Apache-Hive/itests/qtest/target/localfs/warehouse/repairtable/p2=c
|
…clients (apache#5087)(Taraka Rama Rao Lethavadla, reviewed by okumin, Butao Zhang)



… clients
What changes were proposed in this pull request?
Why are the changes needed?
When try to MSCK TABLE, if there is a directory that doesn't match the partition format, the query fails. However, it doesn't thrown out the detail error information to the client. Rethrowing exception coming from msck.repair call
Does this PR introduce any user-facing change?
Yes, change in error message thrown when there is an issue with msck repair command execution
Is the change a dependency upgrade?
No
How was this patch tested?
Junit test case added