Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BDTopo and OSM workflow now return the name of the computed tables. #666

Merged
merged 10 commits into from
Jan 20, 2022

Conversation

ebocher
Copy link
Member

@ebocher ebocher commented Jan 8, 2022

The method getResults() on the OSM and BDTopo workflow returns the name of the computed tables and stored in the local database.
The input parameter has been improved. So the user can send a configuration file or a map to the workflow.

 def osm_parmeters = [
                "description" :"Example of configuration file to run the grid indicators",
                "geoclimatedb" : [
                        "folder" : "/tmp/geoclimate",
                        "name" : "geoclimate_chain_db;AUTO_SERVER=TRUE",
                        "delete" :false
                ],
                "input" : [
                        "osm" : ["Paimpol"]],
                "output" :[
                        "folder" : ["path":  "/tmp/geoclimate",
                                    "tables": ["grid_indicators", "zones", "rsu_lcz"]]],
                "parameters":
                        ["distance" : 0,
                         "grid_indicators": [
                                 "x_size": 1000,
                                 "y_size": 1000,
                                 "indicators": ["LCZ_PRIMARY"]
                         ]
                        ]
        ]
IProcess process = OSM.WorkflowOSM.workflow()
process.execute(input: osm_parmeters)
process.getResults().output["Paimpol"]

will return a map with a key = Paimpol and value = name of tables

If the local H2GIS is not deleted after the workflow chain, the user can process the tables stored in the database.

@ebocher
Copy link
Member Author

ebocher commented Jan 19, 2022

Since last H2 update with some errors

Timeout trying to lock table "SURFACE_ACTIVITE"; SQL statement:

@ebocher
Copy link
Member Author

ebocher commented Jan 19, 2022

Dear @katzyn
Since the last update on H2 we have some lock issue.
I'm not able to find where it appears.
The H2 database is build with this path "./target/${RsuIndicatorsTests.simpleName}_db;AUTO_SERVER=TRUE"

@katzyn
Copy link

katzyn commented Jan 19, 2022

Do you have a complete stack trace?

@ebocher
Copy link
Member Author

ebocher commented Jan 19, 2022

Not yet a clear stack trace.
I'm on it

@katzyn
Copy link

katzyn commented Jan 19, 2022

H2 uses a very small lock timeout by default, usually it needs to be increased for applications with concurrent sessions and transactions.

But timeout may also indicate a some kind of deadlock.

@ebocher
Copy link
Member Author

ebocher commented Jan 19, 2022

has the lock timeout changed recently ?

@katzyn
Copy link

katzyn commented Jan 19, 2022

No.

@katzyn
Copy link

katzyn commented Jan 19, 2022

Did it work in H2 2.0.x?

@ebocher
Copy link
Member Author

ebocher commented Jan 19, 2022

This code was working before 2.1.210 with 2.0.206.
I'm try to find a unit test but it's a huge sql chain ;((

@ebocher
Copy link
Member Author

ebocher commented Jan 19, 2022

I modified the tests to create a new database each time because it was impossible to isolate a unit test

@ebocher ebocher marked this pull request as ready for review January 20, 2022 17:11
@ebocher
Copy link
Member Author

ebocher commented Jan 20, 2022

@katzyn
The issue is fixed. It was a bad used of setAutocommit on H2GIS side.

1 similar comment
@ebocher
Copy link
Member Author

ebocher commented Jan 20, 2022

@katzyn
The issue is fixed. It was a bad used of setAutocommit on H2GIS side.

@ebocher ebocher merged commit f090def into orbisgis:master Jan 20, 2022
@ebocher ebocher deleted the workflow_parameters branch June 21, 2024 05:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants