HorizonNet commented on a change in pull request #1639:
URL: https://github.com/apache/hbase/pull/1639#discussion_r419596355



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
##########
@@ -120,63 +116,24 @@ private ServerName(final Address address, final long 
startcode) {
         this.address.getPort(), startcode);
   }
 
-  private ServerName(final String serverName) {
-    this(parseHostname(serverName), parsePort(serverName),
-      parseStartcode(serverName));
-  }
-
   private ServerName(final String hostAndPort, final long startCode) {
     this(Address.fromString(hostAndPort), startCode);
   }
 
   /**
-   * @param hostname
+   * @param hostname the hostname string to get the actual hostname from
    * @return hostname minus the domain, if there is one (will do pass-through 
on ip addresses)
-   * @deprecated Since 2.0. This is for internal use only.
    */
-  @Deprecated
-  // Make this private in hbase-3.0.
-  static String getHostNameMinusDomain(final String hostname) {
-    if (InetAddresses.isInetAddress(hostname)) return hostname;
-    String [] parts = hostname.split("\\.");
-    if (parts == null || parts.length == 0) return hostname;
-    return parts[0];
-  }

Review comment:
       Most of it is still available via `toShortString`, which we use most for 
logging.




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