You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2022/03/13 23:31:06 UTC

[GitHub] [jena] kinow commented on a change in pull request #1225: Geosparql transformation options

kinow commented on a change in pull request #1225:
URL: https://github.com/apache/jena/pull/1225#discussion_r825500668



##########
File path: jena-geosparql/src/main/java/org/apache/jena/geosparql/spatial/SpatialIndex.java
##########
@@ -533,11 +534,18 @@ public static final void save(File spatialIndexFile, Collection<SpatialIndexItem
         if (spatialIndexFile != null) {
             LOGGER.info("Saving Spatial Index - Started: {}", spatialIndexFile.getAbsolutePath());
             SpatialIndexStorage storage = new SpatialIndexStorage(spatialIndexItems, srsURI);
-            try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(spatialIndexFile))) {
-                out.writeObject(storage);
-                LOGGER.info("Saving Spatial Index - Completed: {}", spatialIndexFile.getAbsolutePath());
-            } catch (Exception ex) {
+            File file;
+            try {
+                file = File.createTempFile("spatial_index", null);

Review comment:
       Couldn't it cause issues for users, if their environments are configured with a temporary file with smaller size? I haven't used the spatial index, but in the past I had issues when I had the temporary folder in a partition with smaller size and the applications directory in another partition/disk with a lot more space. Maybe we will have to warn users the index uses temporary disk and that that disk must contain enough space for the spatial index?




-- 
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: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org