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

HBASE-23304: RPCs needed for client meta information lookup #904

Conversation

bharathv
Copy link
Contributor

@bharathv bharathv commented Dec 6, 2019

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

@bharathv
Copy link
Contributor Author

bharathv commented Dec 6, 2019

Next in the series of patches. This is a pretty simple one, just adds the needed RPCs and some sanity testing.

@ndimiduk @apurtell @wchevreuil @saintstack @virajjasani FYI, you might be interested in reviewing this.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 prototool 0m 0s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗 mvndep 0m 36s Maven dependency ordering for branch
+1 💚 mvninstall 5m 41s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 compile 2m 9s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 checkstyle 2m 7s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 shadedjars 4m 57s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 17s HBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗 spotbugs 4m 31s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 8m 23s HBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 5m 29s the patch passed
+1 💚 compile 2m 9s the patch passed
+1 💚 cc 2m 9s the patch passed
+1 💚 javac 2m 9s the patch passed
+1 💚 checkstyle 0m 12s The patch passed checkstyle in hbase-protocol-shaded
+1 💚 checkstyle 0m 36s hbase-client: The patch generated 0 new + 179 unchanged - 1 fixed = 179 total (was 180)
-1 ❌ checkstyle 1m 17s hbase-server: The patch generated 1 new + 5 unchanged - 7 fixed = 6 total (was 12)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 5m 3s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 17m 23s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 hbaseprotoc 2m 0s the patch passed
+1 💚 javadoc 1m 19s the patch passed
+1 💚 findbugs 8m 28s the patch passed
_ Other Tests _
+1 💚 unit 0m 42s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 59s hbase-client in the patch passed.
+1 💚 unit 177m 34s hbase-server in the patch passed.
+1 💚 asflicense 1m 23s The patch does not generate ASF License warnings.
259m 3s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/artifact/out/Dockerfile
GITHUB PR #904
JIRA Issue HBASE-23304
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
uname Linux 2935c70fb90d 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revision HBASE-18095/client-locate-meta-no-zookeeper / d0f6883
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/testReport/
Max. process+thread count 4847 (vs. ulimit of 10000)
modules C: hbase-protocol-shaded hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 0s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗 mvndep 0m 36s Maven dependency ordering for branch
+1 💚 mvninstall 5m 49s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 compile 2m 10s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 checkstyle 2m 11s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 shadedjars 5m 22s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 21s HBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗 spotbugs 4m 28s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 8m 49s HBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 5m 14s the patch passed
+1 💚 compile 2m 9s the patch passed
+1 💚 cc 2m 9s the patch passed
+1 💚 javac 2m 9s the patch passed
+1 💚 checkstyle 0m 11s The patch passed checkstyle in hbase-protocol-shaded
+1 💚 checkstyle 0m 35s hbase-client: The patch generated 0 new + 179 unchanged - 1 fixed = 179 total (was 180)
+1 💚 checkstyle 1m 17s hbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 4m 41s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 16m 35s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 hbaseprotoc 2m 2s the patch passed
+1 💚 javadoc 1m 16s the patch passed
+1 💚 findbugs 8m 52s the patch passed
_ Other Tests _
+1 💚 unit 0m 43s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 59s hbase-client in the patch passed.
+1 💚 unit 170m 59s hbase-server in the patch passed.
+1 💚 asflicense 1m 35s The patch does not generate ASF License warnings.
252m 16s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/2/artifact/out/Dockerfile
GITHUB PR #904
JIRA Issue HBASE-23304
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
uname Linux f7c6cafe219d 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revision HBASE-18095/client-locate-meta-no-zookeeper / d0f6883
Default Java 1.8.0_181
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/2/testReport/
Max. process+thread count 4789 (vs. ulimit of 10000)
modules C: hbase-protocol-shaded hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/2/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ndimiduk ndimiduk left a comment

Choose a reason for hiding this comment

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

Just some minor comments on the code changes, so +1 from me as that goes.

However, I'd like to see a larger design discussion on this API. It's going to be in the critical path of data, so it's worth taking a critical look at how this API will be used and if each RPC is necessary. Do you have this written up in a design doc someplace? The API definitions and their semantics fall under the category of "Client-Server Wire Compatibility" as described in our book, http://hbase.apache.org/book.html#hbase.versioning.post10

/**
* Implements all the RPCs needed by clients to look up cluster meta information needed for connection establishment.
*/
service ClientMetaService {
Copy link
Member

Choose a reason for hiding this comment

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

Not saying it's right or wrong (yet), but why define a new service rather than add these methods to the existing "MasterService" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just seemed logical to me to group these (and possibly related RPCs that we add in the future) into a separate service that master is just implementing today. Theoretically they are not tied to masters in any way. Any other process can implement it too (like you already mentioned in the jira comments of HBASE-18095). What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of a separate service. If someone wants to move this later.

import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetMetaRegionLocationsRequest;
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetMetaRegionLocationsResponse;

@Category({SmallTests.class, MasterTests.class})
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be at least a MediumTests because it spins up a mini-cluster at all. Have a look at the java docs on those annotations for how they categorize things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 0s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗 mvndep 0m 35s Maven dependency ordering for branch
+1 💚 mvninstall 5m 19s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 compile 2m 4s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 checkstyle 2m 10s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 shadedjars 4m 37s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 15s HBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗 spotbugs 4m 8s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 7m 44s HBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 4m 56s the patch passed
+1 💚 compile 2m 7s the patch passed
+1 💚 cc 2m 7s the patch passed
+1 💚 javac 2m 7s the patch passed
+1 💚 checkstyle 0m 12s The patch passed checkstyle in hbase-protocol-shaded
+1 💚 checkstyle 0m 38s hbase-client: The patch generated 0 new + 179 unchanged - 1 fixed = 179 total (was 180)
+1 💚 checkstyle 1m 17s hbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 4m 38s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 15m 46s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 hbaseprotoc 1m 56s the patch passed
+1 💚 javadoc 1m 15s the patch passed
+1 💚 findbugs 8m 19s the patch passed
_ Other Tests _
+1 💚 unit 0m 43s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 54s hbase-client in the patch passed.
-1 ❌ unit 174m 17s hbase-server in the patch failed.
+1 💚 asflicense 1m 38s The patch does not generate ASF License warnings.
250m 52s
Reason Tests
Failed junit tests hadoop.hbase.quotas.TestClusterScopeQuotaThrottle
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/artifact/out/Dockerfile
GITHUB PR #904
JIRA Issue HBASE-23304
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
uname Linux 0f5b9c676bc8 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revision HBASE-18095/client-locate-meta-no-zookeeper / d0f6883
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/testReport/
Max. process+thread count 4933 (vs. ulimit of 10000)
modules C: hbase-protocol-shaded hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@bharathv
Copy link
Contributor Author

bharathv commented Dec 11, 2019

@ndimiduk I actually missed your comment on the compatibility. I documented them in the jira for future, but I'm pasting them here for convenience.

Following is the information needed by clients during connection init and the corresponding RPC endpoints added by the patch.

  • clusterid - GetClusterId(GetClusterIdRequest) -> (GetClusterIdResponse)
  • activemaster - GetActiveMaster(GetActiveMasterRequest) -> (GetActiveMasterResponse)
  • metalocations - GetMetaRegionLocations(GetMetaRegionLocationsRequest) -> (GetMetaRegionLocationsResponse)

Given these are new service endpoints, we need to consider some upgrade scenarios.

  • old client -> old server works (duh!)
  • old client -> new server works (backwards compatible since the patch does not change any existing RPC signatures)
  • old client -> new server - does not work, the channel will be closed on error because the end points it is looking up would still not be implemented on the server side.
  • new client -> new server works (duh!)

Given this compatibility matrix,

  • Client-server compatibility - clients and servers are not allowed to upgrade out of sync. Servers should be upgraded first before upgrading the clients.
  • Server-server compatibility - unaffected.
  • File format compatibility - unaffected.
  • Client API compatibility - unaffected.
  • Client binary compatibility - unaffected. (only configuration changes needed)
  • Server side limited API compatibility - unaffected.
  • Dependency compatibility - unaffected.

@bharathv
Copy link
Contributor Author

@ndimiduk There has been some discussion over the design doc [1] but I don't see any major blocking comments from anyone. If that seems ok, can you please merge this patch? (I already addressed the test annotation issue)

[1] https://docs.google.com/document/d/1JAJdM7eUxg5b417f0xWS4NztKCx1f2b6wZrudPtiXF4

@asfgit asfgit force-pushed the HBASE-18095/client-locate-meta-no-zookeeper branch 2 times, most recently from e64830d to 361a3c1 Compare December 16, 2019 18:28
This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.
@bharathv
Copy link
Contributor Author

bharathv commented Dec 17, 2019

@apurtell This is the change I was talking about in the offline chat. This is currently a blocker for HBASE-23305. Just putting this in your radar.

To give you some context, @ndimiduk and I were chatting about this offline and he suggested that I get your feedback before merging. Appreciate any comments on the overall design [1]. Thanks.

[1] https://docs.google.com/document/d/1JAJdM7eUxg5b417f0xWS4NztKCx1f2b6wZrudPtiXF4/edit

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 14s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 1s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗 mvndep 0m 36s Maven dependency ordering for branch
+1 💚 mvninstall 5m 49s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 compile 2m 4s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 checkstyle 2m 14s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 shadedjars 5m 0s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 11s HBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗 spotbugs 4m 40s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 8m 29s HBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 5m 25s the patch passed
+1 💚 compile 2m 4s the patch passed
+1 💚 cc 2m 4s the patch passed
+1 💚 javac 2m 4s the patch passed
+1 💚 checkstyle 0m 10s The patch passed checkstyle in hbase-protocol-shaded
+1 💚 checkstyle 0m 35s hbase-client: The patch generated 0 new + 175 unchanged - 1 fixed = 175 total (was 176)
+1 💚 checkstyle 1m 28s hbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 5m 2s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 20m 14s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 hbaseprotoc 2m 1s the patch passed
+1 💚 javadoc 1m 13s the patch passed
+1 💚 findbugs 9m 8s the patch passed
_ Other Tests _
+1 💚 unit 0m 43s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 46s hbase-client in the patch passed.
-1 ❌ unit 276m 9s hbase-server in the patch failed.
+1 💚 asflicense 1m 14s The patch does not generate ASF License warnings.
362m 1s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/artifact/out/Dockerfile
GITHUB PR #904
JIRA Issue HBASE-23304
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
uname Linux 1e2558c98c8e 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revision HBASE-18095/client-locate-meta-no-zookeeper / 361a3c1
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/testReport/
Max. process+thread count 4634 (vs. ulimit of 10000)
modules C: hbase-protocol-shaded hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

/**
* Implements all the RPCs needed by clients to look up cluster meta information needed for connection establishment.
*/
service ClientMetaService {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of a separate service. If someone wants to move this later.

GetActiveMasterRequest request) throws ServiceException {
GetActiveMasterResponse.Builder resp = GetActiveMasterResponse.newBuilder();
Optional<ServerName> serverName = master.getActiveMaster();
serverName.ifPresent(name -> resp.setServerName(ProtobufUtil.toServerName(name)));
Copy link
Contributor

Choose a reason for hiding this comment

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

These Java 8 constructs don't add much and make backports harder. No issues here, just a thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ya, will clean this up in the back ports separately.

GetMetaRegionLocationsResponse.Builder response = GetMetaRegionLocationsResponse.newBuilder();
Optional<List<HRegionLocation>> metaLocations =
master.getMetaRegionLocationCache().getMetaRegionLocations();
metaLocations.ifPresent(hRegionLocations -> hRegionLocations.forEach(
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetMetaRegionLocationsRequest;
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetMetaRegionLocationsResponse;

@Category({MediumTests.class, MasterTests.class})
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a unit that checks that all running masters successfully answer? Will catch the impact if someone changes something in the future that prevents standby masters from answering.

Copy link
Contributor

@apurtell apurtell Dec 19, 2019

Choose a reason for hiding this comment

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

Let me clarify. You loop over the masters but don't assert that all masters answer exactly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@apurtell
Copy link
Contributor

So for now you would only want this merged into apache:HBASE-18095/client-locate-meta-no-zookeeper ? @bharathv

Adds an assert on the total RPC count for each test.
@bharathv
Copy link
Contributor Author

So for now you would only want this merged into apache:HBASE-18095/client-locate-meta-no-zookeeper ?

Yes, please. Will do the backports together once all the feature patches land in master.

@apurtell apurtell merged commit 93e9867 into apache:HBASE-18095/client-locate-meta-no-zookeeper Dec 19, 2019
@bharathv bharathv deleted the HBASE-23304 branch December 19, 2019 19:55
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 1s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗 mvndep 0m 36s Maven dependency ordering for branch
+1 💚 mvninstall 5m 17s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 compile 2m 5s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 checkstyle 2m 7s HBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚 shadedjars 4m 33s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 16s HBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗 spotbugs 4m 10s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 7m 46s HBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 5m 3s the patch passed
+1 💚 compile 2m 3s the patch passed
+1 💚 cc 2m 3s the patch passed
+1 💚 javac 2m 3s the patch passed
+1 💚 checkstyle 0m 12s The patch passed checkstyle in hbase-protocol-shaded
+1 💚 checkstyle 0m 36s hbase-client: The patch generated 0 new + 175 unchanged - 1 fixed = 175 total (was 176)
+1 💚 checkstyle 1m 17s hbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 4m 38s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 15m 47s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 hbaseprotoc 1m 55s the patch passed
+1 💚 javadoc 1m 13s the patch passed
+1 💚 findbugs 8m 25s the patch passed
_ Other Tests _
+1 💚 unit 0m 43s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 59s hbase-client in the patch passed.
-1 ❌ unit 183m 16s hbase-server in the patch failed.
+1 💚 asflicense 1m 38s The patch does not generate ASF License warnings.
259m 59s
Reason Tests
Failed junit tests hadoop.hbase.quotas.TestQuotaAdmin
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/artifact/out/Dockerfile
GITHUB PR #904
JIRA Issue HBASE-23304
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
uname Linux dc5cf4f53426 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revision HBASE-18095/client-locate-meta-no-zookeeper / 361a3c1
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/testReport/
Max. process+thread count 4896 (vs. ulimit of 10000)
modules C: hbase-protocol-shaded hbase-client hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

bharathv added a commit to bharathv/hbase that referenced this pull request Dec 20, 2019
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Dec 20, 2019
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Dec 28, 2019
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
@ndimiduk
Copy link
Member

ndimiduk commented Jan 2, 2020

However, I'd like to see a larger design discussion on this API.

I don't see this covered in the design doc at all. I was hoping to see some kind of state diagram that show the happy-path and error-case RPC calls made during client initialization, making use of these 3 new endpoints. Are there places where we can reduce the necessary RPCs? For example, how about a removing "get active master" and just have the client call "get meta locations". If the client happens to be communicating with the active master, it's saved an RPC. If it's not the active master, the failure response can contain the location of the active master. For reference, consider an HTTP 301 response.

@bharathv
Copy link
Contributor Author

bharathv commented Jan 2, 2020

If the client happens to be communicating with the active master, it's saved an RPC. If it's not the active master, the failure response can contain the location of the active master.

I'm a little confused. With patches like #812 #830 etc all the running masters (active/stand-by) can serve the information needed by a connection registry. For example: stand-by masters keep track of active masters so that they can serve the "get active master" request. Client does not need to keep retrying until it finds an active master. On top of that we now also have the ability to hedge requests across masters (#954). Did I miss something?

asfgit pushed a commit that referenced this pull request Jan 3, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
@ndimiduk
Copy link
Member

ndimiduk commented Jan 3, 2020

Did I miss something?

Likely no, it's me who's missing something, and probably other more "casual" reviewers as well; thus my request for some description of the protocol for invoking these new RPC endpoints. I have the apparently outdated understanding that the location of the meta region(s) is only served by the active master. Thanks for your patience.

@bharathv
Copy link
Contributor Author

bharathv commented Jan 3, 2020

Cool, thanks for taking a look, appreciate the reviews!

asfgit pushed a commit that referenced this pull request Jan 29, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Jan 30, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Feb 3, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Feb 3, 2020
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Feb 3, 2020
asfgit pushed a commit that referenced this pull request Feb 4, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
ndimiduk added a commit that referenced this pull request Feb 5, 2020
asfgit pushed a commit that referenced this pull request Feb 5, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
asfgit pushed a commit that referenced this pull request Feb 5, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit that referenced this pull request Feb 9, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit that referenced this pull request Feb 11, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit that referenced this pull request Feb 13, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit to bharathv/hbase that referenced this pull request Feb 14, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit to bharathv/hbase that referenced this pull request Feb 17, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit that referenced this pull request Feb 18, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit to bharathv/hbase that referenced this pull request Feb 20, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit that referenced this pull request Feb 20, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit to bharathv/hbase that referenced this pull request Feb 23, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
bharathv added a commit to bharathv/hbase that referenced this pull request Feb 25, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
bharathv added a commit to bharathv/hbase that referenced this pull request Feb 26, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
bharathv added a commit that referenced this pull request Feb 27, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
thangTang pushed a commit to thangTang/hbase that referenced this pull request Apr 16, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
thangTang pushed a commit to thangTang/hbase that referenced this pull request Apr 16, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
bharathv added a commit to bharathv/hbase that referenced this pull request Aug 20, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
(cherry picked from commit 488460e)
bharathv added a commit to bharathv/hbase that referenced this pull request Aug 21, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
(cherry picked from commit 488460e)
bharathv added a commit to bharathv/hbase that referenced this pull request Aug 21, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
(cherry picked from commit 488460e)
bharathv added a commit to bharathv/hbase that referenced this pull request Sep 1, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
(cherry picked from commit 488460e)
bharathv added a commit to bharathv/hbase that referenced this pull request Sep 18, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
(cherry picked from commit 488460e)
bharathv added a commit that referenced this pull request Sep 19, 2020
* HBASE-23304: RPCs needed for client meta information lookup

This patch implements the RPCs needed for the meta information
lookup during connection init. New tests added to cover the RPC
code paths. HBASE-23305 builds on this to implement the client
side logic.

Fixed a bunch of checkstyle nits around the places the patch
touches.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 4f8fbba)
(cherry picked from commit 488460e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants