From issues-return-198007-apmail-hive-issues-archive=hive.apache.org@hive.apache.org Tue Aug 25 06:12:02 2020 Return-Path: X-Original-To: apmail-hive-issues-archive@locus.apache.org Delivered-To: apmail-hive-issues-archive@locus.apache.org Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with ESMTP id AC96D191BC for ; Tue, 25 Aug 2020 06:12:02 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 599931247AA for ; Tue, 25 Aug 2020 06:12:02 +0000 (UTC) Received: (qmail 55605 invoked by uid 500); 25 Aug 2020 06:12:01 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 55544 invoked by uid 500); 25 Aug 2020 06:12:01 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 55531 invoked by uid 99); 25 Aug 2020 06:12:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2020 06:12:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id ABA2845B88 for ; Tue, 25 Aug 2020 06:12:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 2866D7802B9 for ; Tue, 25 Aug 2020 06:12:00 +0000 (UTC) Date: Tue, 25 Aug 2020 06:12:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HIVE-24064) Disable Materialized View Replication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 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 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 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
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
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)