Github user brosander commented on a diff in the pull request: https://github.com/apache/nifi-minifi/pull/51#discussion_r87498508 --- Diff: minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/RunMiNiFi.java --- @@ -1600,9 +1622,13 @@ private void restartInstance() throws IOException { } } - private static void performTransformation(InputStream configIs, String configDestinationPath) throws ConfigurationChangeException, IOException { - try { - ConfigTransformer.transformConfigFile(configIs, configDestinationPath); + private static ByteBuffer performTransformation(InputStream configIs, String configDestinationPath) throws ConfigurationChangeException, IOException { + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + TeeInputStream teeInputStream = new TeeInputStream(configIs, byteArrayOutputStream)) { + + ConfigTransformer.transformConfigFile(teeInputStream, configDestinationPath); + + return ByteBuffer.wrap(byteArrayOutputStream.getUnderlyingBuffer()); --- End diff -- @JPercivall I think this is what was causing my constant restarting to happen. If the underlying buffer isn't full, it will result in a bunch of null values at the end in the transformed config.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---