marklogic - Marklogic 内容泵没有可用的服务器问题
问题描述
我在集群上有 marklogic 9。我正在尝试在服务器上从一个集合执行 mlcp 到另一个集合。
请在下面找到随附的代码
MlcpBean mlcpBean = new MlcpBean();
mlcpBean.setCommand("COPY");
mlcpBean.setInput_database("somehost");
mlcpBean.setCollection_filter("somecollection");
mlcpBean.setInput_host("somehost");
mlcpBean.setInput_port(some port);
mlcpBean.setInput_username("some user id");
mlcpBean.setInput_password("some password");
String[] args1 = mlcpBean.buildArgs();
String[] expandedArgs =
OptionsFileUtil.expandArguments(args1);
// Invoke mlcp
ContentPump.runCommand(expandedArgs); }
When I run the above class it gives me the following error
01:01:00.104 [scheduling-1] WARN c.m.mapreduce.MarkLogicInputFormat - Unable to connect to "********.com" to query source information
01:01:00.104 [scheduling-1] ERROR c.m.contentpump.LocalJobRunner - Error getting input splits:
01:01:00.104 [scheduling-1] ERROR c.m.contentpump.LocalJobRunner - Unable to query source information, no usable hostname found.
它甚至不连接到主机。
我已经从另一个没有运行 mlcp 但使用 databaseclientfactory 的程序验证了可以建立连接
我也无法验证 -ssl_protocol 是否为 TLSv1.2
有人可以帮我解决这个问题。
解决方案
看起来您正在使用 MLCP JAR 中的类来构建新的 Java 程序。这种方法实际上不受支持,并且会使您面临在未来版本中未经宣布的情况发生变化的风险。如果这是一次性副本,您可以使用 MLCP 作为命令行工具;如果这是你打算随着时间推移使用的东西,你应该使用 MarkLogic 的数据移动 SDK,用于这样的任务。
如果您在使用 DMSDK 时遇到问题,我鼓励您尝试一下,然后发布一个新问题。
推荐阅读
- python - 递归与迭代函数 Python
- java - 在这个将前缀转换为后缀的程序中,为什么在执行以下代码时会显示运行时错误“ArrayIndexOutOfBound”?
- c - 为什么这个变量等于一个数字和一个字符?
- node.js - 使用 Express 访问静态内容和 API
- mysql - 如何复制表(MySQL)并自动更新新表?
- java - 如何从本地java应用程序连接到kerberized hive
- angular - 杀死 Angular 服务人员并用另一个服务人员替换的最佳方法是什么?
- python - 将字符串中的最后两个字母大写
- docker - 带有 LocalDB 的 Visual Studio 2017 docker 容器
- jakarta-ee - 分离实体传递错误