Reply
New Contributor
Posts: 6
Registered: ‎06-06-2018

Cdh6.0.1 does not support Chinese by default

Chinese scrambling code in cdh6 oozie scheduling shell

 

Resolvent

Add in the first line of the file

Export LANG = zh_CN.UTF-8

 

 

 

In spark

The original code for the old cluster running: Val = md5. digest (encryptStr. getBytes ()) is no problem.

There is a problem with running on the new cluster. The result of the Chinese string. getBytes () is?????? Coding problem, code to add.

Val e = md5. digest (encryptStr. getBytes (Charset. forName ("utf-8"))

 

 

New Contributor
Posts: 6
Registered: ‎06-06-2018

Re: Cdh6.0.1 does not support Chinese by default

IN spark

Byte conversion will scramble if no encoding is specified
Announcements