Repository: phoenix
Updated Branches:
  refs/heads/master 6f16a6a62 -> 71832b59f


PHOENIX-1562 NPE in ServerCacheClient


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/71832b59
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/71832b59
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/71832b59

Branch: refs/heads/master
Commit: 71832b59ff8435067f9db3ac79f0a6360271fa75
Parents: 6f16a6a
Author: maryannxue <wei....@intel.com>
Authored: Mon Jan 12 17:47:28 2015 -0500
Committer: maryannxue <wei....@intel.com>
Committed: Mon Jan 12 17:47:28 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/phoenix/cache/ServerCacheClient.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/71832b59/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
index ba7d265..1233e1c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java
@@ -24,12 +24,12 @@ import java.io.IOException;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
@@ -82,7 +82,7 @@ public class ServerCacheClient {
     private static final Log LOG = LogFactory.getLog(ServerCacheClient.class);
     private static final Random RANDOM = new Random();
     private final PhoenixConnection connection;
-    private final Map<Integer, TableRef> cacheUsingTableRefMap = new 
HashMap<Integer, TableRef>();
+    private final Map<Integer, TableRef> cacheUsingTableRefMap = new 
ConcurrentHashMap<Integer, TableRef>();
 
     /**
      * Construct client used to create a serialized cached snapshot of a table 
and send it to each region server

Reply via email to