| 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
StreamBaseExceptionpublic boolean isHA()
Adminpublic ByteOrder getByteOrder(long timeoutMS) throws StreamBaseException
AdmingetByteOrder in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeStreamBaseExceptionpublic 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 Adminapplication - 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
Adminshutdown in interface AdmintimeoutMS - 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
AdminshutdownOperators in interface AdmintimeoutMS - 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
AdminrestartOperators in interface AdmintimeoutMS - 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
AdminsuspendOperators in interface AdmintimeoutMS - 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 AdmintimeoutMS - 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
AdminresumeOperators in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeoperatorsNames - the operators to suspendStreamBaseExceptionpublic void resume(long timeoutMS,
String containerName)
throws StreamBaseException
resume in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completecontainerName - optional containerNameStreamBaseExceptionpublic String describe(long timeoutMS, String entityName) throws StreamBaseException
describe in interface AdminentityName - 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 AdminfeatureName - 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 AdminstreamName - 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
AdminCaptureTransformStrategy.FLATTENgetStreamProperties in interface AdmintimeoutMS - 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 Adminhash - 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 AdminentityType - 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 Adminhash - 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 AdminschemaName - 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
Admindrain in interface AdmintimeoutMS - 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
AdmingetOperatorProperties in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeoperatorName - The operator whose properties are retrieved.StreamBaseExceptionpublic String getOperatorProperty(long timeoutMS, String operatorName, String propertyName) throws StreamBaseException
getOperatorProperty in interface AdminoperatorName - 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 completeStreamBaseExceptionpublic void setOperatorProperty(long timeoutMS,
String operatorName,
String propertyName,
String value)
throws StreamBaseException
setOperatorProperty in interface AdminoperatorName - 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 completeStreamBaseExceptionpublic String[] operatorStatus(long timeoutMS, String containerName) throws StreamBaseException
operatorStatus in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completecontainerName - name of the containerStreamBaseExceptionpublic String[] status(long timeoutMS, boolean verbose) throws StreamBaseException
status in interface AdmintimeoutMS - 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 Adminconnections - 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 Adminprops - 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 AdmintimeoutMS - 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 AdmintimeoutMS - 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
Adminenqueue in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeprops - StreamProperties for streamtuples - list of tuplesStreamBaseExceptionpublic void setRuntimeParam(long timeoutMS,
String paramName,
String paramValue,
String operator)
throws StreamBaseException
AdminsetRuntimeParam in interface AdmintimeoutMS - 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 paramStreamBaseExceptionpublic String[] addContainer(long timeoutMS, String containerName, byte[] application, List<String> containerStreamMappings) throws StreamBaseException
AdminaddContainer in interface AdmintimeoutMS - 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
AdminaddDeploy in interface AdmintimeoutMS - 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
AdminrestartContainer in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completecontainerName - the name of the container to restartStreamBaseExceptionpublic String[] removeContainer(long timeoutMS, String containerName, List<String> args) throws StreamBaseException
AdminremoveContainer in interface AdmintimeoutMS - 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 AdmincontainerName - args - list of argumentstimeoutMS - the timeout in milliseconds to wait for the command to completeStreamBaseExceptionpublic String[] killConnection(long timeoutMS, byte[] connectionId) throws StreamBaseException
AdminkillConnection in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeStreamBaseExceptionpublic String[] killAllConnections(long timeoutMS) throws StreamBaseException
AdminkillAllConnections in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeStreamBaseExceptionpublic String[] manageJdbcConnections(long timeoutMS, List<String> args) throws StreamBaseException
AdminmanageJdbcConnections in interface AdmintimeoutMS - 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
AdminThis method is no longer supported since the StreamBase 10 platform release. Please consult the documentation.
setLeadershipStatus in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeleadershipStatus - new leadership statusStreamBaseExceptionpublic Constants.LeadershipStatus getLeadershipStatus(long timeoutMS) throws StreamBaseException
AdminThis method is no longer supported since the StreamBase 10 platform release. Please consult the documentation.
getLeadershipStatus in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completeStreamBaseExceptionpublic 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)
AdminsetConnectionID in interface Adminpublic ByteString getConnectionID()
AdmingetConnectionID in interface Adminpublic static String createBaseURIString(Collection<StreamBaseURI> uris)
uris - public Tuple getDynamicVariables(long timeoutMS, Path modulePath) throws StreamBaseException
AdmingetDynamicVariables in interface AdmintimeoutMS - 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
AdminsetDynamicVariable in interface AdmintimeoutMS - the timeout in milliseconds to wait for the command to completedynamicVariablePath - the path to the dynamic variablevalue - the value to set the variable toStreamBaseExceptionpublic void fastForwardTime(long timeout,
Object value)
throws StreamBaseException
AdminfastForwardTime in interface Admintimeout - 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
AdmingetEvalCacheContent in interface Admintimeout - Timeout in milliseconds to wait for completioncontainerName - Container nameStreamBaseException - Error reading cachepublic String getTargetTime(long timeout) throws StreamBaseException
AdmingetTargetTime in interface Admintimeout - Timeout in milliseconds to wait for completionStreamBaseException - Error getting timepublic Schema.Field getDynamicVariableField(long timeoutMS, Path dynamicVariablePath) throws StreamBaseException
StreamBaseExceptionpublic List<Tuple> readTable(long timeoutMS, String tablePath, int rowLimit, String predicate) throws StreamBaseException
AdminreadTable in interface AdmintimeoutMS - 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
AdminclearEvalCache in interface AdmintimeoutMS - Timeout in milliseconds to wait for completioncontainerName - Container nameStreamBaseException - Error clearing cachepublic String getMapperCacheContent(long timeoutMS, String containerName) throws StreamBaseException
AdmingetMapperCacheContent in interface AdmintimeoutMS - Timeout in milliseconds to wait for completioncontainerName - Container nameStreamBaseException - Error reading cachepublic Map<Integer,String> getNamesForContainer(long timeoutMS, int id) throws StreamBaseException
AdmingetNamesForContainer in interface AdminStreamBaseExceptionCopyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.