Apache Nifi Marklogic обработчик запросов - PullRequest
0 голосов
/ 18 мая 2018

Я играю с nifi и marklogic процессором .. Я пытаюсь использовать Query Processor с cts: uri's ... вот мой cts: uri query

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')))

enter image description here Приведенный выше запрос работает на консоли запросов ... но при использовании в 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 '$0'  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 '$0'  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 '$0'  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$1(QueryMarkLogic.java:143)
    at com.marklogic.client.datamovement.impl.QueryBatcherImpl$1$1.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 '$0'  is required to be non-zero in rule: set-transaction-timestamp
    at com.marklogic.nifi.processor.QueryMarkLogic.lambda$onTrigger$1(QueryMarkLogic.java:158)
    at com.marklogic.client.datamovement.impl.QueryBatcherImpl$1$1.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 '$0'  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$1(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

Что я здесь не так делаю?

1 Ответ

0 голосов
/ 19 мая 2018

Попробуйте, если для «Consistent snapshot» установлено значение false.Если это работает, это из-за некоторых проблем, которые мы пытаемся решить, когда установлено значение true.

...