Переглянути джерело

MAPREDUCE-6753. Variable in byte printed directly in mapreduce client. Contributed by Kai Sasaki.

(cherry picked from commit 19a1fc6373f0dea56e5845f19990d469428489bc)
(cherry picked from commit e2fb9538f0e2855d757bcbd586c37278824700ea)
Akira Ajisaka 8 роки тому
батько
коміт
c6bf43e0be

+ 1 - 1
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/CredentialsTestJob.java

@@ -58,7 +58,6 @@ public class CredentialsTestJob extends Configured implements Tool {
       String secretName = "alias"+i;
       String secretName = "alias"+i;
       // get token storage and a key
       // get token storage and a key
       byte[] secretValue =  ts.getSecretKey(new Text(secretName));
       byte[] secretValue =  ts.getSecretKey(new Text(secretName));
-      System.out.println(secretValue);
 
 
       if (secretValue == null){
       if (secretValue == null){
         throw new RuntimeException("The key "+ secretName + " is not available. "); 
         throw new RuntimeException("The key "+ secretName + " is not available. "); 
@@ -66,6 +65,7 @@ public class CredentialsTestJob extends Configured implements Tool {
       }
       }
 
 
       String secretValueStr = new String (secretValue);
       String secretValueStr = new String (secretValue);
+      System.out.println(secretValueStr);
 
 
       if  ( !("password"+i).equals(secretValueStr)){
       if  ( !("password"+i).equals(secretValueStr)){
         throw new RuntimeException("The key "+ secretName +
         throw new RuntimeException("The key "+ secretName +