Created 05-07-2018 02:49 AM
I am currently running apache nifi in centos 7, and mounted some network drives by samba ( windows share ), then in the nifi data flow, I use putfile to write some files with Chinese Characters filename into the network drives by samba.
Then I got this error
PutFile[id=e0ae7c13-0162-1000-f401-ecb9b39fa9de] Penalizing StandardFlowFileRecord[uuid=04563401-54ff-4a1f-9117-02e4472ff0c4,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1525659272432-6, container=default, section=6], offset=0, length=6981],offset=0,name=用户划款授权通知书.pdf,size=6981] and transferring to failure due to Malformed input or input contains unmappable characters: .用户划款授权通知书.pdf: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: .用户划款授权通知书.pdf
Please advise how to do.
Created 05-08-2018 06:11 AM
This is fixed by doing below:
export JAVA_TOOL_OPTIONS=-Dfile.encoding=utf8
java.arg.8=-Dfile.encoding=UTF8
Of course, adjust the argument’s number according to your configuration.
And in nifi-env.sh
export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" |
Created 05-08-2018 03:23 AM
Just tested, I are not able to write to local path "/tmp" neither
Created 05-08-2018 06:11 AM
This is fixed by doing below:
export JAVA_TOOL_OPTIONS=-Dfile.encoding=utf8
java.arg.8=-Dfile.encoding=UTF8
Of course, adjust the argument’s number according to your configuration.
And in nifi-env.sh
export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" |