Interface FlinkPublishApi
- All Known Implementing Classes:
FlinkPublishApiImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelBatch(BatchToken token) Cancels a batch operation.voidcompleteBatch(BatchToken token) Finalizes the batch and waits until the metadata has been processed.deleteFeatures(String layer, List<String> ids) Deletes specified features from Interactive Map layer.deleteIndex(String layer, String queryString) Deletes the partitions from index layer that match the provided query written in the RSQL query language.Get latest version available for the given catalog which can be used instartBatch2(java.util.OptionalLong,java.util.Optional<java.util.List<java.lang.String>>,java.util.List<com.here.platform.data.client.model.VersionDependency>).patchFeature(String layer, Feature feature, String featureId) Patch specified feature in Interactive Map layer.patchFeatureJson(String layer, String feature, String featureId) Patch specified feature in Interactive Map layer.postFeatureCollection(String layer, FeatureCollection featureCollection, Optional<InteractiveMapOptions.IfExistType> ifExist, Optional<InteractiveMapOptions.IfNotExistType> ifNotExist, Boolean transactional) Uploads specified FeatureCollection to Interactive Map layer.postFeatureCollectionJson(String layer, String featureCollection, Optional<InteractiveMapOptions.IfExistType> ifExist, Optional<InteractiveMapOptions.IfNotExistType> ifNotExist, Boolean transactional) Uploads specified FeatureCollection to Interactive Map layer.postFeatureModifications(String layer, FeatureModificationList featureModificationList, Boolean transactional) Uploads FeatureCollection(s) specified in FeatureModificationList to Interactive Map layer.postFeatureModificationsJson(String layer, String featureModificationList, Boolean transactional) Uploads FeatureCollection(s) specified in FeatureModificationList to Interactive Map layer.voidpublishBatch2(OptionalLong baseVersion, Optional<List<String>> layerIds, List<VersionDependency> dependencies, Iterator<CommitPartition> partitions) Performs new batch publication to a catalog.voidpublishIndex(String layer, Iterator<CommitPartition> partitions) Performs indexing of the specified partitions in Index layer.voidpublishToBatch(BatchToken token, Iterator<CommitPartition> partitions) Upload partitions for given commit token.putFeature(String layer, Feature feature, String featureId) Uploads specified feature to Interactive Map layer.putFeatureCollection(String layer, FeatureCollection featureCollection) Uploads specified FeatureCollection to Interactive Map layer.putFeatureCollectionJson(String layer, String featureCollection) Uploads specified FeatureCollection to Interactive Map layer.putFeatureJson(String layer, String feature, String featureId) Uploads specified feature to Interactive Map layer.startBatch2(OptionalLong baseVersion, Optional<List<String>> layerIds, List<VersionDependency> dependencies) Starts a new batch for a catalog with layers explicitly named.voidupdateIndex(String layer, Iterator<CommitPartition> additions, Iterator<CommitPartition> removals) Updates an index layer by adding theadditionspartitions and removingremovalspartitions.
-
Method Details
-
cancelBatch
Cancels a batch operation.Cancels an active batch and signals that submitted batch publications can be discarded. The token will no longer be valid after cancel batch operation.
- Parameters:
token- Token retrieved from a functionstartBatch2(java.util.OptionalLong,java.util.Optional<java.util.List<java.lang.String>>,java.util.List<com.here.platform.data.client.model.VersionDependency>).- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
completeBatch
Finalizes the batch and waits until the metadata has been processed.- Parameters:
token- Token retrieved from a functionstartBatch2(java.util.OptionalLong,java.util.Optional<java.util.List<java.lang.String>>,java.util.List<com.here.platform.data.client.model.VersionDependency>).- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
deleteFeatures
Deletes specified features from Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.ids- List of feature IDs to be deleted- Returns:
- Future which completes when specified featureCollection is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
deleteIndex
Deletes the partitions from index layer that match the provided query written in the RSQL query language.- Parameters:
layer- Name of the index layer. If the layer specified in request does not exist, an error is returned.queryString- String written in the RSQL query language to query the index layer- Returns:
- Delete request id which can be used to query the delete status.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
getBaseVersion
OptionalLong getBaseVersion()Get latest version available for the given catalog which can be used instartBatch2(java.util.OptionalLong,java.util.Optional<java.util.List<java.lang.String>>,java.util.List<com.here.platform.data.client.model.VersionDependency>).- Returns:
- Returns Some(version) - latest version for the given catalog. If the catalog doesn't contain any versions None will be returned.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
patchFeature
Patch specified feature in Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.feature- The feature to put in Interactive Map layer.featureId- The feature ID of the feature.- Returns:
- Future which completes when specified feature is patched.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
patchFeatureJson
Patch specified feature in Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.feature- The feature to put in Interactive Map layer.featureId- The feature ID of the feature.- Returns:
- Future which completes when specified feature is patched.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
postFeatureCollection
FeatureCollection postFeatureCollection(String layer, FeatureCollection featureCollection, Optional<InteractiveMapOptions.IfExistType> ifExist, Optional<InteractiveMapOptions.IfNotExistType> ifNotExist, Boolean transactional) Uploads specified FeatureCollection to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.featureCollection- The FeatureCollection to put in Interactive Map layer.ifExist- The action to execute, when a feature with the provided ID exists. Default is PATCH.ifNotExist- The action to execute, when a feature with the provided ID does not exist or the feature contains no ID. Default is CREATE.transactional- Defines, if this is a transactional operation. Default is true.- Returns:
- Future which completes when specified featureCollection is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
postFeatureCollectionJson
String postFeatureCollectionJson(String layer, String featureCollection, Optional<InteractiveMapOptions.IfExistType> ifExist, Optional<InteractiveMapOptions.IfNotExistType> ifNotExist, Boolean transactional) Uploads specified FeatureCollection to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.featureCollection- The FeatureCollection to put in Interactive Map layer.ifExist- The action to execute, when a feature with the provided ID exists. Default is PATCH.ifNotExist- The action to execute, when a feature with the provided ID does not exist or the feature contains no ID. Default is CREATE.transactional- Defines, if this is a transactional operation. Default is true.- Returns:
- Future which completes when specified featureCollection is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
postFeatureModifications
FeatureCollection postFeatureModifications(String layer, FeatureModificationList featureModificationList, Boolean transactional) Uploads FeatureCollection(s) specified in FeatureModificationList to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.featureModificationList- The FeatureModificationList which contains list of features that need to get created/updated/deleted in Interactive Map layer.transactional- Defines, if this is a transactional operation. Default is true.- Returns:
- Future which completes when specified FeatureCollection(s) are uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
postFeatureModificationsJson
String postFeatureModificationsJson(String layer, String featureModificationList, Boolean transactional) Uploads FeatureCollection(s) specified in FeatureModificationList to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.featureModificationList- The FeatureModificationList which contains list of features that need to get created/updated/deleted in Interactive Map layer.transactional- Defines, if this is a transactional operation. Default is true.- Returns:
- Future which completes when specified FeatureCollection(s) are uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
publishBatch2
void publishBatch2(OptionalLong baseVersion, Optional<List<String>> layerIds, List<VersionDependency> dependencies, Iterator<CommitPartition> partitions) Performs new batch publication to a catalog.Data for
CommitPartitionmust be already uploaded beforehandThis call is identical to
startBatch2(java.util.OptionalLong,java.util.Optional<java.util.List<java.lang.String>>,java.util.List<com.here.platform.data.client.model.VersionDependency>)+ {@link publishToBatch(token:com\.here\.platform\.data\.client\.model\.BatchToken,partitions:java\.util\.Iterator*} +completeBatch(com.here.platform.data.client.model.BatchToken).
Please note that there can only be one active publication at a time per versioned layer.- Parameters:
baseVersion- This parameter is deprecated and not used anymore.layerIds- List of layer ids which should be updated. Note: Publishing versioned and volatile layer partitions in the same publication is not advisable as in this case it increases version number even for volatile layers.dependencies- List of the dependencies for this publication. This is only relevant for publishing to versioned layer.partitions- partitions to publish.- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
publishIndex
Performs indexing of the specified partitions in Index layer.The partitions are indexed using the specified index keys defined in each indexing partition. After indexing the partitions can be searched by keys using query method from Query API.
- Parameters:
layer- Name of index layer. If the layer specified in request does not exist, an error is returned.partitions- The partitions to index.- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
publishToBatch
Upload partitions for given commit token.- Parameters:
token- Token retrieved from a functionstartBatch2(java.util.OptionalLong,java.util.Optional<java.util.List<java.lang.String>>,java.util.List<com.here.platform.data.client.model.VersionDependency>).partitions- partitions to upload.- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
putFeature
Uploads specified feature to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.feature- The feature to put in Interactive Map layer.featureId- The feature ID of the feature.- Returns:
- Future which completes when specified feature is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
putFeatureCollection
Uploads specified FeatureCollection to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.featureCollection- The FeatureCollection to put in Interactive Map layer.- Returns:
- Future which completes when specified featureCollection is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
putFeatureCollectionJson
Uploads specified FeatureCollection to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.featureCollection- The FeatureCollection to put in Interactive Map layer.- Returns:
- Future which completes when specified featureCollection is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
putFeatureJson
Uploads specified feature to Interactive Map layer.- Parameters:
layer- Name of interactive Map layer. If the layer specified in request does not exist, an error is returned.feature- The feature to put in Interactive Map layer.featureId- The feature ID of the feature.- Returns:
- Future which completes when specified feature is uploaded.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
startBatch2
BatchToken startBatch2(OptionalLong baseVersion, Optional<List<String>> layerIds, List<VersionDependency> dependencies) Starts a new batch for a catalog with layers explicitly named.This call is used to start a new publishing to a catalog. The layers must be named explicitly. The returned token is valid for 24 hours.
Please note that there can only be one active publication at a time per versioned layer.- Parameters:
baseVersion- This parameter is deprecated and not used anymore.layerIds- List of layer ids which should be updated. Note: Publishing versioned and volatile layer partitions in the same publication is not advisable as in this case it increases version number even for volatile layers.dependencies- List of the dependencies for this publication. This is only relevant for publishing to versioned layer.- Returns:
- The token to use in subsequent calls that are part of the same publication (e.g.{@link publishToBatch(token:com\.here\.platform\.data\.client\.model\.BatchToken,partitions:java\.util\.Iterator*}).
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
updateIndex
void updateIndex(String layer, Iterator<CommitPartition> additions, Iterator<CommitPartition> removals) Updates an index layer by adding theadditionspartitions and removingremovalspartitions.- Parameters:
layer- Name of the index layer. If the layer specified in request does not exist, an error is returned.additions- The partitions to add to the index.removals- The partitions to remove from the index.- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-