Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with chunk size #16

Open
akahkhanna opened this issue Mar 27, 2018 · 0 comments
Open

Issue with chunk size #16

akahkhanna opened this issue Mar 27, 2018 · 0 comments

Comments

@akahkhanna
Copy link

akahkhanna commented Mar 27, 2018

I am working on a web based application to tail log file. I set a chunksize of 16384 and startPosition 5. My log file is around 38 MB in size and the browser hangs as soon as I do so. I am using Jetty and Primefaces.

When I click the server, the text area displaying log content gets filled up with way more data than expected.

int displayChunkSize =  16384 :
long fileSize = path.toFile().length();
long startPos =5;
Observable<String> tailer = FileObservable
           .tailer()
           .file( path.toFile().getAbsolutePath() ) 
           .sampleTimeMs( 500 )
           .chunkSize( displayChunkSize )
           .startPosition( startPos)
           .tailText();
SafeSubscriber safeSub = new SafeSubscriber(new ActionSubscriber( 
    onMessage, onError, Actions.empty() ) );
Runnable sub = () -> tailer.subscribe( safeSub );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant