Open dinhtrung opened 3 years ago
1 - Install Mapr dependencies:
$ cat /etc/yum.repos.d/mapr_core.repo
[MapR_Core]
baseurl = https://package.mapr.com/releases/v6.2.0/redhat
enabled = 1
gpgcheck = 1
name = MapR Core Components
protect = 1
$ cat /etc/yum.repos.d/mapr_ecosystem.repo
[MapR_Ecosystem]
baseurl = https://package.mapr.com/releases/MEP/MEP-7.1.0/redhat
enabled = 1
gpgcheck = 1
name = MapR Ecosystem Components
protect = 1
$ yum -y install mapr-client mapr-hadoop-client
2 - Configure NIFI to load mapr native library:
Add the native library path into Nifi bootstrap.conf
:
@@ -73,6 +73,7 @@
# It is needed when a custom jar (eg. JDBC driver) has been configured on a component in the flow and this custom jar depends on a native library
# and tries to load it by its absolute path (java.lang.System.load(String filename) method call).
# Use this Java Agent only if you get "Native Library ... already loaded in another classloader" errors otherwise!
+java.arg.18=-Djava.library.path=/opt/mapr/lib
#java.arg.18=-javaagent:./lib/aspectj/aspectjweaver-1.9.6.jar
#java.arg.19=-Daj.weaving.loadersToSkip=sun.misc.Launcher$AppClassLoader,jdk.internal.loader.ClassLoaders$AppClassLoader,org.eclipse.jetty.webapp.WebAppClassLoader,\
# org.apache.jasper.servlet.JasperLoader,org.jvnet.hk2.internal.DelegatingClassLoader,org.apache.nifi.nar.NarClassLoader
2 - Under Hadoop Processor setting, add following settings:
/opt/mapr/hadoop/hadoop-2.7.5/etc/hadoop/core-site.xml
/opt/mapr/lib,/opt/mapr/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/lib,/opt/mapr/hadoop/hadoop-2.7.5/share/hadoop/mapreduce
How to Compile NIFI with Mapr support
nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/pom.xml
with following changes:ListHDFS.java
andPutHDFS.java
source undernifi-hdfs-processors
with following changes:If everything works then the entire nifi binaries will be located at
nifi-assembly/target/
folder, ready to deploy.