【问题标题】:Getting XDMP-EXPNTREECACHEFULL error in MarkLogic 9在 MarkLogic 9 中出现 XDMP-EXPNTREECACHEFULL 错误
【发布时间】:2018-01-24 09:19:18
【问题描述】:

实际上我有一组 json 文件(即总计:1M,大小为 500MB)。每个 json 文件有 18 个 Key。我尝试使用下面的 Javascript 实现信封模式

'use strict';
declareUpdate()
var docs = fn.collection("input");
for(var doc of docs) {
  var transformed = {};

  transformed.Metadata = { "Last Used" : ""};
  transformed.Updated = { "University" : "UCLA"}
  transformed.Source = doc; //Sending original data under Source section
  xdmp.nodeReplace(doc,transformed)
}

我尝试使用 marklogic 9 的 JAVA API 调用此 JS.sjs。但我遇到以下错误:

Exception in thread "main" com.marklogic.client.FailedRequestException: Local message: failed to apply resource at invoke: Internal Server Error. Server Message: XDMP-EXPNTREECACHEFULL: for(var doc of docs) { -- Expanded tree cache full on host localhost uri file.json-0-968991
    at com.marklogic.client.impl.OkHttpServices.checkStatus(OkHttpServices.java:4317)
    at com.marklogic.client.impl.OkHttpServices.postIteratedResourceImpl(OkHttpServices.java:3831)
    at com.marklogic.client.impl.OkHttpServices.postEvalInvoke(OkHttpServices.java:3768)
    at com.marklogic.client.impl.ServerEvaluationCallImpl.eval(ServerEvaluationCallImpl.java:164)
    at com.marklogic.client.impl.ServerEvaluationCallImpl.eval(ServerEvaluationCallImpl.java:153)
    at com.marklogic.client.impl.ServerEvaluationCallImpl.evalAs(ServerEvaluationCallImpl.java:144)
    at bulkimport.Tsm.main(Tsm.java:19)

我查看了 MarkLogic Documentation,他们提到了解决此错误的方法。之后我将expanded tree cache size* 增加到2048,但我仍然面临同样的错误。

如何通过上述代码(即JS.sjs)进行优化以避免此错误?

感谢任何帮助。

【问题讨论】:

    标签: javascript marklogic java


    【解决方案1】:

    您正在尝试一次更新所有文档。那不会扩展。您需要以某种方式将工作负载分解成更小的部分,并分批处理大约 500 到 1000 个文件。

    有几种方法可以做到这一点,但正如此电子邮件回复中所建议的那样,DMSDK 可能是目前最好的方法之一:http://markmail.org/message/ua6fyaztctx6syrw

    有关 DMSDK 的教程,请参阅:http://developer.marklogic.com/learn/data-movement-sdk

    指南见:https://docs.marklogic.com/guide/java/data-movement

    HTH!

    【讨论】:

      猜你喜欢
      • 2014-06-16
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      • 2021-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-25
      相关资源
      最近更新 更多