You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Jayant Shekhar (JIRA)" <ji...@apache.org> on 2012/09/04 20:21:07 UTC
[jira] [Created] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Jayant Shekhar created FLUME-1535:
-------------------------------------
Summary: Ability to specify the capacity of MemoryChannel in bytes
Key: FLUME-1535
URL: https://issues.apache.org/jira/browse/FLUME-1535
Project: Flume
Issue Type: Improvement
Components: Channel
Affects Versions: v1.2.0
Reporter: Jayant Shekhar
Fix For: v1.3.0
Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451447#comment-13451447 ]
Ted Malaska commented on FLUME-1535:
------------------------------------
Just noting a comment by Mike P that should be remembered when reviewing this patch
"One possibly tricky issue is incrementing the memory usage on put (but undoing it on rollback) and only decrementing it on commit of takes."
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Labels: patch
> Fix For: v1.3.0
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470858#comment-13470858 ]
Hudson commented on FLUME-1535:
-------------------------------
Integrated in flume-trunk #312 (See [https://builds.apache.org/job/flume-trunk/312/])
FLUME-1535. Ability to specify the capacity of MemoryChannel in bytes. (Revision 246c1b0213a2089e6cb684d1d982cd03015fb09e)
Result = SUCCESS
hshreedharan : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=246c1b0213a2089e6cb684d1d982cd03015fb09e
Files :
* flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
* flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannel.java
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch, FLUME-1535-5-Atomic.patch, FLUME-1535-Semaphore-0.patch, FLUME-1535-Semaphore-1.patch, FLUME-1535-Semaphore-3.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-0.patch
Not totally finished.
But this patch contains a work implementation and junits.
Please feel free to comment.
Tomorrow I play to give it one more look over and add some comments and exit some wording.
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-Semaphore-0.patch
Implemented byte capacity with semaphores
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch, FLUME-1535-5-Atomic.patch, FLUME-1535-Semaphore-0.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-Semaphore-3.patch
Fixed multi config change issue.
Also added unit test to check for such an error in the future.
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch, FLUME-1535-5-Atomic.patch, FLUME-1535-Semaphore-0.patch, FLUME-1535-Semaphore-1.patch, FLUME-1535-Semaphore-3.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-1.patch
Did some clean up.
This is a fulling working and tested patch.
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451988#comment-13451988 ]
Ted Malaska commented on FLUME-1535:
------------------------------------
How it works:
1. The user will be able to define a byteCapacity and a byteCapacityBufferPercentage.
2. Events byte size will be estimated from there body contents
3. On put bytes are added to current total
4. On commit any uncommitted takes are removed from the current byte total
5. On rollover any uncommitted puts are removed from the current byte total
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-5-Atomic.patch
here is the solution with AtomicLong. Tomorrow I will look at a possible solution using a Semaphore.
Let me know if there are any problems with the AtomicLong solution and how might the use of Semaphore help.
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch, FLUME-1535-5-Atomic.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Assignee: Ted Malaska
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (FLUME-1535) Ability to specify the
capacity of MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451717#comment-13451717 ]
Ted Malaska edited comment on FLUME-1535 at 9/11/12 12:20 AM:
--------------------------------------------------------------
Not totally finished.
But this patch contains a working implementation and junits.
Please feel free to comment.
Tomorrow I plan to give it one more look over and add some comments and exit some wording.
was (Author: ted.m):
Not totally finished.
But this patch contains a work implementation and junits.
Please feel free to comment.
Tomorrow I play to give it one more look over and add some comments and exit some wording.
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Hari Shreedharan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hari Shreedharan resolved FLUME-1535.
-------------------------------------
Resolution: Fixed
Excellent work. Thanks for pulling it through. Patch committed, rev: 246c1b0213a2089e6cb684d1d982cd03015fb09e. Thanks Ted!
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch, FLUME-1535-5-Atomic.patch, FLUME-1535-Semaphore-0.patch, FLUME-1535-Semaphore-1.patch, FLUME-1535-Semaphore-3.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-4.patch
Thank you Mike for the review.
Summary of my changes
-Changed currentByteUsage to AtomicLong
-Also added synchronized(currentByteUsage) to put.
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FLUME-1535) Ability to specify the capacity of
MemoryChannel in bytes
Posted by "Ted Malaska (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FLUME-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Malaska updated FLUME-1535:
-------------------------------
Attachment: FLUME-1535-Semaphore-1.patch
Added another unit test
> Ability to specify the capacity of MemoryChannel in bytes
> ---------------------------------------------------------
>
> Key: FLUME-1535
> URL: https://issues.apache.org/jira/browse/FLUME-1535
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.2.0
> Reporter: Jayant Shekhar
> Assignee: Ted Malaska
> Labels: patch
> Fix For: v1.3.0
>
> Attachments: FLUME-1535-0.patch, FLUME-1535-1.patch, FLUME-1535-4.patch, FLUME-1535-5-Atomic.patch, FLUME-1535-Semaphore-0.patch, FLUME-1535-Semaphore-1.patch
>
>
> Users should be able to specify the capacity of memory channel in bytes. Currently users are able to specify the capacity in terms of max number of events. This causes issues when the size of the events can vary significantly (a couple of KB to MB) and could easily result in the Flume agent running into OOM.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira