HBASE-24475 Clean up the master thread name getting in SplitLogManager and AssignmentManager (#1810)
This commit is contained in:
parent
c120260bce
commit
b4a4debdd9
|
@ -121,12 +121,8 @@ public class SplitLogManager {
|
||||||
throws IOException {
|
throws IOException {
|
||||||
this.server = master;
|
this.server = master;
|
||||||
this.conf = conf;
|
this.conf = conf;
|
||||||
// Get Server Thread name. Sometimes the Server is mocked so may not extends Thread.
|
|
||||||
// For example, in tests.
|
|
||||||
String name = master instanceof Thread? ((Thread)master).getName():
|
|
||||||
master.getServerName().toShortString();
|
|
||||||
this.choreService =
|
this.choreService =
|
||||||
new ChoreService(name + ".splitLogManager.");
|
new ChoreService(master.getServerName().toShortString() + ".splitLogManager.");
|
||||||
if (server.getCoordinatedStateManager() != null) {
|
if (server.getCoordinatedStateManager() != null) {
|
||||||
SplitLogManagerCoordination coordination = getSplitLogManagerCoordination();
|
SplitLogManagerCoordination coordination = getSplitLogManagerCoordination();
|
||||||
Set<String> failedDeletions = Collections.synchronizedSet(new HashSet<String>());
|
Set<String> failedDeletions = Collections.synchronizedSet(new HashSet<String>());
|
||||||
|
|
|
@ -1907,11 +1907,7 @@ public class AssignmentManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startAssignmentThread() {
|
private void startAssignmentThread() {
|
||||||
// Get Server Thread name. Sometimes the Server is mocked so may not implement Thread.
|
assignThread = new Thread(master.getServerName().toShortString()) {
|
||||||
// For example, in tests.
|
|
||||||
String name = master instanceof Thread? ((Thread)master).getName():
|
|
||||||
master.getServerName().toShortString();
|
|
||||||
assignThread = new Thread(name) {
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
while (isRunning()) {
|
while (isRunning()) {
|
||||||
|
|
Loading…
Reference in New Issue