Skip to content

Commit

Permalink
[hotfix][table] table.resource.download.dir -> table.resources.downlo…
Browse files Browse the repository at this point in the history
…ad-dir
  • Loading branch information
twalthr committed Aug 23, 2022
1 parent cb26f08 commit 4befe48
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<td>Strategy how to restore catalog objects such as tables, functions, or data types using a given plan and performing catalog lookups if necessary. It influences the need for catalog metadata to bepresent and enables partial enrichment of plan information.<br /><br />Possible values:<ul><li>"ALL": Reads all metadata about catalog tables, functions, or data types that has been persisted in the plan. The strategy performs a catalog lookup by identifier to fill in missing information or enrich mutable options. If the original object is not available in the catalog anymore, pipelines can still be restored if all information necessary is contained in the plan.</li><li>"ALL_ENFORCED": Requires that all metadata about catalog tables, functions, or data types has been persisted in the plan. The strategy will neither perform a catalog lookup by identifier nor enrich mutable options with catalog information. A restore will fail if not all information necessary is contained in the plan.</li><li>"IDENTIFIER": Uses only the identifier of catalog tables, functions, or data types and always performs a catalog lookup. A restore will fail if the original object is not available in the catalog anymore. Additional metadata that might be contained in the plan will be ignored.</li></ul></td>
</tr>
<tr>
<td><h5>table.resource.download.dir</h5><br> <span class="label label-primary">Batch</span> <span class="label label-primary">Streaming</span></td>
<td><h5>table.resources.download-dir</h5><br> <span class="label label-primary">Batch</span> <span class="label label-primary">Streaming</span></td>
<td style="word-wrap: break-word;">System.getProperty("java.io.tmpdir")</td>
<td>String</td>
<td>Local directory that is used by planner for storing downloaded resources.</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@ private static void setResourceDownloadTmpDir(
Configuration configuration, SessionHandle sessionId) {
Path path =
Paths.get(
configuration.get(TableConfigOptions.RESOURCE_DOWNLOAD_DIR),
configuration.get(TableConfigOptions.RESOURCES_DOWNLOAD_DIR),
String.format("sql-gateway-%s", sessionId));
// override resource download temp directory
configuration.set(
TableConfigOptions.RESOURCE_DOWNLOAD_DIR, path.toAbsolutePath().toString());
TableConfigOptions.RESOURCES_DOWNLOAD_DIR, path.toAbsolutePath().toString());
}

// --------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ private TableConfigOptions() {}

@Documentation.TableOption(execMode = Documentation.ExecMode.BATCH_STREAMING)
@Documentation.OverrideDefault("System.getProperty(\"java.io.tmpdir\")")
public static final ConfigOption<String> RESOURCE_DOWNLOAD_DIR =
key("table.resource.download.dir")
public static final ConfigOption<String> RESOURCES_DOWNLOAD_DIR =
key("table.resources.download-dir")
.stringType()
.defaultValue(System.getProperty("java.io.tmpdir"))
.withDescription(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static ResourceManager createResourceManager(
public ResourceManager(ReadableConfig config, MutableURLClassLoader userClassLoader) {
this.localResourceDir =
new Path(
config.get(TableConfigOptions.RESOURCE_DOWNLOAD_DIR),
config.get(TableConfigOptions.RESOURCES_DOWNLOAD_DIR),
String.format("flink-table-%s", UUID.randomUUID()));
this.resourceInfos = new HashMap<>();
this.userClassLoader = userClassLoader;
Expand Down

0 comments on commit 4befe48

Please sign in to comment.