You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/12/04 21:14:22 UTC

[1/2] nifi git commit: NIFI-1254 remove Destination Type property from GetJMSQueue and GetJMSTopic

Repository: nifi
Updated Branches:
  refs/heads/master 0f3a62015 -> 903f4981a


NIFI-1254 remove Destination Type property from GetJMSQueue and GetJMSTopic

Signed-off-by: Mark Payne <ma...@hotmail.com>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/14b3349e
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/14b3349e
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/14b3349e

Branch: refs/heads/master
Commit: 14b3349e8d5bab515d83b854f23fa00439bd408d
Parents: dce039b
Author: Mike Moser <mo...@apache.org>
Authored: Fri Dec 4 14:26:14 2015 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Dec 4 15:11:47 2015 -0500

----------------------------------------------------------------------
 .../nifi/processors/standard/JmsConsumer.java   |  2 -
 .../processors/standard/TestGetJMSQueue.java    | 71 +++++++++++++-------
 2 files changed, 46 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/14b3349e/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JmsConsumer.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JmsConsumer.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JmsConsumer.java
index d4e1969..ea70d52 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JmsConsumer.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JmsConsumer.java
@@ -21,7 +21,6 @@ import static org.apache.nifi.processors.standard.util.JmsProperties.ACK_MODE_CL
 import static org.apache.nifi.processors.standard.util.JmsProperties.BATCH_SIZE;
 import static org.apache.nifi.processors.standard.util.JmsProperties.CLIENT_ID_PREFIX;
 import static org.apache.nifi.processors.standard.util.JmsProperties.DESTINATION_NAME;
-import static org.apache.nifi.processors.standard.util.JmsProperties.DESTINATION_TYPE;
 import static org.apache.nifi.processors.standard.util.JmsProperties.JMS_PROPS_TO_ATTRIBUTES;
 import static org.apache.nifi.processors.standard.util.JmsProperties.JMS_PROVIDER;
 import static org.apache.nifi.processors.standard.util.JmsProperties.MESSAGE_SELECTOR;
@@ -90,7 +89,6 @@ public abstract class JmsConsumer extends AbstractProcessor {
         descriptors.add(USERNAME);
         descriptors.add(PASSWORD);
         descriptors.add(SSL_CONTEXT_SERVICE);
-        descriptors.add(DESTINATION_TYPE);
         descriptors.add(ACKNOWLEDGEMENT_MODE);
         descriptors.add(MESSAGE_SELECTOR);
         descriptors.add(JMS_PROPS_TO_ATTRIBUTES);

http://git-wip-us.apache.org/repos/asf/nifi/blob/14b3349e/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java
index bfc56a5..3d1447d 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetJMSQueue.java
@@ -42,15 +42,15 @@ public class TestGetJMSQueue {
 
     @Test
     public void testSendTextToQueue() throws Exception {
-        GetJMSQueue getJmsQueue = new GetJMSQueue();
-        TestRunner runner = TestRunners.newTestRunner(getJmsQueue);
-        runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
-        runner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
-        runner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE);
-        runner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
-        runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
-
-        WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(runner.getProcessContext(), true);
+        PutJMS putJms = new PutJMS();
+        TestRunner putRunner = TestRunners.newTestRunner(putJms);
+        putRunner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
+        putRunner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
+        putRunner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE);
+        putRunner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
+        putRunner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
+
+        WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(putRunner.getProcessContext(), true);
         final Session jmsSession = wrappedProducer.getSession();
         final MessageProducer producer = wrappedProducer.getProducer();
         final Message message = jmsSession.createTextMessage("Hello World");
@@ -58,6 +58,13 @@ public class TestGetJMSQueue {
         producer.send(message);
         jmsSession.commit();
 
+        GetJMSQueue getJmsQueue = new GetJMSQueue();
+        TestRunner runner = TestRunners.newTestRunner(getJmsQueue);
+        runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
+        runner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
+        runner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
+        runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
+
         runner.run();
 
         List<MockFlowFile> flowFiles = runner
@@ -73,14 +80,14 @@ public class TestGetJMSQueue {
 
     @Test
     public void testSendBytesToQueue() throws Exception {
-        GetJMSQueue getJmsQueue = new GetJMSQueue();
-        TestRunner runner = TestRunners.newTestRunner(getJmsQueue);
-        runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
-        runner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
-        runner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE);
-        runner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
-        runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
-        WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(runner.getProcessContext(), true);
+        PutJMS putJms = new PutJMS();
+        TestRunner putRunner = TestRunners.newTestRunner(putJms);
+        putRunner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
+        putRunner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
+        putRunner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE);
+        putRunner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
+        putRunner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
+        WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(putRunner.getProcessContext(), true);
         final Session jmsSession = wrappedProducer.getSession();
         final MessageProducer producer = wrappedProducer.getProducer();
         final BytesMessage message = jmsSession.createBytesMessage();
@@ -89,6 +96,13 @@ public class TestGetJMSQueue {
         producer.send(message);
         jmsSession.commit();
 
+        GetJMSQueue getJmsQueue = new GetJMSQueue();
+        TestRunner runner = TestRunners.newTestRunner(getJmsQueue);
+        runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
+        runner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
+        runner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
+        runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
+
         runner.run();
 
         List<MockFlowFile> flowFiles = runner
@@ -104,14 +118,14 @@ public class TestGetJMSQueue {
 
     @Test
     public void testSendStreamToQueue() throws Exception {
-        GetJMSQueue getJmsQueue = new GetJMSQueue();
-        TestRunner runner = TestRunners.newTestRunner(getJmsQueue);
-        runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
-        runner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
-        runner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE);
-        runner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
-        runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
-        WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(runner.getProcessContext(), true);
+        PutJMS putJms = new PutJMS();
+        TestRunner putRunner = TestRunners.newTestRunner(putJms);
+        putRunner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
+        putRunner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
+        putRunner.setProperty(JmsProperties.DESTINATION_TYPE, JmsProperties.DESTINATION_TYPE_QUEUE);
+        putRunner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
+        putRunner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
+        WrappedMessageProducer wrappedProducer = JmsFactory.createMessageProducer(putRunner.getProcessContext(), true);
         final Session jmsSession = wrappedProducer.getSession();
         final MessageProducer producer = wrappedProducer.getProducer();
 
@@ -121,6 +135,13 @@ public class TestGetJMSQueue {
         producer.send(message);
         jmsSession.commit();
 
+        GetJMSQueue getJmsQueue = new GetJMSQueue();
+        TestRunner runner = TestRunners.newTestRunner(getJmsQueue);
+        runner.setProperty(JmsProperties.JMS_PROVIDER, JmsProperties.ACTIVEMQ_PROVIDER);
+        runner.setProperty(JmsProperties.URL, "vm://localhost?broker.persistent=false");
+        runner.setProperty(JmsProperties.DESTINATION_NAME, "queue.testing");
+        runner.setProperty(JmsProperties.ACKNOWLEDGEMENT_MODE, JmsProperties.ACK_MODE_AUTO);
+
         runner.run();
 
         List<MockFlowFile> flowFiles = runner


[2/2] nifi git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/nifi

Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/nifi


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/903f4981
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/903f4981
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/903f4981

Branch: refs/heads/master
Commit: 903f4981a2916a815bcf88001def73cd1d784af9
Parents: 14b3349 0f3a620
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Dec 4 15:14:10 2015 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri Dec 4 15:14:10 2015 -0500

----------------------------------------------------------------------
 nifi-docs/src/main/asciidoc/administration-guide.adoc            | 4 ++--
 .../nifi-resources/src/main/resources/conf/nifi.properties       | 4 ++--
 .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js        | 1 +
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------