Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Invalid argument when RandomAccessFile is too big #150

Open
tomjamescn opened this issue Mar 6, 2017 · 3 comments
Open

Invalid argument when RandomAccessFile is too big #150

tomjamescn opened this issue Mar 6, 2017 · 3 comments

Comments

@tomjamescn
Copy link

when RandomAccessFile is too big , for example 1 G:

java.io.IOException: Invalid argument
at java.io.RandomAccessFile.setLength(Native Method) ~[na:1.8.0_111]
at com.squareup.tape.QueueFile.setLength(QueueFile.java:406) ~[canalClient-1.0-SNAPSHOT.jar:na]
at com.squareup.tape.QueueFile.expandIfNecessary(QueueFile.java:375) ~[canalClient-1.0-SNAPSHOT.jar:na]
at com.squareup.tape.QueueFile.add(QueueFile.java:305) ~[canalClient-1.0-SNAPSHOT.jar:na]
at com.squareup.tape.QueueFile.add(QueueFile.java:287) ~[canalClient-1.0-SNAPSHOT.jar:na]
at com.haibian.util.FileChannel.add(FileChannel.java:41) ~[canalClient-1.0-SNAPSHOT.jar:na]
at com.haibian.AbstractCanalClient.process(AbstractCanalClient.java:168) ~[canalClient-1.0-SNAPSHOT.jar:na]
at com.haibian.AbstractCanalClient$2.run(AbstractCanalClient.java:73) [canalClient-1.0-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]

@jan-zajic
Copy link

jan-zajic commented Jul 14, 2017

+1, we have same:
09:32:16.976 [vert.x-eventloop-thread-1] ERROR xx.xx.TapeQueue -
java.io.IOException: Invalid argument
at java.io.RandomAccessFile.setLength(Native Method)
at com.squareup.tape.QueueFile.setLength(QueueFile.java:406)
at com.squareup.tape.QueueFile.expandIfNecessary(QueueFile.java:375)
at com.squareup.tape.QueueFile.add(QueueFile.java:305)
at com.squareup.tape.QueueFile.add(QueueFile.java:287)
at xxx.xxx.TapeQueue$1.write(TapeQueue.java:49)

(version 1.2.3)

@rabelenda
Copy link

rabelenda commented Jan 9, 2018

+1, Same here, the problem should be fixed by #127, which is already in master. Any plans when is it going to be released?

@f2prateek
Copy link
Collaborator

It's released as a snapshot https://github.com/square/tape#download

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants