Following on from my post yesterday, here's a further example usage for the hadoop connector
Listed below is an example showing how you can use the connector to update an existing document in MarkLogic. As before, we're only focusing on the Map phase of Map/Reduce in order to keep things simple.
- You'll need the hadoop connector on your buildpath, which is here
- In addition to having installed MarkLogic 5, you'll need to create an XDBC server (for this example, I'm using port 9999 and targeting the Documents database).
When you're ready, create one XML doc in the database:
Then try the following:
This is the content for the XML config file src/main/resources/marklogic-mlnode-update.xml (referred to in the code above):
And the xcc/j connector for MarkLogic 5.0-1 is now in maven, so all other dependencies can be resolved by this pom:
Enjoy your elephant...