You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/11 03:28:00 UTC

[jira] [Work logged] (HIVE-24558) Handle update in table level regular expression.

     [ https://issues.apache.org/jira/browse/HIVE-24558?focusedWorklogId=534116&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-534116 ]

ASF GitHub Bot logged work on HIVE-24558:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Jan/21 03:27
            Start Date: 11/Jan/21 03:27
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #1804:
URL: https://github.com/apache/hive/pull/1804#discussion_r554672844



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -410,12 +413,16 @@ private boolean shouldDump(Path previousDumpPath) throws IOException {
    * @return true if need to examine tables for dump and false if not.
    */
   private boolean shouldExamineTablesToDump() {
-    return (work.oldReplScope != null)
+    return (previousReplScopeModified())
             || !tablesForBootstrap.isEmpty()
             || conf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)
             || conf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES);
   }
 
+  private boolean previousReplScopeModified() {

Review comment:
       dmd.setDump(DumpType.BOOTSTRAP, bootDumpBeginReplId, bootDumpEndReplId, cmRoot, executorId,
           work.oldReplScope != null);
   Shouldn't this line also also previousReplScopeModified() otherwise load will always assume that there is change in expession.

##########
File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/repl/ReplScope.java
##########
@@ -116,4 +117,27 @@ private boolean inTableExcludedList(final String tableName) {
     }
     return excludedTableNamePattern.matcher(tableName).matches();
   }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (! (o instanceof ReplScope)) {
+      return false;
+    }
+
+    ReplScope replScope = (ReplScope)o;
+    return ((replScope.getExcludedTableNames() == null ?  (this.excludedTableNames == null) :
+      replScope.getExcludedTableNames().equals(this.excludedTableNames))

Review comment:
       nit: getExcludedTableNames() /getIncludedTableNames() methods can be replaced by replScope.excludedTableNamePattern and replScope.includedTableNamePattern respectively.




----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 534116)
    Time Spent: 20m  (was: 10m)

> Handle update in table level regular expression.
> ------------------------------------------------
>
>                 Key: HIVE-24558
>                 URL: https://issues.apache.org/jira/browse/HIVE-24558
>             Project: Hive
>          Issue Type: Task
>            Reporter: Aasha Medhi
>            Assignee: Aasha Medhi
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-24558.01.patch, HIVE-24558.02.patch, HIVE-24558.03.patch, HIVE-24558.04.patch, HIVE-24558.05.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)