当前位置: 动力学知识库 > 问答 > 编程问答 >

maven - MarkLogic Content Pump Java

问题描述:

I am trying to use the MarkLogic content pump from the maven dependency.

I'm struggling to find any documentation on the code. Does anyone have a tutorial they could point me to?

网友答案:

The Using MarkLogic Content Pump chapter of the Loading Content into MarkLogic Guide documents how to work with MLCP. If that doesn't cover what you're looking for, please add more detail to your question.

网友答案:

Found it eventually. What I was looking for was a way to use the mlcp maven dependency. The documentation I did find was mostly on how to use the content pump from command line and I need to use a java process instead.

The following link gave me the examples I needed on how to connect etc http://docs.marklogic.com/guide/java/intro

网友答案:

There is rudimentary maven information available here:

https://developer.marklogic.com/products/mlcp

If you are willing to use gradle, then you could use this in you build.gradle file:

repositories {
  mavenCentral()
  maven {url "http://developer.marklogic.com/maven2/"}
  maven {url "http://repository.cloudera.com/artifactory/cloudera-repos/" }
}

configurations {
  mlcp
}

dependencies {
  mlcp "com.marklogic:mlcp-Hadoop2:1.3-2"
}

task importDocuments(type: JavaExec) {
  main = "com.marklogic.contentpump.ContentPump"
  classpath = configurations.mlcp
  args = ["import",
    "-host", "myhost",
    "-port", "9000",
    "-username", "usn",
    "-password", "pwd",
    "-input_file_type", "documents",
    "-input_file_path", "mypath"]
}

HTH!

分享给朋友:
您可能感兴趣的文章:
随机阅读: