|
@@ -32,6 +32,10 @@ import java.util.Map;
|
|
|
import javax.crypto.KeyGenerator;
|
|
|
import javax.crypto.SecretKey;
|
|
|
|
|
|
+import com.fasterxml.jackson.core.JsonParseException;
|
|
|
+import com.fasterxml.jackson.databind.JsonMappingException;
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.fasterxml.jackson.databind.ObjectReader;
|
|
|
import org.apache.commons.logging.Log;
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
@@ -60,10 +64,6 @@ import org.apache.hadoop.security.token.Token;
|
|
|
import org.apache.hadoop.security.token.TokenIdentifier;
|
|
|
import org.apache.hadoop.util.ReflectionUtils;
|
|
|
import org.apache.hadoop.yarn.api.records.ReservationId;
|
|
|
-import org.codehaus.jackson.JsonParseException;
|
|
|
-import org.codehaus.jackson.map.JsonMappingException;
|
|
|
-import org.codehaus.jackson.map.ObjectMapper;
|
|
|
-import org.codehaus.jackson.map.ObjectReader;
|
|
|
|
|
|
import com.google.common.base.Charsets;
|
|
|
|
|
@@ -407,7 +407,6 @@ class JobSubmitter {
|
|
|
LOG.info("loading user's secret keys from " + tokensFileName);
|
|
|
String localFileName = new Path(tokensFileName).toUri().getPath();
|
|
|
|
|
|
- boolean json_error = false;
|
|
|
try {
|
|
|
// read JSON
|
|
|
Map<String, String> nm = READER.readValue(new File(localFileName));
|
|
@@ -416,13 +415,9 @@ class JobSubmitter {
|
|
|
credentials.addSecretKey(new Text(ent.getKey()), ent.getValue()
|
|
|
.getBytes(Charsets.UTF_8));
|
|
|
}
|
|
|
- } catch (JsonMappingException e) {
|
|
|
- json_error = true;
|
|
|
- } catch (JsonParseException e) {
|
|
|
- json_error = true;
|
|
|
- }
|
|
|
- if(json_error)
|
|
|
+ } catch (JsonMappingException | JsonParseException e) {
|
|
|
LOG.warn("couldn't parse Token Cache JSON file with user secret keys");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|