Skip to content

Commit 2ebab6d

Browse files
authored
Update UserGroupInformation.java
1 parent eb92779 commit 2ebab6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,10 @@ private static void ensureInitialized() {
306306
private static synchronized void initialize(Configuration conf,
307307
boolean overrideNameRules) {
308308
authenticationMethod = SecurityUtil.getAuthenticationMethod(conf);
309-
long cacheTimeout = conf.getLong(HADOOP_SECURITY_GROUPS_CACHE_SECS, HADOOP_SECURITY_GROUPS_CACHE_SECS_DEFAULT) * 1000;
310-
if (cacheTimeout <=0 ){
311-
throw new IllegalArgumentException("hadoop.security.groups.cache.secs should be larger than 0", new IllegalArgumentException("hadoop.security.groups.cache.secs should be larger than 0"));
309+
if (conf.getLong(HADOOP_SECURITY_GROUPS_CACHE_SECS, HADOOP_SECURITY_GROUPS_CACHE_SECS_DEFAULT) * 1000 <= 0){
310+
throw new IllegalArgumentException(
311+
"hadoop.security.groups.cache.secs should be larger than 0",
312+
new IllegalArgumentException("hadoop.security.groups.cache.secs should be larger than 0"));
312313
}
313314
if (overrideNameRules || !HadoopKerberosName.hasRulesBeenSet()) {
314315
try {

0 commit comments

Comments
 (0)