Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.6.0
-
None
-
None
Description
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]
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)); } } }