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/03/03 10:02:16 UTC

[GitHub] [jena] afs opened a new pull request #943: Code cleaning.

afs opened a new pull request #943:
URL: https://github.com/apache/jena/pull/943


   A few internal changes:
   
   * Rename `dboe.Sys` as `SysDB` (this causes most of the file changes) to avoid two classes called `Sys`.
   * Subcontract OS determination to Apache Commons lang3.
   * Limit Fuseki to 8 threads when embedded. Also set the minimum to 2 which makes debugging the app easier.


----------------------------------------------------------------
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 #943: Code cleaning.

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


   


----------------------------------------------------------------
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 #943: Code cleaning.

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



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -736,6 +738,41 @@ private void serviceEndpointOperation(String datasetName, String endpointName, O
             dap.getDataService().addEndpoint(endpoint);
         }
 
+        /**
+         * Set the number threads used by Jetty. This uses a {@code org.eclipse.jetty.util.thread.QueuedThreadPool} provided by Jetty.
+         * <p>
+         * Argument order is (minThreads, maxThreads).
+         * <p>
+         * <ul>
+         * <li>Use (-1,-1) for Jetty "default". The Jetty 9.4 defaults are (min=8,max=200).
+         * <li>If (min != -1, max is -1) then the default max is 20.
+         * <li>If (min is -1, max != -1) then the default min is 2.
+         * </ul>
+         */
+        public Builder numServerThreads(int minThreads, int maxThreads) {
+            if ( minThreads >= 0 && maxThreads > 0 ) {
+                if ( minThreads > maxThreads )
+                    throw new FusekiConfigException(String.format("Bad thread setting: (min=%d, max=%d)", minThreads, maxThreads));
+            }

Review comment:
       Just wondering if this is set by a user external configuration (e.g. assembler file). In such case, couldn't the user pass `-1, -11` by accident? Does that create a useful error somewhere else?
   
   I tried building Jena locally but it's failing for some reason. Upgraded to Java 11 and latest Maven, but still some annoying build error. Will figure out later what's wrong, but otherwise I would test to see what happens in this case, sorry.




----------------------------------------------------------------
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 #943: Code cleaning.

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



##########
File path: jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
##########
@@ -736,6 +738,41 @@ private void serviceEndpointOperation(String datasetName, String endpointName, O
             dap.getDataService().addEndpoint(endpoint);
         }
 
+        /**
+         * Set the number threads used by Jetty. This uses a {@code org.eclipse.jetty.util.thread.QueuedThreadPool} provided by Jetty.
+         * <p>
+         * Argument order is (minThreads, maxThreads).
+         * <p>
+         * <ul>
+         * <li>Use (-1,-1) for Jetty "default". The Jetty 9.4 defaults are (min=8,max=200).
+         * <li>If (min != -1, max is -1) then the default max is 20.
+         * <li>If (min is -1, max != -1) then the default min is 2.
+         * </ul>
+         */
+        public Builder numServerThreads(int minThreads, int maxThreads) {
+            if ( minThreads >= 0 && maxThreads > 0 ) {
+                if ( minThreads > maxThreads )
+                    throw new FusekiConfigException(String.format("Bad thread setting: (min=%d, max=%d)", minThreads, maxThreads));
+            }

Review comment:
       This isn't accessible from an assembler ATM.
   
   Jetty has a test "if (maxThreads < minThreads)" but can change the use of min/max to make any negative numbers be "default".
   




----------------------------------------------------------------
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