Skip to content

Commit

Permalink
Revert "Resumable copy"
Browse files Browse the repository at this point in the history
This reverts commit ea851ac.
  • Loading branch information
phughk committed Mar 6, 2018
1 parent c8688c0 commit 305167a
Show file tree
Hide file tree
Showing 99 changed files with 519 additions and 4,738 deletions.
Expand Up @@ -19,9 +19,6 @@
*/ */
package org.neo4j.internal.kernel.api.schema; package org.neo4j.internal.kernel.api.schema;


/**
* Please note that this interface has dependencies in other modules. See {@see org.neo4j.causalclustering.catchup.storecopy.IndexDescriptorSerializer}
*/
public interface LabelSchemaDescriptor extends SchemaDescriptor, LabelSchemaSupplier public interface LabelSchemaDescriptor extends SchemaDescriptor, LabelSchemaSupplier
{ {
int getLabelId(); int getLabelId();
Expand Down
Expand Up @@ -127,7 +127,6 @@
import org.neo4j.kernel.impl.transaction.log.rotation.LogRotation; import org.neo4j.kernel.impl.transaction.log.rotation.LogRotation;
import org.neo4j.kernel.impl.transaction.log.rotation.LogRotationImpl; import org.neo4j.kernel.impl.transaction.log.rotation.LogRotationImpl;
import org.neo4j.kernel.impl.transaction.state.DefaultSchemaIndexProviderMap; import org.neo4j.kernel.impl.transaction.state.DefaultSchemaIndexProviderMap;
import org.neo4j.kernel.impl.transaction.state.NeoStoreFileIndexListing;
import org.neo4j.kernel.impl.transaction.state.NeoStoreFileListing; import org.neo4j.kernel.impl.transaction.state.NeoStoreFileListing;
import org.neo4j.kernel.impl.util.Dependencies; import org.neo4j.kernel.impl.util.Dependencies;
import org.neo4j.kernel.impl.util.SynchronizedArrayIdOrderingQueue; import org.neo4j.kernel.impl.util.SynchronizedArrayIdOrderingQueue;
Expand Down Expand Up @@ -829,19 +828,7 @@ public InwardKernel getKernel()


public ResourceIterator<StoreFileMetadata> listStoreFiles( boolean includeLogs ) throws IOException public ResourceIterator<StoreFileMetadata> listStoreFiles( boolean includeLogs ) throws IOException
{ {
if ( includeLogs ) return kernelModule.fileListing().listStoreFiles( includeLogs );
{
return getNeoStoreFileListing().builder().build();
}
else
{
return getNeoStoreFileListing().builder().excludeLogFiles().build();
}
}

public NeoStoreFileListing getNeoStoreFileListing()
{
return kernelModule.fileListing();
} }


public void registerDiagnosticsWith( DiagnosticsManager manager ) public void registerDiagnosticsWith( DiagnosticsManager manager )
Expand Down
Expand Up @@ -36,8 +36,6 @@
/** /**
* Internal representation of a graph index, including the schema unit it targets (eg. label-property combination) * Internal representation of a graph index, including the schema unit it targets (eg. label-property combination)
* and the type of index. UNIQUE indexes are used to back uniqueness constraints. * and the type of index. UNIQUE indexes are used to back uniqueness constraints.
*
* Please note that this class has dependencies in other modules. See {@see org.neo4j.causalclustering.catchup.storecopy.IndexDescriptorSerializer}
*/ */
public class IndexDescriptor implements LabelSchemaSupplier public class IndexDescriptor implements LabelSchemaSupplier
{ {
Expand Down Expand Up @@ -83,7 +81,7 @@ public interface Supplier
private final LabelSchemaDescriptor schema; private final LabelSchemaDescriptor schema;
private final IndexDescriptor.Type type; private final IndexDescriptor.Type type;


public IndexDescriptor( LabelSchemaDescriptor schema, Type type ) IndexDescriptor( LabelSchemaDescriptor schema, Type type )
{ {
this.schema = schema; this.schema = schema;
this.type = type; this.type = type;
Expand Down
Expand Up @@ -24,14 +24,11 @@
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.EnumMap; import java.util.EnumMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.function.Predicate;


import org.neo4j.collection.primitive.Primitive; import org.neo4j.collection.primitive.Primitive;
import org.neo4j.collection.primitive.PrimitiveLongIterator; import org.neo4j.collection.primitive.PrimitiveLongIterator;
Expand Down Expand Up @@ -638,35 +635,16 @@ private void closeAllIndexes()
} ); } );
} }


public Set<IndexDescriptor> getIndexDescriptors() public ResourceIterator<File> snapshotStoreFiles() throws IOException
{
Set<IndexDescriptor> indexDescriptors = new HashSet<>();
for ( IndexProxy indexProxy : indexMapRef.getAllIndexProxies() )
{
indexDescriptors.add( indexProxy.getDescriptor() );
}
return indexDescriptors;
}

public ResourceIterator<File> snapshotIndexFiles( Predicate<IndexDescriptor> filter ) throws IOException
{ {
Collection<ResourceIterator<File>> snapshots = new ArrayList<>(); Collection<ResourceIterator<File>> snapshots = new ArrayList<>();
for ( IndexProxy indexProxy : indexMapRef.getAllIndexProxies() ) for ( IndexProxy indexProxy : indexMapRef.getAllIndexProxies() )
{ {
IndexDescriptor providerDescriptor = indexProxy.getDescriptor(); snapshots.add( indexProxy.snapshotFiles() );
if ( filter.test( providerDescriptor ) )
{
snapshots.add( indexProxy.snapshotFiles() );
}
} }
return Iterators.concatResourceIterators( snapshots.iterator() ); return Iterators.concatResourceIterators( snapshots.iterator() );
} }


public ResourceIterator<File> snapshotIndexFiles() throws IOException
{
return snapshotIndexFiles( d -> true );
}

private IndexPopulationJob newIndexPopulationJob() private IndexPopulationJob newIndexPopulationJob()
{ {
MultipleIndexPopulator multiPopulator = multiPopulatorFactory.create( storeView, logProvider ); MultipleIndexPopulator multiPopulator = multiPopulatorFactory.create( storeView, logProvider );
Expand Down

This file was deleted.

0 comments on commit 305167a

Please sign in to comment.