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-26869 : Backport of HIVE-19104: Fix TestHS2ImpersonationWithRemoteMS.testImpersonation #3873
Conversation
@abstractdog @zabetak Can you please review this too and merge |
the original commit has a minor change in HiveConnection too: |
@abstractdog If you see in the code also, the maxRetries is set to 1 which was changed from 5 to 1 in the original commit. So I think should be okay. |
right, thanks for clarifying also, I can see TestHS2ImpersonationWithRemoteMS failing in the precommit: shouldn't it be fixed with this PR? |
Hi @abstractdog I had triggered it late at night. Just saw it today that the tests are failing. Let me reproduce this in my local. I thought it was a simple cherry pick to fix the test. Will update you asap. |
Hi @abstractdog @ayushtkn @zabetak @sankarh @ashish-kumar-sharma This is the error :
The issue is that in the test the directory structure where this table is getting created is like this hdfs://localhost:43235/base/warehouse/44157 : When it tries to get the directory name it returns 44157 instead of foo_table or bar_table. This is why this is throwing the error. I see a bunch of other test cases failing because of this. Any idea which commit that I need to look into. I also compared this code with oss/master and oss/branch-3.1. There are no differences related to this. Also a point to be noted is that this test fails in oss/branch-3.1. |
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.
@amanraj2520 , I think the reason for the failure in TestWarehouseExternalDir
is because MetaStoreTestUtils#startMetaStoreWithRetry
configures a testing metastore with the warehouse directory parameterized by the metastore's server port number. For example, when I ran the test locally, I saw this in the output:
2022-12-22T15:44:41,372 ERROR [main] metastore.MetaStoreTestUtils: MetaStore Thrift Server started on port: 42103 with warehouse dir: hdfs://localhost:41827/base/warehouse/42103
The reason for parameterizing the warehouse directory by port is that it can support running multiple instances concurrently and tests can be isolated from each other's data changes.
In the master branch, this test and several other were marked to skip with @org.junit.Ignore
. This was done in commit ad925ea. I don't know if there was a JIRA issue associated with that. There is also HIVE-25266 to track fixing TestWarehouseExternalDir
, but it isn't resolved.
My opinion (non-binding of course) is that any tests skipped as known failures on master can also be skipped on branch-3. Then, when the permanent fixes come in, they should be committed to both master and branch-3.
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.
The question remains, why does this specific test pass on master but fail on branch-3? I've been investigating for any differences in configuration handling in the tests between the 2 branches, but so far, I haven't found an explanation.
Hi @cnauroth I have also debugged it. But did not find anything. My hunch is that this can be due to the hadoop version issue. Can you once check this if this can be the issue - https://issues.apache.org/jira/browse/HDFS-13408. Can this be the case |
This did not go into 3.1.0 but went into 3.1.1 I think. Not sure though |
…hould be independent Change-Id: I4955b9dd2c5b82da9510ae3a2342b8d96ab86781
@amanraj2520 , I don't think HDFS-13408 would be related, because I think that was a problem specific to Windows, and this test seems to be having a problem handling the parameterized warehouse directory, not the base testing directory. I think I figured it out. I found that on master, HIVE-19104 included an additional line in MiniHs2 to make sure these 2 properties would stay in sync for test runs. I can get I'll let you know when I have a pull request ready. |
This is great @cnauroth . Please let me know if you have the PR, I will also test it from my side. |
f0d457b
to
1211e9c
Compare
@cnauroth Cherry picked the patch and tested locally. It works as expected. Thanks for your suggestion updated this PR. |
@cnauroth You suggestion worked. The concerned tests have passed But now new tests are failing :
|
I found a fix for the first test in HIVE-19313 (https://issues.apache.org/jira/browse/HIVE-19313). Will cherry pick the same |
Remaining tests which failed were disabled in https://issues.apache.org/jira/browse/HIVE-20715 and https://issues.apache.org/jira/browse/HIVE-20741 so cherry picked the same |
Thanks, @amanraj2520 . It looks like you've picked up the cherry-pick I had in mind as well as a few others. I don't know if committers would prefer to see them split out individually for cleaner revision history. If so, I'll post my PR for just the HIVE-19104 backport. |
@cnauroth I agree with you. I was going to revert the additional commits just was making sure that these test work fine when combined together. This PR tests that. This PR will now going to be for HIVE-19104. Will raise new tickets. |
08be6c9
to
aef9c68
Compare
@cnauroth @zabetak @abstractdog I have done the changes from my side and tested it in my local as well. Can you please approve and merge this PR. |
@abstractdog Can you please review this PR and merge. We have tested it locally as well as on the pipelines |
I created HIVE-26910 / #3918 for separate tracking of the warehouse directory configuration fix. |
Oops, sorry! I misunderstood. I see now that the changes are still included in this PR. I'll abandon my PR if this one gets committed. |
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.
+1 (non-binding)
I confirmed that this is the same thing as the pull request I just created by mistake:
> diff <(curl -sS https://patch-diff.githubusercontent.com/raw/apache/hive/pull/3873.diff) <(curl -sS https://patch-diff.githubusercontent.com/raw/apache/hive/pull/3918.diff)
> echo $?
0
I've been running with this locally. TestHS2ImpersonationWithRemoteMS
is passing as well as all other test suites that were modified.
Thank you for the contribution, @amanraj2520 !
@abstractdog @zabetak A gentle reminder. Can you please approve and merge this. |
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.
+1
HIVE-26869 : Backport of HIVE-19104: When test MetaStore is started with retry the instances should be independent
Change-Id: I4955b9dd2c5b82da9510ae3a2342b8d96ab86781
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?