Search in sources :

Example 71 with StorableKey

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

the class StreamCatalogService method removeBranchRule.

public TopologyBranchRule removeBranchRule(Long topologyId, Long id, Long versionId) throws Exception {
    TopologyBranchRule topologyBranchRule = getBranchRule(topologyId, id, versionId);
    if (topologyBranchRule != null) {
        topologyBranchRule = dao.remove(new StorableKey(TOPOLOGY_BRANCHRULEINFO_NAMESPACE, topologyBranchRule.getPrimaryKey()));
        topologyBranchRule.setVersionTimestamp(updateVersionTimestamp(versionId).getTimestamp());
    }
    return topologyBranchRule;
}
Also used : StorableKey(com.hortonworks.registries.storage.StorableKey) TopologyBranchRule(com.hortonworks.streamline.streams.catalog.TopologyBranchRule)

Example 72 with StorableKey

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

the class StreamCatalogService method getStreamInfo.

public TopologyStream getStreamInfo(Long topologyId, Long streamId, Long versionId) {
    TopologyStream topologyStream = new TopologyStream();
    topologyStream.setId(streamId);
    topologyStream.setVersionId(versionId);
    TopologyStream result = dao.get(new StorableKey(STREAMINFO_NAMESPACE, topologyStream.getPrimaryKey()));
    if (result == null || !result.getTopologyId().equals(topologyId)) {
        return null;
    }
    result.setVersionTimestamp(getVersionTimestamp(versionId));
    return result;
}
Also used : StorableKey(com.hortonworks.registries.storage.StorableKey) TopologyStream(com.hortonworks.streamline.streams.catalog.TopologyStream)

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