Giter Club home page Giter Club logo

nifi's Introduction

MarkLogic NiFi connector

The MarkLogic NiFi connector simplifies integrating Apache NiFi with MarkLogic, allowing for data to be easily written to and read from MarkLogic. The connector consists of a set of custom NiFi processors and controller services which can be used in NiFi flows for integrating with MarkLogic. The connector has been developed and tested on NiFi 1.15.3; it may work in more recent versions of NiFi too.

Please see the Getting Started guide for information on obtaining the connector, installing it, and using it.

Building and testing the connector

If you'd like to build the MarkLogic NiFi connector from source, you'll first need to download and install Apache Maven if you do not already have it installed.

As of the 1.15.3.2 release, Java 11 should be used to run the Maven commands below. The Maven pom.xml file now ensures that the NAR files constructed by Maven will run on Java 8, but it does so via a compiler switch introduced in Java 9. Thus, Java 8 cannot be used to run Maven, but the NAR files will run on both Java 8 and Java 11. This is consistent with the NiFi system requirements.

Next, clone this repository and run the following command to build the two NAR files:

mvn clean install -DskipTests

It is recommended to use "-DskipTests" unless you have completed the instructions below for deploying an application to MarkLogic that the tests depend on. You may still want to include "-DskipTests" so that the process for building the NARs is faster.

After "install" completes, the below NARs will have been created:

  • ./nifi-marklogic-nar/target/nifi-marklogic-nar-(version).nar
  • ./nifi-marklogic-services-api-nar/target/nifi-marklogic-services-api-nar-(version).nar

You can then copy these NAR files into your NiFi installation as described in the Getting Started guide.

Note that depending on the version of NiFi you're running, NiFi may require you to login after accessing the NiFi home page after starting it up. See these NiFi docs for instructions on how to login.

Running the tests

Please note that the instructions right below this only run the JUnit 4 tests within this project. The project also contains JUnit 5 tests, but the necessary Maven config has not been determined yet to allow for both sets of tests to be run when running the Maven "test" task. If you would like to run all of the tests - which is important when developing the connector - please use an IDE such as IntelliJ that is able to run both the JUnit 4 and JUnit 5 tests at the same time.

After cloning this repository locally and installing Maven, you can run the tests for the connector by performing the following steps (as noted above, be sure to use Java 8):

  1. cd nifi-marklogic-processors
  2. Put your ML admin username/password in gradle-local.properties (a gitignored file, so you'll need to create it)
  3. Run ./gradlew -i mldeploy (uses Gradle to deploy a small test application to ML)
  4. cd ..
  5. Run mvn clean test

You should have output like this:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for nifi-marklogic-bundle 1.15.3:
[INFO] 
[INFO] nifi-marklogic-bundle .............................. SUCCESS [  1.062 s]
[INFO] nifi-marklogic-services-api ........................ SUCCESS [  1.032 s]
[INFO] nifi-marklogic-services-api-nar .................... SUCCESS [  0.366 s]
[INFO] nifi-marklogic-services ............................ SUCCESS [  2.692 s]
[INFO] nifi-marklogic-processors .......................... SUCCESS [  5.757 s]
[INFO] nifi-marklogic-nar ................................. SUCCESS [  1.235 s]
[INFO] nifi-marklogic-services-nar ........................ SUCCESS [  0.506 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

nifi's People

Contributors

markap14 avatar mcgilman avatar joewitt avatar bbende avatar mattyb149 avatar pvillard31 avatar ijokarumawak avatar apiri avatar olegz avatar alopresto avatar scottyaslan avatar andrewmlim avatar trixpan avatar rjrudin avatar mikethomsen avatar ryanjdew avatar jtstorck avatar mosermw avatar brosander avatar patricker avatar zenfenan avatar jskora avatar trkurc avatar jbarnabee avatar jvwing avatar yolandamdavis avatar mans2singh avatar yuri1969 avatar jdye64 avatar jmamanpara avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.