We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31aa4f5 commit 133fac4Copy full SHA for 133fac4
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/Groups.java
@@ -131,7 +131,11 @@ public Groups(Configuration conf, final Timer timer) {
131
CommonConfigurationKeys.
132
HADOOP_SECURITY_GROUPS_CACHE_BACKGROUND_RELOAD_THREADS_DEFAULT);
133
parseStaticMapping(conf);
134
-
+ if(cacheTimeout<=0){
135
+ throw new IllegalArgumentException(
136
+ "hadoop.security.groups.cache.secs should be larger than 0",
137
+ new IllegalArgumentException("hadoop.security.groups.cache.secs should be larger than 0"));
138
+ }
139
this.timer = timer;
140
this.cache = CacheBuilder.newBuilder()
141
.refreshAfterWrite(cacheTimeout, TimeUnit.MILLISECONDS)
0 commit comments