chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r803964 - in /hadoop/chukwa/trunk: ./ src/java/org/apache/hadoop/chukwa/database/ src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ src/java/org/apache/hadoop/chukwa/datacollection/agent/ src/java/org/apache/hadoop/chukwa/hicc/ src/...
Date Thu, 13 Aug 2009 17:55:31 GMT
Author: asrabkin
Date: Thu Aug 13 17:55:26 2009
New Revision: 803964

URL: http://svn.apache.org/viewvc?rev=803964&view=rev
Log:
CHUKWA-374. Adaptor.getStatus() shouldn't throw exceptions.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/database/Aggregator.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ExecAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/FileAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/ChukwaInputFormat.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/MaxRateSender.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/ChukwaTestAdaptor.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Thu Aug 13 17:55:26 2009
@@ -46,6 +46,8 @@
 
   IMPROVEMENTS
 
+    CHUKWA-374.  Adaptor.getStatus() shouldn't throw exceptions. (asrabkin)
+
     CHUKWA-373.  Test code for backpressure. (asrabkin)
 
     CHUKWA-370.  Exec adaptor should commit immediately. (asrabkin)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/database/Aggregator.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/database/Aggregator.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/database/Aggregator.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/database/Aggregator.java Thu Aug
13 17:55:26 2009
@@ -41,6 +41,7 @@
 import org.apache.hadoop.chukwa.util.ExceptionUtil;
 import org.apache.hadoop.chukwa.util.PidFile;
 
+@SuppressWarnings("unused")
 public class Aggregator {
 
   private static Log log = LogFactory.getLog(Aggregator.class);

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
Thu Aug 13 17:55:26 2009
@@ -56,9 +56,8 @@
    * be written by this method.
    * 
    * @return the adaptor state as a string
-   * @throws AdaptorException
    */
-  public String getCurrentStatus() throws AdaptorException;
+  public String getCurrentStatus();
 
   public String getType();
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java
Thu Aug 13 17:55:26 2009
@@ -41,8 +41,9 @@
   long lastSweepStartTime;
   volatile boolean continueScanning=true;
   File baseDir;
+  String baseDirName; 
   long scanInterval;
-  String adaptorName;
+  String adaptorName; //name of adaptors to start
   
   
 
@@ -53,6 +54,11 @@
       
     scanThread.start();
     lastSweepStartTime = offset;
+    try {
+      baseDirName = baseDir.getCanonicalPath();
+    } catch(IOException e) {
+      throw new AdaptorException(e);
+    }
   }
   
   public void run() {
@@ -90,12 +96,8 @@
   }
 
   @Override
-  public String getCurrentStatus() throws AdaptorException {
-    try {
-      return type + " " + baseDir.getCanonicalPath()+ " " + adaptorName;
-    } catch(IOException e) {
-      throw new AdaptorException(e);
-    }
+  public String getCurrentStatus() {
+    return type + " " + baseDirName + " " + adaptorName;
   }
 
   @Override

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ExecAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ExecAdaptor.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ExecAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ExecAdaptor.java
Thu Aug 13 17:55:26 2009
@@ -124,7 +124,7 @@
   }
 
   @Override
-  public String getCurrentStatus() throws AdaptorException {
+  public String getCurrentStatus() {
     return type + " " + period + " " + cmd;
   }
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/FileAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/FileAdaptor.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/FileAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/FileAdaptor.java
Thu Aug 13 17:55:26 2009
@@ -312,7 +312,7 @@
   }
 
   @Override
-  public String getCurrentStatus() throws AdaptorException {
+  public String getCurrentStatus() {
     return type.trim() + " " + offsetOfFirstByte + " " + toWatch.getPath();
   }
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
Thu Aug 13 17:55:26 2009
@@ -489,7 +489,7 @@
   }
 
   
-  private String formatAdaptorStatus(Adaptor a) throws AdaptorException {
+  private String formatAdaptorStatus(Adaptor a) {
     return a.getClass().getCanonicalName() + " " + a.getCurrentStatus() + 
    " " + adaptorPositions.get(a).offset;
   }
@@ -503,11 +503,7 @@
     Map<String, String> adaptors = new HashMap<String, String>();
     synchronized (adaptorsByName) {
       for (Map.Entry<String, Adaptor> a : adaptorsByName.entrySet()) {
-        try {
-          adaptors.put(a.getKey(), formatAdaptorStatus(a.getValue()));
-        } catch (AdaptorException e) {
-          log.error(e);
-        }
+        adaptors.put(a.getKey(), formatAdaptorStatus(a.getValue()));
       }
     }
     return adaptors;

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/Chart.java Thu Aug 13 17:55:26
2009
@@ -34,6 +34,7 @@
 import org.apache.hadoop.chukwa.hicc.ColorPicker;
 import org.apache.hadoop.chukwa.util.XssFilter;
 
+@SuppressWarnings("unused")
 public class Chart {
   private String id;
   private String title;

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/ChukwaInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/ChukwaInputFormat.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/ChukwaInputFormat.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/ChukwaInputFormat.java
Thu Aug 13 17:55:26 2009
@@ -39,6 +39,7 @@
  * be extended to also filter by other fields.
  * 
  */
+@SuppressWarnings("deprecation")
 public class ChukwaInputFormat extends
     SequenceFileInputFormat<LongWritable, Text> {
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/ConstRateAdaptor.java Thu Aug
13 17:55:26 2009
@@ -40,7 +40,7 @@
 
   private volatile boolean stopping = false;
 
-  public String getCurrentStatus() throws AdaptorException {
+  public String getCurrentStatus() {
     return type.trim() + " " + bytesPerSec;
   }
 

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/MaxRateSender.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/MaxRateSender.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/MaxRateSender.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/MaxRateSender.java Thu Aug
13 17:55:26 2009
@@ -36,7 +36,7 @@
   ChunkReceiver dest;
   private String adaptorID;
 
-  public String getCurrentStatus() throws AdaptorException {
+  public String getCurrentStatus() {
     return type;
   }
 

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/ChukwaTestAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/ChukwaTestAdaptor.java?rev=803964&r1=803963&r2=803964&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/ChukwaTestAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/ChukwaTestAdaptor.java
Thu Aug 13 17:55:26 2009
@@ -28,7 +28,7 @@
   private ChunkReceiver dest = null;
 
   @Override
-  public String getCurrentStatus() throws AdaptorException {
+  public String getCurrentStatus() {
     // TODO Auto-generated method stub
     return type + " " + params + " " + startOffset;
   }



Mime
View raw message