From f3fd1b2305b06cba1a2e84fa00dd98f8155bef31 Mon Sep 17 00:00:00 2001
From: Todd Lipcon <todd@cloudera.com>
Date: Wed, 6 Jan 2010 13:13:48 -0800
Subject: [PATCH] HADOOP-6400. Log the exception when calls out for UnixUGI fail

Contributed by Todd Lipcon
---
 .../hadoop/security/UnixUserGroupInformation.java  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/core/org/apache/hadoop/security/UnixUserGroupInformation.java b/src/core/org/apache/hadoop/security/UnixUserGroupInformation.java
index 62cbb65..dcb13b9 100644
--- a/src/core/org/apache/hadoop/security/UnixUserGroupInformation.java
+++ b/src/core/org/apache/hadoop/security/UnixUserGroupInformation.java
@@ -244,6 +244,7 @@ public class UnixUserGroupInformation extends UserGroupInformation {
       try {
         userName =  getUnixUserName();
       } catch (Exception e) {
+        LOG.warn("Couldn't get unix username, using " + DEFAULT_USERNAME, e);
         userName = DEFAULT_USERNAME;
       }
 
@@ -263,6 +264,7 @@ public class UnixUserGroupInformation extends UserGroupInformation {
       try {
         groupNames = getUnixGroups();
       } catch (Exception e) {
+        LOG.warn("Couldn't get unix groups, using " + DEFAULT_GROUP, e);
         groupNames = new String[1];
         groupNames[0] = DEFAULT_GROUP;
       }
-- 
1.6.0.4

