public static ProxyProperties loadStoreProperties(final Path storePropertiesPath) { return StoreProperties.loadStoreProperties(storePropertiesPath, ProxyProperties.class); }
public Builder storeProperties(final StoreProperties properties) { this.properties = properties; if (null != properties) { ReflectionUtil.addReflectionPackages(properties.getReflectionPackages()); JSONSerialiser.update( properties.getJsonSerialiserClass(), properties.getJsonSerialiserModules(), properties.getStrictJson() ); } return this; }
@Override public AccumuloProperties clone() { return (AccumuloProperties) super.clone(); }
public Builder properties(final StoreProperties properties) { if (null == properties) { this.properties = null; } else { this.properties = properties.getProperties(); } return _self(); }
@Override public String getJsonSerialiserModules() { return new StringDeduplicateConcat().apply( SketchesJsonModules.class.getName(), super.getJsonSerialiserModules() ); } }
if (!fromLibrary.equals(graphLibrary.getProperties(parentStorePropertiesId))) { result.addError(String.format(GRAPH_S_ALREADY_EXISTS_SO_YOU_CANNOT_USE_A_DIFFERENT_S_DO_NOT_SET_THE_S_FIELD, graphId, STORE_PROPERTIES_STRING, PARENT_STORE_PROPERTIES_ID)); if (null != storeProperties && !existingGraphPair.getSecond().equals(storeProperties)) { result.addError(String.format(GRAPH_S_ALREADY_EXISTS_SO_YOU_CANNOT_USE_A_DIFFERENT_S_DO_NOT_SET_THE_S_FIELD, graphId, STORE_PROPERTIES_STRING, STORE_PROPERTIES_STRING));
@JsonGetter("storeProperties") public Properties getProperties() { return null != storeProperties ? storeProperties.getProperties() : null; }
@Override public String getJsonSerialiserModules() { return new StringDeduplicateConcat().apply( SketchesJsonModules.class.getName(), super.getJsonSerialiserModules() ); }
private void updateStore(final GraphConfig config) { if (null == store) { store = Store.createStore(config.getGraphId(), cloneSchema(schema), properties); } else if ((null != config.getGraphId() && !config.getGraphId().equals(store.getGraphId())) || (null != schema) || (null != properties && !properties.equals(store.getProperties()))) { if (null == config.getGraphId()) { config.setGraphId(store.getGraphId()); } if (null == schema || schema.getGroups().isEmpty()) { schema = store.getSchema(); } if (null == properties) { properties = store.getProperties(); } try { store.initialise(config.getGraphId(), cloneSchema(schema), properties); } catch (final StoreException e) { throw new IllegalArgumentException("Unable to initialise the store with the given graphId, schema and properties", e); } } store.setGraphLibrary(config.getLibrary()); if (null == schema || schema.getGroups().isEmpty()) { schema = store.getSchema(); } }
public static FederatedStoreProperties loadStoreProperties(final InputStream storePropertiesStream) { return StoreProperties.loadStoreProperties(storePropertiesStream, FederatedStoreProperties.class); }
@JsonGetter("storeProperties") public Properties getProperties() { return null != storeProperties ? storeProperties.getProperties() : null; }
@Override public MapStoreProperties clone() { return (MapStoreProperties) super.clone(); }
public static MapStoreProperties loadStoreProperties(final Path storePropertiesPath) { return StoreProperties.loadStoreProperties(storePropertiesPath, MapStoreProperties.class); }
@JsonIgnore public Builder graph(final Graph graph) { schema = graph.getSchema(); properties = graph.getStoreProperties().getProperties(); config = graph.getConfig(); return _self(); }
public static FederatedStoreProperties loadStoreProperties(final String pathStr) { return StoreProperties.loadStoreProperties(pathStr, FederatedStoreProperties.class); }
private void validateSameAsFromCache(final Graph newGraph, final String graphId) { final Graph fromCache = federatedStoreCache.getGraphSerialisableFromCache(graphId).getGraph(graphLibrary); if (!newGraph.getStoreProperties().getProperties().equals(fromCache.getStoreProperties().getProperties())) { throw new RuntimeException(String.format(ERROR_ADDING_GRAPH_TO_CACHE, GraphConfigEnum.PROPERTIES.toString(), graphId)); } else { if (!JsonUtil.equals(newGraph.getSchema().toJson(false), fromCache.getSchema().toJson(false))) { throw new RuntimeException(String.format(ERROR_ADDING_GRAPH_TO_CACHE, GraphConfigEnum.SCHEMA.toString(), graphId)); } else { if (!newGraph.getGraphId().equals(fromCache.getGraphId())) { throw new RuntimeException(String.format(ERROR_ADDING_GRAPH_TO_CACHE, "GraphId", graphId)); } } } }
public static FederatedStoreProperties loadStoreProperties(final Path storePropertiesPath) { return StoreProperties.loadStoreProperties(storePropertiesPath, FederatedStoreProperties.class); }
public <OP extends Validatable & Operation> GafferAdder(final OP operation, final Store store) { this.store = store; this.validate = operation.isValidate(); this.skipInvalid = operation.isSkipInvalidElements(); final String maxQueueSizeOption = operation.getOption(FlinkConstants.MAX_QUEUE_SIZE); this.maxQueueSize = null != maxQueueSizeOption ? Integer.parseInt(maxQueueSizeOption) : MAX_QUEUE_SIZE_DEFAULT; graphId = store.getGraphId(); schema = store.getSchema().toCompactJson(); properties = store.getProperties().getProperties(); }
public static ParquetStoreProperties loadStoreProperties(final InputStream storePropertiesStream) { return StoreProperties.loadStoreProperties(storePropertiesStream, ParquetStoreProperties.class); }
public static MapStoreProperties loadStoreProperties(final String pathStr) { return StoreProperties.loadStoreProperties(pathStr, MapStoreProperties.class); }