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 312dcf5 commit 61ca906Copy full SHA for 61ca906
src/main/java/tech/stackable/hadoop/StackableGroupMapper.java
@@ -31,8 +31,16 @@ public class StackableGroupMapper implements GroupMappingServiceProvider {
31
private final ObjectMapper json;
32
private URI opaUri = null;
33
34
+ public enum HadoopConfig {
35
+ INSTANCE;
36
+ public Configuration getConfiguration() {
37
+ return new Configuration();
38
+ }
39
40
+
41
public StackableGroupMapper() {
- Configuration configuration = new Configuration();
42
+ // guaranteed to be only called once (Effective Java: Item 3)
43
+ Configuration configuration = HadoopConfig.INSTANCE.getConfiguration();
44
45
String opaMappingUrl = configuration.get(OPA_MAPPING_URL_PROP);
46
if (opaMappingUrl == null) {
0 commit comments