Contents
If you have a previous StreamBase release installed, but you are new to the StreamBase 7.x series, follow these migration steps to ensure a smooth transition:
- Read Previous 7.x New and Noteworthy Sections
-
Study the New and Noteworthy sections for earlier 7.x releases.
- Close All 6.x EventFlow Modules in 6.x Before Opening in 7.x
-
Studio 7.x includes a new EventFlow Editor with advanced features, as described in EventFlow Editor Differences. All EventFlow files open automatically in the new Editor if you start with a new, blank Studio workspace. If you open an existing 6.x workspace in Studio 7.x, EventFlow files might open in the Legacy EventFlow Editor instead. To prevent this, follow these steps:
-
Open Studio 6.x.
-
Close ALL Editor sessions, so that you end with a large gray area where the canvas usually is, and an empty Palette view.
-
Close Studio 6.x and open Studio 7.x using the same workspace.
-
With one exception, all EventFlow files you open in Studio 7.x now open in the new EventFlow Editor.
The exception is that any EventFlow file you ever opened using the Open With context menu in Studio 6.x might still open in the Legacy EventFlow Editor in 7.x. In this case, close the Editor session and reopen it one time in Studio 7.x using the → context menu. Thereafter, that file opens in the new Editor.
-
- Reset Your Perspectives
-
The 7.x series adds menu items, views, and editors to the standard StreamBase Studio perspectives. If you are re-using an existing Studio workspace, you must run reset your perspectives in order to see the new features. To reset perspectives, follow these steps:
-
[Optional step] If you have a highly customized perspective arrangement, you can save it before resetting, which allows you to return anytime to your customized layout. Use StreamBase perspective name. For example, save your customized perspective as My SB Authoring.
→ to save your current customized perspective, but do not save it with an existing -
Open the SB Authoring perspective. Invoke → and click in the confirmation dialog.
-
Do the same for the SB Test/Debug perspective.
-
- Update Any Logback.xml Configuration Files
-
StreamBase 7.x includes a newer version of the Logback libraries than the release 6.x series, and one section of Logback configuration files was updated to a new format. See Using StreamBase Logging for an overview of StreamBase logging.
If your 6.x projects include a
Logback.xml
file, migrate the affected section to the new format. In particular, the Logback configuration files appropriate for 6.x use the format shown in the following example for specifying a pattern layout for log messages:<layout class="ch.qos.logback.classic.PatternLayout"> <pattern>[LogBack %p] %c{0} - %m%n</pattern> </layout>
This is replaced in the 7.x version with the
<encoder><pattern>
format shown in the following example:<encoder> <pattern>[LogBack %level] %logger{0} - %msg%n</pattern> </encoder>
Because of this format change, Logback configuration files that worked well with a 6.x release will continue to work with StreamBase 7.x, but at the cost of a dozen WARNING messages emitted that urge you to switch to the newer
<encoder>
format.
As you work with StreamBase 7.x, be aware of the following differences between StreamBase 6.x and 7.x.
- Configuration File Changes
-
The StreamBase Server configuration file's XML syntax has several important changes described next and in the 7.0.0 New and Noteworthy. To take advantage of the new features, StreamBase Systems recommends opening your existing configuration files in Studio 7.x's Configuration File Editor. Add the new namespace declarations to the top
<streambase-configuration>
element, as described in Upgrading Configuration Files, then correct any typecheck errors detected. As an alternative, you can generate a new skeleton configuration file in Studio, or with sbd -s, then copy the custom settings from your old configuration files to the new file. - Deprecated Server Configuration Attributes Now Removed
-
Server configuration file attributes documented as deprecated in previous releases were removed as of 7.0.0, and now cause a typecheck error if detected in your
.sbconf
files. These include:<runtime> <param name="cpp-string-field-size" ...>
<runtime> <param name="application-file" ...>
<data-source type="chronicle" ... >
The size
attribute of<return>
under<custom-function>
- Use Deployment Files to Define Containers and Container Connections
-
The
<runtime>
element's<application>
child element of the server configuration file is now deprecated in favor of the same elements in StreamBase deployment files. Your existing server configuration files are still supported, but StreamBase Systems strongly recommends migrating to deployment files. - New Signatures for Three Expression Language Functions
-
In the StreamBase expression language, three functions were updated and no longer accept a string length argument. In any application that uses format(), systemproperty(), or systemenv(), adjust the expression to remove the extra argument.
- System Statistics Stream Renamed; Cannot Monitor Server 7 with Monitor Clients 6
-
As a consequence of release 7.x's high resolution profiling feature, the system stream on which StreamBase Server emits statistics was renamed to
system.statv2
(fromsystem.stat
in previous releases).As a result, any server monitoring utilities compiled with the 6.x Client Library (including StreamBase Manager, sbmonitor, and sbprofile from 6.x) fail to connect to StreamBase Server 7.x. You must use StreamBase Manager, sbmonitor, and sbprofile from 7.x to monitor or profile Server 7.x. Any custom monitoring utilities must be recompiled with the 7.x Client Library to be able to monitor Server 7.x.
- Renaming Columns in JDBC Queries
-
Support was added to rename columns in SQL queries in Query operators associated with a JDBC Table data construct. For example,
select column1 as field1
now works as expected to return a column namedfield1
in the results of the query. In previous releases, the AS keyword was accepted, but the returned field was not actually renamed. - New Default Expression for Aggregate Operators
-
In previous releases, when you added a new Aggregate operator to the EventFlow canvas, the grid in the Properties view's Aggregate Functions tab contained a single default entry with these values:
Action Field Name Expression Add * firstval(*) Starting with release 7.0.0, the default expression function is now
lastval(*)
:Action Field Name Expression Add * lastval(*) - Typecheck Errors from New Behavior for Named Schema Constructor Functions
-
When you define or import a named schema, StreamBase automatically adds a function with the same name to the expression language that lets you construct an instance of that schema, as described in the named schema constructor function. In 6.x releases, named schema constructor functions were always called by argument position. In StreamSQL, you were required to include AS clauses to specify field names. In EventFlow modules, field names specified with AS clauses in expressions were accepted but ignored.
Starting with release 7.0.0, named schema constructor functions can now be called either by argument position or by field name. To call by field name, construct the tuple with AS clauses to specify the schema field name for function arguments, which sets values for only the specified fields in the resulting tuple. You do not need to specify all fields; any fields not represented in the arguments are automatically given a null value. As of 7.0.0, it is an error to mix AS-clause and non AS-clause arguments in the same named schema constructor.
There are two ways this change can result in typecheck errors when you open a 6.x application in 7.x:
-
When migrating a module to 7.x, you now receive a typecheck error for an operator that uses a named schema constructor function with partial AS clauses (such as
myschema(10, 20.5, "IBM" as symbol)
). The typecheck error message begins with "Mix of explicitly named and unnamed arguments." The solutions are: (1) remove all AS clauses to restore the by-position argument style, or (2) add AS clauses for all fields to use the by-name style. Solution 2 provides better compatibility with future changes to your named schemas. -
Because AS clauses were previously accepted but ignored in EventFlow module expressions, field names in the expression were not validated against the formal field names defined for that named schema in a module's Definitions tab. This means that, in 6.x releases, you might have mistyped a field name in an expression, or used a lowercase version of a mixed case field name, without complaint from StreamBase.
When you open a such a 6.x application in Studio 7.x, for each of those cases, you now receive a typechecking error that complains "operator
opName
: SchemaschemaName
has no field namedfieldName
inappName
." In this case, open the Properties view for operatoropName
in the specified module, and look for a use of a named schema constructor function. Make sure all field names specified with an AS clause use the exact, case-sensitive spelling of each field name as defined in the defining module's Definitions tab.
-
Be aware of the following StreamBase Studio changes in the 7.x release series.
- New EventFlow Editor
-
Studio's EventFlow Editor underwent a major transformation as of StreamBase 7.0.0. The great majority of editing features work the same as before, but with new ease of use and editing efficiency. EventFlow application files from Studio 6.x open in Studio 7.x without requiring a conversion process. EventFlow modules are silently upgraded to take advantage of new features when you next save the module in 7.x.
Notice that the selection outlines around component icons are now automatically sized as wide as the component's name. Data constructs such as Query Tables are also automatically sized to the width of their assigned names. This may result in crowded or overlapping components in some modules that were last saved in StreamBase 6.x. You may prefer to rearrange components on the canvas before saving the first time. You can rearrange automatically by pressing Ctrl+L.
See EventFlow Editor 7.x Differences for a complete list of the differences between the 6.x and 7.x EventFlow Editors.
- Layout Coordinates Change with New Editor
-
Using the new EventFlow Editor serializes new values for height, width, and coordinates of components on the EventFlow canvas. If you save an EventFlow module in Studio 7.x, then re-open it with an earlier release's Studio, the placement of components on the canvas may be affected.
- StreamBase Studio Based on Eclipse 3.6
-
As of 7.0.0, Studio is based on Eclipse 3.6, with compatibility for Eclipse 3.5 plug-ins. Studio now ships with the Subversive plug-in to provide support for the Subversion version control system.
- Wizard to Import 3.x Workspace Removed
-
Studio 7.x no longer includes a wizard to load and migrate Studio 3.x projects.
The StreamBase Client Library changed in the following ways as of release 7.0.0.
- Recompile Client Programs
-
If you have custom server monitoring programs compiled with any 6.x release, you must recompile them with the 7.x Client Library to be able to monitor Server 7.x.
By contrast, existing enqueuing and dequeuing client programs compiled with the 6.x Client Library will continue to enqueue to or dequeue from Server 7.x. This is because StreamBase Server, as before, includes automatic proxying of the network protocol versions of previous releases.
However, StreamBase Systems recommends recompiling all 6.x client programs to take advantage of changes in the 7.x API.
- Java API Changes
-
The StreamBase Client Library for Java changed in the following ways for the classes listed. Existing code that uses deprecated methods will now have compile errors until adjusted to take into account these updates.
- Performance Improvements for Operator and Adapter Marshalling
-
The New Operator and New Adapter wizards have been updated to generate code that uses a new recommended pattern that produces generated tuples faster. In the new pattern, performance is improved by creating output Tuples from schemas returned by
setOutputSchema()
orgetOutputSchema()
. - Implementation Change for Operators and Adapters
-
The New Operator and New Adapter wizards have been updated to generate code in which their BeanInfo classes now extend
SBSimpleBeanInfo
, rather thanSimpleBeanInfo
. They also now implementgetPropertyDescriptorsChecked()
, which returns an array ofSBPropertyDescriptor
objects and throws anIntrospectionException
. Previously, when extendingSimpleBeanInfo
, the overridden method used wasgetPropertyDescriptors()
, which returned an array ofPropertyDescriptor
objects and did not throw anIntrospectionException
. The change was made to allow the names of missing getters and setters to be exposed, thus streamlining the development of adapters and operators. - Tuple Class
-
-
The deprecated methods
getStringBytes()
,setStringBytes()
,getStringBuffer()
, andsetStringBuffer()
were removed. UsegetString()
andsetString()
instead. -
The signatures of
setString()
that took aString value
as the second argument were removed. -
Deprecated signatures of
setField()
that specified a Booleantruncate
argument were removed. -
The
clear()
method no longer throws an exception. You can remove any catch clauses with no ill effect. -
getFieldAsString()
is now promoted to the public API. -
Tuple methods that took or returned a
Map
object in previous releases now take or returnMap<String,Object>
. -
getFields()
is now deprecated in favor of the newtoMapView()
method. -
The DEFAULT_FORMATTER and HEX_FORMATTER static strings were not part of the public API, but are now removed.
-
The
hammerSchema()
method, marked with @exclude in previous releases, is now removed.
-
- TupleCopier Class
-
TupleCopier
was expanded with a new constructor to copy fields by index. The original by-name constructor is still available. - StreamBaseAdminClient Class
-
-
The deprecated methods
clustershutdown()
,clusterstart()
,isCluster()
, andmodify()
were removed. -
Use the new method
addDeploy()
to add the runtime specifications in a StreamBase deployment file to a running server.
-
- StreamBaseClient Class
-
-
The
enqueue()
method now accepts tuples that have a schema with the exact same field positions and data types as the input stream, but that have different field names. -
The new method
getDynamicVariable(String dynvarPath)
returns the value of the specified dynamic variable. -
The new method
getDynamicVariables(String modulePath)
returns a Tuple of all dynamic variables in the specified module along with their values. -
The new method
setDynamicVariable(String dynamicVariablePath, Object value)
sets the specified dynamic variable to the specified value.
-
- New StreamBaseClient.ListEntityFlags Interface
-
The constants in the
StreamBaseClient
class that are used in thelistEntities()
method were moved to the ListEntityFlags interface. The following constants are affected: NO_FLAGS, FULLY_QUALIFIED_NAMES, INCLUDE_MODULES, ALL_CONTAINERS. - DequeueResult Class
-
-
The deprecated methods
getTuple()
,reuseTuple()
, andreuseTuple(Tuple)
were removed. -
The deprecated methods
getTuple(int)
andtuples()
were removed; useiterator()
instead.
-
- Schema Class
-
Deprecated
Schema
constructors with ahasHeader
boolean argument were removed. - Operator Class
-
-
Method
setOutputSchema()
now returns a Schema instead of void. Client applications that used this method need to be adjusted and recompiled. -
The new method
getRuntimeEnvironment()
returns an object with information about the runtime environment of the hosting StreamBase Server.
-
- New Operator.RuntimeEnvironment Interface
-
Provides access to StreamBase Server facilities from Java operators. This interface currently supports the
getLeadershipStatus()
andgetURI()
methods. - SBServerManager Interface
-
-
SBServerManager now supports a
loadAppString()
method that loads an application with a string rather than a file name. -
The interface now supports a
getURI()
method to return the StreamBase URI of the server.
-
- C++ API Changes
-
The StreamBase Client Library for C++ changed in the following ways:
- Deprecated APIs for old cluster support now removed
-
Methods were removed that referred to the Node Manager based cluster support that was provided in StreamBase 5.0 and earlier:
-
StreamBaseClient::isCluster()
-
StreamBaseAdminClient::clusterStart()
-
StreamBaseAdminClient::clusterShutdown()
-
- Signatures for addContainer() and removeContainer() changed
-
StreamBaseAdminClient::addContainer()
andStreamBaseAdminClient::removeContainer()
were updated to returnstd::vector<std::string>
instead ofvoid
. Client applications that used these methods need to be adjusted and recompiled. - New Methods
-
StreamBaseAdminClient::addDeploy()
is used to add the runtime specifications in a StreamBase deployment file to a running server.
The StreamBase Client Library was updated as follows as of release 7.1.0:
-
The previously deprecated
Schema#sameFieldDescriptions
was removed. -
#sameSchemaDescriptions
was previously marked@exclude
, and is now removed. -
In both the C++ and Java APIs, two methods were added:
StreamBaseClient.getTupleEnqueueCount()
andStreamBaseClient.getTupleDequeueCount()
. This allows your client applications to request the number of tuples they have enqueued or dequeued. -
The
StreamBaseMonitor
API for both Java and .NET now supports reporting JVM garbage collection data. Look forgetGCollectors()
in theSystemInfo
class, and a new classSystemInfo.GCInfo
. -
The Java package com.streambase.sb.client has a new class,
ClientSettings
. Use this class to set and modify various settings forStreamBaseClient
andStreamBaseAdminClient
client applications. There are new constructors onStreamBaseClient
andStreamBaseAdminClient
that take aClientSettings
object as an argument. -
In the Java API, there are new interface classes
Operator.SharedObject
andOperator.SharedObjectManager
that implement and manage objects that can be shared between operators in the same container.