hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-24064) Disable Materialized View Replication
Date Tue, 25 Aug 2020 06:12:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 25/Aug/20 06:11
            Start Date: 25/Aug/20 06:11
    Worklog Time Spent: 10m 
      Work Description: aasha commented on a change in pull request #1422:
URL: https://github.com/apache/hive/pull/1422#discussion_r476198220



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -542,6 +549,24 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData dmd, Path cmRoot,
Hive
       if (ev.getEventId() <= resumeFrom) {
         continue;
       }
+
+      //disable materialized-view replication if configured
+      String tblName = null;
+      tblName = ev.getTableName();
+      if(tblName != null) {
+        try {
+          Table table = null;
+          HiveWrapper.Tuple<Table> TableTuple = new HiveWrapper(hiveDb, dbName).table(tblName,
conf);

Review comment:
       rename the variable. should start with small letter

##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -540,6 +540,8 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
     REPL_DUMP_METADATA_ONLY("hive.repl.dump.metadata.only", false,
         "Indicates whether replication dump only metadata information or data + metadata.
\n"
           + "This config makes hive.repl.include.external.tables config ineffective."),
+    REPL_MATERIALIZED_VIEWS_ENABLED("hive.repl.materialized.views.enabled", false,

Review comment:
       rename to REPL_INCLUDE_MATERIALIZED_VIEWS to match the other config naming

##########
File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -136,7 +136,7 @@
   protected static final Logger LOG = LoggerFactory.getLogger(TestReplicationScenarios.class);
   private ArrayList<String> lastResults;
 
-  private final boolean VERIFY_SETUP_STEPS = false;
+  private boolean VERIFY_SETUP_STEPS = false;

Review comment:
       can be removed. the value is overwritten inside the tests so not a constant

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -542,6 +549,24 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData dmd, Path cmRoot,
Hive
       if (ev.getEventId() <= resumeFrom) {
         continue;
       }
+
+      //disable materialized-view replication if configured
+      String tblName = null;
+      tblName = ev.getTableName();
+      if(tblName != null) {
+        try {
+          Table table = null;
+          HiveWrapper.Tuple<Table> TableTuple = new HiveWrapper(hiveDb, dbName).table(tblName,
conf);
+          table = TableTuple != null ? TableTuple.object : null;

Review comment:
       can be initialised in the same statement

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -542,6 +549,24 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData dmd, Path cmRoot,
Hive
       if (ev.getEventId() <= resumeFrom) {
         continue;
       }
+
+      //disable materialized-view replication if configured
+      String tblName = null;
+      tblName = ev.getTableName();

Review comment:
       can be initialised in the same statement

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -542,6 +549,24 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData dmd, Path cmRoot,
Hive
       if (ev.getEventId() <= resumeFrom) {
         continue;
       }
+
+      //disable materialized-view replication if configured
+      String tblName = null;
+      tblName = ev.getTableName();
+      if(tblName != null) {
+        try {
+          Table table = null;
+          HiveWrapper.Tuple<Table> TableTuple = new HiveWrapper(hiveDb, dbName).table(tblName,
conf);
+          table = TableTuple != null ? TableTuple.object : null;
+          if (TableTuple != null && TableType.MATERIALIZED_VIEW.equals(TableTuple.object.getTableType())
&& !isMaterializedViewsReplEnabled()) {

Review comment:
       isMaterializedViewsReplEnabled check can be done at the top. no processing is needed
if its enabled

##########
File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -2518,11 +2518,16 @@ public void testRenamePartitionedTableAcrossDatabases() throws IOException
{
 
   @Test
   public void testViewsReplication() throws IOException {
+    boolean verify_setup_tmp = VERIFY_SETUP_STEPS;

Review comment:
       you can add a new test just for MV. 
   
   Create MV with same DB and diff DB
   Test after bootstrap, replica shouldn't have MV.
   
   Create MV with same DB and diff DB
   Test after incremental, replica shouldn't have MV.




----------------------------------------------------------------
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: 474152)
    Time Spent: 20m  (was: 10m)

> Disable Materialized View Replication
> -------------------------------------
>
>                 Key: HIVE-24064
>                 URL: https://issues.apache.org/jira/browse/HIVE-24064
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Arko Sharma
>            Assignee: Arko Sharma
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-24064.01.patch, HIVE-24064.02.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




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

Mime
View raw message