-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-25663 Make graceful_stop localhostname compare match even if fqdn #3048
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
Conversation
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
ekrettek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed this works when running with hostname --fqdn now!
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
2 similar comments
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saintstack @ekrettek I am curious about how the stripServer condition in RegionMover.java will succeed after this PR:
| if (server.getAddress().getHostName().equalsIgnoreCase(hostname) && |
From my understanding, this will compare the fqdn with "localhost", so it won't be able to strip it, leading the RegionMover to not unload and return early:
hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java
Lines 384 to 390 in cfbae4d
| ServerName server = stripServer(regionServers, hostname, port); | |
| if (server == null) { | |
| LOG.info("Could not find server '{}:{}' in the set of region servers. giving up.", | |
| hostname, port); | |
| LOG.debug("List of region servers: {}", regionServers); | |
| return false; | |
| } |
|
@javierluca Thank you for taking a look. Looks like the stripServer needs to handle 'localhost'. Let me make an addendum.... |
|
Or, let me just revert this and commit your patch; it works for you. |
|
@saintstack In my opinion, your change was better than mine because we could use Lines 61 to 64 in 59ec375
Just needed to address the unload_hostname="$hostname"
if [[ "$hostname" -eq "localhost" ]]; then
unload_hostname=`/bin/hostname -f`
fi
unload_args="--filename $filename --maxthreads $maxthreads $noack --operation unload \
--timeout $movetimeout --regionserverhost $unload_hostname"If you don't mind, I would like to submit a patch including the changes of this PR + above fix for the RegionMover. |
|
@saintstack addressing it at #3053. Please have a look 🙇 |
No description provided.