Map<String,InputTableConfig> configs = new HashMap<String,InputTableConfig>();
Map.Entry<String,InputTableConfig> defaultConfig = getDefaultInputTableConfig(implementingClass, conf);
if (defaultConfig != null)
configs.put(defaultConfig.getKey(), defaultConfig.getValue());
String configString = conf.get(enumToConfKey(implementingClass, ScanOpts.TABLE_CONFIGS));
MapWritable mapWritable = new MapWritable();
if (configString != null) {
try {
byte[] bytes = Base64.decodeBase64(configString.getBytes());
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
mapWritable.readFields(new DataInputStream(bais));
bais.close();
} catch (IOException e) {
throw new IllegalStateException("The table query configurations could not be deserialized from the given configuration");
}
}
for (Map.Entry<Writable,Writable> entry : mapWritable.entrySet())
configs.put(((Text) entry.getKey()).toString(), (InputTableConfig) entry.getValue());
return configs;
}