[
https://issues.apache.org/jira/browse/NIFI-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard resolved NIFI-5269.
----------------------------------
Resolution: Feedback Received
Apache NiFi 1.x is no longer maintained and no new release is planned on the
1.x release line. Marking as resolved as part of a cleanup operation. Please
open a new one with an updated description if this is still relevant for NiFi
2.x.
> NiFi doesn't start if bootstrap.conf contains a tmp dir which doesn't exist
> ---------------------------------------------------------------------------
>
> Key: NIFI-5269
> URL: https://issues.apache.org/jira/browse/NIFI-5269
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.6.0
> Reporter: Brandon Rhys DeVries
> Priority: Minor
>
> If a "java.io.tmpdir" argument is added to bootstrap.conf, and that directory
> does not exist, the PutHiveStreaming processor cannot be instantiated due to
> a SnappyError FAILED_TO_LOAD_NATIVE_LIBRARY. A possible solution to this
> would be to add a check in RunNiFi.java[1]
>
> {code:java}
> final String tmpDirProperty = "-Djava.io.tmpdir=";
> final List<String> javaAdditionalArgs = new ArrayList<>();
> for (final Map.Entry<String, String> entry : props.entrySet()) {
> final String key = entry.getKey();
> final String value = entry.getValue();
> if (key.startsWith("java.arg")) {
> javaAdditionalArgs.add(value);
> if(value.startsWith(tmpDirProperty)
> && value.length() > tmpDirProperty.length()){
> String tmpDir = value.subString(tmpDirProperty.length());
> Files.createDirectories(Paths.get(tmpDir));
> }
> }
> }{code}
>
> [1]
> [https://github.com/apache/nifi/blob/rel/nifi-1.6.0/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java#L964-L972]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)