From 180ea1ba222a5890541dfbe046f2876695e69239 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Mon, 16 Nov 2015 15:50:14 -0500 Subject: [PATCH] NIFI-1176: Use a smaller internal blocking queue size of only 5000 messages; do not create a new queue every time the processor is scheduled to run Signed-off-by: Aldrin Piri --- .../java/org/apache/nifi/processors/twitter/GetTwitter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java b/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java index e41b583929..e0994499af 100644 --- a/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java +++ b/nifi-nar-bundles/nifi-social-media-bundle/nifi-twitter-processors/src/main/java/org/apache/nifi/processors/twitter/GetTwitter.java @@ -156,7 +156,7 @@ public class GetTwitter extends AbstractProcessor { private final BlockingQueue eventQueue = new LinkedBlockingQueue<>(1000); private volatile Client client; - private volatile BlockingQueue messageQueue = new LinkedBlockingQueue<>(10000); + private volatile BlockingQueue messageQueue = new LinkedBlockingQueue<>(5000); @Override protected void init(final ProcessorInitializationContext context) { @@ -222,8 +222,6 @@ public class GetTwitter extends AbstractProcessor { @OnScheduled public void onScheduled(final ProcessContext context) throws MalformedURLException { - messageQueue = new LinkedBlockingQueue<>(100000); - final String endpointName = context.getProperty(ENDPOINT).getValue(); final Authentication oauth = new OAuth1(context.getProperty(CONSUMER_KEY).getValue(), context.getProperty(CONSUMER_SECRET).getValue(),