chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject chukwa git commit: CHUKWA-773. Update maven surefire version. (Anna Wang via Eric Yang)
Date Thu, 20 Aug 2015 03:11:22 GMT
Repository: chukwa
Updated Branches:
  refs/heads/master dd10a5cf7 -> a31164908


CHUKWA-773. Update maven surefire version.  (Anna Wang via Eric Yang)


Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/a3116490
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/a3116490
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/a3116490

Branch: refs/heads/master
Commit: a311649089d25a8c8ec33902da2a6c06fd155d29
Parents: dd10a5c
Author: Eric Yang <eyang@apache.org>
Authored: Wed Aug 19 20:11:09 2015 -0700
Committer: Eric Yang <eyang@apache.org>
Committed: Wed Aug 19 20:11:09 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 +
 .../apache/hadoop/chukwa/tools/PigMover.java    |  2 +-
 .../hadoop/chukwa/util/GenerateTestFile.java    |  2 +-
 .../edu/berkeley/chukwa_xtrace/XtrExtract.java  |  2 +-
 pom.xml                                         |  3 +-
 .../chukwa/analysis/salsa/fsm/FSMBuilder.java   |  2 +-
 .../datacollection/agent/ChukwaAgent.java       |  6 +-
 .../datacollection/test/SinkFileValidator.java  |  2 +-
 .../archive/ChukwaArchiveBuilder.java           |  2 +-
 .../demux/DailyChukwaRecordRolling.java         |  4 +-
 .../hadoop/chukwa/extraction/demux/Demux.java   |  2 +-
 .../demux/HourlyChukwaRecordRolling.java        |  4 +-
 .../hadoop/chukwa/hicc/HiccWebServer.java       |  2 +-
 .../chukwa/inputtools/jplugin/JPluginAgent.java |  6 +-
 .../chukwa/inputtools/plugin/metrics/Exec.java  |  2 +-
 .../tools/backfilling/BackfillingLoader.java    |  4 +-
 .../hadoop/chukwa/util/ConstRateValidator.java  |  2 +-
 .../hadoop/chukwa/util/CreateRecordFile.java    |  2 +-
 .../apache/hadoop/chukwa/util/DumpChunks.java   |  2 +-
 .../adaptor/filetailer/TestRCheckAdaptor.java   |  3 -
 .../chukwa/rest/resource/TestClientTrace.java   |  2 +
 .../chukwa/rest/resource/TestUserResource.java  | 60 ---------------
 .../chukwa/rest/resource/TestViewResource.java  | 77 --------------------
 .../rest/resource/TestWidgetResource.java       | 41 -----------
 .../DemuxDirectoryValidator.java                |  5 +-
 25 files changed, 35 insertions(+), 206 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2612a36..32f42af 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,8 @@ Trunk (unreleased changes)
 
   IMPROVEMENTS
 
+    CHUKWA-773. Update maven surefire version.  (Anna Wang via Eric Yang)
+
     CHUKWA-769. Updated Chukwa to current HBase API. (Eric Yang)
 
     CHUKWA-767. Implemented low pass filter for Charting REST API.  (Eric Yang)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/contrib/chukwa-pig/src/java/org/apache/hadoop/chukwa/tools/PigMover.java
----------------------------------------------------------------------
diff --git a/contrib/chukwa-pig/src/java/org/apache/hadoop/chukwa/tools/PigMover.java b/contrib/chukwa-pig/src/java/org/apache/hadoop/chukwa/tools/PigMover.java
index 9cfac13..438c15c 100644
--- a/contrib/chukwa-pig/src/java/org/apache/hadoop/chukwa/tools/PigMover.java
+++ b/contrib/chukwa-pig/src/java/org/apache/hadoop/chukwa/tools/PigMover.java
@@ -44,7 +44,6 @@ public class PigMover {
   public static void usage() {
     System.out
         .println("PigMover <cluster> <recordType> <pigDir> <finalOutPutDir>");
-    System.exit(-1);
   }
 
   /**
@@ -56,6 +55,7 @@ public class PigMover {
     if (args.length != 5) {
       log.warn("Wrong number of arguments");
       usage();
+      return;
     }
     Configuration conf = new Configuration();
     FileSystem fs = FileSystem.get(conf);

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/contrib/chukwa-pig/test/src/java/org/apache/hadoop/chukwa/util/GenerateTestFile.java
----------------------------------------------------------------------
diff --git a/contrib/chukwa-pig/test/src/java/org/apache/hadoop/chukwa/util/GenerateTestFile.java
b/contrib/chukwa-pig/test/src/java/org/apache/hadoop/chukwa/util/GenerateTestFile.java
index 3138f73..bf6dd3b 100644
--- a/contrib/chukwa-pig/test/src/java/org/apache/hadoop/chukwa/util/GenerateTestFile.java
+++ b/contrib/chukwa-pig/test/src/java/org/apache/hadoop/chukwa/util/GenerateTestFile.java
@@ -100,7 +100,7 @@ public class GenerateTestFile {
     outputFile = outputFile.makeQualified(fs);
     if (fs.exists(outputFile)) {
       System.out.println("File already there, exit -1," + outputFile );
-      System.exit(-1);
+      return;
     }
     System.out.println("outputFile:" + outputFile);
     

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/contrib/xtrace/src/java/edu/berkeley/chukwa_xtrace/XtrExtract.java
----------------------------------------------------------------------
diff --git a/contrib/xtrace/src/java/edu/berkeley/chukwa_xtrace/XtrExtract.java b/contrib/xtrace/src/java/edu/berkeley/chukwa_xtrace/XtrExtract.java
index fe2d607..940d3a1 100644
--- a/contrib/xtrace/src/java/edu/berkeley/chukwa_xtrace/XtrExtract.java
+++ b/contrib/xtrace/src/java/edu/berkeley/chukwa_xtrace/XtrExtract.java
@@ -250,7 +250,7 @@ public static class MapClass extends Mapper <Object, Object, BytesWritable,
Text
   public static void main(String[] args) throws Exception {
     int res = ToolRunner.run(new Configuration(),
         new XtrExtract(), args);
-    System.exit(res);
+    return;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 91bf6a8..5bc3556 100644
--- a/pom.xml
+++ b/pom.xml
@@ -514,7 +514,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.10</version>
+                <version>2.18.1</version>
                 <configuration>
                     <skip>false</skip>
                 </configuration>
@@ -539,6 +539,7 @@
                                 <exclude>**/TestArchive.java</exclude>
                                 <exclude>**/TestJobLogEntry.java</exclude>
                                 <exclude>**/*$*</exclude>
+				<exclude>**/TestClientTrace.java</exclude>
                             </excludes>
                             <systemPropertyVariables>
                                 <test.build.dir>${project.build.directory}/test</test.build.dir>

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/fsm/FSMBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/fsm/FSMBuilder.java b/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/fsm/FSMBuilder.java
index c4b2536..d917c8b 100644
--- a/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/fsm/FSMBuilder.java
+++ b/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/fsm/FSMBuilder.java
@@ -450,7 +450,7 @@ public class FSMBuilder extends Configured implements Tool {
         
     int res = ToolRunner.run(new Configuration(), new FSMBuilder(), args);
     
-    System.exit(res);
+    return;
   }
 
 

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
index 4a2e996..0d201e7 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
@@ -265,7 +265,7 @@ public class ChukwaAgent implements AdaptorManager {
       if (args.length > 0 && args[0].equals("-help")) {
         System.out.println("usage:  LocalAgent [-noCheckPoint]"
             + "[default collector URL]");
-        System.exit(0);
+        return;
       }
 
       Configuration conf = ChukwaUtil.readConfiguration();
@@ -303,7 +303,7 @@ public class ChukwaAgent implements AdaptorManager {
       System.out
           .println("agent started already on this machine with same portno;"
               + " bailing out");
-      System.exit(0); // better safe than sorry
+      return;
     } catch (Exception e) {
       e.printStackTrace();
     }
@@ -740,7 +740,7 @@ public class ChukwaAgent implements AdaptorManager {
     adaptorStatsManager.clear();
     agent.stop();
     if (exit)
-      System.exit(0);
+      return;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/datacollection/test/SinkFileValidator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/test/SinkFileValidator.java
b/src/main/java/org/apache/hadoop/chukwa/datacollection/test/SinkFileValidator.java
index db1be4d..008456f 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/test/SinkFileValidator.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/test/SinkFileValidator.java
@@ -40,7 +40,7 @@ public class SinkFileValidator {
     if (args.length < 1) {
       System.out
           .println("usage:  SinkFileValidator <filename> [filesystem URI] ");
-      System.exit(0);
+      return;
     }
     fname = args[0];
     if (args.length > 1)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveBuilder.java
b/src/main/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveBuilder.java
index e8e89c0..42a3d21 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveBuilder.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/archive/ChukwaArchiveBuilder.java
@@ -142,6 +142,6 @@ public class ChukwaArchiveBuilder extends Configured implements Tool {
   public static void main(String[] args) throws Exception {
     int res = ToolRunner.run(new ChukwaConfiguration(), new ChukwaArchiveBuilder(),
         args);
-    System.exit(res);
+    return;
   }
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
index bebd1e5..ebdbca5 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
@@ -63,7 +63,6 @@ public class DailyChukwaRecordRolling extends Configured implements Tool
{
   public static void usage() {
     System.err
         .println("usage: java org.apache.hadoop.chukwa.extraction.demux.DailyChukwaRecordRolling
rollInSequence <True/False> deleteRawdata <True/False>");
-    System.exit(-1);
   }
 
   public static boolean hourlyRolling(String dailyStreamDirectory) {
@@ -221,14 +220,17 @@ public class DailyChukwaRecordRolling extends Configured implements
Tool {
     // TODO do a real parameter parsing
     if (args.length != 4) {
       usage();
+      return;
     }
 
     if (!args[0].equalsIgnoreCase("rollInSequence")) {
       usage();
+      return;
     }
 
     if (!args[2].equalsIgnoreCase("deleteRawdata")) {
       usage();
+      return;
     }
 
     if (args[1].equalsIgnoreCase("true")) {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/extraction/demux/Demux.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/Demux.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/Demux.java
index 71ac1f7..80696b8 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/Demux.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/Demux.java
@@ -261,7 +261,7 @@ public class Demux extends Configured implements Tool {
 
   public static void main(String[] args) throws Exception {
     int res = ToolRunner.run(new Configuration(), new Demux(), args);
-    System.exit(res);
+    return;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
index b59b229..e272ea8 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
@@ -62,7 +62,6 @@ public class HourlyChukwaRecordRolling extends Configured implements Tool
{
   public static void usage() {
     System.err
         .println("usage: java org.apache.hadoop.chukwa.extraction.demux.HourlyChukwaRecordRolling
rollInSequence <True/False> deleteRawdata <True/False>");
-    System.exit(-1);
   }
 
   public static void buildHourlyFiles(String chukwaMainRepository,
@@ -170,14 +169,17 @@ public class HourlyChukwaRecordRolling extends Configured implements
Tool {
     // TODO do a real parameter parsing
     if (args.length != 4) {
       usage();
+      return;
     }
 
     if (!args[0].equalsIgnoreCase("rollInSequence")) {
       usage();
+      return;
     }
 
     if (!args[2].equalsIgnoreCase("deleteRawdata")) {
       usage();
+      return;
     }
 
     if (args[1].equalsIgnoreCase("true")) {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/hicc/HiccWebServer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/HiccWebServer.java b/src/main/java/org/apache/hadoop/chukwa/hicc/HiccWebServer.java
index fe90941..28a5490 100644
--- a/src/main/java/org/apache/hadoop/chukwa/hicc/HiccWebServer.java
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/HiccWebServer.java
@@ -61,7 +61,7 @@ public class HiccWebServer {
     }
     if(serverConf==null) {
       log.error("Unable to locate jetty-web.xml.");
-      System.exit(-1);
+      throw new RuntimeException("Unable to locate jetty-web.xml.");
     }
     return instance;
   }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/inputtools/jplugin/JPluginAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/inputtools/jplugin/JPluginAgent.java b/src/main/java/org/apache/hadoop/chukwa/inputtools/jplugin/JPluginAgent.java
index 0bed639..06ac805 100644
--- a/src/main/java/org/apache/hadoop/chukwa/inputtools/jplugin/JPluginAgent.java
+++ b/src/main/java/org/apache/hadoop/chukwa/inputtools/jplugin/JPluginAgent.java
@@ -78,7 +78,7 @@ public class JPluginAgent {
     if (args.length < 1) {
       System.out
           .println("Usage: java -DPERIOD=nn JavaPluginAgent <class name> [parameters]");
-      System.exit(0);
+      return;
     }
 
     int period = -1;
@@ -89,7 +89,7 @@ public class JPluginAgent {
     } catch (NumberFormatException ex) {
       ex.printStackTrace();
       System.out.println("PERIOD should be numeric format of seconds.");
-      System.exit(0);
+      return;
     }
 
     JPlugin plugin = null;
@@ -98,7 +98,7 @@ public class JPluginAgent {
       plugin.init(args);
     } catch (Throwable e) {
       e.printStackTrace();
-      System.exit(-1);
+      return;
     }
 
     try {

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/inputtools/plugin/metrics/Exec.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/inputtools/plugin/metrics/Exec.java b/src/main/java/org/apache/hadoop/chukwa/inputtools/plugin/metrics/Exec.java
index f3b11cf..e4eb972 100644
--- a/src/main/java/org/apache/hadoop/chukwa/inputtools/plugin/metrics/Exec.java
+++ b/src/main/java/org/apache/hadoop/chukwa/inputtools/plugin/metrics/Exec.java
@@ -71,7 +71,7 @@ public class Exec extends TimerTask {
       System.out
           .println("Usage: java -DPERIOD=nn -DRECORD_TYPE=recordType Exec [cmd]");
       System.out.println("PERIOD should be numeric format of seconds.");
-      System.exit(0);
+      return;
     }
     Timer timer = new Timer();
     timer.schedule(new Exec(args), 0, period * 1000);

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
b/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
index aba36b3..b325948 100644
--- a/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
+++ b/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
@@ -82,7 +82,6 @@ public class BackfillingLoader {
   
   public static void usage() {
     System.out.println("java org.apache.hadoop.chukwa.tools.backfilling.BackfillingLoader
<cluster> <machine> <adaptorName> <recordType> <logFile>");
-    System.exit(-1);
   }
   
   /**
@@ -92,7 +91,8 @@ public class BackfillingLoader {
   public static void main(String[] args) throws Exception {
 
     if (args.length != 5) {
-      usage();
+	usage();
+	return;
     }
     
 

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/util/ConstRateValidator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/ConstRateValidator.java b/src/main/java/org/apache/hadoop/chukwa/util/ConstRateValidator.java
index 7f69fbe..9e874d2 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/ConstRateValidator.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/ConstRateValidator.java
@@ -277,7 +277,7 @@ public class ConstRateValidator extends Configured implements Tool{
  //   System.out.println("specify -D textOutput=true for text output");
     int res = ToolRunner.run(new Configuration(),
         new ConstRateValidator(), args);
-    System.exit(res);
+    return;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/util/CreateRecordFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/CreateRecordFile.java b/src/main/java/org/apache/hadoop/chukwa/util/CreateRecordFile.java
index 0a2ab46..387888a 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/CreateRecordFile.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/CreateRecordFile.java
@@ -117,6 +117,7 @@ public class CreateRecordFile {
                                                  InstantiationException {
      if(args.length == 0 || (args.length==1 && args[0].contains("-h"))) {
        usage();
+       return;
      }
 
      File inputFile = new File(args[0]);
@@ -177,6 +178,5 @@ public class CreateRecordFile {
      System.out.println("            streamName     - Stream name to use in the records");
      System.out.println("            processorClass - Processor class to use. Defaults to
TsProcessor");
      System.out.println("            confFile       - File to use to create the JobConf");
-     System.exit(0);
    }
 }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java b/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
index 552bffe..11d1d1a 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
@@ -46,7 +46,7 @@ public class DumpChunks {
     
     if(args.length < 2) {
       System.out.println("usage: Dump [-s] pattern1,pattern2,pattern3... file1 file2 file3...");
-      System.exit(-1);
+      return;
     }
     
     ChukwaConfiguration conf = new ChukwaConfiguration();

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRCheckAdaptor.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRCheckAdaptor.java
b/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRCheckAdaptor.java
index f4ec73f..8eca91d 100644
--- a/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRCheckAdaptor.java
+++ b/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRCheckAdaptor.java
@@ -172,16 +172,13 @@ public class TestRCheckAdaptor extends TestCase implements ChunkReceiver
{
   
   @Override
   public void add(Chunk event) throws InterruptedException {
-//    System.out.println("got a chunk; len = " + event.getData().length);
     String[] lines = new String(event.getData()).split("\n");
     System.err.println("got chunk; " + lines.length + " lines " + event.getData().length
+ " bytes");
     for(String line: lines) {
       String n = line.substring(line.indexOf(':')+1);
       int i = Integer.parseInt(n);
-//      System.out.println("saw "+i);
       if(i != nextExpectedLine) {
         System.err.println("lines out of order: saw " + i + " expected " + nextExpectedLine);
-        System.exit(0);
         fail();
       }
       nextExpectedLine = i+1;

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestClientTrace.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestClientTrace.java b/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestClientTrace.java
index c047910..aa9efb1 100644
--- a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestClientTrace.java
+++ b/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestClientTrace.java
@@ -52,6 +52,8 @@ public class TestClientTrace extends SetupTestEnv {
       assertTrue(l.size()==1);
       psw.add(l);
       assertTrue(true);
+    } catch (RuntimeException er) {
+	fail(ExceptionUtil.getStackTrace(er));
     } catch (WriterException e) {
       fail(ExceptionUtil.getStackTrace(e));
     }

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java b/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java
deleted file mode 100644
index 9322860..0000000
--- a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.chukwa.rest.resource;
-
-import org.json.simple.JSONObject;
-
-import org.apache.hadoop.chukwa.rest.bean.ReturnCodeBean;
-import org.apache.hadoop.chukwa.rest.bean.UserBean;
-import org.apache.hadoop.chukwa.util.ExceptionUtil;
-import org.json.simple.JSONArray;
-
-import com.sun.jersey.api.client.Client;
-
-public class TestUserResource extends SetupTestEnv {
-  public void testUserSave() {
-    try {
-    UserBean user = new UserBean();
-    user.setId("admin");
-    user.setProperty("testKey", "testValue");
-    JSONArray ja = new JSONArray();
-    user.setViews(ja);
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    ReturnCodeBean result = resource.path("/hicc/v1/user").
-    header("Content-Type","application/json").
-    header("Authorization", authorization).
-    put(ReturnCodeBean.class, user);
-    assertEquals(1, result.getCode());
-    } catch (Exception e) {
-      fail(ExceptionUtil.getStackTrace(e));
-    }
-  }
-  
-  public void testUserLoad() {
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    UserBean user = resource.path("/hicc/v1/user/uid/admin").header("Authorization", authorization).get(UserBean.class);
-    try {
-      assertEquals("admin", user.getId());
-      assertEquals("testValue", user.getPropertyValue("testKey"));
-    } catch (Exception e) {
-      fail(ExceptionUtil.getStackTrace(e));
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestViewResource.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestViewResource.java b/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestViewResource.java
deleted file mode 100644
index 8e355fe..0000000
--- a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestViewResource.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.chukwa.rest.resource;
-
-import javax.ws.rs.core.MultivaluedMap;
-
-import org.apache.hadoop.chukwa.hicc.HiccWebServer;
-import org.apache.hadoop.chukwa.rest.bean.ColumnBean;
-import org.apache.hadoop.chukwa.rest.bean.PagesBean;
-import org.apache.hadoop.chukwa.rest.bean.ReturnCodeBean;
-import org.apache.hadoop.chukwa.rest.bean.ViewBean;
-import org.apache.hadoop.chukwa.rest.bean.WidgetBean;
-
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.core.util.MultivaluedMapImpl;
-
-public class TestViewResource extends SetupTestEnv{
-  public void testViewClone() {
-    MultivaluedMap form = new MultivaluedMapImpl();
-    form.add("owner", "system");
-    form.add("view_name","test");
-    form.add("view_vid","default");
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    ReturnCodeBean result = resource.path("/hicc/v1/view").
-    header("Authorization", authorization).
-    post(ReturnCodeBean.class,form);
-    assertEquals(1,result.getCode());
-  }
-  
-  public void testViewSave() {
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    ViewBean view = resource.path("/hicc/v1/view/vid/test").header("Authorization", authorization).get(ViewBean.class);
-    view.setPermissionType("private");
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    ReturnCodeBean result = (ReturnCodeBean) resource.path("/hicc/v1/view").
-    header("Content-Type","application/json").
-    header("Authorization", authorization).
-    put(ReturnCodeBean.class, view);
-    assertEquals(1, result.getCode());
-  }
-  
-  public void testViewLoad() {
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    ViewBean view = resource.path("/hicc/v1/view/vid/test").header("Authorization", authorization).get(ViewBean.class);
-    assertEquals("test", view.getName());
-    assertEquals("admin", view.getOwner());
-    assertEquals("private", view.getPermissionType());
-  }
-  
-  public void testViewDelete() {
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    ReturnCodeBean result = resource.path("/hicc/v1/view/delete/admin/vid/test").
-    header("Authorization", authorization).
-    delete(ReturnCodeBean.class);
-    assertEquals(1,result.getCode());
-  }
-}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestWidgetResource.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestWidgetResource.java
b/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestWidgetResource.java
deleted file mode 100644
index 4a3b374..0000000
--- a/src/test/java/org/apache/hadoop/chukwa/rest/resource/TestWidgetResource.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.chukwa.rest.resource;
-
-import org.apache.hadoop.chukwa.rest.bean.UserBean;
-import org.apache.hadoop.chukwa.rest.bean.WidgetBean;
-import org.apache.hadoop.chukwa.util.ExceptionUtil;
-
-import com.sun.jersey.api.client.Client;
-
-public class TestWidgetResource extends SetupTestEnv {
-  public void testWidgetSave() {
-    
-  }
-  
-  public void testWidgetLoad() {
-    client = Client.create();
-    resource = client.resource("http://localhost:"+restPort);
-    WidgetBean widget = resource.path("/hicc/v1/widget/wid/disk").header("Authorization",
authorization).get(WidgetBean.class);
-    try {
-      assertEquals("disk", widget.getId());
-    } catch (Exception e) {
-      fail(ExceptionUtil.getStackTrace(e));
-    }    
-  }
-}

http://git-wip-us.apache.org/repos/asf/chukwa/blob/a3116490/src/test/java/org/apache/hadoop/chukwa/validationframework/DemuxDirectoryValidator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/validationframework/DemuxDirectoryValidator.java
b/src/test/java/org/apache/hadoop/chukwa/validationframework/DemuxDirectoryValidator.java
index 808ce7f..dde0106 100644
--- a/src/test/java/org/apache/hadoop/chukwa/validationframework/DemuxDirectoryValidator.java
+++ b/src/test/java/org/apache/hadoop/chukwa/validationframework/DemuxDirectoryValidator.java
@@ -35,7 +35,6 @@ public class DemuxDirectoryValidator {
 
   public static void usage() {
     System.out.println("Usage ...");
-    System.exit(-1);
   }
 
   public static void validate(boolean isLocal, FileSystem fs,
@@ -63,6 +62,7 @@ public class DemuxDirectoryValidator {
 
     if (args.length != 3) {
       usage();
+      return;
     }
 
     String demuxGoldDirectory = args[1];
@@ -84,13 +84,14 @@ public class DemuxDirectoryValidator {
     } else {
       System.out.println("Wrong first argument");
       usage();
+      return;
     }
 
     String[] dirs = { demuxGoldDirectory, demuxTestDirectory };
     validate(isLocal, fs, conf, dirs);
 
     System.out.println("Gold and test directories are equivalent");
-    System.exit(10);
+    return;
   }
 
   public static void compareHDFSDirectory(String gold, String test) {


Mime
View raw message