public static Map<String,String> getConfigFromConstMapInspector(ObjectInspector objInspector) throws UDFArgumentException {
if( ! ( ObjectInspectorUtils.isConstantObjectInspector(objInspector))
|| !(objInspector instanceof StandardConstantMapObjectInspector)) {
throw new UDFArgumentException("HBase parameters must be a constant map");
}
StandardConstantMapObjectInspector constMapInsp = (StandardConstantMapObjectInspector) objInspector;
Map<?,?> uninspMap = constMapInsp.getWritableConstantValue();
System.out.println( " Uninsp Map = " + uninspMap + " size is " + uninspMap.size());
Map<String,String> configMap = new HashMap<String,String>();
for(Object uninspKey : uninspMap.keySet()) {
Object uninspVal = uninspMap.get( uninspKey);
String key = ((StringObjectInspector)constMapInsp.getMapKeyObjectInspector()).getPrimitiveJavaObject(uninspKey);
String val = ((StringObjectInspector)constMapInsp.getMapValueObjectInspector()).getPrimitiveJavaObject(uninspVal);
LOG.info(" Key " + key + " VAL = " + configMap.get(key) );
System.out.println(" Key " + key + " VAL = " + configMap.get(key) );
configMap.put( key, val);
}