Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh-349: Document Iterable and Iterator class migration/changes #426

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/change-notes/changelist/v2-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A lot of bugs have been fixed that should facilitate FederatedStores with ProxyS
!!! danger "Breaking change | developer | [alpha-0.5](https://github.com/gchq/Gaffer/releases/tag/gaffer2-2.0.0-alpha-0.5)"
The unique store trait `DYNAMIC_SCHEMA` has been removed from Gaffer. Simply removing it from custom FederatedStore implementations should be an adequate fix.

### Removal of CloseableIterable
### Removal of CloseableIterable and CloseableIterator
The `CloseableIterable` class has been removed so Operations like `GetAllElements` now return an `Iterable` instead, but the result still implements `Closeable`.
!!! danger "Breaking change | developer | [alpha-0.2](https://github.com/gchq/Gaffer/releases/tag/gaffer2-2.0.0-alpha-0.2)"
Everywhere `CloseableIterable` was used in client code should be replaced with an `Iterable`:
Expand All @@ -49,6 +49,18 @@ The `CloseableIterable` class has been removed so Operations like `GetAllElement
final Iterable<? extends Element> results = graph.execute(new GetAllElements(), USER);
```

Note that the `CloseableIterator` class has similarly been removed and any implementations will require updating.

### Migration of Iterable Classes
Some Gaffer-specific Iterables and Iterators used for retrieving and manipulating data from stores have migrated from `uk.gov.gchq.gaffer.commonutil.iterable` to [`uk.gov.gchq.koryphe.iterable`](https://gchq.github.io/koryphe/uk/gov/gchq/koryphe/iterable/package-summary.html).

`ChainedIterable`, `ChainedIterator`, `FilteredIterable`, `FilteredIterator`, `LimitedIterable` (previously `LimitedCloseableIterable`) and `LimitedIterator` have been migrated into the Koryphe repo.
Additionally, the `MappedIterable` and `MappedIterator` classes have been added which allow you to apply a list of functions to an iterable/iterator.

Many of the other classes remain in [`uk.gov.gchq.gaffer.commonutil.iterable`](https://gchq.github.io/Gaffer/uk/gov/gchq/gaffer/commonutil/iterable/package-summary.html).

Both the `WrappedCloseableIterable` and `WrappedCloseableIterator` classes have been removed.

### Removal of HBase and Parquet stores
The HBase and Parquet stores have been removed from Gaffer in version 2. We made posts for both the [HBase](https://github.com/gchq/Gaffer/issues/2367) and [Parquet](https://github.com/gchq/Gaffer/discussions/2557) stores to understand the levels of usage. It was then decided to remove both stores as this would make introducing various improvements easier in the long term. HBase and Parquet remain available in Gaffer version 1. In the future, they could be reimplemented for Gaffer 2, though we do not plan to currently.
!!! danger "Breaking change | admin | [alpha-0.1](https://github.com/gchq/Gaffer/releases/tag/gaffer2-2.0.0-alpha-0.1)"
Expand Down