Uploaded image for project: 'Slider'
  1. Slider
  2. SLIDER-1234

Slider JsonSerDeser can use readFully instead of read to avoid " Read finished prematurely"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Slider 0.92
    • None
    • core
    • None

    Description

      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.

      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) 
      

      Attachments

        1. SLIDER-1234.1.patch
          0.7 kB
          Billie Rinaldi

        Activity

          People

            billie Billie Rinaldi
            prabhujoseph Prabhu Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: