[ https://issues.apache.org/jira/browse/BEAM-7945?focusedWorklogId=307725&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-307725 ]
ASF GitHub Bot logged work on BEAM-7945: ---------------------------------------- Author: ASF GitHub Bot Created on: 06/Sep/19 09:39 Start Date: 06/Sep/19 09:39 Worklog Time Spent: 10m Work Description: mxm commented on pull request #9452: [BEAM-7945] Allow runner to configure semi_persist_dir which is used … URL: https://github.com/apache/beam/pull/9452#discussion_r321655867 ########## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/options/RemoteEnvironmentOptionsTest.java ########## @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.beam.sdk.options; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for {@link RemoteEnvironmentOptions}. */ +@RunWith(JUnit4.class) +public class RemoteEnvironmentOptionsTest { + + @Test + public void testSemiDirectory() { + RemoteEnvironmentOptions options = PipelineOptionsFactory.as(RemoteEnvironmentOptions.class); + String semiDir = "/ab/cd"; + options.setSemiPersistDir(semiDir); + assertEquals(semiDir, options.getSemiPersistDir()); Review comment: This should also test the default. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 307725) Time Spent: 1h 50m (was: 1h 40m) > Allow runner to configure "semi_persist_dir" which is used in the SDK harness > ----------------------------------------------------------------------------- > > Key: BEAM-7945 > URL: https://issues.apache.org/jira/browse/BEAM-7945 > Project: Beam > Issue Type: Sub-task > Components: java-fn-execution, sdk-go, sdk-java-core, sdk-py-core > Reporter: sunjincheng > Assignee: sunjincheng > Priority: Major > Fix For: 2.16.0 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > Currently "semi_persist_dir" is not configurable. This may become a problem > in certain scenarios. For example, the default value of "semi_persist_dir" is > "/tmp" > ([https://github.com/apache/beam/blob/master/sdks/python/container/boot.go#L48]) > in Python SDK harness. When the environment type is "PROCESS", the disk of > "/tmp" may be filled up and unexpected issues will occur in production > environment. We should provide a way to configure "semi_persist_dir" in > EnvironmentFactory at the runner side. -- This message was sent by Atlassian Jira (v8.3.2#803003)