New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-19812 : Disable external table replication by default via a coniguration property #365
Conversation
.run("import table " + replDbName + ".t2 from " + exportDataPath) | ||
.run("select * from " + replDbName + ".t2") | ||
.verifyResults(new String[] { "1", "2" }) | ||
.runFailure("import table " + replDbName + ".t3 from " + exportDataPathRepl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Export already failed for this path exportDataPathRepl. No point in importing from this path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its ok to have import
@@ -482,6 +483,11 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal | |||
REPL_ADD_RAW_RESERVED_NAMESPACE("hive.repl.add.raw.reserved.namespace", false, | |||
"For TDE with same encryption keys on source and target, allow Distcp super user to access \n" | |||
+ "the raw bytes from filesystem without decrypting on source and then encrypting on target."), | |||
REPL_INCLUDE_EXTERNAL_TABLES("hive.repl.dump.include.external.tables", false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name can be hive.repl.include.external.tables. Shall remove "dump"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
primary = new WarehouseInstance(LOG, miniDFSCluster, overridesForHiveConf); | ||
replica = new WarehouseInstance(LOG, miniDFSCluster, overridesForHiveConf); | ||
externalDump = new WarehouseInstance(LOG, miniDFSCluster, overridesForHiveConfDump); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of another WarehouseInstance, shall pass the new config as an option to WITH clause for REPL DUMP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
@Test | ||
public void testDumpExternalTableSetTrue() throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall merge into 1 test case where pass different configs in WITH clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 test is cleaner
.run("show tables like 't2'") | ||
.verifyFailure(new String[] {"t2"}); | ||
|
||
tuple = primary.run("use " + primaryDbName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall also test incremental dump with new config=true and metadata_only=false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -176,6 +177,12 @@ public static Boolean shouldReplicate(ReplicationSpec replicationSpec, Table tab | |||
return false; | |||
} | |||
|
|||
if (!hiveConf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can move this check inside below if block for replicationSpec.isInReplicationScope().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
13b2b64
to
f5a72a6
Compare
…iguration property
…iguration property : ptest fixes
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
use a hive config property to allow external table replication. set this property by default to prevent external table replication.
for metadata only hive repl always export metadata for external tables.