You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "Gour Saha (JIRA)" <ji...@apache.org> on 2017/08/01 16:22:00 UTC
[jira] [Commented] (SLIDER-1234) Slider JsonSerDeser can use
readFully instead of read to avoid " Read finished prematurely"
[ https://issues.apache.org/jira/browse/SLIDER-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109202#comment-16109202 ]
Gour Saha commented on SLIDER-1234:
-----------------------------------
+1 for the patch. Running all UTs to validate.
> Slider JsonSerDeser can use readFully instead of read to avoid " Read finished prematurely"
> -------------------------------------------------------------------------------------------
>
> Key: SLIDER-1234
> URL: https://issues.apache.org/jira/browse/SLIDER-1234
> Project: Slider
> Issue Type: Bug
> Components: core
> Affects Versions: Slider 0.92
> Reporter: Prabhu Joseph
> Assignee: Billie Rinaldi
> Attachments: SLIDER-1234.1.patch
>
>
> Slider JsonSerDeser uses FSDataInputStream#read() inside load method which fails sometimes with "Read finished prematurely" when there is a data loss for the data sent over the socket.
> Better to use readFully() which can avoid this.
> {code}
> Exception: Read finished prematurely
> 2017-05-16 12:34:33,329 [main] ERROR main.ServiceLauncher - Exception: Read finished prematurely
> java.io.EOFException: Read finished prematurely
> at org.apache.slider.core.persist.JsonSerDeser.load(JsonSerDeser.java:204)
> at org.apache.slider.core.persist.ConfPersister.loadConf(ConfPersister.java:230)
> at org.apache.slider.core.persist.ConfPersister.load(ConfPersister.java:277)
> at org.apache.slider.core.build.InstanceIO.loadInstanceDefinitionUnresolved(InstanceIO.java:54)
> at org.apache.slider.client.SliderClient.loadInstanceDefinitionUnresolved(SliderClient.java:1913)
> at org.apache.slider.client.SliderClient.actionCreate(SliderClient.java:703)
> at org.apache.slider.client.SliderClient.exec(SliderClient.java:388)
> at org.apache.slider.client.SliderClient.runService(SliderClient.java:349)
> at org.apache.slider.core.main.ServiceLauncher.launchService(ServiceLauncher.java:188)
> at org.apache.slider.core.main.ServiceLauncher.launchServiceRobustly(ServiceLauncher.java:475)
> at org.apache.slider.core.main.ServiceLauncher.launchServiceAndExit(ServiceLauncher.java:403)
> at org.apache.slider.core.main.ServiceLauncher.serviceMain(ServiceLauncher.java:630)
> at org.apache.slider.Slider.main(Slider.java:49)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)