private ParallelEnv createPeFromTemporaryFile()

in src/main/java/com/epam/grid/engine/provider/parallelenv/sge/SgeParallelEnvProvider.java [248:259]


    private ParallelEnv createPeFromTemporaryFile(final Path pathToTemporaryPeDescription) {
        try (Stream<String> lines = Files.lines(pathToTemporaryPeDescription)) {
            final List<String> rawEntities = lines.collect(Collectors.toList());
            final SgeParallelEnv sgeParallelEnv = parallelEnvMapper.mapRawOutputToSgePe(SgeOutputParsingUtils
                    .parseEntitiesToMap(rawEntities));
            return parallelEnvMapper.mapSgePeToPe(sgeParallelEnv);
        } catch (final IOException e) {
            throw new GridEngineException(HttpStatus.INTERNAL_SERVER_ERROR, TEMPORARY_FILE_WAS_NOT_FOUND, e);
        } finally {
            deleteTemporaryDescriptionFile(pathToTemporaryPeDescription);
        }
    }