Search in sources :

Example 56 with EMPTY

use of org.apache.commons.lang3.StringUtils.EMPTY in project cassandra by apache.

the class StorageService method drain.

protected synchronized void drain(boolean isFinalShutdown) throws IOException, InterruptedException, ExecutionException {
    ExecutorService counterMutationStage = StageManager.getStage(Stage.COUNTER_MUTATION);
    ExecutorService viewMutationStage = StageManager.getStage(Stage.VIEW_MUTATION);
    ExecutorService mutationStage = StageManager.getStage(Stage.MUTATION);
    if (mutationStage.isTerminated() && counterMutationStage.isTerminated() && viewMutationStage.isTerminated()) {
        if (!isFinalShutdown)
            logger.warn("Cannot drain node (did it already happen?)");
        return;
    }
    assert !isShutdown;
    isShutdown = true;
    Throwable preShutdownHookThrowable = Throwables.perform(null, preShutdownHooks.stream().map(h -> h::run));
    if (preShutdownHookThrowable != null)
        logger.error("Attempting to continue draining after pre-shutdown hooks returned exception", preShutdownHookThrowable);
    try {
        setMode(Mode.DRAINING, "starting drain process", !isFinalShutdown);
        BatchlogManager.instance.shutdown();
        HintsService.instance.pauseDispatch();
        if (daemon != null)
            shutdownClientServers();
        ScheduledExecutors.optionalTasks.shutdown();
        Gossiper.instance.stop();
        if (!isFinalShutdown)
            setMode(Mode.DRAINING, "shutting down MessageService", false);
        // In-progress writes originating here could generate hints to be written, so shut down MessagingService
        // before mutation stage, so we can get all the hints saved before shutting down
        MessagingService.instance().shutdown();
        if (!isFinalShutdown)
            setMode(Mode.DRAINING, "clearing mutation stage", false);
        viewMutationStage.shutdown();
        counterMutationStage.shutdown();
        mutationStage.shutdown();
        viewMutationStage.awaitTermination(3600, TimeUnit.SECONDS);
        counterMutationStage.awaitTermination(3600, TimeUnit.SECONDS);
        mutationStage.awaitTermination(3600, TimeUnit.SECONDS);
        StorageProxy.instance.verifyNoHintsInProgress();
        if (!isFinalShutdown)
            setMode(Mode.DRAINING, "flushing column families", false);
        // disable autocompaction - we don't want to start any new compactions while we are draining
        for (Keyspace keyspace : Keyspace.all()) for (ColumnFamilyStore cfs : keyspace.getColumnFamilyStores()) cfs.disableAutoCompaction();
        // count CFs first, since forceFlush could block for the flushWriter to get a queue slot empty
        totalCFs = 0;
        for (Keyspace keyspace : Keyspace.nonSystem()) totalCFs += keyspace.getColumnFamilyStores().size();
        remainingCFs = totalCFs;
        // flush
        List<Future<?>> flushes = new ArrayList<>();
        for (Keyspace keyspace : Keyspace.nonSystem()) {
            for (ColumnFamilyStore cfs : keyspace.getColumnFamilyStores()) flushes.add(cfs.forceFlush());
        }
        // thus make several short ones "instant" if we wait for them later.
        for (Future f : flushes) {
            try {
                FBUtilities.waitOnFuture(f);
            } catch (Throwable t) {
                JVMStabilityInspector.inspectThrowable(t);
                // don't let this stop us from shutting down the commitlog and other thread pools
                logger.warn("Caught exception while waiting for memtable flushes during shutdown hook", t);
            }
            remainingCFs--;
        }
        // Interrupt ongoing compactions and shutdown CM to prevent further compactions.
        CompactionManager.instance.forceShutdown();
        // Flush the system tables after all other tables are flushed, just in case flushing modifies any system state
        // like CASSANDRA-5151. Don't bother with progress tracking since system data is tiny.
        // Flush system tables after stopping compactions since they modify
        // system tables (for example compactions can obsolete sstables and the tidiers in SSTableReader update
        // system tables, see SSTableReader.GlobalTidy)
        flushes.clear();
        for (Keyspace keyspace : Keyspace.system()) {
            for (ColumnFamilyStore cfs : keyspace.getColumnFamilyStores()) flushes.add(cfs.forceFlush());
        }
        FBUtilities.waitOnFutures(flushes);
        HintsService.instance.shutdownBlocking();
        // Interrupt ongoing compactions and shutdown CM to prevent further compactions.
        CompactionManager.instance.forceShutdown();
        // whilst we've flushed all the CFs, which will have recycled all completed segments, we want to ensure
        // there are no segments to replay, so we force the recycling of any remaining (should be at most one)
        CommitLog.instance.forceRecycleAllSegments();
        CommitLog.instance.shutdownBlocking();
        // wait for miscellaneous tasks like sstable and commitlog segment deletion
        ScheduledExecutors.nonPeriodicTasks.shutdown();
        if (!ScheduledExecutors.nonPeriodicTasks.awaitTermination(1, TimeUnit.MINUTES))
            logger.warn("Failed to wait for non periodic tasks to shutdown");
        ColumnFamilyStore.shutdownPostFlushExecutor();
        setMode(Mode.DRAINED, !isFinalShutdown);
    } catch (Throwable t) {
        logger.error("Caught an exception while draining ", t);
    } finally {
        Throwable postShutdownHookThrowable = Throwables.perform(null, postShutdownHooks.stream().map(h -> h::run));
        if (postShutdownHookThrowable != null)
            logger.error("Post-shutdown hooks returned exception", postShutdownHookThrowable);
    }
}
Also used : TraceKeyspace(org.apache.cassandra.tracing.TraceKeyspace) ILoggingEvent(ch.qos.logback.classic.spi.ILoggingEvent) ScheduledExecutors(org.apache.cassandra.concurrent.ScheduledExecutors) StorageMetrics(org.apache.cassandra.metrics.StorageMetrics) org.apache.cassandra.repair(org.apache.cassandra.repair) Stage(org.apache.cassandra.concurrent.Stage) org.apache.cassandra.streaming(org.apache.cassandra.streaming) ProposeVerbHandler(org.apache.cassandra.service.paxos.ProposeVerbHandler) MatchResult(java.util.regex.MatchResult) LoggerFactory(org.slf4j.LoggerFactory) org.apache.cassandra.db(org.apache.cassandra.db) CommitLog(org.apache.cassandra.db.commitlog.CommitLog) org.apache.cassandra.gms(org.apache.cassandra.gms) com.google.common.util.concurrent(com.google.common.util.concurrent) JMXConfiguratorMBean(ch.qos.logback.classic.jmx.JMXConfiguratorMBean) AuthKeyspace(org.apache.cassandra.auth.AuthKeyspace) TabularData(javax.management.openmbean.TabularData) org.apache.cassandra.utils(org.apache.cassandra.utils) StringUtils(org.apache.commons.lang3.StringUtils) ByteBuffer(java.nio.ByteBuffer) TokenFactory(org.apache.cassandra.dht.Token.TokenFactory) InetAddress(java.net.InetAddress) MigrationManager(org.apache.cassandra.schema.MigrationManager) SecondaryIndexManager.isIndexColumnFamily(org.apache.cassandra.index.SecondaryIndexManager.isIndexColumnFamily) SecondaryIndexManager.getIndexName(org.apache.cassandra.index.SecondaryIndexManager.getIndexName) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Arrays.asList(java.util.Arrays.asList) HintsService(org.apache.cassandra.hints.HintsService) AuthSchemaChangeListener(org.apache.cassandra.auth.AuthSchemaChangeListener) com.google.common.collect(com.google.common.collect) DatabaseDescriptor(org.apache.cassandra.config.DatabaseDescriptor) java.util.concurrent(java.util.concurrent) TombstoneOption(org.apache.cassandra.schema.CompactionParams.TombstoneOption) JMXProgressSupport(org.apache.cassandra.utils.progress.jmx.JMXProgressSupport) SchemaVersionVerbHandler(org.apache.cassandra.schema.SchemaVersionVerbHandler) org.apache.cassandra.dht(org.apache.cassandra.dht) ViewMetadata(org.apache.cassandra.schema.ViewMetadata) PrepareVerbHandler(org.apache.cassandra.service.paxos.PrepareVerbHandler) NamedThreadFactory(org.apache.cassandra.concurrent.NamedThreadFactory) LifecycleTransaction(org.apache.cassandra.db.lifecycle.LifecycleTransaction) Predicate(com.google.common.base.Predicate) org.apache.cassandra.exceptions(org.apache.cassandra.exceptions) FileUtils(org.apache.cassandra.io.util.FileUtils) TableMetadataRef(org.apache.cassandra.schema.TableMetadataRef) TabularDataSupport(javax.management.openmbean.TabularDataSupport) BatchRemoveVerbHandler(org.apache.cassandra.batchlog.BatchRemoveVerbHandler) Entry(java.util.Map.Entry) TableMetadata(org.apache.cassandra.schema.TableMetadata) Pattern(java.util.regex.Pattern) KeyspaceMetadata(org.apache.cassandra.schema.KeyspaceMetadata) SchemaConstants(org.apache.cassandra.schema.SchemaConstants) ProgressEvent(org.apache.cassandra.utils.progress.ProgressEvent) HintVerbHandler(org.apache.cassandra.hints.HintVerbHandler) java.util(java.util) CompactionManager(org.apache.cassandra.db.compaction.CompactionManager) SSTableLoader(org.apache.cassandra.io.sstable.SSTableLoader) RepairOption(org.apache.cassandra.repair.messages.RepairOption) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Range(org.apache.cassandra.dht.Range) LoggerContext(ch.qos.logback.classic.LoggerContext) Schema(org.apache.cassandra.schema.Schema) CommitVerbHandler(org.apache.cassandra.service.paxos.CommitVerbHandler) Appender(ch.qos.logback.core.Appender) BatchlogManager(org.apache.cassandra.batchlog.BatchlogManager) StreamSupport(java.util.stream.StreamSupport) ProtocolVersion(org.apache.cassandra.transport.ProtocolVersion) ManagementFactory(java.lang.management.ManagementFactory) SchemaPushVerbHandler(org.apache.cassandra.schema.SchemaPushVerbHandler) ProgressEventType(org.apache.cassandra.utils.progress.ProgressEventType) Nullable(javax.annotation.Nullable) SchemaPullVerbHandler(org.apache.cassandra.schema.SchemaPullVerbHandler) Logger(org.slf4j.Logger) LegacyJMXProgressSupport(org.apache.cassandra.utils.progress.jmx.LegacyJMXProgressSupport) DelayingShutdownHook(ch.qos.logback.core.hook.DelayingShutdownHook) javax.management(javax.management) UnknownHostException(java.net.UnknownHostException) Collectors.toList(java.util.stream.Collectors.toList) BatchStoreVerbHandler(org.apache.cassandra.batchlog.BatchStoreVerbHandler) java.io(java.io) StageManager(org.apache.cassandra.concurrent.StageManager) org.apache.cassandra.net(org.apache.cassandra.net) VisibleForTesting(com.google.common.annotations.VisibleForTesting) org.apache.cassandra.locator(org.apache.cassandra.locator) TraceKeyspace(org.apache.cassandra.tracing.TraceKeyspace) AuthKeyspace(org.apache.cassandra.auth.AuthKeyspace)

Example 57 with EMPTY

use of org.apache.commons.lang3.StringUtils.EMPTY in project pinot by linkedin.

the class HybridClusterScanComparisonIntegrationTest method runTestLoop.

protected void runTestLoop(Callable<Object> testMethod, boolean useMultipleThreads) throws Exception {
    // Clean up the Kafka topic
    // TODO jfim: Re-enable this once PINOT-2598 is fixed
    // purgeKafkaTopicAndResetRealtimeTable();
    List<Pair<File, File>> enabledRealtimeSegments = new ArrayList<>();
    // Sort the realtime segments based on their segment name so they get added from earliest to latest
    TreeMap<File, File> sortedRealtimeSegments = new TreeMap<File, File>(new Comparator<File>() {

        @Override
        public int compare(File o1, File o2) {
            return _realtimeAvroToSegmentMap.get(o1).getName().compareTo(_realtimeAvroToSegmentMap.get(o2).getName());
        }
    });
    sortedRealtimeSegments.putAll(_realtimeAvroToSegmentMap);
    for (File avroFile : sortedRealtimeSegments.keySet()) {
        enabledRealtimeSegments.add(Pair.of(avroFile, sortedRealtimeSegments.get(avroFile)));
        if (useMultipleThreads) {
            _queryExecutor = new ThreadPoolExecutor(4, 4, 5, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(50), new ThreadPoolExecutor.CallerRunsPolicy());
        }
        // Push avro for the new segment
        LOGGER.info("Pushing Avro file {} into Kafka", avroFile);
        pushAvroIntoKafka(Collections.singletonList(avroFile), KafkaStarterUtils.DEFAULT_KAFKA_BROKER, KAFKA_TOPIC);
        // Configure the scan based comparator to use the distinct union of the offline and realtime segments
        configureScanBasedComparator(enabledRealtimeSegments);
        QueryResponse queryResponse = _scanBasedQueryProcessor.processQuery("select count(*) from mytable");
        int expectedRecordCount = queryResponse.getNumDocsScanned();
        waitForRecordCountToStabilizeToExpectedCount(expectedRecordCount, System.currentTimeMillis() + getStabilizationTimeMs());
        // Run the actual tests
        LOGGER.info("Running queries");
        testMethod.call();
        if (useMultipleThreads) {
            if (_nQueriesRead == -1) {
                _queryExecutor.shutdown();
                _queryExecutor.awaitTermination(5, TimeUnit.MINUTES);
            } else {
                int totalQueries = _failedQueries.get() + _successfulQueries.get();
                while (totalQueries < _nQueriesRead) {
                    LOGGER.info("Completed " + totalQueries + " out of " + _nQueriesRead + " - waiting");
                    Uninterruptibles.sleepUninterruptibly(20, TimeUnit.SECONDS);
                    totalQueries = _failedQueries.get() + _successfulQueries.get();
                }
                if (totalQueries > _nQueriesRead) {
                    throw new RuntimeException("Executed " + totalQueries + " more than " + _nQueriesRead);
                }
                _queryExecutor.shutdown();
            }
        }
        int totalQueries = _failedQueries.get() + _successfulQueries.get();
        doDisplayStatus(totalQueries);
        // Release resources
        _scanBasedQueryProcessor.close();
        _compareStatusFileWriter.write("Status after push of " + avroFile + ":" + System.currentTimeMillis() + ":Executed " + _nQueriesRead + " queries, " + _failedQueries + " failures," + _emptyResults.get() + " empty results\n");
    }
}
Also used : ArrayList(java.util.ArrayList) TreeMap(java.util.TreeMap) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) QueryResponse(com.linkedin.pinot.tools.scan.query.QueryResponse) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) File(java.io.File) Pair(org.apache.commons.lang3.tuple.Pair)

Example 58 with EMPTY

use of org.apache.commons.lang3.StringUtils.EMPTY in project MinecraftForge by MinecraftForge.

the class MultiModel method bake.

@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    IBakedModel bakedBase = null;
    if (base != null)
        bakedBase = base.bake(state, format, bakedTextureGetter);
    ImmutableMap.Builder<String, IBakedModel> mapBuilder = ImmutableMap.builder();
    for (Entry<String, Pair<IModel, IModelState>> entry : parts.entrySet()) {
        Pair<IModel, IModelState> pair = entry.getValue();
        mapBuilder.put(entry.getKey(), pair.getLeft().bake(new ModelStateComposition(state, pair.getRight()), format, bakedTextureGetter));
    }
    if (bakedBase == null && parts.isEmpty()) {
        FMLLog.log(Level.ERROR, "MultiModel %s is empty (no base model or parts were provided/resolved)", location);
        IModel missing = ModelLoaderRegistry.getMissingModel();
        return missing.bake(missing.getDefaultState(), format, bakedTextureGetter);
    }
    return new Baked(location, true, bakedBase, mapBuilder.build());
}
Also used : IModelState(net.minecraftforge.common.model.IModelState) IBakedModel(net.minecraft.client.renderer.block.model.IBakedModel) ImmutableMap(com.google.common.collect.ImmutableMap) Pair(org.apache.commons.lang3.tuple.Pair) ItemOverride(net.minecraft.client.renderer.block.model.ItemOverride)

Example 59 with EMPTY

use of org.apache.commons.lang3.StringUtils.EMPTY in project distributedlog by twitter.

the class ZKSessionLock method processLockWaiters.

/**
     * Check Lock Owner Phase 2 : check all lock waiters to get current owner and wait for ownership if necessary.
     *
     * @param lockWatcher
     *          lock watcher.
     * @param wait
     *          whether to wait for ownership.
     * @param getChildrenRc
     *          result of getting all lock waiters
     * @param children
     *          current lock waiters.
     * @param promise
     *          promise to satisfy with current lock owner.
     */
private void processLockWaiters(final LockWatcher lockWatcher, final boolean wait, final int getChildrenRc, final List<String> children, final Promise<String> promise) {
    executeLockAction(lockWatcher.epoch, new LockAction() {

        @Override
        public void execute() {
            if (!lockState.inState(State.PREPARED)) {
                // e.g. lock closed or session expired after prepared
                promise.setException(new LockStateChangedException(lockPath, lockId, State.PREPARED, lockState.getState()));
                return;
            }
            if (KeeperException.Code.OK.intValue() != getChildrenRc) {
                promise.setException(KeeperException.create(KeeperException.Code.get(getChildrenRc)));
                return;
            }
            if (children.isEmpty()) {
                LOG.error("Error, member list is empty for lock {}.", lockPath);
                promise.setException(new UnexpectedException("Empty member list for lock " + lockPath));
                return;
            }
            // sort the children
            Collections.sort(children, MEMBER_COMPARATOR);
            final String cid = currentId;
            final int memberIndex = children.indexOf(cid);
            if (LOG.isDebugEnabled()) {
                LOG.debug("{} is the number {} member in the list.", cid, memberIndex);
            }
            // If we hold the lock
            if (memberIndex == 0) {
                LOG.info("{} acquired the lock {}.", cid, lockPath);
                claimOwnership(lockWatcher.epoch);
                promise.setValue(cid);
            } else if (memberIndex > 0) {
                // we are in the member list but we didn't hold the lock
                // get ownership of current owner
                asyncParseClientID(zk, lockPath, children.get(0)).addEventListener(new FutureEventListener<Pair<String, Long>>() {

                    @Override
                    public void onSuccess(Pair<String, Long> currentOwner) {
                        watchLockOwner(lockWatcher, wait, cid, children.get(memberIndex - 1), children.get(0), currentOwner, promise);
                    }

                    @Override
                    public void onFailure(final Throwable cause) {
                        // ensure promise is satisfied in lock thread
                        executeLockAction(lockWatcher.epoch, new LockAction() {

                            @Override
                            public void execute() {
                                promise.setException(cause);
                            }

                            @Override
                            public String getActionName() {
                                return "handleFailureOnParseClientID(lockPath=" + lockPath + ")";
                            }
                        }, promise);
                    }
                });
            } else {
                LOG.error("Member {} doesn't exist in the members list {} for lock {}.", new Object[] { cid, children, lockPath });
                promise.setException(new UnexpectedException("Member " + cid + " doesn't exist in member list " + children + " for lock " + lockPath));
            }
        }

        @Override
        public String getActionName() {
            return "processLockWaiters(rc=" + getChildrenRc + ", waiters=" + children + ")";
        }
    }, promise);
}
Also used : UnexpectedException(com.twitter.distributedlog.exceptions.UnexpectedException) Pair(org.apache.commons.lang3.tuple.Pair)

Example 60 with EMPTY

use of org.apache.commons.lang3.StringUtils.EMPTY in project neo4j by neo4j.

the class StoreMigrator method migrateWithBatchImporter.

private void migrateWithBatchImporter(File storeDir, File migrationDir, long lastTxId, long lastTxChecksum, long lastTxLogVersion, long lastTxLogByteOffset, MigrationProgressMonitor.Section progressMonitor, RecordFormats oldFormat, RecordFormats newFormat) throws IOException {
    prepareBatchImportMigration(storeDir, migrationDir, oldFormat, newFormat);
    boolean requiresDynamicStoreMigration = !newFormat.dynamic().equals(oldFormat.dynamic());
    boolean requiresPropertyMigration = !newFormat.property().equals(oldFormat.property()) || requiresDynamicStoreMigration;
    File badFile = new File(storeDir, Configuration.BAD_FILE_NAME);
    try (NeoStores legacyStore = instantiateLegacyStore(oldFormat, storeDir);
        RecordCursors nodeInputCursors = new RecordCursors(legacyStore);
        RecordCursors relationshipInputCursors = new RecordCursors(legacyStore);
        OutputStream badOutput = new BufferedOutputStream(new FileOutputStream(badFile, false))) {
        Configuration importConfig = new Configuration.Overridden(config);
        AdditionalInitialIds additionalInitialIds = readAdditionalIds(lastTxId, lastTxChecksum, lastTxLogVersion, lastTxLogByteOffset);
        // We have to make sure to keep the token ids if we're migrating properties/labels
        BatchImporter importer = new ParallelBatchImporter(migrationDir.getAbsoluteFile(), fileSystem, pageCache, importConfig, logService, withDynamicProcessorAssignment(migrationBatchImporterMonitor(legacyStore, progressMonitor, importConfig), importConfig), additionalInitialIds, config, newFormat);
        InputIterable<InputNode> nodes = legacyNodesAsInput(legacyStore, requiresPropertyMigration, nodeInputCursors);
        InputIterable<InputRelationship> relationships = legacyRelationshipsAsInput(legacyStore, requiresPropertyMigration, relationshipInputCursors);
        importer.doImport(Inputs.input(nodes, relationships, IdMappers.actual(), IdGenerators.fromInput(), Collectors.badCollector(badOutput, 0)));
        // During migration the batch importer doesn't necessarily writes all entities, depending on
        // which stores needs migration. Node, relationship, relationship group stores are always written
        // anyways and cannot be avoided with the importer, but delete the store files that weren't written
        // (left empty) so that we don't overwrite those in the real store directory later.
        Collection<StoreFile> storesToDeleteFromMigratedDirectory = new ArrayList<>();
        storesToDeleteFromMigratedDirectory.add(StoreFile.NEO_STORE);
        if (!requiresPropertyMigration) {
            // We didn't migrate properties, so the property stores in the migrated store are just empty/bogus
            storesToDeleteFromMigratedDirectory.addAll(asList(StoreFile.PROPERTY_STORE, StoreFile.PROPERTY_STRING_STORE, StoreFile.PROPERTY_ARRAY_STORE));
        }
        if (!requiresDynamicStoreMigration) {
            // We didn't migrate labels (dynamic node labels) or any other dynamic store
            storesToDeleteFromMigratedDirectory.addAll(asList(StoreFile.NODE_LABEL_STORE, StoreFile.LABEL_TOKEN_STORE, StoreFile.LABEL_TOKEN_NAMES_STORE, StoreFile.RELATIONSHIP_TYPE_TOKEN_STORE, StoreFile.RELATIONSHIP_TYPE_TOKEN_NAMES_STORE, StoreFile.PROPERTY_KEY_TOKEN_STORE, StoreFile.PROPERTY_KEY_TOKEN_NAMES_STORE, StoreFile.SCHEMA_STORE));
        }
        StoreFile.fileOperation(DELETE, fileSystem, migrationDir, null, storesToDeleteFromMigratedDirectory, true, null, StoreFileType.values());
        // When migrating on a block device there might be some files only accessible via the page cache.
        try {
            Predicate<FileHandle> fileHandlePredicate = fileHandle -> storesToDeleteFromMigratedDirectory.stream().anyMatch(storeFile -> storeFile.fileName(StoreFileType.STORE).equals(fileHandle.getFile().getName()));
            pageCache.streamFilesRecursive(migrationDir).filter(fileHandlePredicate).forEach(FileHandle.HANDLE_DELETE);
        } catch (NoSuchFileException e) {
        // This means that we had no files only present in the page cache, this is fine.
        }
    }
}
Also used : PropertyDeduplicator(org.neo4j.kernel.impl.storemigration.legacystore.v21.propertydeduplication.PropertyDeduplicator) Arrays(java.util.Arrays) PageCursor(org.neo4j.io.pagecache.PageCursor) NullLogProvider(org.neo4j.logging.NullLogProvider) StringUtils(org.apache.commons.lang3.StringUtils) UNKNOWN_TX_COMMIT_TIMESTAMP(org.neo4j.kernel.impl.transaction.log.TransactionIdStore.UNKNOWN_TX_COMMIT_TIMESTAMP) COPY(org.neo4j.kernel.impl.storemigration.FileOperation.COPY) SchemaIndexProvider(org.neo4j.kernel.api.index.SchemaIndexProvider) CountsComputer(org.neo4j.kernel.impl.store.CountsComputer) Arrays.asList(java.util.Arrays.asList) BASE_TX_COMMIT_TIMESTAMP(org.neo4j.kernel.impl.transaction.log.TransactionIdStore.BASE_TX_COMMIT_TIMESTAMP) Position(org.neo4j.kernel.impl.store.MetaDataStore.Position) Lifespan(org.neo4j.kernel.lifecycle.Lifespan) RecordCursors(org.neo4j.kernel.impl.store.RecordCursors) SilentMigrationProgressMonitor(org.neo4j.kernel.impl.storemigration.monitoring.SilentMigrationProgressMonitor) StandardCharsets(java.nio.charset.StandardCharsets) MetaDataRecordFormat(org.neo4j.kernel.impl.store.format.standard.MetaDataRecordFormat) DELETE(org.neo4j.kernel.impl.storemigration.FileOperation.DELETE) Stream(java.util.stream.Stream) ExecutionSupervisors.withDynamicProcessorAssignment(org.neo4j.unsafe.impl.batchimport.staging.ExecutionSupervisors.withDynamicProcessorAssignment) StoreType(org.neo4j.kernel.impl.store.StoreType) BatchImporter(org.neo4j.unsafe.impl.batchimport.BatchImporter) NodeStore(org.neo4j.kernel.impl.store.NodeStore) StoreFactory(org.neo4j.kernel.impl.store.StoreFactory) Collectors(org.neo4j.unsafe.impl.batchimport.input.Collectors) PagedFile(org.neo4j.io.pagecache.PagedFile) VERSION_TRAILERS(org.neo4j.kernel.impl.store.format.Capability.VERSION_TRAILERS) FormatFamily(org.neo4j.kernel.impl.store.format.FormatFamily) Supplier(java.util.function.Supplier) UNKNOWN_TX_CHECKSUM(org.neo4j.kernel.impl.transaction.log.TransactionIdStore.UNKNOWN_TX_CHECKSUM) BufferedOutputStream(java.io.BufferedOutputStream) StandardCopyOption(java.nio.file.StandardCopyOption) ArrayList(java.util.ArrayList) TransactionId(org.neo4j.kernel.impl.store.TransactionId) StandardV2_2(org.neo4j.kernel.impl.store.format.standard.StandardV2_2) LogPosition(org.neo4j.kernel.impl.transaction.log.LogPosition) StandardV2_1(org.neo4j.kernel.impl.store.format.standard.StandardV2_1) RelationshipStore(org.neo4j.kernel.impl.store.RelationshipStore) StandardV2_0(org.neo4j.kernel.impl.store.format.standard.StandardV2_0) IdMappers(org.neo4j.unsafe.impl.batchimport.cache.idmapping.IdMappers) BiConsumer(java.util.function.BiConsumer) IdGenerators(org.neo4j.unsafe.impl.batchimport.cache.idmapping.IdGenerators) StreamSupport(java.util.stream.StreamSupport) DirectRecordStoreMigrator(org.neo4j.kernel.impl.storemigration.DirectRecordStoreMigrator) CoarseBoundedProgressExecutionMonitor(org.neo4j.unsafe.impl.batchimport.staging.CoarseBoundedProgressExecutionMonitor) StoreFile(org.neo4j.kernel.impl.storemigration.StoreFile) FileOutputStream(java.io.FileOutputStream) RecordFormatSelector.selectForVersion(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForVersion) IOException(java.io.IOException) NodeRecordFormat(org.neo4j.kernel.impl.store.format.standard.NodeRecordFormat) LegacyLogs(org.neo4j.kernel.impl.storemigration.legacylogs.LegacyLogs) File(java.io.File) Iterables(org.neo4j.helpers.collection.Iterables) ParallelBatchImporter(org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter) NodeRecord(org.neo4j.kernel.impl.store.record.NodeRecord) Configuration(org.neo4j.unsafe.impl.batchimport.Configuration) BufferedReader(java.io.BufferedReader) MigrationProgressMonitor(org.neo4j.kernel.impl.storemigration.monitoring.MigrationProgressMonitor) RelationshipRecord(org.neo4j.kernel.impl.store.record.RelationshipRecord) StoreUpgrader(org.neo4j.kernel.impl.storemigration.StoreUpgrader) NoSuchFileException(java.nio.file.NoSuchFileException) BASE_TX_LOG_VERSION(org.neo4j.kernel.impl.transaction.log.TransactionIdStore.BASE_TX_LOG_VERSION) BASE_TX_CHECKSUM(org.neo4j.kernel.impl.transaction.log.TransactionIdStore.BASE_TX_CHECKSUM) PageCache(org.neo4j.io.pagecache.PageCache) InputNode(org.neo4j.unsafe.impl.batchimport.input.InputNode) Predicate(java.util.function.Predicate) Collection(java.util.Collection) StandardOpenOption(java.nio.file.StandardOpenOption) MOVE(org.neo4j.kernel.impl.storemigration.FileOperation.MOVE) LogService(org.neo4j.kernel.impl.logging.LogService) List(java.util.List) StoreFileType(org.neo4j.kernel.impl.storemigration.StoreFileType) MetaDataStore(org.neo4j.kernel.impl.store.MetaDataStore) Writer(java.io.Writer) Optional(java.util.Optional) Inputs(org.neo4j.unsafe.impl.batchimport.input.Inputs) InputIterable(org.neo4j.unsafe.impl.batchimport.InputIterable) InputRelationship(org.neo4j.unsafe.impl.batchimport.input.InputRelationship) TransactionIdStore(org.neo4j.kernel.impl.transaction.log.TransactionIdStore) InputEntity(org.neo4j.unsafe.impl.batchimport.input.InputEntity) DEFAULT_NAME(org.neo4j.kernel.impl.store.MetaDataStore.DEFAULT_NAME) RecordFormats(org.neo4j.kernel.impl.store.format.RecordFormats) CustomIOConfigValidator(org.neo4j.kernel.impl.util.CustomIOConfigValidator) AdditionalInitialIds(org.neo4j.unsafe.impl.batchimport.AdditionalInitialIds) NeoStores(org.neo4j.kernel.impl.store.NeoStores) StorePropertyCursor(org.neo4j.kernel.impl.api.store.StorePropertyCursor) CountsTracker(org.neo4j.kernel.impl.store.counts.CountsTracker) ExistingTargetStrategy(org.neo4j.kernel.impl.storemigration.ExistingTargetStrategy) PhysicalLogFiles(org.neo4j.kernel.impl.transaction.log.PhysicalLogFiles) RelationshipRecordFormat(org.neo4j.kernel.impl.store.format.standard.RelationshipRecordFormat) OutputStream(java.io.OutputStream) Config(org.neo4j.kernel.configuration.Config) ReadOnlyIdGeneratorFactory(org.neo4j.kernel.impl.store.id.ReadOnlyIdGeneratorFactory) LockService(org.neo4j.kernel.impl.locking.LockService) FileHandle(org.neo4j.io.pagecache.FileHandle) CapabilityType(org.neo4j.kernel.impl.store.format.CapabilityType) PrimitiveRecord(org.neo4j.kernel.impl.store.record.PrimitiveRecord) FIELD_NOT_PRESENT(org.neo4j.kernel.impl.store.format.standard.MetaDataRecordFormat.FIELD_NOT_PRESENT) StoreMigratorCheckPointer(org.neo4j.kernel.impl.storemigration.StoreMigratorCheckPointer) ExecutionMonitor(org.neo4j.unsafe.impl.batchimport.staging.ExecutionMonitor) BASE_TX_LOG_BYTE_OFFSET(org.neo4j.kernel.impl.transaction.log.TransactionIdStore.BASE_TX_LOG_BYTE_OFFSET) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) InputNode(org.neo4j.unsafe.impl.batchimport.input.InputNode) Configuration(org.neo4j.unsafe.impl.batchimport.Configuration) FileHandle(org.neo4j.io.pagecache.FileHandle) RecordCursors(org.neo4j.kernel.impl.store.RecordCursors) BufferedOutputStream(java.io.BufferedOutputStream) FileOutputStream(java.io.FileOutputStream) OutputStream(java.io.OutputStream) ArrayList(java.util.ArrayList) NoSuchFileException(java.nio.file.NoSuchFileException) InputRelationship(org.neo4j.unsafe.impl.batchimport.input.InputRelationship) ParallelBatchImporter(org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter) BatchImporter(org.neo4j.unsafe.impl.batchimport.BatchImporter) ParallelBatchImporter(org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter) NeoStores(org.neo4j.kernel.impl.store.NeoStores) FileOutputStream(java.io.FileOutputStream) StoreFile(org.neo4j.kernel.impl.storemigration.StoreFile) PagedFile(org.neo4j.io.pagecache.PagedFile) StoreFile(org.neo4j.kernel.impl.storemigration.StoreFile) File(java.io.File) BufferedOutputStream(java.io.BufferedOutputStream) AdditionalInitialIds(org.neo4j.unsafe.impl.batchimport.AdditionalInitialIds)

Aggregations

List (java.util.List)44 Map (java.util.Map)42 ArrayList (java.util.ArrayList)41 StringUtils (org.apache.commons.lang3.StringUtils)38 Collectors (java.util.stream.Collectors)37 HashMap (java.util.HashMap)33 IOException (java.io.IOException)27 Set (java.util.Set)25 HashSet (java.util.HashSet)22 LoggerFactory (org.slf4j.LoggerFactory)22 Pair (org.apache.commons.lang3.tuple.Pair)20 Logger (org.slf4j.Logger)20 Optional (java.util.Optional)19 Collections (java.util.Collections)17 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)17 java.util (java.util)15 Arrays.asList (java.util.Arrays.asList)14 Collection (java.util.Collection)14 Stream (java.util.stream.Stream)14 Arrays (java.util.Arrays)12