use of uk.gov.gchq.gaffer.parquetstore.utils.SchemaUtils in project Gaffer by gchq.
the class ParquetStore method initialise.
@Override
public void initialise(final String graphId, final Schema schema, final StoreProperties properties) throws StoreException {
if (!(properties instanceof ParquetStoreProperties)) {
throw new StoreException("ParquetStore must be initialised with properties of class ParquetStoreProperties");
}
final ParquetStoreProperties parquetStoreProperties = (ParquetStoreProperties) properties;
if (null == parquetStoreProperties.getDataDir()) {
throw new StoreException("The ParquetStoreProperties must contain a non-null data directory (" + ParquetStoreProperties.DATA_DIR + ")");
}
if (null == parquetStoreProperties.getTempFilesDir()) {
throw new StoreException("The ParquetStoreProperties must contain a non-null temporary data directory (" + ParquetStoreProperties.TEMP_FILES_DIR + ")");
}
LOGGER.info("Initialising ParquetStore for graph id {}", graphId);
super.initialise(graphId, schema, parquetStoreProperties);
try {
fs = FileSystem.get(new Configuration());
schemaUtils = new SchemaUtils(getSchema());
initialise();
loadGraphPartitioner();
} catch (final IOException e) {
throw new StoreException("Could not connect to the file system", e);
}
}
Aggregations