gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From th3iedkid <>
Subject [GitHub] incubator-gearpump pull request #126: Gearpump 257 remote application submit...
Date Wed, 28 Dec 2016 13:02:19 GMT
Github user th3iedkid commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/gearpump/jarstore/FileServer.scala ---
    @@ -145,8 +145,7 @@ object FileServer {
         private def entity(file: File)(implicit ec: ExecutionContext): Future[RequestEntity]
= {
    -      val entity = HttpEntity(MediaTypes.`application/octet-stream`, file.length(),
    -        FileIO.fromFile(file, chunkSize = 100000))
    +      val entity = HttpEntity(MediaTypes.`application/octet-stream`, file, chunkSize
= 100000)
    --- End diff --
    yes its unconnected ,shall remove it if you feel so ,
    However was wondering if it made the method more focused & better performant on setting
up entity with file directly using Akka http API than us us doing a FileIO ?
    The akka http API does the same plus 
    1-  we don't fetch the length of the file ourselves ,
    2- short-circuits if the file length were zero , prevent graph orchestration possibly
for File IO reads of empty files.
    Believe these can be useful for a client context.
    Let me know otherwise , shall undo.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message