AydarZaynutdinov commented on a change in pull request #15803:
URL: https://github.com/apache/beam/pull/15803#discussion_r738032426



##########
File path: playground/backend/internal/fs_tool/java_fs.go
##########
@@ -45,6 +48,21 @@ func newJavaLifeCycle(pipelineId uuid.UUID, workingDir 
string) *LifeCycle {
                        ExecutableExtension: javaExecutableFileExtension,
                        CompiledExtension:   javaCompiledFileExtension,
                },
-               pipelineId: pipelineId,
+               ExecutableName: executableName,
+               pipelineId:     pipelineId,
        }
 }
+
+// executableName returns name that should be executed (HelloWorld for 
HelloWorld.class for java SDK)
+func executableName(pipelineId uuid.UUID, workingDir string) (string, error) {
+       baseFileFolder := filepath.Join(workingDir, javaBaseFileFolder, 
pipelineId.String())
+       binFileFolder := filepath.Join(baseFileFolder, javaCompiledFolderName)
+       dirEntries, err := os.ReadDir(binFileFolder)
+       if err != nil {
+               return "", err
+       }
+       if len(dirEntries) < 1 {
+               return "", errors.New("number of executable files should be 
more than one")

Review comment:
       Changed.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to