Version 0.10.0
BREAKING CHANGES
There is only PARTIAL COMPATIBILITY between
- an
0.10.0+
client and an older server, and - a
0.10.0+
server and an older client.
Due to changes in Concourse's internal APIs,
- Older client will receive an error when trying to invoke any navigate or calculation methods on a
0.10.0+
server. - Older servers will throw an error message when any navigate or calculation methods are invoked from an
0.10.0+
client.
New Features
Sorting
Concourse Server now (finally) has the ability to sort results!
- A result set that returns data from multiple records (across any number of keys) can be sorted.
- Concourse drivers now feature an
Order
framework that allows the client to specify how Concourse Server should sort a result set. AnOrder
can be generated using an intuitive builder chain. - An Order can be specified using values for any keys; regardless of whether those keys are explictly fetched or not.
- A timestamp can optionally be associated with each order component.
- NOTE: If no timestamp is specified with an order component, Concourse Server uses the value that is explicitly fetched in the request OR it looks up the value using the selection timestamp of the request. If there is no selection timestamp, the lookup returns the current value(s).
- A direction (ascending or descending) can optionally be associated with each order component.
- NOTE: The default direction is ascending.
- An Order can contain an unlimited number of components. If, after evaluating all the order components, two records still have the same sort order, Concourse Server automatically sorts based on the record id.
- If a
null
value is encountered when evaluating an order components, Concourse Server pushes the record containing thatnull
value to the "end" of the result set regardless of the order component's direction.
Pagination
Concourse Server now (finally) has the ability to page through results!
- A result set that returns data from multiple records (across any number of keys) can be paginated.
- Concourse drviers now feature a
Page
object that allows the client to specify how Concourse Server should paginate a result set. APage
is an abstraction for offset/skip and limit parameters. ThePage
class contains various factory methods to offset and limit a result set using various intuitive notions of pagination.
Navigable Data Reads
- You can now traverse the document graph by specifying one ore more navigation keys in the following read methods:
- browse
- calculate
- get
- select
- Reading a navigation key using
get
orselect
is intended to repleace thenavigate
methods. - When reading a navigation key in the context of one or more records, the root record (e.g the record from which the document-graph traversal starts) is mapped to the values that are retrieved from the destination records. In the
navgiate
methods, the destination record is associated with the destination value(s).- For example, assume record
1
is linked to record2
on thefriends
key. Record2
contains the valueJeff
for thename
key... - if you
select("friends.name", 1)
, the return value will map1
to[Jeff]
whereas the return value ofnavigate("friends.name", 1)
maps2
to[Jeff]
.
- For example, assume record
Navigable Criteria
- You can now use navigation keys in
Criteria
objects orccl
statements that are passed to thefind
,get
andselect
methods.
ETL
- Added the
com.cinchapi.concourse.etl
package that contains data processing utilities:- A
Strainer
can be used to process aMap<String, Object>
using Concourse's data model rules. In particular, theStrainer
encapsulates logic to break down top-level sequence values and process their elements individually. - The
Transform
class contains functions for common data transformations.
- A
Miscellaneous
- Added an iterative connection builder that is accessible using the
Concourse.at()
static factory method. - Added the
com.cinchapi.concourse.valididate.Keys
utility class which contains the#isWritable
method that determines if a proposed key can be written to Concourse. - Added
Parsers#create
static factory methods that accept aCriteria
object as a parameter. These new methods compliment existing ones which take a CCLString
andTCriteria
object respectively. - Upgraded the
ccl
dependency to the latest version, which adds support for local criteria evaluation using theParser#evaluate
method. The parsers returned from theParsers#create
factories all support local evaluation using the function defined in the newly createdOperators#evaluate
utility. - Added support for remote debugging of Concourse Server. Remote debugging can be enabled by specifying a
remote_debugger_port
inconcourse.prefs
. - The
calculate
methods now throw anUnsupportedOperationException
instead of a vagueRuntimeException
when trying to run calculations that aren't permitted (i.e. running an aggregation on a non-numeric index).
Improvements
- Refactored the
concourse-import
framework to take advantage of version1.1.0+
of thedata-transform-api
which has a more flexible notion of data transformations. As a result of this change, theImportables
utility class has been removed. Custom importers that extendDelimitedLineImporter
can leverage the protectedparseObject
andimportLines
methods to hook into the extraction and import logic in a manner similar to what was possible using theImportables
functions. - Refactored the
Criteria
class into an interface that is implemented by any language symbols that can be immediately transformed to a well-built criteria (e.g.ValueState
andTimestampState
). The primary benefit of this change is that methods that took a generic Object parameter and checked whether that object could be built into aCriteria
have now been removed from theConcourse
driver since that logic is automatically captured within the new class hiearchy. Another positive side effect of this change is that it is no longer necessary to explicitly build a nestedCriteria
when using thegroup
functionality of theCriteria
builder. - Improved the performance of querying certain Concourse Server methods from a plugin via
ConcourseRuntime
by eliminating unnecessary server-side calculations meant to facilitate analytics. These calculations will continue to be computed when the plugin receives the data fromConcourseRuntime
.
Bug Fixes
- Fixed a bug that caused data imported from STDIN to not have a
__datasource
tag, even if the--annotate-data-source
flag was included with the CLI invocation. - Fixed a bug that allowed Concourse Server to start an environment's storage engine in a partially or wholly unreadable state if the Engine partially completed a block sync while Concourse Server was going through its shutdown routine. In this scenario, the partially written block is malformed and should not be processed by the Engine since the data contained in the malformed block is still contained in the Buffer. While the malformed block files can be safely deleted, the implemented fix causes the Engine to simply ignore them if they are encountered upon initialization.
- Added checks to ensure that a storage Engine cannot transport writes from the Buffer to the Database while Concourse Server is shutting down.
- Fixed a bug that allow methods annotated as
PluginRestricted
to be invoked if those methods were defined in an ancestor class or interface of the invokved plugin. - Fixed a bug introduced by JEF-245 that caused Concourse Server to fail to start on recent versions of Java 8 and Java 9+ due to an exploitation of a JVM bug that was used to allow Concourse Server to specify native thread prioritization when started by a non-root user. As a result of this fix, Concourse Server will only try to specify native thread prioritization when started by a root user.
Deprecated and Removed Features
- Removed the
Strings
utility class in favor ofAnyStrings
fromaccent4j
. - Removed the
StringSplitter
framework in favor of the same fromaccent4j
. - Deprecated
Criteria#getCclString
in favor ofCriteria#ccl
. - The
navigate
methods in the client drivers have been deprecated in favor of usingselect
/get
to traverse the document-graph.