chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r895472 - in /hadoop/chukwa/trunk: ./ src/java/org/apache/hadoop/chukwa/datacollection/adaptor/ src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/ src/java/org/apache/hadoop/chukwa/datacollection/agent/ src/java/org/apache...
Date Sun, 03 Jan 2010 20:32:09 GMT
Author: asrabkin
Date: Sun Jan  3 20:32:08 2010
New Revision: 895472

URL: http://svn.apache.org/viewvc?rev=895472&view=rev
Log:
CHUKWA-420. Clean up adaptor stop methods.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractWrapper.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/adaptor/UDPAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/LWFTAdaptor.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.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
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/collector/TestDelayedAcks.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Sun Jan  3 20:32:08 2010
@@ -22,6 +22,8 @@
  
    IMPROVEMENTS
 
+    CHUKWA-420. Clean up adaptor stop methods. (asrabkin)
+
     CHUKWA-437. Clean up widget category labels. (Eric Yang)
 
     CHUKWA-421. Use modification time to detect rotation. (asrabkin)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractAdaptor.java?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractAdaptor.java
Sun Jan  3 20:32:08 2010
@@ -54,5 +54,16 @@
     return parseArgs(s);
   }
   
+
+
+  @Deprecated
+  public void hardStop() throws AdaptorException {
+    shutdown(AdaptorShutdownPolicy.HARD_STOP);
+  }
+
+  @Deprecated
+  public long shutdown() throws AdaptorException {
+    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
+  }
   
 }

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractWrapper.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractWrapper.java?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractWrapper.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/AbstractWrapper.java
Sun Jan  3 20:32:08 2010
@@ -37,10 +37,6 @@
     return innerClassName + " " + inner.getCurrentStatus();
   }
 
-  @Override
-  public void hardStop() throws AdaptorException {
-    inner.hardStop();
-  }
 
   static Pattern p = Pattern.compile("([^ ]+) +([^ ].*)");
   
@@ -61,12 +57,7 @@
     }
     else return null;
   }
-
-  @Override
-  public long shutdown() throws AdaptorException {
-    return inner.shutdown();
-  }
-
+  
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
       throws AdaptorException {

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=895472&r1=895471&r2=895472&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
Sun Jan  3 20:32:08 2010
@@ -79,28 +79,29 @@
    */
   public String parseArgs(String datatype, String params, AdaptorManager c);
   
+ 
+  
   /**
    * Signals this adaptor to come to an orderly stop. The adaptor ought to push
-   * out all the data it can before exiting.
-   * 
-   * This method is synchronous up to 60 seconds
+   * out all the data it can before exiting depending of the shutdown policy
    * 
-   * @return the logical offset at which the adaptor stops
+   * @return the logical offset at which the adaptor was when the method return
    * @throws AdaptorException
    */
-  @Deprecated
-  public long shutdown() throws AdaptorException;
-
+  public long shutdown(AdaptorShutdownPolicy shutdownPolicy) throws AdaptorException;
   
   /**
    * Signals this adaptor to come to an orderly stop. The adaptor ought to push
-   * out all the data it can before exiting depending of the shutdown policy
+   * out all the data it can before exiting.
    * 
-   * @return the logical offset at which the adaptor was when the method return
+   * This method is synchronous up to 60 seconds
+   * 
+   * @return the logical offset at which the adaptor stops
    * @throws AdaptorException
    */
-  public long shutdown(AdaptorShutdownPolicy shutdownPolicy) throws AdaptorException;
-  
+//  @Deprecated
+//  public long shutdown() throws AdaptorException;
+
   
   /**
    * Signals this adaptor to come to an abrupt stop, as quickly as it can. The
@@ -116,7 +117,7 @@
    * 
    * @throws AdaptorException
    */
-  @Deprecated
-  public void hardStop() throws AdaptorException;
+//  @Deprecated
+//  public void hardStop() throws AdaptorException;
 
 }
\ No newline at end of file

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=895472&r1=895471&r2=895472&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
Sun Jan  3 20:32:08 2010
@@ -117,16 +117,6 @@
     return baseDir + " " + adaptorName; //both params mandatory
   }
 
-  @Deprecated
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-  }
-
-  @Deprecated
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
-
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
       throws AdaptorException {

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=895472&r1=895471&r2=895472&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
Sun Jan  3 20:32:08 2010
@@ -129,25 +129,6 @@
   public String getCurrentStatus() {
     return type + " " + period + " " + cmd;
   }
-
-
-  @Override
-  @Deprecated
-  /**
-  * use shutdown(AdaptorShutdownPolicy shutdownPolicy)
-  */
-  public void hardStop() throws AdaptorException {
-     shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
-  
- @Override
- @Deprecated
- /**
-* use shutdown(AdaptorShutdownPolicy shutdownPolicy)
-*/
-    public long shutdown() throws AdaptorException {
-     return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-   }
  
    @Override
    public long shutdown(AdaptorShutdownPolicy shutdownPolicy)

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=895472&r1=895471&r2=895472&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
Sun Jan  3 20:32:08 2010
@@ -209,24 +209,6 @@
     } 
   }
   
-  
-  /**
-   * We want to keep trying
-   * 
-   * @see org.apache.hadoop.chukwa.datacollection.adaptor.Adaptor#shutdown()
-   */
-  @Deprecated
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-  }
-
-  /**
-   * Stop tailing the file, effective immediately.
-   */
-  @Deprecated
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
 
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy) {

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/UDPAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/UDPAdaptor.java?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/UDPAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/UDPAdaptor.java
Sun Jan  3 20:32:08 2010
@@ -78,16 +78,6 @@
   }
 
   @Override
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
-
-  @Override
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY); 
-  }
-
-  @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
       throws AdaptorException {
     try {

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
Sun Jan  3 20:32:08 2010
@@ -58,25 +58,6 @@
         + " with first byte at offset " + offsetOfFirstByte);
   }
  
-
-  /**
-   * Do one last tail, and then stop
-   * 
-   * @see org.apache.hadoop.chukwa.datacollection.adaptor.Adaptor#shutdown()
-   */
-  @Deprecated
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-  }
-
-  /**
-   * Stop tailing the file, effective immediately.
-   */
-  @Deprecated
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
-
   
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy) {
@@ -84,17 +65,6 @@
     log.info("Enter Shutdown:" + shutdownPolicy.name() + " - ObjectId:" + this);
     
     switch(shutdownPolicy) {
-      case HARD_STOP :
-        tailer.stopWatchingFile(this);
-        try {
-          if (reader != null) {
-            reader.close();
-          }
-          reader = null;
-        } catch(Throwable e) {
-         log.warn("Exception while closing reader:",e);
-        }
-        break;
       case GRACEFULLY : 
       case WAIT_TILL_FINISHED :{
         if (toWatch.exists()) {
@@ -128,6 +98,19 @@
         }
       }
       break;
+      
+      case HARD_STOP :
+      default:
+        tailer.stopWatchingFile(this);
+        try {
+          if (reader != null) {
+            reader.close();
+          }
+          reader = null;
+        } catch(Throwable e) {
+         log.warn("Exception while closing reader:",e);
+        }
+        break;
     }
     log.info("Exit Shutdown:" + shutdownPolicy.name()+ " - ObjectId:" + this);
     return fileReadOffset + offsetOfFirstByte;

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/LWFTAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/LWFTAdaptor.java?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/LWFTAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/LWFTAdaptor.java
Sun Jan  3 20:32:08 2010
@@ -115,17 +115,6 @@
     }
     return toWatch.getAbsolutePath();
   }
-  
-
-  @Override
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
-  
-  @Override
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-  }
 
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy)

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=895472&r1=895471&r2=895472&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
Sun Jan  3 20:32:08 2010
@@ -40,6 +40,7 @@
 import org.apache.hadoop.chukwa.datacollection.DataFactory;
 import org.apache.hadoop.chukwa.datacollection.adaptor.Adaptor;
 import org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorException;
+import org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorShutdownPolicy;
 import org.apache.hadoop.chukwa.datacollection.adaptor.NotifyOnCommitAdaptor;
 import org.apache.hadoop.chukwa.datacollection.agent.metrics.AgentMetrics;
 import org.apache.hadoop.chukwa.datacollection.connector.Connector;
@@ -555,11 +556,11 @@
     
     try {
       if (gracefully) {
-        offset = toStop.shutdown();
+        offset = toStop.shutdown(AdaptorShutdownPolicy.GRACEFULLY);
         log.info("shutdown on adaptor: " + name + ", "
             + toStop.getCurrentStatus());
       } else {
-        toStop.hardStop();
+        toStop.shutdown(AdaptorShutdownPolicy.HARD_STOP);
         log.info("hardStop on adaptorId: " + name + ", "
             + toStop.getCurrentStatus());
       }
@@ -645,7 +646,7 @@
       // shut down each adaptor
       for (Adaptor a : adaptorsByName.values()) {
         try {
-          a.hardStop();
+          a.shutdown(AdaptorShutdownPolicy.HARD_STOP);
         } catch (AdaptorException e) {
           log.warn("failed to cleanly stop " + a, e);
         }

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=895472&r1=895471&r2=895472&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 Sun Jan
 3 20:32:08 2010
@@ -124,26 +124,9 @@
     return "const rate " + type;
   }
 
-  @Deprecated
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
-
-  @Deprecated
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-  }
-
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy) {
-    
-    switch(shutdownPolicy) {
-      case HARD_STOP :
-      case GRACEFULLY : 
-      case WAIT_TILL_FINISHED :
-        stopping = true;
-      break;
-    }
+    stopping = true;
     return offset;
   }
   

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=895472&r1=895471&r2=895472&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 Sun Jan
 3 20:32:08 2010
@@ -76,24 +76,10 @@
     return ADAPTOR_NAME;
   }
 
-  public long shutdown() throws AdaptorException {
-    return shutdown(AdaptorShutdownPolicy.GRACEFULLY);
-  }
-
-  public void hardStop() throws AdaptorException {
-    shutdown(AdaptorShutdownPolicy.HARD_STOP);
-  }
 
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy) {
-    
-    switch(shutdownPolicy) {
-      case HARD_STOP :
-      case GRACEFULLY : 
-      case WAIT_TILL_FINISHED :
-        stopping = true;
-      break;
-    }
+    stopping = true;
     return offset;
   }
   

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=895472&r1=895471&r2=895472&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
Sun Jan  3 20:32:08 2010
@@ -39,18 +39,6 @@
   }
 
   @Override
-  public void hardStop() throws AdaptorException {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public long shutdown() throws AdaptorException {
-    // TODO Auto-generated method stub
-    return 0;
-  }
-
-  @Override
   public void start(long offset) throws AdaptorException {
     this.startOffset = offset;
     System.out.println("adaptorId [" + adaptorID + "]");
@@ -76,7 +64,6 @@
   @Override
   public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
       throws AdaptorException {
-    // TODO Auto-generated method stub
     return 0;
   }
 

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/collector/TestDelayedAcks.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/collector/TestDelayedAcks.java?rev=895472&r1=895471&r2=895472&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/collector/TestDelayedAcks.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/collector/TestDelayedAcks.java
Sun Jan  3 20:32:08 2010
@@ -22,6 +22,7 @@
 import java.util.*;
 import java.util.regex.*;
 import org.apache.hadoop.chukwa.*;
+import org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorShutdownPolicy;
 import org.apache.hadoop.chukwa.datacollection.adaptor.TestDirTailingAdaptor;
 import org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.FileTailingAdaptor;
 import org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.TestRawAdaptor;
@@ -216,7 +217,7 @@
 
       //do the shutdown directly, here, so that acks are still processed.
       assertNotNull(agent.getAdaptor("adaptor_constSend"));
-      long bytesOutput = agent.getAdaptor("adaptor_constSend").shutdown();
+      long bytesOutput = agent.getAdaptor("adaptor_constSend").shutdown(AdaptorShutdownPolicy.GRACEFULLY);
       Thread.sleep(CLIENT_SCANPERIOD + SERVER_SCANPERIOD + ROTATEPERIOD + 3000);
       
       String[] stat = agent.getAdaptorList().get("adaptor_constSend").split(" ");



Mime
View raw message