Search in sources :

Example 21 with StorableKey

use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.

the class EnvironmentService method removeCluster.

public Cluster removeCluster(Long clusterId) {
    Cluster cluster = new Cluster();
    cluster.setId(clusterId);
    return dao.remove(new StorableKey(CLUSTER_NAMESPACE, cluster.getPrimaryKey()));
}
Also used : StorableKey(com.hortonworks.registries.storage.StorableKey) Cluster(com.hortonworks.streamline.streams.cluster.catalog.Cluster)

Example 22 with StorableKey

use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.

the class EnvironmentService method removeNamespace.

public Namespace removeNamespace(Long namespaceId) {
    assertEnvironmentIsNotInternal(namespaceId);
    Namespace namespace = new Namespace();
    namespace.setId(namespaceId);
    Namespace ret = this.dao.remove(new StorableKey(NAMESPACE_NAMESPACE, namespace.getPrimaryKey()));
    invalidateTopologyActionsMetricsInstances(namespaceId);
    return ret;
}
Also used : StorableKey(com.hortonworks.registries.storage.StorableKey) Namespace(com.hortonworks.streamline.streams.cluster.catalog.Namespace)

Example 23 with StorableKey

use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.

the class EnvironmentService method getCluster.

public Cluster getCluster(Long clusterId) {
    Cluster cluster = new Cluster();
    cluster.setId(clusterId);
    return this.dao.get(new StorableKey(CLUSTER_NAMESPACE, cluster.getPrimaryKey()));
}
Also used : StorableKey(com.hortonworks.registries.storage.StorableKey) Cluster(com.hortonworks.streamline.streams.cluster.catalog.Cluster)

Example 24 with StorableKey

use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.

the class EnvironmentService method getServiceConfiguration.

public ServiceConfiguration getServiceConfiguration(Long configurationId) {
    ServiceConfiguration serviceConfiguration = new ServiceConfiguration();
    serviceConfiguration.setId(configurationId);
    return this.dao.get(new StorableKey(SERVICE_CONFIGURATION_NAMESPACE, serviceConfiguration.getPrimaryKey()));
}
Also used : ServiceConfiguration(com.hortonworks.streamline.streams.cluster.catalog.ServiceConfiguration) StorableKey(com.hortonworks.registries.storage.StorableKey)

Example 25 with StorableKey

use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.

the class EnvironmentService method getService.

public Service getService(Long serviceId) {
    Service service = new Service();
    service.setId(serviceId);
    return this.dao.get(new StorableKey(SERVICE_NAMESPACE, service.getPrimaryKey()));
}
Also used : StorableKey(com.hortonworks.registries.storage.StorableKey) Service(com.hortonworks.streamline.streams.cluster.catalog.Service)

Aggregations

StorableKey (com.hortonworks.registries.storage.StorableKey)72 Schema (com.hortonworks.registries.common.Schema)6 OrderByField (com.hortonworks.registries.storage.OrderByField)6 PrimaryKey (com.hortonworks.registries.storage.PrimaryKey)6 HashMap (java.util.HashMap)6 Test (org.junit.Test)5 QueryParam (com.hortonworks.registries.common.QueryParam)4 StorageManager (com.hortonworks.registries.storage.StorageManager)4 SchemaNotFoundException (com.hortonworks.registries.schemaregistry.errors.SchemaNotFoundException)3 Storable (com.hortonworks.registries.storage.Storable)3 StorageException (com.hortonworks.registries.storage.exception.StorageException)3 Role (com.hortonworks.streamline.streams.security.catalog.Role)3 UserRole (com.hortonworks.streamline.streams.security.catalog.UserRole)3 CacheBuilder (com.google.common.cache.CacheBuilder)2 SchemaVersionInfoCache (com.hortonworks.registries.schemaregistry.cache.SchemaVersionInfoCache)2 CacheBackedStorageManager (com.hortonworks.registries.storage.CacheBackedStorageManager)2 StorageWriter (com.hortonworks.registries.storage.cache.writer.StorageWriter)2 AlreadyExistsException (com.hortonworks.registries.storage.exception.AlreadyExistsException)2 IllegalQueryParameterException (com.hortonworks.registries.storage.exception.IllegalQueryParameterException)2 MySqlSelectQuery (com.hortonworks.registries.storage.impl.jdbc.provider.mysql.query.MySqlSelectQuery)2