JAVA API :
PreviewContext
interface PreviewContext { PreviewEmitter getEmitter(String identifier); }
PreviewEmitter
interface PreviewEmitter { void emit(T record); Iterator<T> getEmittedRecords(); }
Implementation:
SDK:
Preview Execution Isolation:
Requirement:
- We want the program runs we execute, datasets created during preview for preview purpose, logs and metrics emitted during preview to be isolated from the regular Standalone execution which is used to publish and run the pipeline.
- In Preview, pipeline could have lookup datasets in a transform which reads from the datasets in Standalone. so we want a way to share datasets in preview with datasets in standalone.
- In Preview, we want to skip writing meta data and lineage information as they are unnecessary.
Preview Injector and Services Run in Preview:
Service | Standalone (Yes/No) | Preview (Yes/No) |
---|---|---|
userInterfaceService | Yes | No |
trackerAppCreationService | Yes | No |
router | Yes | No |
streamService | Yes | Yes |
exploreExecutorService | Yes | No |
exploreClient | Yes | No |
metadataService | Yes | No |
serviceStore (set/get service instances) | Yes | No |
appFabricServer | Yes | No |
previewServer | No | Yes |
datasetService | Yes | Yes |
metricsQueryService | Yes | Yes |
txService | Yes | Yes |
externalAuthenticationServer (if security enabled) | Yes | Yes |
logAppenderInitializer | Yes | Yes |
kafkaClient(if audit enabled) | Yes | No |
zkClient (if audit enabled) | Yes | No |
authorizerInstantiator (started by default) | Yes | Yes? |
PreviewServer Services:
This is a subset of services started in app-fabric server.
Services | AppFabricServer | PreviewServer |
---|---|---|
notificationService | Yes | No |
schedulerService | Yes | No |
applicationLifecycleService | Yes | Yes |
systemArtifactLoader | Yes | Yes |
programRuntimeService | Yes | Yes |
streamCoordinatorClient | Yes | Yes |
programLifecycleService | Yes | Yes |
pluginService | Yes | Yes |
httpService | Yes | Yes (but only with preview handler). |
HybridDatasetFramework