From ee97af78425143921ba69959532646819c0423c8 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 7 Jul 2011 19:48:05 +0000 Subject: [PATCH] HBASE-4074 When a RS has hostname with uppercase letter, there are two RS entries in master -- addendum git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1144004 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/hadoop/hbase/ServerName.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/hadoop/hbase/ServerName.java b/src/main/java/org/apache/hadoop/hbase/ServerName.java index a84f76a884f..6b03832a3b8 100644 --- a/src/main/java/org/apache/hadoop/hbase/ServerName.java +++ b/src/main/java/org/apache/hadoop/hbase/ServerName.java @@ -184,7 +184,8 @@ public class ServerName implements Comparable { @Override public int compareTo(ServerName other) { - int compare = this.getHostname().compareTo(other.getHostname()); + int compare = this.getHostname().toLowerCase(). + compareTo(other.getHostname().toLowerCase()); if (compare != 0) return compare; compare = this.getPort() - other.getPort(); if (compare != 0) return compare;