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);
}
};
}
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);
}
};
}
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);
}
};
}
Aggregations