[jira] [Assigned] (FLUME-2917) Provide netcat UDP source as alternative to TCP

2016-09-26 Thread Tristan Stevens (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLUME-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tristan Stevens reassigned FLUME-2917:
--

Assignee: Tristan Stevens

> Provide netcat UDP source as alternative to TCP
> ---
>
> Key: FLUME-2917
> URL: https://issues.apache.org/jira/browse/FLUME-2917
> Project: Flume
>  Issue Type: New Feature
>  Components: Sinks+Sources
>Affects Versions: v1.6.0
>Reporter: Tristan Stevens
>Assignee: Tristan Stevens
>Priority: Minor
> Attachments: FLUME-2917.patch
>
>
> Currently Flume provides a Netcat TCP source, however Netcat is often used 
> with UDP. There is an implementation of a UDP client in the SyslogUDP source, 
> this request takes this implementation and strips out the Syslog parts, thus 
> forming a Netcat UDP source - where each datagram is recorded as a Flume 
> event.
> The implementation is provided for this at 
> https://github.com/tmgstevens/FlumeNetcatUDPSource and also provided as an 
> attached patch for inclusion.
> N.B. Unit tests are provided for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Review Request 52279: FLUME-2917 Provide netcat UDP source as alternative to TCP

2016-09-26 Thread Tristan Stevens

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52279/
---

Review request for Flume and Balázs Donát Bessenyei.


Repository: flume-git


Description
---

Implementation is heavily based on the existing SyslogUDPSource - the tests and 
implementation mirror that. We could consider making it a superclass of 
SyslogUDPSource and removing the syslog parsing, if this was felt tidier.


Diffs
-

  flume-ng-core/src/main/java/org/apache/flume/source/NetcatUdpSource.java 
PRE-CREATION 
  flume-ng-core/src/test/java/org/apache/flume/source/TestNetcatUdpSource.java 
PRE-CREATION 

Diff: https://reviews.apache.org/r/52279/diff/


Testing
---

Unit tests provided.


Thanks,

Tristan Stevens



[jira] [Commented] (FLUME-2917) Provide netcat UDP source as alternative to TCP

2016-09-26 Thread Tristan Stevens (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15524214#comment-15524214
 ] 

Tristan Stevens commented on FLUME-2917:


Just looking back at how I did this - it was actually inspired by the SyslogUDP 
source - if anything it should be a superclass of that - although that's 
probably more re-engineering than is necessary (unless you disagree of course!)

Given how dissimilar this is vs. the TCP version of Netcat source, I'd propose 
to keep them separate. I'll create a review request now.

> Provide netcat UDP source as alternative to TCP
> ---
>
> Key: FLUME-2917
> URL: https://issues.apache.org/jira/browse/FLUME-2917
> Project: Flume
>  Issue Type: New Feature
>  Components: Sinks+Sources
>Affects Versions: v1.6.0
>Reporter: Tristan Stevens
>Priority: Minor
> Attachments: FLUME-2917.patch
>
>
> Currently Flume provides a Netcat TCP source, however Netcat is often used 
> with UDP. There is an implementation of a UDP client in the SyslogUDP source, 
> this request takes this implementation and strips out the Syslog parts, thus 
> forming a Netcat UDP source - where each datagram is recorded as a Flume 
> event.
> The implementation is provided for this at 
> https://github.com/tmgstevens/FlumeNetcatUDPSource and also provided as an 
> attached patch for inclusion.
> N.B. Unit tests are provided for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Jenkins build became unstable: Flume-trunk-hbase-1 #205

2016-09-26 Thread Apache Jenkins Server
See 



[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523310#comment-15523310
 ] 

Hudson commented on FLUME-2966:
---

UNSTABLE: Integrated in Jenkins build Flume-trunk-hbase-1 #205 (See 
[https://builds.apache.org/job/Flume-trunk-hbase-1/205/])
FLUME-2966. Fix NPE in JMS Source (bessbd: 
[http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=591b138321280cea1e7d61efcaf625a67202cb3d])
* (edit) 
flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestDefaultJMSMessageConverter.java
* (edit) 
flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java


> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FLUME-2998) Add missing configuration parameter to SequenceSource docs

2016-09-26 Thread Attila Simon (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLUME-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Simon updated FLUME-2998:

Attachment: FLUME-2998.patch

> Add missing configuration parameter to SequenceSource docs
> --
>
> Key: FLUME-2998
> URL: https://issues.apache.org/jira/browse/FLUME-2998
> Project: Flume
>  Issue Type: Documentation
>  Components: Docs
>Affects Versions: v1.7.0
>Reporter: Attila Simon
>Assignee: Attila Simon
> Fix For: v1.7.0
>
> Attachments: FLUME-2998.patch
>
>
> totalEvents can be specified



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (FLUME-2998) Add missing configuration parameter to SequenceSource docs

2016-09-26 Thread Attila Simon (JIRA)
Attila Simon created FLUME-2998:
---

 Summary: Add missing configuration parameter to SequenceSource docs
 Key: FLUME-2998
 URL: https://issues.apache.org/jira/browse/FLUME-2998
 Project: Flume
  Issue Type: Documentation
  Components: Docs
Affects Versions: v1.7.0
Reporter: Attila Simon
Assignee: Attila Simon
 Fix For: v1.7.0


totalEvents can be specified



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread JIRA

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523191#comment-15523191
 ] 

Bessenyei Balázs Donát commented on FLUME-2966:
---

[~denes], [~sati], [~mpercy]: thank you for the reviews

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread JIRA

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523149#comment-15523149
 ] 

Bessenyei Balázs Donát commented on FLUME-2966:
---

[~sahuja]: thank you for the patch

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523134#comment-15523134
 ] 

ASF subversion and git services commented on FLUME-2966:


Commit 591b138321280cea1e7d61efcaf625a67202cb3d in flume's branch 
refs/heads/trunk from [~sahuja]
[ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=591b138 ]

FLUME-2966. Fix NPE in JMS Source

JMS Source does not check for null text in a TextMessage. This can lead to 
NullPointerException.
This commit fixes that problem by checking for nullity of textMessage.getText().

Reviewers: Denes Arvay, Attila Simon, Mike Percy, Bessenyei Balázs Donát

(Siddharth Ahuja via Bessenyei Balázs Donát)


> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2997) Fix flaky junit test in SpillableMemoryChannel

2016-09-26 Thread Attila Simon (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523123#comment-15523123
 ] 

Attila Simon commented on FLUME-2997:
-

Code change in the attached patch sets up a channel in the test with a capacity 
enough to store the produced events.

> Fix flaky junit test in SpillableMemoryChannel
> --
>
> Key: FLUME-2997
> URL: https://issues.apache.org/jira/browse/FLUME-2997
> Project: Flume
>  Issue Type: Test
>Affects Versions: v1.7.0
>Reporter: Attila Simon
>Assignee: Attila Simon
> Fix For: v1.7.0
>
> Attachments: FLUME-2997.patch
>
>
> testParallelSingleSourceAndSink sometimes trigger an edge case scenario if 
> sinks are slower than sources. In such situations the channel can get full 
> thus uncaught ChannelFullException breaks the test. Since 
> testCapacityWithOverflow was designed to cover such edge-case scenario 
> already we can safely fix the test by increasing the channel capacity to make 
> sure it won't get full.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FLUME-2997) Fix flaky junit test in SpillableMemoryChannel

2016-09-26 Thread Attila Simon (JIRA)

 [ 
https://issues.apache.org/jira/browse/FLUME-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Simon updated FLUME-2997:

Attachment: FLUME-2997.patch

> Fix flaky junit test in SpillableMemoryChannel
> --
>
> Key: FLUME-2997
> URL: https://issues.apache.org/jira/browse/FLUME-2997
> Project: Flume
>  Issue Type: Test
>Affects Versions: v1.7.0
>Reporter: Attila Simon
>Assignee: Attila Simon
> Fix For: v1.7.0
>
> Attachments: FLUME-2997.patch
>
>
> testParallelSingleSourceAndSink sometimes trigger an edge case scenario if 
> sinks are slower than sources. In such situations the channel can get full 
> thus uncaught ChannelFullException breaks the test. Since 
> testCapacityWithOverflow was designed to cover such edge-case scenario 
> already we can safely fix the test by increasing the channel capacity to make 
> sure it won't get full.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (FLUME-2997) Fix flaky junit test in SpillableMemoryChannel

2016-09-26 Thread Attila Simon (JIRA)
Attila Simon created FLUME-2997:
---

 Summary: Fix flaky junit test in SpillableMemoryChannel
 Key: FLUME-2997
 URL: https://issues.apache.org/jira/browse/FLUME-2997
 Project: Flume
  Issue Type: Test
Affects Versions: v1.7.0
Reporter: Attila Simon
Assignee: Attila Simon
 Fix For: v1.7.0


testParallelSingleSourceAndSink sometimes trigger an edge case scenario if 
sinks are slower than sources. In such situations the channel can get full thus 
uncaught ChannelFullException breaks the test. Since testCapacityWithOverflow 
was designed to cover such edge-case scenario already we can safely fix the 
test by increasing the channel capacity to make sure it won't get full.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread JIRA

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523023#comment-15523023
 ] 

Bessenyei Balázs Donát commented on FLUME-2966:
---

I'm about to commit this

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread Mike Percy (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523006#comment-15523006
 ] 

Mike Percy commented on FLUME-2966:
---

[~bessbd], ah you are right, didn't notice the same logic in the constructor. 
+1 LGTM

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread JIRA

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522989#comment-15522989
 ] 

Bessenyei Balázs Donát commented on FLUME-2966:
---

[~mpercy]: if it's a new event, pretty much the same happens, doesn't it?

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread Mike Percy (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522956#comment-15522956
 ] 

Mike Percy commented on FLUME-2966:
---

Should we setBody(null) if gettext() returns null?

Looking at SimpleEvent, handling of setBody(null) is different than doing 
nothing, but I'm not sure why.

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread Attila Simon (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522921#comment-15522921
 ] 

Attila Simon commented on FLUME-2966:
-

After applying FLUME-2966-1.patch: flume builds and unittest passed (within the 
impacted module). the change looks good to me. +1

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLUME-2966) NULL text in a TextMessage from a JMS source in Flume can lead to NPE

2016-09-26 Thread Denes Arvay (JIRA)

[ 
https://issues.apache.org/jira/browse/FLUME-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522304#comment-15522304
 ] 

Denes Arvay commented on FLUME-2966:


[~sahuja], thanks for the patch, LGTM, +1

> NULL text in a TextMessage from a JMS source in Flume can lead to NPE
> -
>
> Key: FLUME-2966
> URL: https://issues.apache.org/jira/browse/FLUME-2966
> Project: Flume
>  Issue Type: Bug
>Affects Versions: v1.5.0
>Reporter: Siddharth Ahuja
>Assignee: Siddharth Ahuja
> Attachments: App.java, FLUME-2966-0.patch, FLUME-2966-1.patch
>
>
> Code at 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103
>  does not check for a NULL text in a TextMessage from a Flume JMS source. 
> This can lead to a NullPointerException here: 
> {code}textMessage.getText().getBytes(charset){code} while trying to 
> de-reference a null text from the textmessage.
> We should probably skip these like the NULL Objects in the ObjectMessage just 
> below at: 
> https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)