virajjasani commented on a change in pull request #1797:
URL: https://github.com/apache/hbase/pull/1797#discussion_r432283958



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
##########
@@ -122,9 +121,9 @@ public SplitLogManager(MasterServices master, Configuration 
conf)
       throws IOException {
     this.server = master;
     this.conf = conf;
-    // Get Server Thread name. Sometimes the Server is mocked so may not 
implement HasThread.
+    // Get Server Thread name. Sometimes the Server is mocked so may not 
implement Thread.
     // For example, in tests.
-    String name = master instanceof HasThread? ((HasThread)master).getName():
+    String name = master instanceof Thread? ((Thread)master).getName():

Review comment:
       We should not worry about mocked objects. Ideally, we can provide 
`getName()` default implementation in `MasterServices` and `HMaster` 
specifically can implement `getName()` as `Thread.getName()`, that way here the 
caller will just call: `String name = master.getName();`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to