MAPREDUCE-6855. Specify charset when create String in CredentialsTestJob. Contributed by Kai Sasaki.
This commit is contained in:
parent
686823529b
commit
14413989ca
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.mapreduce.security;
|
package org.apache.hadoop.mapreduce.security;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -64,7 +65,7 @@ public class CredentialsTestJob extends Configured implements Tool {
|
||||||
// fail the test
|
// fail the test
|
||||||
}
|
}
|
||||||
|
|
||||||
String secretValueStr = new String (secretValue);
|
String secretValueStr = new String (secretValue, StandardCharsets.UTF_8);
|
||||||
System.out.println(secretValueStr);
|
System.out.println(secretValueStr);
|
||||||
|
|
||||||
if ( !("password"+i).equals(secretValueStr)){
|
if ( !("password"+i).equals(secretValueStr)){
|
||||||
|
|
Loading…
Reference in New Issue