You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/03/20 17:35:54 UTC

[GitHub] [nifi] bbende commented on a change in pull request #4154: NIFI-7271 Make command timeout configurable for ShellUserGroupProvider

bbende commented on a change in pull request #4154: NIFI-7271 Make command timeout configurable for ShellUserGroupProvider
URL: https://github.com/apache/nifi/pull/4154#discussion_r395791349
 
 

 ##########
 File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-shell-authorizer/src/main/java/org/apache/nifi/authorization/util/ShellRunner.java
 ##########
 @@ -33,13 +33,18 @@
 
     static String SHELL = "sh";
     static String OPTS = "-c";
-    static Integer TIMEOUT = 60;
 
-    public static List<String> runShell(String command) throws IOException {
+    private final long timeoutSeconds;
+
+    public ShellRunner(final long timeoutSeconds) {
 
 Review comment:
   It definitely doesn't in terms of the size of the value, but since the value is obtained from this which returns a long:
   `Math.round(FormatUtils.getPreciseTimeDuration(propertyValue, TimeUnit.SECONDS))`
   and then passed in here which accepts a long:
   `boolean waitFor(long timeout, TimeUnit unit)`
   We could still convert to int for the internal variables if you prefer.

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


With regards,
Apache Git Services