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 2021/04/06 16:37:30 UTC

[GitHub] [jena] bsara opened a new pull request #980: added /$/compact/* endpoint to fuseki main

bsara opened a new pull request #980:
URL: https://github.com/apache/jena/pull/980


   Compaction can be a very important feature. But, if you're using something like rdf-delta to run your fuseki server, you don't have any way to run compaction while the server is still running. This PR moves the `/$/compact/*` endpoint from the webapp into main so that can be supplied even when the non-full version of Fuseki is being used.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] kinow commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r610118226



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -501,6 +505,18 @@ public Builder enableMetrics(boolean withMetrics) {
             return this;
         }
 
+        /** Add the "/$/compact/*" servlet that triggers compaction for specified dataset. */
+        public Builder enableCompact(boolean withCompact) {
+            this.withCompact = withCompact;
+            return this;
+        }
+
+        /** Add the "/$/tasks" servlet that responds with info about tasks run on the server */
+        public Builder enableTasks(boolean withTasks) {

Review comment:
       I am not maintaining a production Jena instance at the moment. But at least for me I prefer to have the tasks endpoint accessible to that I can either check task statuses manually via command line `curl`, or preferably via Fuseki UI.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-815301568


   > not sure how long the compact action may take?
   
   @kinow in my situation, it takes about 18-20 minutes to complete because I have a very large dataset. From what I could tell, there is no way to determine if the process has completed unless you ping the server `/$/tasks/{taskId}` endpoint to check if is finished. I would imagine that continuously pinging that from the front-end wouldn't be very desirable. One could check once on load of some page component though. 


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] rvesse commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
rvesse commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609509718



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -501,6 +505,18 @@ public Builder enableMetrics(boolean withMetrics) {
             return this;
         }
 
+        /** Add the "/$/compact/*" servlet that triggers compaction for specified dataset. */
+        public Builder enableCompact(boolean withCompact) {
+            this.withCompact = withCompact;
+            return this;
+        }
+
+        /** Add the "/$/tasks" servlet that responds with info about tasks run on the server */
+        public Builder enableTasks(boolean withTasks) {

Review comment:
       Does it not make more sense to just automatically enable tasks if any background task feature is enabled?




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] afs commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r608659970



##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestConfigFile.java
##########
@@ -214,7 +220,7 @@ private static RDFConnection namedServices(String baseURL) {
         }
     }
 
-    @Test public void serverMisc() {
+    @Test public void serverMisc() throws IOException {

Review comment:
       Unused throws

##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestConfigFile.java
##########
@@ -18,14 +18,20 @@
 
 package org.apache.jena.fuseki.main;
 
+import java.io.IOException;
+
 import static org.apache.jena.fuseki.test.FusekiTest.expect400;
 import static org.apache.jena.fuseki.test.FusekiTest.expect404;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import org.apache.jena.atlas.lib.StrUtils;
+import org.apache.jena.atlas.web.HttpException;

Review comment:
       Ditto - unused imports.

##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiMainCmd.java
##########
@@ -19,12 +19,17 @@
 package org.apache.jena.fuseki.main;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;

Review comment:
       Seems to be unused.

##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiMainCmd.java
##########
@@ -19,12 +19,17 @@
 package org.apache.jena.fuseki.main;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
+import java.io.IOException;
 import java.util.Arrays;
 import java.util.stream.Stream;
 
+import org.apache.http.HttpEntity;

Review comment:
       Seems to be unused.

##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestConfigFile.java
##########
@@ -230,6 +236,26 @@ private static RDFConnection namedServices(String baseURL) {
         }
     }
 
+    @Test public void serverTDB2() throws IOException {
+        int port = WebLib.choosePort();
+        FusekiServer server = server(port, "server-tdb2.ttl");
+        server.start();
+        try {
+            String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/$/ping");
+            assertNotNull(x1);
+            String x2 = HttpOp.execHttpGetString("http://localhost:"+port+"/$/stats");
+            assertNotNull(x2);
+            String x3 = HttpOp.execHttpGetString("http://localhost:"+port+"/$/metrics");
+            assertNotNull(x3);
+            try(TypedInputStream x4 = HttpOp.execHttpPostStream("http://localhost:"+port+"/$/compact/ds", null, "application/json")) {
+                assertNotNull(x4);
+                assertNotEquals(0, x4.readAllBytes().length);
+            }

Review comment:
       catch IOException here:  can turn it into a runtime exception with `IO.exception`
   
   ```
            } catch (IOException ex) {
                  IO.exception(ex);
            }
   ```




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609140122



##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiMainCmd.java
##########
@@ -102,4 +103,11 @@ private void server(String... cmdline) {
             assertNotEquals(0, x.readAllBytes().length);
         }
     }
+
+    @Test public void tasks_01() {
+        server("--mem", "--tasks", "/ds");
+        String x = HttpOp.execHttpGetString(serverURL+"/$/tasks");
+        assertNotNull(x);
+        assertNotEquals(0, x.length());

Review comment:
       `JSON.parse` throws an error when calling it on `x` here because the root type of the JSON returned is a list, not an object. I opted to not update the parser to handle lists because it seemed silly to update it for this one test.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] afs commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-816562720


   > I might submit another for /$/backups-list and /$/backup/*
   
   @bsara -- yes, please. That would be great.
   


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] rvesse commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
rvesse commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609912791



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -501,6 +505,18 @@ public Builder enableMetrics(boolean withMetrics) {
             return this;
         }
 
+        /** Add the "/$/compact/*" servlet that triggers compaction for specified dataset. */
+        public Builder enableCompact(boolean withCompact) {
+            this.withCompact = withCompact;
+            return this;
+        }
+
+        /** Add the "/$/tasks" servlet that responds with info about tasks run on the server */
+        public Builder enableTasks(boolean withTasks) {

Review comment:
       Yeah I can see arguments for both approaches.
   
   We recently had one user who was trying to `cron` a script that was requesting a compaction and then immediately deleting files out from under Fuseki/TDB ultimately causing it to crash.  Our response to them was to refer them to using the tasks API to only clean up files after compaction was finished.
   
   So my strong preference is always to have task monitoring enabled if we have any of the potentially long running background task APIs enabled.
   
   Be interested to see what @kinow and @afs's opinions are as they use Fuseki more heavily than me




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] afs commented on pull request #980: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-814800825


   Visual scan of the PR and it looks good.
   
   > we didn't make this change at the time
   
   IIRC it is the lack of "local only" operation of admin operations that change the database. stats/metrics don't do that. But this feature for compaction is "opt-in" by server startup. Anyway - from memory.
   
   I'll try the PR out.
   


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-815298641


   @afs changes applied. Thank you for the quick response.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-814274679


   found some issues in the tests...please wait to merge


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-815299617


   I also figured that if you all were ok with this change. I might submit another for `/$/backups-list` and `/$/backup/*`, I just don't have an immediate need for it right now is all.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609915231



##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiMainCmd.java
##########
@@ -102,4 +103,11 @@ private void server(String... cmdline) {
             assertNotEquals(0, x.readAllBytes().length);
         }
     }
+
+    @Test public void tasks_01() {
+        server("--mem", "--tasks", "/ds");
+        String x = HttpOp.execHttpGetString(serverURL+"/$/tasks");
+        assertNotNull(x);
+        assertNotEquals(0, x.length());

Review comment:
       fixed.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r610256584



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -501,6 +505,18 @@ public Builder enableMetrics(boolean withMetrics) {
             return this;
         }
 
+        /** Add the "/$/compact/*" servlet that triggers compaction for specified dataset. */
+        public Builder enableCompact(boolean withCompact) {
+            this.withCompact = withCompact;
+            return this;
+        }
+
+        /** Add the "/$/tasks" servlet that responds with info about tasks run on the server */
+        public Builder enableTasks(boolean withTasks) {

Review comment:
       OK, I've updated the code to enable tasks by default if compact is enabled.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609140122



##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiMainCmd.java
##########
@@ -102,4 +103,11 @@ private void server(String... cmdline) {
             assertNotEquals(0, x.readAllBytes().length);
         }
     }
+
+    @Test public void tasks_01() {
+        server("--mem", "--tasks", "/ds");
+        String x = HttpOp.execHttpGetString(serverURL+"/$/tasks");
+        assertNotNull(x);
+        assertNotEquals(0, x.length());

Review comment:
       `JSON.parse` throws an error when calling it for `x` because the root type of the JSON returned is a list, not an object. I opted to not update the parser to handle lists because it seemed silly to update it for this one test.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-814292667


   The tests have been fixed. Ok to merge if wanted.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-816790669


   Is there a schedule for releases on this project? I.E. when can I expect to see a production jena with these changes?


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-815336959


   I've added a second commit to add the `/$/tasks` endpoint as well. I didn't put it in a separate PR because it seems to make sense to have it added when `/$/compact/*` is added since you can't actually ever check the status of your compact process without it. It is still has an opt-in separate from compact though.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] afs merged pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
afs merged pull request #980:
URL: https://github.com/apache/jena/pull/980


   


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] kinow commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
kinow commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-816210418


   > > not sure how long the compact action may take?
   > 
   > @kinow in my situation, it takes about 18-20 minutes to complete because I have a very large dataset. From what I could tell, there is no way to determine if the process has completed unless you ping the server `/$/tasks/{taskId}` endpoint to check if is finished. I would imagine that continuously pinging that from the front-end wouldn't be very desirable. One could check once on load of some page component though.
   
   I think that's what happens with the backup task (I think it's around [this function](https://github.com/apache/jena/blob/31dc0d328c4858401e5d3fa99702c97eba0383a0/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/js/app/views/dataset-management.js#L144-L153) that is [scheduled](https://github.com/apache/jena/blob/31dc0d328c4858401e5d3fa99702c97eba0383a0/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/js/app/models/task.js#L79-L83) to run [every 500ms or 1s I think](https://github.com/apache/jena/blob/31dc0d328c4858401e5d3fa99702c97eba0383a0/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/js/app/models/task.js#L91-L99).
   
   But that happens only when you execute the backup action. And if you refresh the screen that's gone, you have no more access to the task progress.
   
   In the branch where I am porting it to Vue, I am setting a permanent view for tasks that [updates every 10 seconds](https://github.com/kinow/jena/blob/7580da22cab35b6fbf76006c10544eeba851d84d/jena-fuseki2/jena-fuseki-ui/src/views/manage/Tasks.vue#L118-L126).
   
   But my intention is to first have a replacement for Fuseki Backbone.js app, and then discuss the possibility of perhaps having a secure WebSockets that sends the data to the UI when available. This way we remove the polling, and can send information about any kind of server management tasks to the UI - so I think in the future we could show back up, compression, and other kinds of tasks if that would save users of having to log in to servers and run commands, or having to save HTTP requests to submit to the server.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r610246190



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -501,6 +505,18 @@ public Builder enableMetrics(boolean withMetrics) {
             return this;
         }
 
+        /** Add the "/$/compact/*" servlet that triggers compaction for specified dataset. */
+        public Builder enableCompact(boolean withCompact) {
+            this.withCompact = withCompact;
+            return this;
+        }
+
+        /** Add the "/$/tasks" servlet that responds with info about tasks run on the server */
+        public Builder enableTasks(boolean withTasks) {

Review comment:
       sounds like there is a consensus to add it by default. I guess if someone wants to have it disabled, an opt-out option could always be added in the future.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara removed a comment on pull request #980: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara removed a comment on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-814274679






-- 
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:
users@infra.apache.org



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


[GitHub] [jena] rvesse commented on pull request #980: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
rvesse commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-814741874


   I think this looks OK, I know we had a discussion on the dev lists about this change previously and can't remember exactly why we didn't make this change at the time
   
   Probably needs @afs to review


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara edited a comment on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara edited a comment on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-815336959


   I've added a second commit to add the `/$/tasks` endpoint as well. I didn't put it in a separate PR because it seems to make sense to have it added when `/$/compact/*` is added since you can't actually ever check the status of your compact process without it. It still has an opt-in separate from compact though.


-- 
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:
users@infra.apache.org



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


[GitHub] [jena] afs commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609681275



##########
File path: jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiMainCmd.java
##########
@@ -102,4 +103,11 @@ private void server(String... cmdline) {
             assertNotEquals(0, x.readAllBytes().length);
         }
     }
+
+    @Test public void tasks_01() {
+        server("--mem", "--tasks", "/ds");
+        String x = HttpOp.execHttpGetString(serverURL+"/$/tasks");
+        assertNotNull(x);
+        assertNotEquals(0, x.length());

Review comment:
       `JSON.parseAny` will read a list or array (or a atomic JSON type).
   
   `jena-fuseki-weabapp TestAdmin` has some tests of tasks.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] bsara commented on a change in pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
bsara commented on a change in pull request #980:
URL: https://github.com/apache/jena/pull/980#discussion_r609873708



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -501,6 +505,18 @@ public Builder enableMetrics(boolean withMetrics) {
             return this;
         }
 
+        /** Add the "/$/compact/*" servlet that triggers compaction for specified dataset. */
+        public Builder enableCompact(boolean withCompact) {
+            this.withCompact = withCompact;
+            return this;
+        }
+
+        /** Add the "/$/tasks" servlet that responds with info about tasks run on the server */
+        public Builder enableTasks(boolean withTasks) {

Review comment:
       I considered this. But just because you're enabling a background task, that doesn't always mean that someone might want/need to track those tasks, so I decided to make it opt-in. But if automatically including it is what is wanted, then I can add it.




-- 
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:
users@infra.apache.org



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


[GitHub] [jena] afs commented on pull request #980: JENA-2081: add /$/compact/* endpoint to fuseki main

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #980:
URL: https://github.com/apache/jena/pull/980#issuecomment-816826189


   The Jena project aims for a release every 3-4 months.
   
   The project operates a "green main branch" - the development main branch is releasable unless there is special reason why it is not in a fit state. There is no special preparation needed other than set the version number.
   
   You are welcome to clone the repo and build the code ("mvn clean install").
   
   As an Apache project, any release by the project is subject to a vote by the PMC. At least 3 PMC members need to vote. This is important because a formal release is transfer from any development build (which is "personal" - it has no standing as a Apache release) to one released by the Apache Software Foundation. The Release Manager is not personally legally liable.
   
   On this issue, we need to decide on access control, or not. These functions are open. As a principle, we need to take these security issues seriously. In some environments, the network/VM/container setup means that serves are not generally accessible but that isn't universal.
   
   One way is restrict to localhost. Another is have a admin/password.
   
   If you want an advance, non-release, build of RDF Delta with development Fuseki, then that is for discussion on RDF Delta. (It is a matter of setting the Jena version but SNAPSHOTS for dependencies can't be released to maven central.)


-- 
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:
users@infra.apache.org



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