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

ASF subversion and git services commented on SLIDER-1234:
---------------------------------------------------------

Commit f18d6ead7fa3a56fad13bd1a6bfd452ca43703c2 in incubator-slider's branch 
refs/heads/develop from [~billie.rinaldi]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=f18d6ea ]

SLIDER-1234 JsonSerDeser should use readFully instead of read


> 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)

Reply via email to