You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by benchristel <gi...@git.apache.org> on 2018/06/30 00:20:17 UTC
[GitHub] incubator-hawq issue #1379: WIP: Cache UGI objects and clean them periodical...
Github user benchristel commented on the issue:
https://github.com/apache/incubator-hawq/pull/1379
What's our approach to testing this going to be? Also, the cache should be a separate class IMO since its behavior and data don't really cohere with `SecurityServletFilter`. Something like:
```java
class UserGroupInformationCache {
public UserGroupInformation get(SegmentTransactionId session) { /* ... */ }
public void removeStaleUGIs(long currentTimeMillis) { /* ... */ }
}
```
This interface assumes we will have some other thread outside this class that periodically calls `removeStaleUGIs` with the current time. We could also have the cache start its own cleanup thread, but then we'd have to `sleep` in our tests to observe the UGIs getting cleaned up, which could make the tests slow and flaky.
---