flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juha...@apache.org
Subject [10/10] git commit: FLUME-1362 fix
Date Wed, 15 Aug 2012 07:00:19 GMT
FLUME-1362 fix


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

Branch: refs/heads/trunk
Commit: 9f52b5f991b7d79fca92fd6c4e87cdf346ceab2e
Parents: 6641c32
Author: Juhani Connolly <juhanic@cyberagent.co.jp>
Authored: Wed Jul 11 17:42:11 2012 +0900
Committer: Juhani Connolly <juhanic@cyberagent.co.jp>
Committed: Wed Jul 11 17:42:11 2012 +0900

----------------------------------------------------------------------
 .../source/thriftLegacy/ThriftLegacySource.java    |    4 ++--
 .../thriftLegacy/TestThriftLegacySource.java       |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/9f52b5f9/flume-ng-legacy-sources/flume-thrift-source/src/main/java/org/apache/flume/source/thriftLegacy/ThriftLegacySource.java
----------------------------------------------------------------------
diff --git a/flume-ng-legacy-sources/flume-thrift-source/src/main/java/org/apache/flume/source/thriftLegacy/ThriftLegacySource.java
b/flume-ng-legacy-sources/flume-thrift-source/src/main/java/org/apache/flume/source/thriftLegacy/ThriftLegacySource.java
index 5b056fc..47913dc 100644
--- a/flume-ng-legacy-sources/flume-thrift-source/src/main/java/org/apache/flume/source/thriftLegacy/ThriftLegacySource.java
+++ b/flume-ng-legacy-sources/flume-thrift-source/src/main/java/org/apache/flume/source/thriftLegacy/ThriftLegacySource.java
@@ -32,6 +32,7 @@ import org.apache.flume.Context;
 import org.apache.flume.CounterGroup;
 import org.apache.flume.Event;
 import org.apache.flume.EventDrivenSource;
+import org.apache.flume.FlumeException;
 import org.apache.flume.conf.Configurable;
 import org.apache.flume.source.AbstractSource;
 import org.apache.flume.event.EventBuilder;
@@ -141,8 +142,7 @@ public class ThriftLegacySource  extends AbstractSource implements
       server = new TThreadPoolServer(new TThreadPoolServer.
           Args(serverTransport).processor(processor));
     } catch (TTransportException e) {
-      e.printStackTrace();
-      return;
+      throw new FlumeException("Failed starting source", e);
     }
     ThriftHandler thriftHandler = new ThriftHandler(server);
     thriftHandlerThread = new Thread(thriftHandler);

http://git-wip-us.apache.org/repos/asf/flume/blob/9f52b5f9/flume-ng-legacy-sources/flume-thrift-source/src/test/java/org/apache/flume/source/thriftLegacy/TestThriftLegacySource.java
----------------------------------------------------------------------
diff --git a/flume-ng-legacy-sources/flume-thrift-source/src/test/java/org/apache/flume/source/thriftLegacy/TestThriftLegacySource.java
b/flume-ng-legacy-sources/flume-thrift-source/src/test/java/org/apache/flume/source/thriftLegacy/TestThriftLegacySource.java
index 4869665..d8a6872 100644
--- a/flume-ng-legacy-sources/flume-thrift-source/src/test/java/org/apache/flume/source/thriftLegacy/TestThriftLegacySource.java
+++ b/flume-ng-legacy-sources/flume-thrift-source/src/test/java/org/apache/flume/source/thriftLegacy/TestThriftLegacySource.java
@@ -31,6 +31,7 @@ import org.apache.flume.ChannelException;
 import org.apache.flume.ChannelSelector;
 import org.apache.flume.Context;
 import org.apache.flume.Event;
+import org.apache.flume.FlumeException;
 import org.apache.flume.Transaction;
 import org.apache.flume.channel.ChannelProcessor;
 import org.apache.flume.channel.MemoryChannel;
@@ -121,7 +122,7 @@ public class TestThriftLegacySource {
 
         source.start();
         bound = true;
-      } catch (ChannelException e) {
+      } catch (FlumeException e) {
         // Assume port in use, try another one
       }
     }


Mime
View raw message