Search in sources :

Example 1 with PackagesManagement

use of org.apache.pulsar.packages.management.core.PackagesManagement in project pulsar by apache.

the class PulsarService method startPackagesManagementService.

private void startPackagesManagementService() throws IOException {
    // TODO: using provider to initialize the packages management service.
    PackagesManagement packagesManagementService = new PackagesManagementImpl();
    this.packagesManagement = Optional.of(packagesManagementService);
    PackagesStorageProvider storageProvider = PackagesStorageProvider.newProvider(config.getPackagesManagementStorageProvider());
    DefaultPackagesStorageConfiguration storageConfiguration = new DefaultPackagesStorageConfiguration();
    storageConfiguration.setProperty(config.getProperties());
    PackagesStorage storage = storageProvider.getStorage(storageConfiguration);
    storage.initialize();
    packagesManagementService.initialize(storage);
}
Also used : PackagesStorage(org.apache.pulsar.packages.management.core.PackagesStorage) PackagesStorageProvider(org.apache.pulsar.packages.management.core.PackagesStorageProvider) PackagesManagementImpl(org.apache.pulsar.packages.management.core.impl.PackagesManagementImpl) PackagesManagement(org.apache.pulsar.packages.management.core.PackagesManagement) DefaultPackagesStorageConfiguration(org.apache.pulsar.packages.management.core.impl.DefaultPackagesStorageConfiguration)

Example 2 with PackagesManagement

use of org.apache.pulsar.packages.management.core.PackagesManagement in project incubator-pulsar by apache.

the class PulsarService method startPackagesManagementService.

private void startPackagesManagementService() throws IOException {
    // TODO: using provider to initialize the packages management service.
    PackagesManagement packagesManagementService = new PackagesManagementImpl();
    this.packagesManagement = Optional.of(packagesManagementService);
    PackagesStorageProvider storageProvider = PackagesStorageProvider.newProvider(config.getPackagesManagementStorageProvider());
    DefaultPackagesStorageConfiguration storageConfiguration = new DefaultPackagesStorageConfiguration();
    storageConfiguration.setProperty(config.getProperties());
    PackagesStorage storage = storageProvider.getStorage(storageConfiguration);
    storage.initialize();
    packagesManagementService.initialize(storage);
}
Also used : PackagesStorage(org.apache.pulsar.packages.management.core.PackagesStorage) PackagesStorageProvider(org.apache.pulsar.packages.management.core.PackagesStorageProvider) PackagesManagementImpl(org.apache.pulsar.packages.management.core.impl.PackagesManagementImpl) PackagesManagement(org.apache.pulsar.packages.management.core.PackagesManagement) DefaultPackagesStorageConfiguration(org.apache.pulsar.packages.management.core.impl.DefaultPackagesStorageConfiguration)

Example 3 with PackagesManagement

use of org.apache.pulsar.packages.management.core.PackagesManagement in project pulsar by yahoo.

the class PulsarService method startPackagesManagementService.

private void startPackagesManagementService() throws IOException {
    // TODO: using provider to initialize the packages management service.
    PackagesManagement packagesManagementService = new PackagesManagementImpl();
    this.packagesManagement = Optional.of(packagesManagementService);
    PackagesStorageProvider storageProvider = PackagesStorageProvider.newProvider(config.getPackagesManagementStorageProvider());
    DefaultPackagesStorageConfiguration storageConfiguration = new DefaultPackagesStorageConfiguration();
    storageConfiguration.setProperty(config.getProperties());
    PackagesStorage storage = storageProvider.getStorage(storageConfiguration);
    storage.initialize();
    packagesManagementService.initialize(storage);
}
Also used : PackagesStorage(org.apache.pulsar.packages.management.core.PackagesStorage) PackagesStorageProvider(org.apache.pulsar.packages.management.core.PackagesStorageProvider) PackagesManagementImpl(org.apache.pulsar.packages.management.core.impl.PackagesManagementImpl) PackagesManagement(org.apache.pulsar.packages.management.core.PackagesManagement) DefaultPackagesStorageConfiguration(org.apache.pulsar.packages.management.core.impl.DefaultPackagesStorageConfiguration)

Aggregations

PackagesManagement (org.apache.pulsar.packages.management.core.PackagesManagement)3 PackagesStorage (org.apache.pulsar.packages.management.core.PackagesStorage)3 PackagesStorageProvider (org.apache.pulsar.packages.management.core.PackagesStorageProvider)3 DefaultPackagesStorageConfiguration (org.apache.pulsar.packages.management.core.impl.DefaultPackagesStorageConfiguration)3 PackagesManagementImpl (org.apache.pulsar.packages.management.core.impl.PackagesManagementImpl)3