NiFi org.xerial.snappy.SnappyError
Using cloudbreak to launch HDF (specifically NiFi), an error may prevent launching an instance. In the logs (/usr/hdf/current/nifi/logs/nifi-app.log) the following error is produced:
pache.nifi.processors.hive.PutHiveStreaming could not be instantiated
java.util.ServiceConfigurationError: org.apache.nifi.processor.Processor: Provider org.apache.nifi.processors.hive.PutHiveStreaming could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
....
Caused by: org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] null
at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:239)
....
This is generally caused by by snappy library extracting to /tmp (generally defined in java.io.tmpdir).
To fix this, do one of the following
- Grant nifi user access to /tmp
- Create a tmp directory where nifi user has access. For example, create tmp directory /home/tmp
- Then go into ambari and find parameter
Template for bootstrap.conf - Scroll past all the java.arg.* arguments
- Add the following
java.arg.snappy=-Dorg.xerial.snappy.tempdir=/usr/hdf/current/nifi/tmp - Then go into ambari and find parameter
That's it!

