Review Board 1.7.22


FLUME-1886 - Add a JMS enum type to SourceType

Review Request #10446 - Created April 13, 2013 and updated

Israel Ekpo
flume-1.4
FLUME-1886
Reviewers
Flume
flume-git
Updated SourceType and SourceConfiguration to support this improvement
Added unit tests to simulate how this source is loaded.

Also modified tests to cover other sources as well.
flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
Revision 7029615 New Change
[20] 25 lines
[+20]
26
import org.apache.flume.conf.ComponentConfiguration;
26
import org.apache.flume.conf.ComponentConfiguration;
27
import org.apache.flume.conf.ComponentConfigurationFactory;
27
import org.apache.flume.conf.ComponentConfigurationFactory;
28
import org.apache.flume.conf.ConfigurationException;
28
import org.apache.flume.conf.ConfigurationException;
29
import org.apache.flume.conf.FlumeConfiguration;
29
import org.apache.flume.conf.FlumeConfiguration;
30
import org.apache.flume.conf.FlumeConfigurationError;
30
import org.apache.flume.conf.FlumeConfigurationError;
31
import org.apache.flume.conf.FlumeConfigurationErrorType;

   
32
import org.apache.flume.conf.FlumeConfigurationError.ErrorOrWarning;
31
import org.apache.flume.conf.FlumeConfigurationError.ErrorOrWarning;

    
   
32
import org.apache.flume.conf.FlumeConfigurationErrorType;
33
import org.apache.flume.conf.channel.ChannelSelectorConfiguration;
33
import org.apache.flume.conf.channel.ChannelSelectorConfiguration;
34
import org.apache.flume.conf.channel.ChannelSelectorConfiguration.ChannelSelectorConfigurationType;
34
import org.apache.flume.conf.channel.ChannelSelectorConfiguration.ChannelSelectorConfigurationType;
35
import org.apache.flume.conf.channel.ChannelSelectorType;
35
import org.apache.flume.conf.channel.ChannelSelectorType;
36

    
   
36

   
37
public class SourceConfiguration extends ComponentConfiguration {
37
public class SourceConfiguration extends ComponentConfiguration {
[+20] [20] 138 lines
[+20] [+] private ChannelSelectorType getKnownChannelSelector(String type) {
176
     * Multiport Syslog TCP Source
176
     * Multiport Syslog TCP Source
177
     *
177
     *
178
     * @see org.apache.flume.source.MultiportSyslogTCPSource
178
     * @see org.apache.flume.source.MultiportSyslogTCPSource
179
     *
179
     *
180
     */
180
     */
181

    
   

   
182
    MULTIPORT_SYSLOGTCP("org.apache.flume.source.MultiportSyslogTCPSourceConfiguration"),
181
    MULTIPORT_SYSLOGTCP("org.apache.flume.source.MultiportSyslogTCPSourceConfiguration"),
183

    
   
182

   
184
    /**
183
    /**
185
     * Spool directory source
184
     * Spool directory source
186
     *
185
     *
[+20] [20] 11 lines
[+20] private ChannelSelectorType getKnownChannelSelector(String type) {
198
    /**
197
    /**
199
     * HTTP Source
198
     * HTTP Source
200
     *
199
     *
201
     * @see org.apache.flume.source.ThriftSource
200
     * @see org.apache.flume.source.ThriftSource
202
     */
201
     */
203
    THRIFT("org.apache.flume.source.http.ThriftSourceConfiguration");
202
    THRIFT("org.apache.flume.source.http.ThriftSourceConfiguration"),

    
   
203

   

    
   
204
    /**

    
   
205
     * JMS Source

    
   
206
     *

    
   
207
     * @see org.apache.flume.source.jms.JMSSource

    
   
208
     */

    
   
209
    JMS("org.apache.flume.source.jms.JMSSourceConfiguration");
204

    
   
210

   
205
    private String srcConfigurationName;
211
    private String srcConfigurationName;
206

    
   
212

   
207
    private SourceConfigurationType(String src) {
213
    private SourceConfigurationType(String src) {
208
      this.srcConfigurationName = src;
214
      this.srcConfigurationName = src;
[+20] [20] 39 lines
flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceType.java
Revision a1bcd58 New Change
 
flume-ng-core/src/test/java/org/apache/flume/source/TestDefaultSourceFactory.java
Revision ffbe177 New Change
 
flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestJMSSourceCreation.java
New File
 
  1. flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java: Loading...
  2. flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceType.java: Loading...
  3. flume-ng-core/src/test/java/org/apache/flume/source/TestDefaultSourceFactory.java: Loading...
  4. flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestJMSSourceCreation.java: Loading...