Repository: phoenix
Updated Branches:
  refs/heads/3.0 2e957f63c -> 70157149c


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/70157149
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/70157149
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/70157149

Branch: refs/heads/3.0
Commit: 70157149c5463f5e522f732058ac4f16f92e1187
Parents: 2e957f6
Author: maryannxue <[email protected]>
Authored: Mon Jan 12 17:54:11 2015 -0500
Committer: maryannxue <[email protected]>
Committed: Mon Jan 12 17:54:11 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/70157149/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 81b5f63..0666dba 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
@@ -22,12 +22,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;
@@ -69,7 +69,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