[ 
https://issues.apache.org/jira/browse/BEAM-7980?focusedWorklogId=301119&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-301119
 ]

ASF GitHub Bot logged work on BEAM-7980:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Aug/19 09:26
            Start Date: 26/Aug/19 09:26
    Worklog Time Spent: 10m 
      Work Description: mxm commented on pull request #9398: [BEAM-7980] 
Exactly once artifact retrieval for Python SDK worker pool
URL: https://github.com/apache/beam/pull/9398#discussion_r317522264
 
 

 ##########
 File path: sdks/python/container/boot.go
 ##########
 @@ -105,18 +107,57 @@ func main() {
 
        // (2) Retrieve and install the staged packages.
 
-       dir := filepath.Join(*semiPersistDir, "staged")
+       func() {
 
-       files, err := artifact.Materialize(ctx, *artifactEndpoint, 
info.GetRetrievalToken(), dir)
-       if err != nil {
-               log.Fatalf("Failed to retrieve staged files: %v", err)
-       }
+        installCompleteFile := filepath.Join(os.TempDir(), 
"beam.install.complete")
 
-       // TODO(herohde): the packages to install should be specified 
explicitly. It
-       // would also be possible to install the SDK in the Dockerfile.
-       if setupErr := installSetupPackages(files, dir); setupErr != nil {
-               log.Fatalf("Failed to install required packages: %v", setupErr)
-       }
+               // skip if install already complete
+               _, err = os.Stat(installCompleteFile)
+               if err == nil {
+                       return
 
 Review comment:
   Is this check really necessary? In case of a race condition when multiple 
workers complete this section before the install file has been created, only 
the later check will catch that. For simplicity, I'd remove this check 
entirely, unless the locking is very expensive.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 301119)
    Time Spent: 7h 50m  (was: 7h 40m)

> External environment with containerized worker pool
> ---------------------------------------------------
>
>                 Key: BEAM-7980
>                 URL: https://issues.apache.org/jira/browse/BEAM-7980
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-harness
>            Reporter: Thomas Weise
>            Assignee: Thomas Weise
>            Priority: Major
>          Time Spent: 7h 50m
>  Remaining Estimate: 0h
>
> Augment Beam Python docker image and boot.go so that it can be used to launch 
> BeamFnExternalWorkerPoolServicer.
> [https://docs.google.com/document/d/1z3LNrRtr8kkiFHonZ5JJM_L4NWNBBNcqRc_yAf6G0VI/edit#heading=h.lnhm75dhvhi0]
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to