public interface StreamAdmin
| Modifier and Type | Method and Description |
|---|---|
void |
addAccess(Id.Run run,
Id.Stream streamId,
AccessType accessType)
Record access of stream by a program run for lineage computation.
|
void |
configureGroups(Id.Stream streamId,
Map<Long,Integer> groupInfo)
Sets the consumer groups information for the given stream.
|
void |
configureInstances(Id.Stream streamId,
long groupId,
int instances)
Sets the number of consumer instances for the given consumer group in a stream.
|
StreamConfig |
create(Id.Stream streamId)
Creates stream if doesn't exist.
|
StreamConfig |
create(Id.Stream streamId,
Properties props)
Creates stream if doesn't exist.
|
boolean |
createOrUpdateView(Id.Stream.View viewId,
ViewSpecification spec)
Creates or updates a stream view.
|
void |
deleteView(Id.Stream.View viewId)
Deletes a stream view.
|
void |
drop(Id.Stream streamId)
Deletes stream from the system completely.
|
void |
dropAllInNamespace(Id.Namespace namespace)
Deletes all entries for all streams within a namespace
|
boolean |
exists(Id.Stream streamId) |
StreamConfig |
getConfig(Id.Stream streamId)
Returns the configuration of the given stream.
|
ViewSpecification |
getView(Id.Stream.View viewId)
Gets the details of a stream view.
|
List<Id.Stream.View> |
listViews(Id.Stream streamId)
Lists views associated with a stream.
|
void |
register(Iterable<? extends Id> owners,
Id.Stream streamId)
Register stream used by program.
|
void |
truncate(Id.Stream streamId)
Wipes out stream data.
|
void |
updateConfig(Id.Stream streamId,
StreamProperties properties)
Overwrites existing configuration for the given stream.
|
void |
upgrade()
Performs upgrade action for all streams.
|
boolean |
viewExists(Id.Stream.View viewId)
Checks if the view exists
|
void dropAllInNamespace(Id.Namespace namespace) throws Exception
Exceptionvoid configureInstances(Id.Stream streamId, long groupId, int instances) throws Exception
streamId - Id of the stream.groupId - The consumer group to alter.instances - Number of instances.Exceptionvoid configureGroups(Id.Stream streamId, Map<Long,Integer> groupInfo) throws Exception
streamId - Id of the stream.groupInfo - A map from groupId to number of instances of each group.ExceptionStreamConfig getConfig(Id.Stream streamId) throws IOException
streamId - Id of the stream.StreamConfig instance.IOException - If the stream doesn't exists.void updateConfig(Id.Stream streamId, StreamProperties properties) throws IOException
streamId - Id of the stream whose properties are being updatedproperties - New configuration of the stream.IOExceptionboolean exists(Id.Stream streamId) throws Exception
streamId - Id of the stream.Exception - if check failsStreamConfig create(Id.Stream streamId) throws Exception
streamId - Id of the stream to createStreamConfig associated with the new streamException - if creation failsStreamConfig create(Id.Stream streamId, @Nullable Properties props) throws Exception
streamId - Id of the stream to createprops - additional propertiesStreamConfig associated with the new streamException - if creation failsvoid truncate(Id.Stream streamId) throws Exception
streamId - Id of the stream to truncateException - if cleanup failsvoid drop(Id.Stream streamId) throws Exception
streamId - Id of the stream to deleteException - if deletion failsboolean createOrUpdateView(Id.Stream.View viewId, ViewSpecification spec) throws Exception
viewId - the viewspec - specification for the viewExceptionvoid deleteView(Id.Stream.View viewId) throws Exception
viewId - the viewExceptionList<Id.Stream.View> listViews(Id.Stream streamId) throws Exception
streamId - the streamExceptionViewSpecification getView(Id.Stream.View viewId) throws Exception
viewId - the viewExceptionboolean viewExists(Id.Stream.View viewId) throws Exception
viewId - the viewExceptionvoid register(Iterable<? extends Id> owners, Id.Stream streamId)
owners - the ids that are using the streamstreamId - the stream being usedvoid addAccess(Id.Run run, Id.Stream streamId, AccessType accessType)
run - program runstreamId - stream being accessedaccessType - type of accessCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.