Modifier and Type | Class and Description |
---|---|
(package private) static class |
HAAdmin.CommandOption |
Constructor and Description |
---|
HAAdmin(List<StreamBaseURI> uris) |
Modifier and Type | Method and Description |
---|---|
String[] |
addContainer(long timeoutMS,
String containerName,
byte[] application,
List<String> containerStreamMappings)
Add the given application to the given container in the StreamBaseServer
|
String[] |
addDeploy(long timeoutMS,
byte[] deploy,
List<String> args)
Add the given deploy file to the server.
|
static List<Throwable> |
addExceptions(List<Throwable> exceptions,
Throwable current)
add the given exception to the list of exceptions
|
boolean |
checkLicense(long timeoutMS,
String featureName)
Return true if a license for the specified feature is available and false otherwise.
|
String |
clearEvalCache(long timeoutMS,
String containerName)
Clear evaluation cache
|
static String |
createBaseURIString(Collection<StreamBaseURI> uris)
Create a URI string of baseURI's from a list of uris
|
String |
describe(long timeoutMS,
String entityName)
Return an XML description of a StreamBase entity
|
void |
drain(long timeoutMS,
String containerName)
Drain a StreamBase container or if empty the entire Server
|
void |
enqueue(long timeoutMS,
StreamProperties props,
Collection<String> tuples)
Enqueue a list of CSV encoded tuples using connectionless XMLRPC
|
void |
fastForwardTime(long timeout,
Object value)
Number of milliseconds to jump forward in time.
|
ByteOrder |
getByteOrder(long timeoutMS)
What is the byte order of the server?
|
ByteString |
getConnectionID()
Return the connection id (which may be null)
|
Schema.Field |
getDynamicVariableField(long timeoutMS,
Path dynamicVariablePath) |
Tuple |
getDynamicVariables(long timeoutMS,
Path modulePath)
Return the current value of the dynamic variables in the given module,
as a Tuple of field name to Java value.
|
String |
getEvalCacheContent(long timeout,
String containerName)
Get evaluation cache content
|
Constants.LeadershipStatus |
getLeadershipStatus(long timeoutMS)
Get the leadership status of the server.
|
String |
getMapperCacheContent(long timeoutMS,
String containerName)
Get mapper cache content
|
Map<Integer,String> |
getNamesForContainer(long timeoutMS,
int id)
Return a map of id and names for the given container id.
|
String[] |
getOperatorProperties(long timeoutMS,
String operatorName)
For the given Operator, return its set of properties and their values.
|
String |
getOperatorProperty(long timeoutMS,
String operatorName,
String propertyName)
Return the value of the given property on the given Operator.
|
Schema |
getSchemaByHash(long timeoutMS,
byte[] hash)
Return the Schema object for the given hash value
|
Schema |
getSchemaByName(long timeoutMS,
String schemaName)
Return the Schema object for the given name
|
StreamProperties |
getStreamProperties(long timeoutMS,
String streamName)
Return the StreamProperties for the given name.
|
StreamProperties |
getStreamProperties(long timeoutMS,
String streamName,
CaptureTransformStrategy strategy)
Return the StreamProperties for the given name
|
StreamProperties |
getStreamPropertiesByHash(long timeoutMS,
byte[] hash)
Return the StreamProperties for the given hash
|
String |
getTargetTime(long timeout)
Get target time
|
String[] |
internalCommand(long timeoutMS,
String... args)
Run the given internal command
|
boolean |
isHA()
Are we in HA mode
|
String[] |
killAllConnections(long timeoutMS)
Kill all of the connections on the server
|
String[] |
killConnection(long timeoutMS,
byte[] connectionId)
Kill the connection with the given connectionId
|
String[] |
listConnections(long timeoutMS,
StreamBaseAdminClient.ListConnectionArgument... args)
Return an array of client connections
|
String[] |
listEntities(long timeoutMS,
String entityType,
int flags,
CaptureTransformStrategy strategy)
Return an array of entity names for the given entity type
|
String[] |
manageJdbcConnections(long timeoutMS,
List<String> args)
Manage jdbc connections:
count [name]Count the open JDBC connections to the named data source (or all data sources if ommitted)
close [name]Close any open JDBC connections to the named data source (or all data sources if ommitted)
|
void |
modifyApplication(long timeoutMS,
byte[] application)
Modify the StreamBase Server with the given StreamBase application.
|
String[] |
modifyContainer(long timeoutMS,
String containerName,
List<String> args)
Modify the given container
|
String[] |
operatorStatus(long timeoutMS,
String containerName)
Return the status of each Operator present in the StreamBase server.
|
static StreamBaseException |
processExceptions(String message,
List<Throwable> exceptions,
String baseURIString,
Class<?> exceptionsCheck)
Look through the exceptions; if we have one that isn't an XMLRPCException then throw that one
otherwise bundle them all up into a list exception.
|
List<Tuple> |
readTable(long timeoutMS,
String tablePath,
int rowLimit,
String predicate)
Return rows from the table.
|
String[] |
removeContainer(long timeoutMS,
String containerName,
List<String> args)
Remove the given container in the StreamBaseServer
|
String[] |
restartContainer(long timeoutMS,
String containerName)
Restart the given container
|
void |
restartOperators(long timeoutMS,
List<String> operatorNames)
Restart the given Operators on the StreamBase server.
|
void |
resume(long timeoutMS,
String containerName)
Resume a paused StreamBase server
|
void |
resumeOperators(long timeoutMS,
List<String> operatorsNames)
Resume the given Operators on the StreamBase server
|
void |
setConnectionID(ByteString _connectionid)
Set the Connection ID
|
void |
setDynamicVariable(long timeoutMS,
Path dynamicVariablePath,
Object value)
Set the value of the given dynamic variable to the given value.
|
void |
setLeadershipStatus(long timeoutMS,
Constants.LeadershipStatus leadershipStatus)
Set the leadership status of the server.
|
void |
setOperatorProperty(long timeoutMS,
String operatorName,
String propertyName,
String value)
On the given Operator, set the given property to the given value.
|
void |
setRuntimeParam(long timeoutMS,
String paramName,
String paramValue,
String operator)
set the given runtime param
|
String |
shutdown(long timeoutMS,
String containerName)
Shutdown a StreamBase container or if empty the whole server
|
void |
shutdownOperators(long timeoutMS,
List<String> operatorNames)
Shut down the given Operators on the StreamBase server.
|
String[] |
status(long timeoutMS,
boolean verbose)
Return the status of the StreamBase Server
|
SubscriptionEntry |
subscribe(long timeoutMS,
SubscriptionEntry subscription,
List<TupleConnections.StreamTupleConnection> connections)
Subscribe to an output stream with predicate
|
void |
suspend(long timeoutMS,
String name)
Suspend (pause) a StreamBase container or operator
|
void |
suspendOperators(long timeoutMS,
List<String> operatorNames)
Suspend the given Operators on the StreamBase Server
|
StreamProperties[] |
typecheck(long timeoutMS,
String application,
boolean full)
Typecheck (validate) the given StreamBase Application.
|
void |
unsubscribe(long timeoutMS,
StreamProperties props,
String logicalstream,
List<TupleConnections.StreamTupleConnection> connections)
UnSubscribe to an output stream.
|
HAAdmin(List<StreamBaseURI> uris) throws StreamBaseException
StreamBaseException
public boolean isHA()
Admin
public ByteOrder getByteOrder(long timeoutMS) throws StreamBaseException
Admin
getByteOrder
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public void modifyApplication(long timeoutMS, byte[] application) throws StreamBaseException
application
- the applicationStreamBaseException
- thrown on typecheck and other errorspublic StreamProperties[] typecheck(long timeoutMS, String application, boolean full) throws StreamBaseException
typecheck
in interface Admin
application
- the StreamBase Application to typecheckfull
- do a full typechecktimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- on network or typecheck errorpublic String shutdown(long timeoutMS, String containerName) throws StreamBaseException
Admin
shutdown
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- optional containerNameStreamBaseException
- thrown on network or other errorspublic void shutdownOperators(long timeoutMS, List<String> operatorNames) throws StreamBaseException
Admin
shutdownOperators
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeoperatorNames
- The Operators to shut downStreamBaseException
- throws on network or other errorspublic void restartOperators(long timeoutMS, List<String> operatorNames) throws StreamBaseException
Admin
restartOperators
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeoperatorNames
- The Operators to shut downStreamBaseException
- throws on network or other errorspublic void suspendOperators(long timeoutMS, List<String> operatorNames) throws StreamBaseException
Admin
suspendOperators
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeoperatorNames
- the operators to suspendStreamBaseException
- thrown on network or other errorspublic void suspend(long timeoutMS, String name) throws StreamBaseException
suspend
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completename
- container or operator nameStreamBaseException
- thrown on network or other errorspublic void resumeOperators(long timeoutMS, List<String> operatorsNames) throws StreamBaseException
Admin
resumeOperators
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeoperatorsNames
- the operators to suspendStreamBaseException
public void resume(long timeoutMS, String containerName) throws StreamBaseException
resume
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- optional containerNameStreamBaseException
public String describe(long timeoutMS, String entityName) throws StreamBaseException
describe
in interface Admin
entityName
- the name of the entity to describetimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- thrown on network or other errorspublic boolean checkLicense(long timeoutMS, String featureName) throws StreamBaseException
checkLicense
in interface Admin
featureName
- the name of the licensed featuretimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- thrown on network or other errorspublic StreamProperties getStreamProperties(long timeoutMS, String streamName, CaptureTransformStrategy strategy) throws StreamBaseException
getStreamProperties
in interface Admin
streamName
- the stream name to lookuptimeoutMS
- the timeout in milliseconds to wait for the command to completestrategy
- the CaptureTransformStrategy
to use if the target stream has capture fields.StreamBaseException
- thrown on network or other errorspublic StreamProperties getStreamProperties(long timeoutMS, String streamName) throws StreamBaseException
Admin
CaptureTransformStrategy.FLATTEN
getStreamProperties
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completestreamName
- the stream name to lookupStreamBaseException
- thrown on network or other errorspublic StreamProperties getStreamPropertiesByHash(long timeoutMS, byte[] hash) throws StreamBaseException
getStreamPropertiesByHash
in interface Admin
hash
- The Hash to lookuptimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- thrown on network or other errorspublic String[] listEntities(long timeoutMS, String entityType, int flags, CaptureTransformStrategy strategy) throws StreamBaseException
listEntities
in interface Admin
entityType
- the entity type to do the lookuptimeoutMS
- the timeout in milliseconds to wait for the command to completeflags
- FULLY_QUALIFIED_NAMES and INCLUDE_MODULES flagsstrategy
- the capture transform strategyStreamBaseException
- thrown on network or other errorspublic Schema getSchemaByHash(long timeoutMS, byte[] hash) throws StreamBaseException
getSchemaByHash
in interface Admin
hash
- a byte array that contains a hash valuetimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- thrown on network or other errorspublic Schema getSchemaByName(long timeoutMS, String schemaName) throws StreamBaseException
getSchemaByName
in interface Admin
schemaName
- the name of the Schema to lookuptimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- thrown on network or other errorspublic void drain(long timeoutMS, String containerName) throws StreamBaseException
Admin
drain
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- optional containerNameStreamBaseException
- thrown on network or other errorspublic String[] getOperatorProperties(long timeoutMS, String operatorName) throws StreamBaseException
Admin
getOperatorProperties
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeoperatorName
- The operator whose properties are retrieved.StreamBaseException
public String getOperatorProperty(long timeoutMS, String operatorName, String propertyName) throws StreamBaseException
getOperatorProperty
in interface Admin
operatorName
- The operator whose property value is retrieved.propertyName
- The property whose value is retrieved.timeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public void setOperatorProperty(long timeoutMS, String operatorName, String propertyName, String value) throws StreamBaseException
setOperatorProperty
in interface Admin
operatorName
- The operator whose property value is set.propertyName
- The property whose value is set.value
- The value set.timeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public String[] operatorStatus(long timeoutMS, String containerName) throws StreamBaseException
operatorStatus
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- name of the containerStreamBaseException
public String[] status(long timeoutMS, boolean verbose) throws StreamBaseException
status
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeverbose
- return a verbose statusStreamBaseException
- thrown on network and other errorspublic SubscriptionEntry subscribe(long timeoutMS, SubscriptionEntry subscription, List<TupleConnections.StreamTupleConnection> connections) throws StreamBaseException
subscribe
in interface Admin
connections
- the list of tupleconnections on which to subscribe totimeoutMS
- the timeout in milliseconds to wait for the command to completesubscription
- a SubscriptionEntry
describing the desired subscription. Contains the StreamProperties
of the desired stream, an optional predicate, and an optional logical stream to associate with the predicate.StreamBaseException
- server errors, or network errors.public void unsubscribe(long timeoutMS, StreamProperties props, String logicalstream, List<TupleConnections.StreamTupleConnection> connections) throws StreamBaseException
unsubscribe
in interface Admin
props
- the streamlogicalstream
- the name of the logical stream.connections
- the list of tupleconnections on which to subscribe totimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
- server errors, or network errors.public String[] listConnections(long timeoutMS, StreamBaseAdminClient.ListConnectionArgument... args) throws StreamBaseException
listConnections
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeargs
- arguments for the commandStreamBaseException
- thrown on network or other errorspublic String[] internalCommand(long timeoutMS, String... args) throws StreamBaseException
internalCommand
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeargs
- the arguments for the commandStreamBaseException
- thrown on network or other errorspublic void enqueue(long timeoutMS, StreamProperties props, Collection<String> tuples) throws StreamBaseException
Admin
enqueue
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeprops
- StreamProperties for streamtuples
- list of tuplesStreamBaseException
public void setRuntimeParam(long timeoutMS, String paramName, String paramValue, String operator) throws StreamBaseException
Admin
setRuntimeParam
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeparamName
- the name of the paramparamValue
- the value of the commandoperator
- the operator for the paramStreamBaseException
public String[] addContainer(long timeoutMS, String containerName, byte[] application, List<String> containerStreamMappings) throws StreamBaseException
Admin
addContainer
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- the containerNameapplication
- contents of an application. Text sbapp, ssql or binary contents of a jar filecontainerStreamMappings
- stream mappings between containers. Each member of
the list should contain a mapping. For example:
newContainer.newStream=oldContainer.oldStreamStreamBaseException
- thrown on typecheck and other errorspublic String[] addDeploy(long timeoutMS, byte[] deploy, List<String> args) throws StreamBaseException
Admin
addDeploy
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completedeploy
- contents of deploy file. XML text or binary contents of an sbar file made from a deploy file.args
- command argumentsStreamBaseException
- thrown on typecheck and other errorspublic String[] restartContainer(long timeoutMS, String containerName) throws StreamBaseException
Admin
restartContainer
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- the name of the container to restartStreamBaseException
public String[] removeContainer(long timeoutMS, String containerName, List<String> args) throws StreamBaseException
Admin
removeContainer
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completecontainerName
- the containerNameargs
- command argumentsStreamBaseException
- thrown on typecheck and other errorspublic String[] modifyContainer(long timeoutMS, String containerName, List<String> args) throws StreamBaseException
modifyContainer
in interface Admin
containerName
- args
- list of argumentstimeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public String[] killConnection(long timeoutMS, byte[] connectionId) throws StreamBaseException
Admin
killConnection
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public String[] killAllConnections(long timeoutMS) throws StreamBaseException
Admin
killAllConnections
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public String[] manageJdbcConnections(long timeoutMS, List<String> args) throws StreamBaseException
Admin
manageJdbcConnections
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeargs
- a list that must contain at least one command string (close
or count
),
and may contain an optional second argument string (the name of a data source). When no argument string is given,
the command will apply to all data sources.close
, one string containing the number of connections closed
for count
, one string containing the number of open connectionsStreamBaseException
- throw on network or other errorspublic void setLeadershipStatus(long timeoutMS, Constants.LeadershipStatus leadershipStatus) throws StreamBaseException
Admin
This method is no longer supported since the StreamBase 10 platform release. Please consult the documentation.
setLeadershipStatus
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeleadershipStatus
- new leadership statusStreamBaseException
public Constants.LeadershipStatus getLeadershipStatus(long timeoutMS) throws StreamBaseException
Admin
This method is no longer supported since the StreamBase 10 platform release. Please consult the documentation.
getLeadershipStatus
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completeStreamBaseException
public static List<Throwable> addExceptions(List<Throwable> exceptions, Throwable current)
exceptions
- list of possibly exceptions (possibly null)current
- exception to addpublic static StreamBaseException processExceptions(String message, List<Throwable> exceptions, String baseURIString, Class<?> exceptionsCheck)
message
- the message to use when throwing a new exceptionexceptions
- the list of exceptions from the callbaseURIString
- exceptionsCheck
- the list of exceptions to check againstpublic void setConnectionID(ByteString _connectionid)
Admin
setConnectionID
in interface Admin
public ByteString getConnectionID()
Admin
getConnectionID
in interface Admin
public static String createBaseURIString(Collection<StreamBaseURI> uris)
uris
- public Tuple getDynamicVariables(long timeoutMS, Path modulePath) throws StreamBaseException
Admin
getDynamicVariables
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completemodulePath
- the path to the moduleStreamBaseException
- on nonexistence of the path, network, if the module contains
no dynamic variables, or other errors.public void setDynamicVariable(long timeoutMS, Path dynamicVariablePath, Object value) throws StreamBaseException
Admin
setDynamicVariable
in interface Admin
timeoutMS
- the timeout in milliseconds to wait for the command to completedynamicVariablePath
- the path to the dynamic variablevalue
- the value to set the variable toStreamBaseException
public void fastForwardTime(long timeout, Object value) throws StreamBaseException
Admin
fastForwardTime
in interface Admin
timeout
- Timeout in milliseconds to wait for completionvalue
- number of milliseconds to jump forward in timeStreamBaseException
- Error forwarding timepublic String getEvalCacheContent(long timeout, String containerName) throws StreamBaseException
Admin
getEvalCacheContent
in interface Admin
timeout
- Timeout in milliseconds to wait for completioncontainerName
- Container nameStreamBaseException
- Error reading cachepublic String getTargetTime(long timeout) throws StreamBaseException
Admin
getTargetTime
in interface Admin
timeout
- Timeout in milliseconds to wait for completionStreamBaseException
- Error getting timepublic Schema.Field getDynamicVariableField(long timeoutMS, Path dynamicVariablePath) throws StreamBaseException
StreamBaseException
public List<Tuple> readTable(long timeoutMS, String tablePath, int rowLimit, String predicate) throws StreamBaseException
Admin
readTable
in interface Admin
timeoutMS
- timeout in millisecondstablePath
- Path to the table.rowLimit
- Limit on number of rows to return, or -1 for all rows.StreamBaseException
- If the connection is not valid or the server cannot be contacted.public String clearEvalCache(long timeoutMS, String containerName) throws StreamBaseException
Admin
clearEvalCache
in interface Admin
timeoutMS
- Timeout in milliseconds to wait for completioncontainerName
- Container nameStreamBaseException
- Error clearing cachepublic String getMapperCacheContent(long timeoutMS, String containerName) throws StreamBaseException
Admin
getMapperCacheContent
in interface Admin
timeoutMS
- Timeout in milliseconds to wait for completioncontainerName
- Container nameStreamBaseException
- Error reading cachepublic Map<Integer,String> getNamesForContainer(long timeoutMS, int id) throws StreamBaseException
Admin
getNamesForContainer
in interface Admin
StreamBaseException
Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.