chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r768045 - in /hadoop/chukwa: branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/
Date Thu, 23 Apr 2009 20:40:09 GMT
Author: eyang
Date: Thu Apr 23 20:40:08 2009
New Revision: 768045

URL: http://svn.apache.org/viewvc?rev=768045&view=rev
Log:
CHUKWA-104. Remove permission setting code for Log4JMetricsContext and ChukwaDailyRollingFileAppender.
 (Jerome Boulon via Eric Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
    hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java

Modified: hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java?rev=768045&r1=768044&r2=768045&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
Thu Apr 23 20:40:08 2009
@@ -551,11 +551,6 @@
 
             chukwaClientIsNull = false;
 
-            // FIXME: Hack to make the log file readable by chukwa user. 
-            if(System.getProperty("os.name").intern()=="Linux".intern()) {
-              Runtime.getRuntime().exec("chmod g+rw "+getFile());
-            }
-            
             // Watchdog is watching for ChukwaAgent only once every 5 minutes,
             // so there's no point in retrying more than once every 5 mins.
             // In practice, if the watchdog is not able to automatically restart

Modified: hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java?rev=768045&r1=768044&r2=768045&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
Thu Apr 23 20:40:08 2009
@@ -109,18 +109,6 @@
                 + ".log");
           }
 
-          try {
-            File fooLogFile = new File(appender.getFile());
-            if (!fooLogFile.exists()) {
-              fooLogFile.createNewFile();
-            }
-            fooLogFile.setReadable(true, false);
-            fooLogFile.setWritable(true, false);
-            fooLogFile = null;
-          }catch (Exception e) {
-            log.warn("Exception while trying to set file permission," , e);
-          }
-          
           appender.setRecordType( contextName);
           appender.setDatePattern(".yyyy-MM-dd");
           

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java?rev=768045&r1=768044&r2=768045&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
Thu Apr 23 20:40:08 2009
@@ -551,11 +551,6 @@
 
             chukwaClientIsNull = false;
 
-            // FIXME: Hack to make the log file readable by chukwa user. 
-            if(System.getProperty("os.name").intern()=="Linux".intern()) {
-              Runtime.getRuntime().exec("chmod 644 "+getFile());
-            }
-            
             // Watchdog is watching for ChukwaAgent only once every 5 minutes,
             // so there's no point in retrying more than once every 5 mins.
             // In practice, if the watchdog is not able to automatically restart

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java?rev=768045&r1=768044&r2=768045&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java
Thu Apr 23 20:40:08 2009
@@ -109,18 +109,6 @@
                 + ".log");
           }
 
-          try {
-            File fooLogFile = new File(appender.getFile());
-            if (!fooLogFile.exists()) {
-              fooLogFile.createNewFile();
-            }
-            fooLogFile.setReadable(true, false);
-            fooLogFile.setWritable(true, false);
-            fooLogFile = null;
-          }catch (Exception e) {
-            log.warn("Exception while trying to set file permission," , e);
-          }
-          
           appender.setRecordType( contextName);
           appender.setDatePattern(".yyyy-MM-dd");
           



Mime
View raw message