You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by Arvind Prabhakar <ar...@apache.org> on 2012/06/25 19:21:25 UTC
Review Request: FLUME-1314. Log file size breach causes the channel to not
startup.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/
-----------------------------------------------------------
Review request for Flume and Brock Noland.
Description
-------
Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
Diffs
-----
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
Diff: https://reviews.apache.org/r/5551/diff/
Testing
-------
Ran full tests.
Thanks,
Arvind Prabhakar
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Brock Noland <br...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/#review8581
-----------------------------------------------------------
Ship it!
Ship It!
- Brock Noland
On June 25, 2012, 11:21 p.m., Arvind Prabhakar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5551/
> -----------------------------------------------------------
>
> (Updated June 25, 2012, 11:21 p.m.)
>
>
> Review request for Flume and Brock Noland.
>
>
> Description
> -------
>
> Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
>
> This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
>
>
> This addresses bug FLUME-1314.
> https://issues.apache.org/jira/browse/FLUME-1314
>
>
> Diffs
> -----
>
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java 1353634
>
> Diff: https://reviews.apache.org/r/5551/diff/
>
>
> Testing
> -------
>
> Ran full tests.
>
>
> Thanks,
>
> Arvind Prabhakar
>
>
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Mike Percy <mp...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/#review8578
-----------------------------------------------------------
Ship it!
+1
I need this change and it lgtm. Brock, please feel free to raise any issues with this and I will follow up.
- Mike Percy
On June 25, 2012, 11:21 p.m., Arvind Prabhakar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5551/
> -----------------------------------------------------------
>
> (Updated June 25, 2012, 11:21 p.m.)
>
>
> Review request for Flume and Brock Noland.
>
>
> Description
> -------
>
> Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
>
> This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
>
>
> This addresses bug FLUME-1314.
> https://issues.apache.org/jira/browse/FLUME-1314
>
>
> Diffs
> -----
>
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java 1353634
>
> Diff: https://reviews.apache.org/r/5551/diff/
>
>
> Testing
> -------
>
> Ran full tests.
>
>
> Thanks,
>
> Arvind Prabhakar
>
>
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Arvind Prabhakar <ar...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/
-----------------------------------------------------------
(Updated June 25, 2012, 11:21 p.m.)
Review request for Flume and Brock Noland.
Description
-------
Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
This addresses bug FLUME-1314.
https://issues.apache.org/jira/browse/FLUME-1314
Diffs
-----
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
/trunk/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java 1353634
Diff: https://reviews.apache.org/r/5551/diff/
Testing
-------
Ran full tests.
Thanks,
Arvind Prabhakar
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Arvind Prabhakar <ar...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/
-----------------------------------------------------------
(Updated June 25, 2012, 11:20 p.m.)
Review request for Flume and Brock Noland.
Changes
-------
Incorporated review feedback.
Description
-------
Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
Diffs (updated)
-----
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
/trunk/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java 1353634
Diff: https://reviews.apache.org/r/5551/diff/
Testing
-------
Ran full tests.
Thanks,
Arvind Prabhakar
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Brock Noland <br...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/#review8562
-----------------------------------------------------------
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java
<https://reviews.apache.org/r/5551/#comment18241>
""Therefore the better fix is to allow for minor size breach with warnings.""
This check does not remove the preconditions check. Did you want to do this? Also, the max size is meant to keep the size less than 2GB because we store the size as an signed int. Lowering the default max size does a good job of that so I think that is a good change.
- Brock Noland
On June 25, 2012, 5:21 p.m., Arvind Prabhakar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5551/
> -----------------------------------------------------------
>
> (Updated June 25, 2012, 5:21 p.m.)
>
>
> Review request for Flume and Brock Noland.
>
>
> Description
> -------
>
> Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
>
> This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
>
>
> Diffs
> -----
>
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
>
> Diff: https://reviews.apache.org/r/5551/diff/
>
>
> Testing
> -------
>
> Ran full tests.
>
>
> Thanks,
>
> Arvind Prabhakar
>
>
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Mubarak Seyed <se...@apple.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/#review8561
-----------------------------------------------------------
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java
<https://reviews.apache.org/r/5551/#comment18240>
FileChannelConfiguration has a constant
public static final long DEFAULT_MAX_FILE_SIZE = LogFile.MAX_FILE_SIZE;
Can't we make use of that constant in LogFile? Now, we have two constants and both refers same value.
If it is a too much of code change (i think TestLog code refers LogFile.MAX_FILE_SIZE), can we define the contant value in FileChannelConfiguration.DEFAULT_MAX_FILE_SIZE and refer it as LogFile.MAX_FILE_SIZE = FileChannelConfiguration.DEFAULT_MAX_FILE_SIZE?
I guess both are same but FileChannelConfiguration is meant to define default values. Looks like
LogFile.MAX_FILE_SIZE = Integer.MAX_VALUE - (500L * 1024L * 1024L) is a default value?
- Mubarak Seyed
On June 25, 2012, 5:21 p.m., Arvind Prabhakar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5551/
> -----------------------------------------------------------
>
> (Updated June 25, 2012, 5:21 p.m.)
>
>
> Review request for Flume and Brock Noland.
>
>
> Description
> -------
>
> Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
>
> This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
>
>
> Diffs
> -----
>
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
>
> Diff: https://reviews.apache.org/r/5551/diff/
>
>
> Testing
> -------
>
> Ran full tests.
>
>
> Thanks,
>
> Arvind Prabhakar
>
>
Re: Review Request: FLUME-1314. Log file size breach causes the channel to
not startup.
Posted by Arvind Prabhakar <ar...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5551/#review8568
-----------------------------------------------------------
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java
<https://reviews.apache.org/r/5551/#comment18248>
Good catch. I will update the code accordingly.
/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java
<https://reviews.apache.org/r/5551/#comment18247>
Sorry - for some reason this diff got mixed up. The Preconditions check was actually removed. I will be updating the diff shortly with the feedback for previous comment incorporated soon.
- Arvind Prabhakar
On June 25, 2012, 5:21 p.m., Arvind Prabhakar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5551/
> -----------------------------------------------------------
>
> (Updated June 25, 2012, 5:21 p.m.)
>
>
> Review request for Flume and Brock Noland.
>
>
> Description
> -------
>
> Currently the file channel log file can grow beyond the maximum size under load due to non locking size check semantics. These semantics are good in that they allow for higher concurrency rather than having exclusive access to the writer thread between size check and write. Therefore the better fix is to allow for minor size breach with warnings.
>
> This change modifies the code to relax the assertion that checks file size to warning. Also, increased the log write default timeout from 3s to 10s.
>
>
> Diffs
> -----
>
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannelConfiguration.java 1353634
> /trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFile.java 1353634
>
> Diff: https://reviews.apache.org/r/5551/diff/
>
>
> Testing
> -------
>
> Ran full tests.
>
>
> Thanks,
>
> Arvind Prabhakar
>
>