private void checkDbState( DatabaseLayout databaseLayout, Config tuningConfiguration ) throws ToolFailureException { try ( JobScheduler jobScheduler = createInitialisedScheduler(); PageCache pageCache = ConfigurableStandalonePageCacheFactory.createPageCache( fs, tuningConfiguration, jobScheduler ) ) { assertRecoveryIsNotRequired( fs, pageCache, tuningConfiguration, databaseLayout, new Monitors() ); } catch ( RecoveryRequiredException rre ) { throw new ToolFailureException( rre.getMessage() ); } catch ( Exception e ) { systemError.printf( "Failure when checking for recovery state: '%s', continuing as normal.%n", e ); } }
private static void checkDbState( DatabaseLayout databaseLayout, Config additionalConfiguration ) throws CommandFailed { try ( FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); JobScheduler jobScheduler = createInitialisedScheduler(); PageCache pageCache = ConfigurableStandalonePageCacheFactory.createPageCache( fileSystem, additionalConfiguration, jobScheduler ) ) { RecoveryRequiredChecker.assertRecoveryIsNotRequired( fileSystem, pageCache, additionalConfiguration, databaseLayout, new Monitors() ); } catch ( RecoveryRequiredException rre ) { throw new CommandFailed( rre.getMessage() ); } catch ( Exception e ) { throw new CommandFailed( "Failure when checking for recovery state: '%s'." + e.getMessage(), e ); } }
private static void checkDbState( DatabaseLayout databaseLayout, Config additionalConfiguration ) throws CommandFailed { try ( FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); JobScheduler jobScheduler = createInitialisedScheduler(); PageCache pageCache = ConfigurableStandalonePageCacheFactory .createPageCache( fileSystem, additionalConfiguration, jobScheduler ) ) { assertRecoveryIsNotRequired( fileSystem, pageCache, additionalConfiguration, databaseLayout, new Monitors() ); } catch ( RecoveryRequiredException rre ) { throw new CommandFailed( rre.getMessage() ); } catch ( Exception e ) { throw new CommandFailed( "Failure when checking for recovery state: '%s'." + e.getMessage(), e ); } }
private static void checkDbState( DatabaseLayout databaseLayout, Config additionalConfiguration ) throws CommandFailed { try ( FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); JobScheduler jobScheduler = createInitialisedScheduler(); PageCache pageCache = ConfigurableStandalonePageCacheFactory.createPageCache( fileSystem, additionalConfiguration, jobScheduler ) ) { RecoveryRequiredChecker.assertRecoveryIsNotRequired( fileSystem, pageCache, additionalConfiguration, databaseLayout, new Monitors() ); } catch ( RecoveryRequiredException rre ) { throw new CommandFailed( rre.getMessage() ); } catch ( Exception e ) { throw new CommandFailed( "Failure when checking for recovery state: '%s'." + e.getMessage(), e ); } }