public Optional
2.3 触发执行
当每次触发的某个方法时,会生成(就是具体的元数据信息) 。
拿 触发方法举例,会自动初始化上述对象,并且去适配用以执行逻辑计划访问器:
@Overridepublic void onJobStart(SparkListenerJobStart jobStart) {if (isDisabled) {return;}initializeContextFactoryIfNotInitialized();Optional
.start方法是解析器的入口(p.s. 如果是监听器的End事件,那就对应.end),调用.run执行逻辑计划解析,这里只放入口代码,解析细节会在下小节深入:
@Overridepublic void start(SparkListenerSQLExecutionStart startEvent) {log.debug("SparkListenerSQLExecutionStart - executionId: {}", startEvent.executionId());if (!olContext.getQueryExecution().isPresent()) {log.info(NO_EXECUTION_INFO, olContext);return;} else if (EventFilterUtils.isDisabled(olContext, startEvent)) {log.info("OpenLineage received Spark event that is configured to be skipped: SparkListenerSQLExecutionStart");return;}RunEvent event =runEventBuilder.buildRun(buildParentFacet(),openLineage.newRunEventBuilder().eventTime(toZonedTime(startEvent.time())),buildJob(olContext.getQueryExecution().get()),startEvent);log.debug("Posting event for start {}: {}", executionId, event);eventEmitter.emit(event);}
2.4 逻辑计划解析
这里主要解释逻辑计划访问器拿取元数据信息的思路,先简略无关的入口代码
RunEvent event =runEventBuilder.buildRun(buildParentFacet(),openLineage.newRunEventBuilder().eventTime(toZonedTime(startEvent.time())),buildJob(olContext.getQueryExecution().get()),startEvent);··· ······ ···RunEvent buildRun(Optional parentRunFacet,RunEventBuilder runEventBuilder,JobBuilder jobBuilder,SparkListenerSQLExecutionStart event) {runEventBuilder.eventType(RunEvent.EventType.START);return buildRun(parentRunFacet, runEventBuilder, jobBuilder, event, Optional.empty());}··· ······ ···RunEvent buildRun(Optional parentRunFacet,RunEventBuilder runEventBuilder,JobBuilder jobBuilder,SparkListenerStageSubmitted event) {Stage stage = stageMap.get(event.stageInfo().stageId());RDD
- 字节跳动DataLeap数据血缘实践
- USB摄像头——v4l2打开设备、获取设备支持的格式【以t113-s3为例】
- 【大数据day04】——JVM优化 上(jvm的内存模型
- 身份鉴别——Linux配置登录失败处理功能
- IE11 —— F12 开发者工具
- AI与游戏——引言
- 量化交易——波动率
- OSChina 周六乱弹 ——淘宝上买U盘 你们猜店家送的啥礼品
- ascll码 — c语言转换
- 电脑小技巧系列——私密文件的保护措施