Hi James, it's possible. But it will have type casting warnings on the 
getRegionGuidePost method since the map would be a generic type. I 
personally prefer stronger typing then weaker typing unless necessary. 
We can modify the type if later we think another data structure makes 
more sense.

On 03/08/2013 02:31 PM, James Taylor wrote:
>
> In src/main/java/com/salesforce/phoenix/schema/stat/PTableStatsImpl.java:
>
> > +
> > +import org.apache.hadoop.hbase.HRegionInfo;
> > +import org.apache.hadoop.hbase.util.Bytes;
> > +import org.apache.hadoop.io.WritableUtils;
> > +
> > +import com.google.common.collect.ImmutableMap;
> > +
> > +
> > +/**
> > + * Implementation for PTableStats.
> > + */
> > +public class PTableStatsImpl implements PTableStats {
> > +
> > +    // The map for guide posts should be immutable. We only take the current snapshot from outside
> > +    // method call, store it in this atomic reference to prevent race condition.
> > +    private AtomicReference<Map<String, byte[][]>> regionGuidePosts;
>
> How about just declaring this as Map and then setting it as you're 
> doing already (with an ImmutableMap copy)?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/83/files#r3305529>.
>