You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Gabriel Reid (JIRA)" <ji...@apache.org> on 2016/12/02 14:55:59 UTC

[jira] [Commented] (GIRAPH-904) Giraph can hang when hostnames include uppercase letters

    [ https://issues.apache.org/jira/browse/GIRAPH-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15715329#comment-15715329 ] 

Gabriel Reid commented on GIRAPH-904:
-------------------------------------

I've got a patch for this, but I don't seem to have permission to upload patches on this jira (which is strange, because I can do it on other ASF projects).

In any case, it's literally a one-liner, so I'll past it inline below. I've verified this patch (i.e. had the same issue reported in this ticket on a cluster that has mixed-case host names, and then resolve the issue by applying the patch).

{code}
From d71c42e72524a937fa0f68380ec5bac71bb80b09 Mon Sep 17 00:00:00 2001
From: Gabriel Reid <ga...@ngdata.com>
Date: Fri, 2 Dec 2016 15:12:18 +0100
Subject: [PATCH] GIRAPH-904 Handle host names case-insensitively

Normalize host names to lower-case in TaskInfo to avoid issues
between different (upper and lower) cases of worker host names.
---
 giraph-core/src/main/java/org/apache/giraph/graph/TaskInfo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/giraph-core/src/main/java/org/apache/giraph/graph/TaskInfo.java b/giraph-core/src/main/java/org/apache/giraph/graph/TaskInfo.java
index d593204..999d49c 100644
--- a/giraph-core/src/main/java/org/apache/giraph/graph/TaskInfo.java
+++ b/giraph-core/src/main/java/org/apache/giraph/graph/TaskInfo.java
@@ -67,7 +67,7 @@ public abstract class TaskInfo implements Writable {
    */
   public void setInetSocketAddress(InetSocketAddress address) {
     this.port = address.getPort();
-    this.hostname = address.getHostName();
+    this.hostname = address.getHostName().toLowerCase();
   }

   /**
-- 
2.7.4 (Apple Git-66)
{code}

> Giraph can hang when hostnames include uppercase letters
> --------------------------------------------------------
>
>                 Key: GIRAPH-904
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-904
>             Project: Giraph
>          Issue Type: Bug
>          Components: bsp, conf and scripts, zookeeper
>    Affects Versions: 1.1.0
>            Reporter: Jaeho Shin
>            Assignee: Jaeho Shin
>             Fix For: 1.1.0
>
>         Attachments: GIRAPH-904.BspServiceMaster-fix.patch, GIRAPH-904.getHostname-fix.patch, GIRAPH-904.patch
>
>
> We found that Giraph jobs were consistently hanging if uppercase letters were included in the DNS (or /etc/hosts) resolved hostnames ({{foo.stanford.edu}} vs. {{foo.Stanford.EDU}} from our DNS).  Normalizing the hostnames to lower case from {{GiraphConfiguration#getLocalHostname()}} fixed our problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)