hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1303178 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/HMaster.java src/test/java/org/apache/hadoop/hbase/util/TestStrings.java
Date Tue, 20 Mar 2012 22:35:33 GMT
Author: stack
Date: Tue Mar 20 22:35:33 2012
New Revision: 1303178

URL: http://svn.apache.org/viewvc?rev=1303178&view=rev
Log:
HBASE-5593 Reverse DNS resolution in regionServerStartup() does not strip trailing dot. REAPPLICATION

Added:
    hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/util/TestStrings.java
Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1303178&r1=1303177&r2=1303178&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Tue Mar 20 22:35:33 2012
@@ -5,6 +5,8 @@ Release 0.90.7 - Unreleased
    HBASE-5568  Multi concurrent flushcache() for one region could cause data loss (Chunhui)
    HBASE-5482  In 0.90, balancer algo leading to same region balanced twice and picking 
                same region with Src and Destination as same RS. (Ram)
+   HBASE-5593  Reverse DNS resolution in regionServerStartup() does not strip trailing dot
+               (David S. Wang)
 
   IMPROVEMENT
    HBASE-5588 Deprecate/remove AssignmentManager#clearRegionFromTransition

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1303178&r1=1303177&r2=1303178&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Tue Mar
20 22:35:33 2012
@@ -652,7 +652,8 @@ implements HMasterInterface, HMasterRegi
     // Everafter, the HSI combination 'server name' is what uniquely identifies
     // the incoming RegionServer.
     InetSocketAddress address = new InetSocketAddress(
-        HBaseServer.getRemoteIp().getHostName(),
+        Strings.domainNamePointerToHostName(
+          HBaseServer.getRemoteIp().getHostName()),
         serverInfo.getServerAddress().getPort());
     serverInfo.setServerAddress(new HServerAddress(address));
 

Added: hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/util/TestStrings.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/util/TestStrings.java?rev=1303178&view=auto
==============================================================================
--- hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/util/TestStrings.java (added)
+++ hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/util/TestStrings.java Tue Mar
20 22:35:33 2012
@@ -0,0 +1,38 @@
+/*
+ * Copyright The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.util;
+
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+
+import org.apache.hadoop.hbase.util.Strings;
+
+/**
+ * Tests functions in the Strings util class
+ */
+public class TestStrings {
+
+  @Test
+  public void testDomainNamePointerToHostName() {
+    assertEquals(Strings.domainNamePointerToHostName("hbase.apache.org."), 
+                 "hbase.apache.org");
+  }
+}



Mime
View raw message