mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
changed syncronizedmap to concurrenthashmap
This commit is contained in:
parent
7b2a7c5709
commit
d0c2bac7a4
2 changed files with 4 additions and 6 deletions
|
|
@ -24,9 +24,8 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* Class defining credentials for data source authorization
|
||||
|
|
@ -44,7 +43,7 @@ public class Credentials {
|
|||
if (credentialsPath != null) {
|
||||
credentialsFile = new File(credentialsPath);
|
||||
}
|
||||
credentialsMap = Collections.synchronizedMap(new HashMap<String, UserCredentials>());
|
||||
credentialsMap = new ConcurrentHashMap<String, UserCredentials>();
|
||||
if (credentialsPersist) {
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.setPrettyPrinting();
|
||||
|
|
|
|||
|
|
@ -17,9 +17,8 @@
|
|||
|
||||
package org.apache.zeppelin.user;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* User Credentials POJO
|
||||
|
|
@ -28,7 +27,7 @@ public class UserCredentials {
|
|||
private Map<String, UsernamePassword> userCredentials;
|
||||
|
||||
public UserCredentials() {
|
||||
userCredentials = Collections.synchronizedMap(new HashMap<String, UsernamePassword>());
|
||||
userCredentials = new ConcurrentHashMap<String, UsernamePassword>();
|
||||
}
|
||||
|
||||
public UsernamePassword getUsernamePassword(String entity) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue