我正试图将文件从Marklogic服务器(安装在我的机器上(导出到我的本地环境,但我收到了以下错误:
mlcp.sh export -host localhost -port 8000 -username admin
> -password admin -mode local -output_file_path
> /output_dir
> -database data-hub-FINAL -document_selector {/envelope/instance/name-entity}
> -query_filter {"wordQuery":{"name":["Jason"]}}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/mnt/c/Users/imam/Documents/2020_Learning_Imane/marklo/project/flight_school/mlcp-10.0.4.2/lib/hadoop-auth-2.6.0.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
20/08/25 17:52:05 INFO contentpump.ContentPump: Job name: local_2008896403_1
20/08/25 17:52:05 ERROR mapreduce.MarkLogicInputFormat: com.marklogic.xcc.exceptions.XQueryException: XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected Lbrace_
[Session: user=admin, cb=data-hub-FINAL [ContentSource: user=admin, cb=data-hub-FINAL [provider: address=localhost/127.0.0.1:8000, pool=1/64]]]
[Client: XCC/10.0-4, Server: XDBC/10.0-3]
on line 1
expr: ,
in xdmp:eval("for $f in xdmp:forest-open-replica(xdmp:database-forests(xdmp:da...")
in /MarkLogic/hadoop.xqy, on line 32
expr: ,
in hadoop:get-splits("", "{/envelope/instance/name-entity}", "cts:query(xdmp:unquote('{wordQuery:{name:[Jason]}}')/*)")
in /eval, on line 5
expr:
我不知道我错过了什么,我已经尝试了一个简单的导入,它非常有效。所以我猜这个错误来自于我的查询语法。
有什么想法吗?非常感谢
https://docs.marklogic.com/guide/mlcp/export#id_66898
在使用
-query_filter
时,建议使用选项文件,因为XML和JSON序列化查询都包含引号和其他对Unix和Windows命令外壳具有特殊意义的字符,因此正确转义查询非常困难。
如果在命令行中使用
-query_filter
,则必须对序列化的查询进行引用,并且可能需要执行其他特殊字符转义。