Apache Nifi Marklogic 查询处理器
Apache Nifi Marklogic query processor
我正在玩 nifi 和 marklogic 处理器。我正在尝试将查询处理器与 cts:uri 一起使用...以下是我的 cts:uri 查询
cts:and-query((cts:element-attribute-value-query(fn:QName('http://clarivate.com/schema/wok5.27/public/FullRecord', 'pub_info'),fn:QName('http://clarivate.com/schema/wok5.27/public/FullRecord', 'pubyear'),'2018'), cts:collection-query('dps')))
上面的查询在查询控制台上工作...但是在 nifi 中使用时我得到以下异常
018-05-18 14:35:30,270 ERROR [pool-27-thread-3] c.m.nifi.processor.QueryMarkLogic QueryMarkLogic[id=01631005-7b1f-199f-65aa-dfa227609659] QueryMarkLogic[id=01631005-7b1f-199f-65aa-dfa227609659] failed to process due to com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp; rolling back session: com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
at com.marklogic.client.impl.OkHttpServices.checkStatus(OkHttpServices.java:4317)
at com.marklogic.client.impl.OkHttpServices.getIteratedResourceImpl(OkHttpServices.java:3081)
at com.marklogic.client.impl.OkHttpServices.getBulkDocumentsImpl(OkHttpServices.java:975)
at com.marklogic.client.impl.OkHttpServices.getBulkDocuments(OkHttpServices.java:860)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:461)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:439)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:408)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.nifi.processor.QueryMarkLogic.getDocs(QueryMarkLogic.java:169)
at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger(QueryMarkLogic.java:143)
at com.marklogic.client.datamovement.impl.QueryBatcherImpl.run(QueryBatcherImpl.java:716)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
2018-05-18 14:35:30,270 ERROR [pool-27-thread-3] c.m.c.datamovement.impl.QueryBatcherImpl Exception thrown by an onUrisReady listener
org.apache.nifi.processor.exception.ProcessException: com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger(QueryMarkLogic.java:158)
at com.marklogic.client.datamovement.impl.QueryBatcherImpl.run(QueryBatcherImpl.java:716)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
at com.marklogic.client.impl.OkHttpServices.checkStatus(OkHttpServices.java:4317)
at com.marklogic.client.impl.OkHttpServices.getIteratedResourceImpl(OkHttpServices.java:3081)
at com.marklogic.client.impl.OkHttpServices.getBulkDocumentsImpl(OkHttpServices.java:975)
at com.marklogic.client.impl.OkHttpServices.getBulkDocuments(OkHttpServices.java:860)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:461)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:439)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:408)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.nifi.processor.QueryMarkLogic.getDocs(QueryMarkLogic.java:169)
at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger(QueryMarkLogic.java:143)
... 4 common frames omitted
2018-05-18 14:35:30,271 INFO [Timer-Driven Process Thread-2] c.m.c.datamovement.impl.QueryBatcherImpl Job complete, jobBatchNumber=0, jobResultsSoFar=0
2018-05-18 14:35:30,272 INFO [Timer-Driven Process Thread-2] c.m.c.e.d.job.SimpleQueryBatcherJob Completed: Generic query batcher job
我在这里做错了什么?
尝试将 "Consistent snapshot" 设置为 false。如果可行,那是因为我们在将其设置为 true 时试图解决一些问题。
我正在玩 nifi 和 marklogic 处理器。我正在尝试将查询处理器与 cts:uri 一起使用...以下是我的 cts:uri 查询
cts:and-query((cts:element-attribute-value-query(fn:QName('http://clarivate.com/schema/wok5.27/public/FullRecord', 'pub_info'),fn:QName('http://clarivate.com/schema/wok5.27/public/FullRecord', 'pubyear'),'2018'), cts:collection-query('dps')))
018-05-18 14:35:30,270 ERROR [pool-27-thread-3] c.m.nifi.processor.QueryMarkLogic QueryMarkLogic[id=01631005-7b1f-199f-65aa-dfa227609659] QueryMarkLogic[id=01631005-7b1f-199f-65aa-dfa227609659] failed to process due to com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp; rolling back session: com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
at com.marklogic.client.impl.OkHttpServices.checkStatus(OkHttpServices.java:4317)
at com.marklogic.client.impl.OkHttpServices.getIteratedResourceImpl(OkHttpServices.java:3081)
at com.marklogic.client.impl.OkHttpServices.getBulkDocumentsImpl(OkHttpServices.java:975)
at com.marklogic.client.impl.OkHttpServices.getBulkDocuments(OkHttpServices.java:860)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:461)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:439)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:408)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.nifi.processor.QueryMarkLogic.getDocs(QueryMarkLogic.java:169)
at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger(QueryMarkLogic.java:143)
at com.marklogic.client.datamovement.impl.QueryBatcherImpl.run(QueryBatcherImpl.java:716)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
2018-05-18 14:35:30,270 ERROR [pool-27-thread-3] c.m.c.datamovement.impl.QueryBatcherImpl Exception thrown by an onUrisReady listener
org.apache.nifi.processor.exception.ProcessException: com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger(QueryMarkLogic.java:158)
at com.marklogic.client.datamovement.impl.QueryBatcherImpl.run(QueryBatcherImpl.java:716)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.marklogic.client.FailedRequestException: Local message: failed to read resource at documents: Bad Request. Server Message: XDMP-RWINVAL0: The value of expression '[=11=]' is required to be non-zero in rule: set-transaction-timestamp
at com.marklogic.client.impl.OkHttpServices.checkStatus(OkHttpServices.java:4317)
at com.marklogic.client.impl.OkHttpServices.getIteratedResourceImpl(OkHttpServices.java:3081)
at com.marklogic.client.impl.OkHttpServices.getBulkDocumentsImpl(OkHttpServices.java:975)
at com.marklogic.client.impl.OkHttpServices.getBulkDocuments(OkHttpServices.java:860)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:461)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:439)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.client.impl.DocumentManagerImpl.read(DocumentManagerImpl.java:408)
at com.marklogic.client.impl.GenericDocumentImpl.read(GenericDocumentImpl.java:23)
at com.marklogic.nifi.processor.QueryMarkLogic.getDocs(QueryMarkLogic.java:169)
at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger(QueryMarkLogic.java:143)
... 4 common frames omitted
2018-05-18 14:35:30,271 INFO [Timer-Driven Process Thread-2] c.m.c.datamovement.impl.QueryBatcherImpl Job complete, jobBatchNumber=0, jobResultsSoFar=0
2018-05-18 14:35:30,272 INFO [Timer-Driven Process Thread-2] c.m.c.e.d.job.SimpleQueryBatcherJob Completed: Generic query batcher job
我在这里做错了什么?
尝试将 "Consistent snapshot" 设置为 false。如果可行,那是因为我们在将其设置为 true 时试图解决一些问题。