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

Attila Simon commented on FLUME-2716:
-------------------------------------

As I can see max capacity is 268434426. Checkpoint file is memory mapped as a 
whole and that cannot exceed Integer.MAX_VALUE :
https://docs.oracle.com/javase/7/docs/api/java/nio/channels/FileChannel.html#map(java.nio.channels.FileChannel.MapMode,%20long,%20long)
Checkpoint file size = (<user defined capacity> + <file header size=1029>) * 
<size of long=8, these are offsets only>

So basically capacity is less than Integer.MAX_VALUE by the header part. I see 
no issue with splitting up the memory mapping in some next release eg mapping 
only different parts of same checkpoint file by multiple map calls or split the 
checkpoints to multiple files.

> File Channel cannot handle capacity Integer.MAX_VALUE
> -----------------------------------------------------
>
>                 Key: FLUME-2716
>                 URL: https://issues.apache.org/jira/browse/FLUME-2716
>             Project: Flume
>          Issue Type: Bug
>          Components: Channel, File Channel
>    Affects Versions: v1.6.0, v1.7.0
>            Reporter: Dong Zhao
>              Labels: unit-test-missing
>             Fix For: v1.7.0
>
>         Attachments: FLUME-2716.patch
>
>
> if capacity is set to Integer.MAX_VALUE(2147483647), checkpoint file size is 
> calculated wrongly to 8224. The calculation should first cast int to long, 
> then calculate the totalBytes. See the patch for details. Thanks.



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

Reply via email to