[
https://issues.apache.org/jira/browse/NIFI-589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528504#comment-14528504
]
ASF GitHub Bot commented on NIFI-589:
-------------------------------------
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.
> Add processors that can run Apache Flume sources/sinks
> ------------------------------------------------------
>
> Key: NIFI-589
> URL: https://issues.apache.org/jira/browse/NIFI-589
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Extensions
> Affects Versions: 0.1.0
> Reporter: Joey Echeverria
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)