polastre opened a new issue, #790:
URL: https://github.com/apache/incubator-baremaps/issues/790
This is using v0.7.2-rc2:
Here's a sample workflow to download the latest shapefiles from natural
earth. The zip file has a directory inside of it, which seems to be
incompatible with the `UnzipFile` task.
workflow.js:
```js
import config from "./config.js";
export default {
"steps": [
{
"id": "natural-earth",
"needs": [],
"tasks": [
{
"type": "DownloadUrl",
"url":
"http://www.shadedrelief.com/ne-draft/World-Base-Map-Shapefiles.zip",
"path": "/data/downloads/natural_earth_basemap.zip"
},
{
"type": "UnzipFile",
"file": "/data/downloads/natural_earth_basemap.zip",
"directory": "/data/downloads/natural_earth_basemap"
},
]
}
]
};
```
Execution log:
```sh
$ baremaps workflow execute --file=/data/workflow-ne.js
[INFO ] 2023-10-11 01:34:51.921 [main] Execute - Executing the workflow
/data/workflow-ne.js
[INFO ] 2023-10-11 01:34:52.773 [main] WorkflowExecutor - Workflow graph:
isDirected: true, allowsSelfLoops: false, nodes: [natural-earth], edges: []
[INFO ] 2023-10-11 01:34:52.787 [pool-2-thread-1] WorkflowExecutor -
Executing task
DownloadUrl[url=http://www.shadedrelief.com/ne-draft/World-Base-Map-Shapefiles.zip,
path=/data/downloads/natural_earth_basemap.zip, replaceExisting=false] of step
natural-earth
[INFO ] 2023-10-11 01:34:52.789 [pool-2-thread-1] DownloadUrl - Skipping
download of http://www.shadedrelief.com/ne-draft/World-Base-Map-Shapefiles.zip
to /data/downloads/natural_earth_basemap.zip
[INFO ] 2023-10-11 01:34:52.795 [pool-2-thread-2] WorkflowExecutor -
Executing task UnzipFile[file=/data/downloads/natural_earth_basemap.zip,
directory=/data/downloads/natural_earth_basemap] of step natural-earth
java.util.concurrent.ExecutionException:
org.apache.baremaps.workflow.WorkflowException:
java.nio.file.FileAlreadyExistsException:
/data/downloads/natural_earth_basemap/World-Base-Map-Shapefiles
at
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
at org.apache.baremaps.cli.workflow.Execute.call(Execute.java:48)
at org.apache.baremaps.cli.workflow.Execute.call(Execute.java:29)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.apache.baremaps.cli.Baremaps.main(Baremaps.java:62)
Caused by: org.apache.baremaps.workflow.WorkflowException:
java.nio.file.FileAlreadyExistsException:
/data/downloads/natural_earth_basemap/World-Base-Map-Shapefiles
at
org.apache.baremaps.workflow.WorkflowExecutor.lambda$createFutureStep$3(WorkflowExecutor.java:162)
at
java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
at
java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.nio.file.FileAlreadyExistsException:
/data/downloads/natural_earth_basemap/World-Base-Map-Shapefiles
at
java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
at
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at
java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397)
at java.base/java.nio.file.Files.createDirectory(Files.java:700)
at
java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807)
at java.base/java.nio.file.Files.createDirectories(Files.java:753)
at
org.apache.baremaps.workflow.tasks.UnzipFile.execute(UnzipFile.java:52)
at
org.apache.baremaps.workflow.WorkflowExecutor.lambda$createFutureStep$3(WorkflowExecutor.java:157)
... 5 more
```
--
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]