Search in sources :

Example 1 with LineageStoreReader

use of co.cask.cdap.data2.metadata.lineage.LineageStoreReader in project cdap by caskdata.

the class DataSetsModules method getInMemoryModules.

@Override
public Module getInMemoryModules() {
    return new PrivateModule() {

        @Override
        protected void configure() {
            install(new FactoryModuleBuilder().implement(DatasetDefinitionRegistry.class, DefaultDatasetDefinitionRegistry.class).build(DatasetDefinitionRegistryFactory.class));
            bind(MetadataStore.class).to(NoOpMetadataStore.class);
            expose(MetadataStore.class);
            bind(DatasetFramework.class).annotatedWith(Names.named(BASE_DATASET_FRAMEWORK)).to(InMemoryDatasetFramework.class).in(Scopes.SINGLETON);
            bind(LineageStoreReader.class).to(LineageStore.class);
            bind(LineageStoreWriter.class).to(LineageStore.class);
            // Need to expose LineageStoreReader as it's being used by the LineageHandler (through LineageAdmin)
            expose(LineageStoreReader.class);
            bind(LineageWriter.class).to(BasicLineageWriter.class);
            expose(LineageWriter.class);
            bind(UsageRegistry.class).to(DefaultUsageRegistry.class).in(Scopes.SINGLETON);
            expose(UsageRegistry.class);
            bind(RuntimeUsageRegistry.class).to(DefaultUsageRegistry.class).in(Scopes.SINGLETON);
            expose(RuntimeUsageRegistry.class);
            bind(DefaultUsageRegistry.class).in(Scopes.SINGLETON);
            bind(DatasetFramework.class).to(LineageWriterDatasetFramework.class);
            expose(DatasetFramework.class);
            bind(DefaultOwnerStore.class).in(Scopes.SINGLETON);
            bind(OwnerStore.class).to(DefaultOwnerStore.class);
            expose(OwnerStore.class);
        }
    };
}
Also used : DefaultMetadataStore(co.cask.cdap.data2.metadata.store.DefaultMetadataStore) NoOpMetadataStore(co.cask.cdap.data2.metadata.store.NoOpMetadataStore) MetadataStore(co.cask.cdap.data2.metadata.store.MetadataStore) DatasetFramework(co.cask.cdap.data2.dataset2.DatasetFramework) RemoteDatasetFramework(co.cask.cdap.data2.datafabric.dataset.RemoteDatasetFramework) LineageWriterDatasetFramework(co.cask.cdap.data2.metadata.writer.LineageWriterDatasetFramework) InMemoryDatasetFramework(co.cask.cdap.data2.dataset2.InMemoryDatasetFramework) DatasetDefinitionRegistryFactory(co.cask.cdap.data2.dataset2.DatasetDefinitionRegistryFactory) LineageWriter(co.cask.cdap.data2.metadata.writer.LineageWriter) BasicLineageWriter(co.cask.cdap.data2.metadata.writer.BasicLineageWriter) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) LineageStoreReader(co.cask.cdap.data2.metadata.lineage.LineageStoreReader) DefaultOwnerStore(co.cask.cdap.store.DefaultOwnerStore) LineageStoreWriter(co.cask.cdap.data2.metadata.lineage.LineageStoreWriter) DefaultUsageRegistry(co.cask.cdap.data2.registry.DefaultUsageRegistry) PrivateModule(com.google.inject.PrivateModule) OwnerStore(co.cask.cdap.security.impersonation.OwnerStore) DefaultOwnerStore(co.cask.cdap.store.DefaultOwnerStore) InMemoryDatasetFramework(co.cask.cdap.data2.dataset2.InMemoryDatasetFramework)

Example 2 with LineageStoreReader

use of co.cask.cdap.data2.metadata.lineage.LineageStoreReader in project cdap by caskdata.

the class DataSetsModules method getModule.

private Module getModule() {
    return new PrivateModule() {

        @Override
        protected void configure() {
            install(new FactoryModuleBuilder().implement(DatasetDefinitionRegistry.class, DefaultDatasetDefinitionRegistry.class).build(DatasetDefinitionRegistryFactory.class));
            bind(MetadataStore.class).to(DefaultMetadataStore.class);
            expose(MetadataStore.class);
            bind(DatasetFramework.class).annotatedWith(Names.named(BASE_DATASET_FRAMEWORK)).to(RemoteDatasetFramework.class);
            bind(LineageStoreReader.class).to(LineageStore.class);
            bind(LineageStoreWriter.class).to(LineageStore.class);
            // Need to expose LineageStoreReader as it's being used by the LineageHandler (through LineageAdmin)
            expose(LineageStoreReader.class);
            bind(LineageWriter.class).to(BasicLineageWriter.class);
            expose(LineageWriter.class);
            bind(UsageRegistry.class).to(DefaultUsageRegistry.class).in(Scopes.SINGLETON);
            expose(UsageRegistry.class);
            bind(RuntimeUsageRegistry.class).to(DefaultUsageRegistry.class).in(Scopes.SINGLETON);
            expose(RuntimeUsageRegistry.class);
            bind(DefaultUsageRegistry.class).in(Scopes.SINGLETON);
            bind(DatasetFramework.class).to(LineageWriterDatasetFramework.class);
            expose(DatasetFramework.class);
            bind(DefaultOwnerStore.class).in(Scopes.SINGLETON);
            bind(OwnerStore.class).to(DefaultOwnerStore.class);
            expose(OwnerStore.class);
        }
    };
}
Also used : DefaultMetadataStore(co.cask.cdap.data2.metadata.store.DefaultMetadataStore) NoOpMetadataStore(co.cask.cdap.data2.metadata.store.NoOpMetadataStore) MetadataStore(co.cask.cdap.data2.metadata.store.MetadataStore) DatasetFramework(co.cask.cdap.data2.dataset2.DatasetFramework) RemoteDatasetFramework(co.cask.cdap.data2.datafabric.dataset.RemoteDatasetFramework) LineageWriterDatasetFramework(co.cask.cdap.data2.metadata.writer.LineageWriterDatasetFramework) InMemoryDatasetFramework(co.cask.cdap.data2.dataset2.InMemoryDatasetFramework) DatasetDefinitionRegistryFactory(co.cask.cdap.data2.dataset2.DatasetDefinitionRegistryFactory) LineageWriter(co.cask.cdap.data2.metadata.writer.LineageWriter) BasicLineageWriter(co.cask.cdap.data2.metadata.writer.BasicLineageWriter) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) LineageStoreReader(co.cask.cdap.data2.metadata.lineage.LineageStoreReader) DefaultOwnerStore(co.cask.cdap.store.DefaultOwnerStore) LineageStoreWriter(co.cask.cdap.data2.metadata.lineage.LineageStoreWriter) DefaultUsageRegistry(co.cask.cdap.data2.registry.DefaultUsageRegistry) PrivateModule(com.google.inject.PrivateModule) OwnerStore(co.cask.cdap.security.impersonation.OwnerStore) DefaultOwnerStore(co.cask.cdap.store.DefaultOwnerStore)

Example 3 with LineageStoreReader

use of co.cask.cdap.data2.metadata.lineage.LineageStoreReader in project cdap by caskdata.

the class PreviewDataModules method getDataSetsModule.

public Module getDataSetsModule(final DatasetFramework remoteDatasetFramework) {
    return new PrivateModule() {

        @Override
        protected void configure() {
            install(new FactoryModuleBuilder().implement(DatasetDefinitionRegistry.class, DefaultDatasetDefinitionRegistry.class).build(DatasetDefinitionRegistryFactory.class));
            bind(MetadataStore.class).to(DefaultMetadataStore.class);
            expose(MetadataStore.class);
            bind(DatasetFramework.class).annotatedWith(Names.named("localDatasetFramework")).to(RemoteDatasetFramework.class);
            bind(DatasetFramework.class).annotatedWith(Names.named("actualDatasetFramework")).toInstance(remoteDatasetFramework);
            bind(DatasetFramework.class).annotatedWith(Names.named(BASE_DATASET_FRAMEWORK)).toProvider(PreviewDatasetFrameworkProvider.class).in(Scopes.SINGLETON);
            bind(DatasetFramework.class).toProvider(PreviewDatasetFrameworkProvider.class).in(Scopes.SINGLETON);
            expose(DatasetFramework.class);
            bind(LineageStoreReader.class).to(LineageStore.class);
            bind(LineageStoreWriter.class).to(LineageStore.class);
            // Need to expose LineageStoreReader as it's being used by the LineageHandler (through LineageAdmin)
            expose(LineageStoreReader.class);
            bind(LineageWriter.class).to(BasicLineageWriter.class);
            expose(LineageWriter.class);
            bind(RuntimeUsageRegistry.class).to(NoOpUsageRegistry.class).in(Scopes.SINGLETON);
            expose(RuntimeUsageRegistry.class);
            bind(UsageRegistry.class).to(NoOpUsageRegistry.class).in(Scopes.SINGLETON);
            expose(UsageRegistry.class);
        }
    };
}
Also used : DefaultMetadataStore(co.cask.cdap.data2.metadata.store.DefaultMetadataStore) MetadataStore(co.cask.cdap.data2.metadata.store.MetadataStore) DatasetFramework(co.cask.cdap.data2.dataset2.DatasetFramework) RemoteDatasetFramework(co.cask.cdap.data2.datafabric.dataset.RemoteDatasetFramework) PreviewDatasetFramework(co.cask.cdap.data2.dataset2.preview.PreviewDatasetFramework) DatasetDefinitionRegistryFactory(co.cask.cdap.data2.dataset2.DatasetDefinitionRegistryFactory) LineageWriter(co.cask.cdap.data2.metadata.writer.LineageWriter) BasicLineageWriter(co.cask.cdap.data2.metadata.writer.BasicLineageWriter) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) LineageStoreReader(co.cask.cdap.data2.metadata.lineage.LineageStoreReader) LineageStoreWriter(co.cask.cdap.data2.metadata.lineage.LineageStoreWriter) NoOpUsageRegistry(co.cask.cdap.data2.registry.NoOpUsageRegistry) PrivateModule(com.google.inject.PrivateModule)

Aggregations

RemoteDatasetFramework (co.cask.cdap.data2.datafabric.dataset.RemoteDatasetFramework)3 DatasetDefinitionRegistryFactory (co.cask.cdap.data2.dataset2.DatasetDefinitionRegistryFactory)3 DatasetFramework (co.cask.cdap.data2.dataset2.DatasetFramework)3 LineageStoreReader (co.cask.cdap.data2.metadata.lineage.LineageStoreReader)3 LineageStoreWriter (co.cask.cdap.data2.metadata.lineage.LineageStoreWriter)3 DefaultMetadataStore (co.cask.cdap.data2.metadata.store.DefaultMetadataStore)3 MetadataStore (co.cask.cdap.data2.metadata.store.MetadataStore)3 BasicLineageWriter (co.cask.cdap.data2.metadata.writer.BasicLineageWriter)3 LineageWriter (co.cask.cdap.data2.metadata.writer.LineageWriter)3 PrivateModule (com.google.inject.PrivateModule)3 FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)3 InMemoryDatasetFramework (co.cask.cdap.data2.dataset2.InMemoryDatasetFramework)2 NoOpMetadataStore (co.cask.cdap.data2.metadata.store.NoOpMetadataStore)2 LineageWriterDatasetFramework (co.cask.cdap.data2.metadata.writer.LineageWriterDatasetFramework)2 DefaultUsageRegistry (co.cask.cdap.data2.registry.DefaultUsageRegistry)2 OwnerStore (co.cask.cdap.security.impersonation.OwnerStore)2 DefaultOwnerStore (co.cask.cdap.store.DefaultOwnerStore)2 PreviewDatasetFramework (co.cask.cdap.data2.dataset2.preview.PreviewDatasetFramework)1 NoOpUsageRegistry (co.cask.cdap.data2.registry.NoOpUsageRegistry)1