Skip to content

HBASE-25292 [branch-1] Improve InetSocketAddress usage discipline - #2671

Closed
apurtell wants to merge 3 commits into
apache:branch-1from
apurtell:HBASE-25292-branch-1
Closed

HBASE-25292 [branch-1] Improve InetSocketAddress usage discipline#2671
apurtell wants to merge 3 commits into
apache:branch-1from
apurtell:HBASE-25292-branch-1

Conversation

@apurtell

Copy link
Copy Markdown
Contributor

See description on #2669

this.socket.bind(this.rpcClient.localAddr);
}
NetUtils.connect(this.socket, remoteId.getAddress(), this.rpcClient.connectTO);
if (this.rpcClient.metrics != null) {

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.

This change fixes a bug we encountered in production while running in Amazon's Elastic Kubernetes Service.

private void connect() throws UnknownHostException {
if (LOG.isDebugEnabled()) {
LOG.debug("Connecting to " + remoteId.address);
LOG.debug("Connecting to " + remoteId.getAddress());

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.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker6m 38sDocker failed to build yetus/hbase:b249092a5f.
SubsystemReport/Notes
GITHUB PR#2671
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/1/console
versionsgit=2.17.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker0m 7sDocker failed to build yetus/hbase:b249092a5f.
SubsystemReport/Notes
GITHUB PR#2671
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/2/console
versionsgit=2.17.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker0m 9sDocker failed to build yetus/hbase:b249092a5f.
SubsystemReport/Notes
GITHUB PR#2671
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/3/console
versionsgit=2.17.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker6m 28sDocker failed to build yetus/hbase:b249092a5f.
SubsystemReport/Notes
GITHUB PR#2671
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/4/console
versionsgit=2.17.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

apurtelland others added 3 commits November 25, 2020 14:48
Network identities should be bound late. Remote addresses should be
resolved at the last possible moment, just before connect(). Network
identity mappings can change, so our code should not inappropriately
cache them. Otherwise we might miss a change and fail to operate normally.
Revert "HBASE-14544 Allow HConnectionImpl to not refresh the dns on errors"
Removes hbase.resolve.hostnames.on.failure and related code. We always
resolve hostnames, as late as possible.
Preserve InetSocketAddress caching per RPC connection. Avoids potential
lookups per Call.
Replace InetSocketAddress with Address where used as a map key. If we want
to key by hostname and/or resolved address we should be explicit about it.
Using Address chooses mapping by hostname and port only.
Add metrics for potential nameservice resolution attempts, whenever an
InetSocketAddress is instantiated for connect; and metrics for failed
resolution, whenever InetSocketAddress#isUnresolved on the new instance
is true.
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec8m 7sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+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 4 new or modified test files.
_ branch-1 Compile Tests _
+0 🆗mvndep2m 23sMaven dependency ordering for branch
+1 💚mvninstall8m 40sbranch-1 passed
+1 💚compile2m 0sbranch-1 passed with JDK Azul Systems, Inc.-1.8.0_262-b19
+1 💚compile2m 17sbranch-1 passed with JDK Azul Systems, Inc.-1.7.0_272-b10
+1 💚checkstyle4m 6sbranch-1 passed
+1 💚shadedjars4m 19sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 51sbranch-1 passed with JDK Azul Systems, Inc.-1.8.0_262-b19
+1 💚javadoc2m 13sbranch-1 passed with JDK Azul Systems, Inc.-1.7.0_272-b10
+0 🆗spotbugs3m 43sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs7m 55sbranch-1 passed
_ Patch Compile Tests _
+0 🆗mvndep0m 23sMaven dependency ordering for patch
+1 💚mvninstall2m 29sthe patch passed
+1 💚compile1m 54sthe patch passed with JDK Azul Systems, Inc.-1.8.0_262-b19
+1 💚javac1m 54sthe patch passed
+1 💚compile2m 14sthe patch passed with JDK Azul Systems, Inc.-1.7.0_272-b10
-1 ❌javac0m 56shbase-server-jdkAzulSystems,Inc.-1.7.0_272-b10 with JDK Azul Systems, Inc.-1.7.0_272-b10 generated 2 new + 4 unchanged - 2 fixed = 6 total (was 6)
-1 ❌checkstyle0m 48shbase-client: The patch generated 1 new + 168 unchanged - 3 fixed = 169 total (was 171)
-1 ❌checkstyle2m 7shbase-server: The patch generated 1 new + 108 unchanged - 1 fixed = 109 total (was 109)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars4m 2spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck6m 17sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚javadoc1m 49sthe patch passed with JDK Azul Systems, Inc.-1.8.0_262-b19
+1 💚javadoc2m 6sthe patch passed with JDK Azul Systems, Inc.-1.7.0_272-b10
+1 💚findbugs6m 35sthe patch passed
_ Other Tests _
+1 💚unit2m 55shbase-common in the patch passed.
+1 💚unit2m 45shbase-client in the patch passed.
-1 ❌unit92m 31shbase-server in the patch failed.
+1 💚unit0m 33shbase-external-blockcache in the patch passed.
+1 💚asflicense1m 34sThe patch does not generate ASF License warnings.
181m 32s
ReasonTests
Failed junit testshadoop.hbase.client.TestConnectionImplementation
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/artifact/out/Dockerfile
GITHUB PR#2671
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 151ce7cf0760 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-home/workspace/Base-PreCommit-GitHub-PR_PR-2671/out/precommit/personality/provided.sh
git revisionbranch-1 / 30d988f
Default JavaAzul Systems, Inc.-1.7.0_272-b10
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:Azul Systems, Inc.-1.8.0_262-b19 /usr/lib/jvm/zulu-7-amd64:Azul Systems, Inc.-1.7.0_272-b10
javachttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/artifact/out/diff-compile-javac-hbase-server-jdkAzulSystems,Inc.-1.7.0_272-b10.txt
checkstylehttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/artifact/out/diff-checkstyle-hbase-client.txt
checkstylehttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/artifact/out/diff-checkstyle-hbase-server.txt
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/testReport/
Max. process+thread count3698 (vs. ulimit of 10000)
modulesC: hbase-common hbase-client hbase-server hbase-external-blockcache U: .
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2671/5/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@apurtell

Copy link
Copy Markdown
ContributorAuthor

#2669 was merged, closing this and picking back the master commit.

@apurtellapurtell closed this Dec 4, 2020
@apurtell
apurtell deleted the HBASE-25292-branch-1 branch December 4, 2020 18:09
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.

2 participants

@apurtell@Apache-HBase