use of org.apache.sling.cassandra.resource.provider.mapper.CassandraMapperException in project sling by apache.
the class CassandraResource method loadResourceData.
private void loadResourceData(ResourceProvider resourceProvider) {
CassandraResourceProvider cassandraResourceProvider = (CassandraResourceProvider) resourceProvider;
try {
// TODO ColumnFamilySector is NULL and hence this..
String cql = cassandraResourceProvider.getCassandraMapperMap().get(columnFamilySector).getCQL(columnFamilySector, remainingPath);
QueryResult<CqlRows<String, String, String>> results = CassandraResourceProviderUtil.executeQuery(cql, ((CassandraResourceProvider) resourceProvider).getKeyspace(), new StringSerializer());
populateDataFromResult(results);
dataLoaded = true;
} catch (CassandraMapperException e) {
System.out.println("Error occurred from resource at " + resourcePath + " : " + e.getMessage());
LOGGER.error("Error occurred from resource at " + resourcePath + " : " + e.getMessage());
}
}
Aggregations