Migration notes
Migrate to 5.8
Announcement
JDK 11 Support
ActivePivot 5.8 supports both JDK 8 and JDK 11. The Java version used by
Maven when compiling ActivePivot depends on the JAVA_HOME
environment
variable, or the current java version if the JAVA_HOME
environment variable
is not set. You will find more information on
the dedicated page.
ActivePivot
HierarchyUtil
The following methods do not return null but throw a UnknownOlapElementRuntimeException when the element is not found:
public static IHierarchy getHierarchy(IActivePivot pivot, String hierarchyDescription) {...}
public static IHierarchy getHierarchy(IActivePivot pivot, String dimensionName, String hierarchyName) {...}
public static ILevel getLevel(IActivePivot pivot, String levelDescription) {...}
public static ILevel getLevel(final IActivePivot pivot, final String dimensionName, final String hierarchyName, final String levelName) {...}
Filters on analysis hierarchies, PostProcessors and V2
In 5.7 a change of behavior in the aggregate retrievers has been introduced : the retrievals with filters on an analysis hierarchy now return null. In 5.7.3 we introduced new versions of post processors (ABasicPostProcessorV2, ABaseDynamicAggregationPostProcessorV2, ADynamicAggregationPostProcessorV2 and AFilteringPostProcessorV2) that automatically remove the filters on analysis hierarchies in the prefetcher of the post processor, and add the filter back while expanding the result on the analysis hierarchies. It was introduced as V2 to avoid changing the behavior of the post processor in a bugfix release.
In 5.8 the post processors V2 have been removed and the core post processors (ABasicPostProcessor, ABaseDynamicAggregationPostProcessor, ADynamicAggregationPostProcessor and AFilteringPostProcessor) now perform this filter removal if the "analysisLevels" property is used.
Keep in mind that AAdvancedPostProcessor does not handle those filters. If you implement directly AAdvancedPostProcessor, you can learn how to handle them on this confluence page.
In order to solve this problem, ABasicPostProcessor (respectively ABaseDynamicPostProcessors) now uses named prefetchers. They will use the constant ABasicPostProcessor.BASIC_POST_PROCESSOR_PREFETCHER (resp. ABaseDynamicAggregationPostProcessor.DYNAMIC_AGGREGATION_POST_PROCESSOR_PREFETCHER) as the name of the prefetcher to retrieve. If you define your own prefetcher you need to name it correctly :
IPrefetcher<?> namedPrefetcher = IPrefetcher.name(ABasicPostProcessor.BASIC_POST_PROCESSOR_PREFETCHER, prefetcher);
CubeFilterBuilder
ICubeFilterBuilder.includeMembers([...])
and excludeMembers([...])
now only accept List<String>
as members path name argument.
The previous signature that accepted List<?>
as members has been moved to ICubeFilterBuilder.includeMembersWithConditions([...])
and excludeMembersWithConditions([...])
Usage of the includeMembersWithConditions([...])
and excludeMembersWithConditions([...])
methods should only be done when using IConditions
when building the CubeFilter.
Range Sharing configuration
The range sharing can no longer be configured with a boolean. You must use an integer or use the withRangeSharing() method on the cube builder, e.g. .withProperty("rangeSharing", "false")
has been replaced by .withoutRangeSharing()
.
AStoreStream
Listeners on a continuous query do not receive an initial view when registering to this query anymore.
This was not the case with com.quartetfs.biz.pivot.postprocessing.streams.impl.AStoreStream
, and has been fixed.
AStoreStream is a selection listener which registers on a datastore selection. It is entirely possible for this operation to occur in the middle of a transaction.
The javadoc of com.quartetfs.biz.pivot.postprocessing.streams.impl.AStoreStream#registerSelection
gives some pointers for concrete implementations.
Copper
Test jar
The Copper test utils that were previously packaged in a test-jar
have been moved to their own module:
<groupId>com.activeviam.activepivot</groupId>
<artifactId>activepivot-copper-test</artifactId>
Datastore
Duplicate key handling
Replacement: IDuplicateKeyWithinTransactionListener
→ IDuplicateKeyHandler
The IDuplicateKeyWithinTransactionListener
interface has been replaced by the IDuplicateKeyHandler
interface, as
described in the Changelog.
The IDuplicateKeyWithinTransactionListener
only allowed to define a custom behavior when two records had the same key
fields within the transaction (but that no record with these key fields exists in the datastore yet). It is still
possible to define such a behavior using the IDuplicateKeyHandler.selectDuplicateKeyWithinTransaction
function.
However, it is now also possible to define a custom behavior when a record in the transaction has the same key fields
as a record already in the datastore, by defining the IDuplicateKeyHandler.selectDuplicateKeyInDatastore
function.
The default behavior, which is to always update with the latest record, has not changed.
The store description builder has been modified : one should replace
.onDuplicateKeyWithinTransaction().logException()
by .withDuplicateKeyHandler(DuplicateKeyHandlers.LOG_WITHIN_TRANSACTION)
Selection Builder
When using the datastore selection builder, one can add all fields reachable using references from a given store using
.withAllreachableFields()
. The only policy used to be that all fields with same name had to be reachable from one
another, and that the furthest would be used.
The selection builder now walks the field graph using references between stores, and keeps track of the paths leading
to the same field. If there are no collisions, nothing happens. But if there are, three options are available:
- resolve conflicts automatically by choosing the furthest field, and throw an exception if two fields with the same
name are not reachable from one another (example:
ref1/field
andref2/field
). This is how it used to be in 5.7, and is the default behavior. - resolve conflicts automatically by choosing the closest field, and throw an exception if two fields with the same
name are not reachable from one another (example:
ref1/field
andref2/field
). - resolve conflicts manually. The user can use a
FieldsCollisionHandler
to transform a map of {field name, [possible paths]} into a map of {name, full expression} (the expression is of the formref1/ref2/fieldName
). This gives the user the possibility to keep one, the other, both (with custom field name), or none.
Test jar
The datastore test utils that were previously packaged in a test-jar
have been moved to their own module:
<groupId>com.activeviam.tech</groupId>
<artifactId>datastore-test</artifactId>
Removal of LINE storage
The storage type in line provided by ActivePivot 5.0 as a safe alternative to the brand new - at the time - columnar
storage has finally been removed. Only one value remains possible: StorageType.COLUMN
.
Changes are required only if your Datastore stores were explicitly configured to use the LINE storage. If so, either replace it by COLUMN as below, or just remove the call to configure the storage to use the default version.
new StoreDescriptionBuilder().withStoreName("<store>")
.withField(...).asKeyField()
... // Other configuration calls
- .withStorage(IStoreDescription.StorageType.LINE)
+ .withStorage(IStoreDescription.StorageType.COLUMN)
...
.build();
Format of partitions sizes
StoreUtils.getPartitionSizes(storeVersion)
now returns values of -1 in the array for non-existing partitions (either dropped or never initialized) at the given storeVersion
.
JDBCSource
The constructors for IJDBCSource
implementations without an appendBatchSize
have been removed.
The constructors for IJDBCSource
implementations no longer require a driverClassName
in the arguments when an IConnectionSupplier
is provided .
The SimpleConnectionSupplier
implementation of IConnectionSupplier
now requires a driverClassName
argument.
The appendQueueSize
attribute has been removed from all IJDBCSource
implementation constructors, and is now a field of the JDBCTopic
class.
JSON Web Tokens (JWT)
The RSA key pair defined by the qfs.jwt.key.[public|private]
variables in jwt.properties
should now be encoded with at least 2048 bits, against 1024 previously. A new pair can be generated using JwtUtil
.
StreamingService
The signature of IStreamingService.updateStreamRanges
changed. It now takes an IAxisRanges
instead of an array of IRangeProperties
.
Spring configuration
With the introduction of the centralized property accessor ActiveViamProperty
, the environment properties will be available only if you import the ActiveViamPropertyFromSpringConfig
configuration class
(see the associated developer guide page).
Memory analysis
With 5.8.0, we improved the services for Memory Analysis. Some elements have been migrated to the dedicated application
Memory Analysis Cube - DatastoreFeederVisitor
, ... Other classes have been renamed to better emphasize that the services are designed for
Memory analysis only and not monitoring.
Renamed classes:
IMemoryMonitoringService
->IMemoryAnalysisService
MemoryMonitoringService
->MemoryAnalysisService
MonitoringStatisticSerializerUtil
->MemoryStatisticSerializerUtil
Removed classes:
For the sake of readability, only major classes are mentionned.
DatastoreFeederVisitor
MemoryMonitoringDatastoreDescription
Previous migration notes
You can find the previous Migration Notes in our old Confluence documentation: