uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (Commented) (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-2369) Need reliable way to download uima binary artifact from standard Apache spot
Date Thu, 09 Feb 2012 17:13:59 GMT

    [ https://issues.apache.org/jira/browse/UIMA-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204658#comment-13204658

Marshall Schor commented on UIMA-2369:

found some hits searching for "premature EOF".  I put in some error recovery for this.  The
first part is reading the total size to be downloaded, which is available before starting
the stream processing.  Then when an EOF happens, I can check to see if it's premature.  If
it is, I restart the download, adding to the URL connection the setRequestProperty("Range",
"bytes=" + starting-location + "-") - which should restart the transfer.  The whole thing
is inside a retry loop.  After I did this, the internet started behaving nicely, and so far
I've gotten 0 premature EOFs.  So this isn't tested... I'll try again tonight.  Maybe I'll
have to wait for a certain sunspot cycle :-) to test. 
> Need reliable way to download uima binary artifact from standard Apache spot
> ----------------------------------------------------------------------------
>                 Key: UIMA-2369
>                 URL: https://issues.apache.org/jira/browse/UIMA-2369
>             Project: UIMA
>          Issue Type: Bug
>          Components: Build, Packaging and Test
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
> The uima-as build is somewhat broken.  A fix was made to download the base uimaj sdk
binary build (upon which the uima-as build depends) by adding a new goal to the uima-build-helper-maven-plugin.
 That goal has a small bug - it doesn't create the intermediate directories needed when creating
the output file for the download.
> However, it has a bigger problem - the download runs a small loop, reading from the URL
open stream, and writing to the local file.  The loop ends when the read method returns -1
for the number of bytes read.  Java is supposed to only return this when the end-of-file is
reached, but (randomly) it is getting returned early.  This results in a corrupt download,
with only the first part of the file being downloaded.
> Investigate and fix.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message