@Override public void upgrade(UpgradeContext context) throws Exception { System.out.println(" Checking if min/max measures were enabled..."); try (final KVPersistentStoreProvider kvPersistentStoreProvider = new KVPersistentStoreProvider( DirectProvider.wrap(context.getKVStoreProvider()))) { final PersistentStore<OptionValue> options = kvPersistentStoreProvider.getOrCreateStore( SystemOptionManager.STORE_NAME, SystemOptionManager.OptionStoreCreator.class, new JacksonSerializer<>(context.getLpPersistence().getMapper(), OptionValue.class)); // check if the old min/max option was set - can be null if the option was not changed from the default (true) final OptionValue optionValue = options.get("accelerator.enable_min_max"); if (optionValue == null || optionValue.getBoolVal()) { System.out.println(" Min/max measures were enabled, migrating aggregate reflections..."); migrateGoals(context); } else { System.out.println(" Min/max measures were disabled, skipping"); } } }
@Before public void setup() throws Exception { kvstoreprovider = new LocalKVStoreProvider(CLASSPATH_SCAN_RESULT, null, true, true); kvstoreprovider.start(); options = new SystemOptionManager( CLASSPATH_SCAN_RESULT, new LogicalPlanPersistence(DEFAULT_SABOT_CONFIG, CLASSPATH_SCAN_RESULT), new KVPersistentStoreProvider(DirectProvider.wrap(kvstoreprovider))); options.init(); }
@Test public void verifyKVPersistentStore() throws Exception { final KVStoreProvider storeProvider = new LocalKVStoreProvider(DremioTest.CLASSPATH_SCAN_RESULT, null, true, false); storeProvider.start(); final Provider<KVStoreProvider> storeProviderProvider = new Provider<KVStoreProvider>() { @Override public KVStoreProvider get() { return storeProvider; } }; try (PersistentStoreProvider provider = new KVPersistentStoreProvider(storeProviderProvider)) { provider.start(); PStoreTestUtil.test(provider); } }
try(KVPersistentStoreProvider kvPersistentStoreProvider = new KVPersistentStoreProvider( DirectProvider.wrap(context.getKVStoreProvider()))) { PersistentStore<OptionValue> options = kvPersistentStoreProvider.getOrCreateStore( SystemOptionManager.STORE_NAME, SystemOptionManager.OptionStoreCreator.class, new JacksonSerializer<>(context.getLpPersistence().getMapper(), OptionValue.class));
storeProvider = new LocalKVStoreProvider(CLASSPATH_SCAN_RESULT, null, true, false); storeProvider.start(); final KVPersistentStoreProvider psp = new KVPersistentStoreProvider( new Provider<KVStoreProvider>() { @Override
storeProvider = new LocalKVStoreProvider(CLASSPATH_SCAN_RESULT, null, true, false); storeProvider.start(); final KVPersistentStoreProvider psp = new KVPersistentStoreProvider( new Provider<KVStoreProvider>() { @Override
public void setup() { try { storeProvider = new LocalKVStoreProvider(DremioTest.CLASSPATH_SCAN_RESULT, null, true, false); storeProvider.start(); final Provider<KVStoreProvider> storeProviderProvider = new Provider<KVStoreProvider>() { @Override public KVStoreProvider get() { return storeProvider; } }; provider = new KVPersistentStoreProvider(storeProviderProvider); options = new SystemOptionManager(result, persistence, provider); options.init(); compiler = new CodeCompiler(config, options); ec = new ExecutionControls(options, NodeEndpoint.getDefaultInstance()); functionLookup = new FunctionImplementationRegistry(config, result); contextInformation = new ContextInformationImpl(UserCredentials.getDefaultInstance(), QueryContextInformation.getDefaultInstance()); }catch(Exception e){ throw new RuntimeException(e); } }
final KVPersistentStoreProvider psp = new KVPersistentStoreProvider(DirectProvider.wrap(storeProvider), true); when(sabotContext.getStoreProvider()) .thenReturn(psp);
final KVPersistentStoreProvider psp = new KVPersistentStoreProvider(DirectProvider.wrap(storeProvider), true); when(sabotContext.getStoreProvider()) .thenReturn(psp);
storeProvider = new KVPersistentStoreProvider(registry.provider(KVStoreProvider.class), !isCoordinator); registry.bind(PersistentStoreProvider.class, storeProvider);
new KVPersistentStoreProvider(registry.provider(KVStoreProvider.class)));