在 MarkLogic 9 中出现 XDMP-EXPNTREECACHEFULL 错误
Getting XDMP-EXPNTREECACHEFULL error in MarkLogic 9
实际上我有一组 json 个文件(i.e.Total:1M,大小为 500MB)。每个 json 文件有 18 个密钥。我尝试使用以下 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
)进行优化来避免这个错误?
感谢任何帮助。
您正在尝试一次更新所有文档。那不会扩展。您需要以某种方式将工作负载分解成更小的部分,并以大约 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!
实际上我有一组 json 个文件(i.e.Total:1M,大小为 500MB)。每个 json 文件有 18 个密钥。我尝试使用以下 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
)进行优化来避免这个错误?
感谢任何帮助。
您正在尝试一次更新所有文档。那不会扩展。您需要以某种方式将工作负载分解成更小的部分,并以大约 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!