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-16866 : existing available UDF is used in TestReplicationScenariosAcrossInstances#testDropFunctionIncrementalReplication #193

Closed
wants to merge 1 commit into from

Conversation

anishek
Copy link
Contributor

@anishek anishek commented Jun 9, 2017

There are few javadoc changes and a method rename in repl change manager along with a few access modifiers as well.

*/
static public FileStatus getFileStatus(Path src, String chksumString,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why public clause is removed for some methods and kept at some?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the idea is to give most restrictive scope visibility for methods / varaibles/ classes. Depending on what where its accessed for now the visibility has been changed

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that's fine.

+ ".testFunction as 'com.yahoo.sketches.hive.theta.DataToSketchUDAF' "
+ "using jar 'ivy://com.yahoo.datasketches:sketches-hive:0.8.2'");
+ ".testFunction as 'hivemall.tools.string.StopwordUDF' "
+ "using jar 'ivy://io.github.myui:hivemall:0.4.0-2'");
WarehouseInstance.Tuple bootStrapDump = primary.dump(primaryDbName, null);
replica.load(replicatedDbName, bootStrapDump.dumpLocation)
.run("REPL STATUS " + replicatedDbName)
Copy link
Contributor

Choose a reason for hiding this comment

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

After bootstrap Repl load, need to check if the function was properly loaded or not. Or else, after drop we cannot ensure if function is missing from beginning or really DROP has been applied.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am verifying that the replica database has the correct last repl id. The fact that the event was missed with the last repl id changed is the use case you are mentioning i think, For this there are incremental replication tests which specifically checks for the existence of the function and i dont think we need it here.

Copy link
Contributor

Choose a reason for hiding this comment

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

My query was, if CREATE FUNCTION fails due to jar unaccessible or any other reasons, then bootstrap won't have it and so lastReplId verification alone won't be enough to ensure that. Apparently, another test testCreateFunctionIncrementalReplication uses the same jar and verifies it. That's fine.

*/
static Path getCMPath(Configuration conf, String checkSum)
throws IOException, MetaException {
static Path getCMPath(Configuration conf, String checkSum) throws IOException, MetaException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like getCMPath never throw IOException or MetaException. Shall check and remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not change the method signature for now. just reformatted the code

Copy link
Contributor

Choose a reason for hiding this comment

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

Just noticed that those exceptions are not thrown by this method and as we making changes in this code, thought may be make these changes as well. If you don't want to make those changes part of this path, that's fine as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sankarh unfortunately i was not confident about the change, as I had just formatted the code and requires very less diligence on my side, but i have since then, looked back in it and made the requested modifications from you. I am waiting for apache jira to come back to attach the new patch

Copy link
Contributor

Choose a reason for hiding this comment

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

@anishek Thejas already committed your patch to apache/master. We'll accommodate this change later with some other patch. :)

…osAcrossInstances#testDropFunctionIncrementalReplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants