ASF GitHub Bot logged work on HIVE-23671:

                Author: ASF GitHub Bot
            Created on: 06/Jul/20 16:19
            Start Date: 06/Jul/20 16:19
    Worklog Time Spent: 10m 
      Work Description: pvargacl commented on a change in pull request #1087:
URL: https://github.com/apache/hive/pull/1087#discussion_r450334396

File path: 
@@ -111,24 +120,24 @@ public IMetaStoreClient getMsc() {
    * @param partitions
    *          List of partition name value pairs, if null or empty check all
    *          partitions
-   * @param table
-   * @param result
-   *          Fill this with the results of the check
+   * @param table Table we want to run the check for.
+   * @return Results of the check
    * @throws MetastoreException
    *           Failed to get required information from the metastore.
    * @throws IOException
    *           Most likely filesystem related
-  public void checkMetastore(String catName, String dbName, String tableName,
-      List<? extends Map<String, String>> partitions, Table table, CheckResult 
+  public CheckResult checkMetastore(String catName, String dbName, String 
+      List<? extends Map<String, String>> partitions, Table table)
       throws MetastoreException, IOException {
+    CheckResult result = new CheckResult();
     if (dbName == null || "".equalsIgnoreCase(dbName)) {
       dbName = Warehouse.DEFAULT_DATABASE_NAME;
     try {
       if (tableName == null || "".equals(tableName)) {
+        // TODO: I do not think this is used by anything other than tests

Review comment:
       I do not know. If I understand correctly there is no way currently to 
call MSCK repair without a table specified, but it seems like someone made some 
effort to create that feature and tests for it. But i don't know if we ever 
want that in production (calling msck repair for every table seems like a quick 
way to overwhelm the system)  I left this comment here, for anybody who tries 
to makes sense of this code.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 454934)
    Time Spent: 8h 10m  (was: 8h)

> MSCK repair should handle transactional tables in certain usecases
> ------------------------------------------------------------------
>                 Key: HIVE-23671
>                 URL: https://issues.apache.org/jira/browse/HIVE-23671
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Peter Varga
>            Assignee: Peter Varga
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 8h 10m
>  Remaining Estimate: 0h
> The MSCK REPAIR tool does not handle transactional tables too well. It can 
> find and add new partitions the same way as for non-transactional tables, but 
> since the writeId differences are not handled, the data can not read back 
> from the new partitions.
> We could handle some usecases when the writeIds in the HMS and the underlying 
> data are not conflicting. If the HMS does not contains allocated writes for 
> the table we can seed the table with the writeIds read from the directory 
> structrure.
> Real life use cases could be:
>  * Copy data files from one cluster to another with different HMS, create the 
> table and call MSCK REPAIR
>  * If the HMS db is lost, recreate the table and call MSCK REPAIR

This message was sent by Atlassian Jira

Reply via email to