Skip to content
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-22954 Repl Load using scheduler #932

Closed
wants to merge 2 commits into from
Closed

Conversation

aasha
Copy link
Contributor

@aasha aasha commented Mar 3, 2020

No description provided.

@aasha aasha force-pushed the HIVE-22954 branch 20 times, most recently from 67aeea1 to 54b5ea3 Compare March 5, 2020 09:22
@@ -121,7 +121,9 @@ public String getName() {
public int execute() {
try {
Hive hiveDb = getHive();
Path dumpRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR), work.dbNameOrPattern.toLowerCase());
Path dumpRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR),
Base64.getEncoder().encodeToString(work.dbNameOrPattern.toLowerCase()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we are not going to have expression ( for ex for table level replication ) do we still need the base64 encoding ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will still need repl dump *

for (FileStatus status : statuses) {
DumpMetaData dmd = new DumpMetaData(status.getPath(), conf);
if (dmd.isIncrementalDump()
&& Long.parseLong(currentReplStatusOfTarget) < dmd.getEventTo().longValue()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.longValue() function is not required.

also why not do comparison with EventFrom will be easy to reason about in code. since the repl status should be either 1 less than from or equal to from event.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are test cases where incremental event starts from say (3-15) and current status of target is at 10 because of the previous partial incremental load.
Like TestReplicationWithTableMigration#testIncrementalLoadMigrationManagedToAcidFailurePart

String replLastId = getReplStatus(dbNameOrPattern);
prepareReturnValues(Collections.singletonList(replLastId), "last_repl_id#string");
setFetchTask(createFetchTask("last_repl_id#string"));
LOG.debug("ReplicationSemanticAnalyzer.analyzeReplStatus: writing repl.last.id={} out to {}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to print the full conf here ? if yes you might want to provide a String representation of it along with an additional {} placeholder in the message to put the values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conf just prints the configuration files and not all the configs. This was part of older repl status code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having files printed might not be useful, it might be good to have the full configs printed in debug or may be trace mode additionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes printing conf in debug mode. The toString is already implemented in Configuration. I missed it.

@github-actions
Copy link

github-actions bot commented Jun 6, 2020

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.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions bot added the stale label Jun 6, 2020
@github-actions github-actions bot closed this Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants