You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Brandon DeVries (JIRA)" <ji...@apache.org> on 2018/06/05 16:00:01 UTC
[jira] [Updated] (NIFI-5269) NiFi doesn't start if bootstrap.conf
contains a tmp dir which doesn't exist
[ https://issues.apache.org/jira/browse/NIFI-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon DeVries updated NIFI-5269:
----------------------------------
Summary: NiFi doesn't start if bootstrap.conf contains a tmp dir which doesn't exist (was: NiFi doesn't start if bootstrap.conf contatins a tmp dir which doesn't exist)
> 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 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
(v7.6.3#76005)