Skip to content

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

Merged
apurtell merged 3 commits into
apache:HBASE-18095/client-locate-meta-no-zookeeperfrom
bharathv:HBASE-23304
Dec 19, 2019
Merged

HBASE-23304: RPCs needed for client meta information lookup#904
apurtell merged 3 commits into
apache:HBASE-18095/client-locate-meta-no-zookeeperfrom
bharathv:HBASE-23304

Conversation

@bharathv

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 32sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo case conflicting files found.
+0 🆗prototool0m 0sprototool was not available.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall5m 41sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚compile2m 9sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚checkstyle2m 7sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚shadedjars4m 57sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 17sHBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗spotbugs4m 31sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs8m 23sHBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall5m 29sthe patch passed
+1 💚compile2m 9sthe patch passed
+1 💚cc2m 9sthe patch passed
+1 💚javac2m 9sthe patch passed
+1 💚checkstyle0m 12sThe patch passed checkstyle in hbase-protocol-shaded
+1 💚checkstyle0m 36shbase-client: The patch generated 0 new + 179 unchanged - 1 fixed = 179 total (was 180)
-1 ❌checkstyle1m 17shbase-server: The patch generated 1 new + 5 unchanged - 7 fixed = 6 total (was 12)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars5m 3spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck17m 23sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚hbaseprotoc2m 0sthe patch passed
+1 💚javadoc1m 19sthe patch passed
+1 💚findbugs8m 28sthe patch passed
_ Other Tests _
+1 💚unit0m 42shbase-protocol-shaded in the patch passed.
+1 💚unit1m 59shbase-client in the patch passed.
+1 💚unit177m 34shbase-server in the patch passed.
+1 💚asflicense1m 23sThe patch does not generate ASF License warnings.
259m 3s
SubsystemReport/Notes
DockerClient=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 IssueHBASE-23304
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
unameLinux 2935c70fb90d 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revisionHBASE-18095/client-locate-meta-no-zookeeper / d0f6883
Default Java1.8.0_181
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/testReport/
Max. process+thread count4847 (vs. ulimit of 10000)
modulesC: hbase-protocol-shaded hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/1/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 34sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗prototool0m 0sprototool was not available.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall5m 49sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚compile2m 10sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚checkstyle2m 11sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚shadedjars5m 22sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 21sHBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗spotbugs4m 28sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs8m 49sHBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall5m 14sthe patch passed
+1 💚compile2m 9sthe patch passed
+1 💚cc2m 9sthe patch passed
+1 💚javac2m 9sthe patch passed
+1 💚checkstyle0m 11sThe patch passed checkstyle in hbase-protocol-shaded
+1 💚checkstyle0m 35shbase-client: The patch generated 0 new + 179 unchanged - 1 fixed = 179 total (was 180)
+1 💚checkstyle1m 17shbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars4m 41spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck16m 35sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚hbaseprotoc2m 2sthe patch passed
+1 💚javadoc1m 16sthe patch passed
+1 💚findbugs8m 52sthe patch passed
_ Other Tests _
+1 💚unit0m 43shbase-protocol-shaded in the patch passed.
+1 💚unit1m 59shbase-client in the patch passed.
+1 💚unit170m 59shbase-server in the patch passed.
+1 💚asflicense1m 35sThe patch does not generate ASF License warnings.
252m 16s
SubsystemReport/Notes
DockerClient=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 IssueHBASE-23304
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
unameLinux f7c6cafe219d 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revisionHBASE-18095/client-locate-meta-no-zookeeper / d0f6883
Default Java1.8.0_181
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/2/testReport/
Max. process+thread count4789 (vs. ulimit of 10000)
modulesC: hbase-protocol-shaded hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/2/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@ndimidukndimiduk left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 34sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗prototool0m 0sprototool was not available.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗mvndep0m 35sMaven dependency ordering for branch
+1 💚mvninstall5m 19sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚compile2m 4sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚checkstyle2m 10sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚shadedjars4m 37sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 15sHBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗spotbugs4m 8sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs7m 44sHBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall4m 56sthe patch passed
+1 💚compile2m 7sthe patch passed
+1 💚cc2m 7sthe patch passed
+1 💚javac2m 7sthe patch passed
+1 💚checkstyle0m 12sThe patch passed checkstyle in hbase-protocol-shaded
+1 💚checkstyle0m 38shbase-client: The patch generated 0 new + 179 unchanged - 1 fixed = 179 total (was 180)
+1 💚checkstyle1m 17shbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars4m 38spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck15m 46sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚hbaseprotoc1m 56sthe patch passed
+1 💚javadoc1m 15sthe patch passed
+1 💚findbugs8m 19sthe patch passed
_ Other Tests _
+1 💚unit0m 43shbase-protocol-shaded in the patch passed.
+1 💚unit1m 54shbase-client in the patch passed.
-1 ❌unit174m 17shbase-server in the patch failed.
+1 💚asflicense1m 38sThe patch does not generate ASF License warnings.
250m 52s
ReasonTests
Failed junit testshadoop.hbase.quotas.TestClusterScopeQuotaThrottle
SubsystemReport/Notes
DockerClient=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 IssueHBASE-23304
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
unameLinux 0f5b9c676bc8 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revisionHBASE-18095/client-locate-meta-no-zookeeper / d0f6883
Default Java1.8.0_181
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/testReport/
Max. process+thread count4933 (vs. ulimit of 10000)
modulesC: hbase-protocol-shaded hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/3/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@bharathv

bharathv commented Dec 11, 2019

Copy link
Copy Markdown
ContributorAuthor

@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
Copy Markdown
ContributorAuthor

@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
asfgitforce-pushed the HBASE-18095/client-locate-meta-no-zookeeper branch 2 times, most recently from e64830d to 361a3c1CompareDecember 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

bharathv commented Dec 17, 2019

Copy link
Copy Markdown
ContributorAuthor

@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
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 14sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗prototool0m 1sprototool was not available.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall5m 49sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚compile2m 4sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚checkstyle2m 14sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚shadedjars5m 0sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 11sHBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗spotbugs4m 40sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs8m 29sHBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall5m 25sthe patch passed
+1 💚compile2m 4sthe patch passed
+1 💚cc2m 4sthe patch passed
+1 💚javac2m 4sthe patch passed
+1 💚checkstyle0m 10sThe patch passed checkstyle in hbase-protocol-shaded
+1 💚checkstyle0m 35shbase-client: The patch generated 0 new + 175 unchanged - 1 fixed = 175 total (was 176)
+1 💚checkstyle1m 28shbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars5m 2spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck20m 14sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚hbaseprotoc2m 1sthe patch passed
+1 💚javadoc1m 13sthe patch passed
+1 💚findbugs9m 8sthe patch passed
_ Other Tests _
+1 💚unit0m 43shbase-protocol-shaded in the patch passed.
+1 💚unit1m 46shbase-client in the patch passed.
-1 ❌unit276m 9shbase-server in the patch failed.
+1 💚asflicense1m 14sThe patch does not generate ASF License warnings.
362m 1s
SubsystemReport/Notes
DockerClient=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 IssueHBASE-23304
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
unameLinux 1e2558c98c8e 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revisionHBASE-18095/client-locate-meta-no-zookeeper / 361a3c1
Default Java1.8.0_181
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/testReport/
Max. process+thread count4634 (vs. ulimit of 10000)
modulesC: hbase-protocol-shaded hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/4/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
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.

@apurtellapurtellDec 19, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done.

@apurtell

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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-zookeeperDec 19, 2019
@bharathv
bharathv deleted the HBASE-23304 branch December 19, 2019 19:55
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 35sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗prototool0m 1sprototool was not available.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ HBASE-18095/client-locate-meta-no-zookeeper Compile Tests _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall5m 17sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚compile2m 5sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚checkstyle2m 7sHBASE-18095/client-locate-meta-no-zookeeper passed
+1 💚shadedjars4m 33sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 16sHBASE-18095/client-locate-meta-no-zookeeper passed
+0 🆗spotbugs4m 10sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs7m 46sHBASE-18095/client-locate-meta-no-zookeeper passed
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall5m 3sthe patch passed
+1 💚compile2m 3sthe patch passed
+1 💚cc2m 3sthe patch passed
+1 💚javac2m 3sthe patch passed
+1 💚checkstyle0m 12sThe patch passed checkstyle in hbase-protocol-shaded
+1 💚checkstyle0m 36shbase-client: The patch generated 0 new + 175 unchanged - 1 fixed = 175 total (was 176)
+1 💚checkstyle1m 17shbase-server: The patch generated 0 new + 5 unchanged - 7 fixed = 5 total (was 12)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars4m 38spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck15m 47sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚hbaseprotoc1m 55sthe patch passed
+1 💚javadoc1m 13sthe patch passed
+1 💚findbugs8m 25sthe patch passed
_ Other Tests _
+1 💚unit0m 43shbase-protocol-shaded in the patch passed.
+1 💚unit1m 59shbase-client in the patch passed.
-1 ❌unit183m 16shbase-server in the patch failed.
+1 💚asflicense1m 38sThe patch does not generate ASF License warnings.
259m 59s
ReasonTests
Failed junit testshadoop.hbase.quotas.TestQuotaAdmin
SubsystemReport/Notes
DockerClient=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 IssueHBASE-23304
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile cc hbaseprotoc prototool
unameLinux dc5cf4f53426 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-904/out/precommit/personality/provided.sh
git revisionHBASE-18095/client-locate-meta-no-zookeeper / 361a3c1
Default Java1.8.0_181
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/testReport/
Max. process+thread count4896 (vs. ulimit of 10000)
modulesC: hbase-protocol-shaded hbase-client hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-904/5/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache 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
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@bharathv@Apache-HBase@apurtell@ndimiduk