Return-Path: X-Original-To: apmail-usergrid-commits-archive@minotaur.apache.org Delivered-To: apmail-usergrid-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B316918B46 for ; Tue, 20 Oct 2015 18:02:05 +0000 (UTC) Received: (qmail 11917 invoked by uid 500); 20 Oct 2015 18:02:05 -0000 Delivered-To: apmail-usergrid-commits-archive@usergrid.apache.org Received: (qmail 11863 invoked by uid 500); 20 Oct 2015 18:02:05 -0000 Mailing-List: contact commits-help@usergrid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@usergrid.apache.org Delivered-To: mailing list commits@usergrid.apache.org Received: (qmail 11685 invoked by uid 99); 20 Oct 2015 18:02:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2015 18:02:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13352E1082; Tue, 20 Oct 2015 18:02:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mrusso@apache.org To: commits@usergrid.apache.org Date: Tue, 20 Oct 2015 18:02:13 -0000 Message-Id: <97eea7bbd53f40949e157524bf6cd7e8@git.apache.org> In-Reply-To: <58c166be647d44999798194bad3e0407@git.apache.org> References: <58c166be647d44999798194bad3e0407@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/12] usergrid git commit: Add null check back for batch sending of SQS w/proper SQS client. Less logging would occur in the event of batch send when the client is not initialized. Add null check back for batch sending of SQS w/proper SQS client. Less logging would occur in the event of batch send when the client is not initialized. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/fbb6c823 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/fbb6c823 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/fbb6c823 Branch: refs/heads/2.1-release Commit: fbb6c823b7e2a1f5f55ab044942b38d1157970c0 Parents: d8e6572 Author: Michael Russo Authored: Mon Oct 19 21:28:46 2015 -0700 Committer: Michael Russo Committed: Mon Oct 19 21:28:46 2015 -0700 ---------------------------------------------------------------------- .../usergrid/persistence/queue/impl/SNSQueueManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/fbb6c823/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java index 3c18992..1bb00dc 100644 --- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java +++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java @@ -543,6 +543,11 @@ public class SNSQueueManagerImpl implements QueueManager { @Override public void sendMessages( final List bodies ) throws IOException { + if ( sqsAsync == null ) { + logger.error( "SQS client is null, perhaps it failed to initialize successfully" ); + return; + } + for ( Object body : bodies ) { sendMessage( ( Serializable ) body ); }