Search in sources :

Example 31 with StreamViewId

use of co.cask.cdap.proto.id.StreamViewId in project cdap by caskdata.

the class MetadataHttpHandler method removeViewProperty.

@DELETE
@Path("/namespaces/{namespace-id}/streams/{stream-id}/views/{view-id}/metadata/properties/{property}")
public void removeViewProperty(HttpRequest request, HttpResponder responder, @PathParam("namespace-id") String namespaceId, @PathParam("stream-id") String streamId, @PathParam("view-id") String viewId, @PathParam("property") String property) throws NotFoundException {
    StreamViewId view = new StreamViewId(namespaceId, streamId, viewId);
    metadataAdmin.removeProperties(view, property);
    responder.sendString(HttpResponseStatus.OK, String.format("Metadata property %s for view %s deleted successfully.", property, view));
}
Also used : StreamViewId(co.cask.cdap.proto.id.StreamViewId) Path(javax.ws.rs.Path) DELETE(javax.ws.rs.DELETE)

Example 32 with StreamViewId

use of co.cask.cdap.proto.id.StreamViewId in project cdap by caskdata.

the class InMemoryViewStore method list.

@Override
public List<StreamViewId> list(StreamId streamId) {
    Lock lock = viewsLock.readLock();
    lock.lock();
    try {
        return ImmutableList.<StreamViewId>builder().addAll(views.column(streamId).keySet()).build();
    } finally {
        lock.unlock();
    }
}
Also used : Lock(java.util.concurrent.locks.Lock) ReentrantReadWriteLock(java.util.concurrent.locks.ReentrantReadWriteLock) ReadWriteLock(java.util.concurrent.locks.ReadWriteLock) StreamViewId(co.cask.cdap.proto.id.StreamViewId)

Aggregations

StreamViewId (co.cask.cdap.proto.id.StreamViewId)32 StreamId (co.cask.cdap.proto.id.StreamId)16 Path (javax.ws.rs.Path)14 ViewSpecification (co.cask.cdap.proto.ViewSpecification)12 FormatSpecification (co.cask.cdap.api.data.format.FormatSpecification)11 DatasetId (co.cask.cdap.proto.id.DatasetId)9 Test (org.junit.Test)9 NamespaceId (co.cask.cdap.proto.id.NamespaceId)7 ApplicationId (co.cask.cdap.proto.id.ApplicationId)6 DELETE (javax.ws.rs.DELETE)6 ArtifactId (co.cask.cdap.proto.id.ArtifactId)5 ProgramId (co.cask.cdap.proto.id.ProgramId)5 MetadataSearchResultRecord (co.cask.cdap.proto.metadata.MetadataSearchResultRecord)5 NamespaceMeta (co.cask.cdap.proto.NamespaceMeta)4 GET (javax.ws.rs.GET)4 Schema (co.cask.cdap.api.data.schema.Schema)3 AuditPolicy (co.cask.cdap.common.security.AuditPolicy)3 WordCountApp (co.cask.cdap.WordCountApp)2 NotFoundException (co.cask.cdap.common.NotFoundException)2 DatasetInstanceConfiguration (co.cask.cdap.proto.DatasetInstanceConfiguration)2