Github user busbey commented on a diff in the pull request:
https://github.com/apache/incubator-nifi/pull/51#discussion_r29672315
--- Diff:
nifi/nifi-nar-bundles/nifi-flume-bundle/nifi-flume-processors/src/main/java/org/apache/nifi/processors/flume/NifiChannelSelector.java
---
@@ -0,0 +1,55 @@
+
+package org.apache.nifi.processors.flume;
+
+import com.google.common.collect.ImmutableList;
+import java.util.List;
+import org.apache.flume.Channel;
+import org.apache.flume.ChannelSelector;
+import org.apache.flume.Context;
+import org.apache.flume.Event;
+
+
+public class NifiChannelSelector implements ChannelSelector {
+ private String name;
+ private final List<Channel> requiredChannels;
+ private final List<Channel> optionalChannels;
+
+ public NifiChannelSelector(Channel channel) {
+ requiredChannels = ImmutableList.of(channel);
+ optionalChannels = ImmutableList.of();
+ }
+
+ @Override
+ public List<Channel> getRequiredChannels(Event event) {
+ return requiredChannels;
+ }
+
+ @Override
+ public List<Channel> getOptionalChannels(Event event) {
+ return optionalChannels;
+ }
+
+ @Override
+ public List<Channel> getAllChannels() {
+ return requiredChannels;
+ }
+
+ @Override
+ public void setChannels(List<Channel> channels) {
+ throw new UnsupportedOperationException("Not supported yet."); //To
change body of generated methods, choose Tools | Templates.
--- End diff --
please leave out autogenerated comments.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---