String storageType = getStorageType(storage);
String cluster = getCluster(storage);
// String hostName = getHostName(cluster);
if (DaoMap.containsKey(cluster)) return DaoMap.get(cluster);
if (storageType.equals("cassandra") && clientType.equals("cql")) {
DataDao dataDao = DaoMap.get(cluster);
if (dataDao==null) {
// dataDao = new CqlDataDaoImpl(factory.getDataCluster(cluster),metaDao);
}
DaoMap.put(cluster, dataDao);
return dataDao;
} else if (storageType.equals("cassandra") && clientType.equals("astyanax")) {
DataDao dataDao = DaoMap.get(cluster);
if (dataDao==null) {
dataDao = new AstyanaxDataDaoImpl();//factory.getDataCluster(cluster),metaDao);
}
DaoMap.put(cluster, dataDao);
return dataDao;