sparkforensics-cli 0.1.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/sparkforensics-analyze.mjs +113 -48
- package/export-template/docs/404.html +25 -0
- package/export-template/docs/assets/app.DQTZyGL1.js +1 -0
- package/export-template/docs/assets/aqe-loop.IwQSATHw.svg +1 -0
- package/export-template/docs/assets/aqe-loop.dark.DGbaxqJE.svg +1 -0
- package/export-template/docs/assets/broadcast-vs-shuffle.Db4WY1XK.svg +1 -0
- package/export-template/docs/assets/broadcast-vs-shuffle.dark.C7Bxs0mG.svg +1 -0
- package/export-template/docs/assets/cache-lifecycle.dark.B-hS7AgU.svg +1 -0
- package/export-template/docs/assets/cache-lifecycle.rEOVYQNU.svg +1 -0
- package/export-template/docs/assets/chunks/@localSearchIndexroot.DppnXnDE.js +1 -0
- package/export-template/docs/assets/chunks/VPLocalSearchBox.BkBIPFs6.js +9 -0
- package/export-template/docs/assets/chunks/duplicate-plan-subtree.dark.Cdp70QhV.js +1 -0
- package/export-template/docs/assets/chunks/framework.DSg0KOwT.js +20 -0
- package/export-template/docs/assets/chunks/retry-escalation-ladder.dark.DHipdJgZ.js +1 -0
- package/export-template/docs/assets/chunks/theme.DP0u1AUq.js +2 -0
- package/export-template/docs/assets/cold-start-timeline.DxC_Sc7w.svg +1 -0
- package/export-template/docs/assets/cold-start-timeline.dark.CZ17YcAG.svg +1 -0
- package/export-template/docs/assets/columnar-layout.PghGeOEA.svg +1 -0
- package/export-template/docs/assets/columnar-layout.dark.BVNlz0ff.svg +1 -0
- package/export-template/docs/assets/container-memory.DIO0AnIm.svg +1 -0
- package/export-template/docs/assets/container-memory.dark.CP-5zuCl.svg +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_board-widgets.md.CWpj01WU.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_board-widgets.md.CWpj01WU.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_detector-contract.md.CgzUsQ6W.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_detector-contract.md.CgzUsQ6W.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_drill-down.md.BtPdlM7r.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_drill-down.md.BtPdlM7r.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_impact-estimation.md.CooslVJt.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_impact-estimation.md.CooslVJt.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_index.md.3TO9ic6w.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_index.md.3TO9ic6w.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_overview.md.CehiRmGn.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_overview.md.CehiRmGn.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_state-and-history.md.C-xxn0q7.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_state-and-history.md.C-xxn0q7.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_widget-rendering.md.R27gQrgY.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_widget-rendering.md.R27gQrgY.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_architecture_worker-protocol.md.IbnfNrV3.js +6 -0
- package/export-template/docs/assets/contributor-guide_architecture_worker-protocol.md.IbnfNrV3.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_contributing.md.CvRsdr6J.js +1 -0
- package/export-template/docs/assets/contributor-guide_contributing.md.CvRsdr6J.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_development-setup.md.DvAN_9mK.js +12 -0
- package/export-template/docs/assets/contributor-guide_development-setup.md.DvAN_9mK.lean.js +1 -0
- package/export-template/docs/assets/contributor-guide_testing.md.6rIKqSyY.js +1 -0
- package/export-template/docs/assets/contributor-guide_testing.md.6rIKqSyY.lean.js +1 -0
- package/export-template/docs/assets/dag-stages.DSz_S937.svg +1 -0
- package/export-template/docs/assets/dag-stages.dark.F72UzxH4.svg +1 -0
- package/export-template/docs/assets/driver-executor.D5pQ7YN1.svg +1 -0
- package/export-template/docs/assets/driver-executor.dark.BmX9cPvh.svg +1 -0
- package/export-template/docs/assets/duplicate-plan-subtree.B4cvN6fj.svg +1 -0
- package/export-template/docs/assets/duplicate-plan-subtree.dark.Dw8wS0Ag.svg +1 -0
- package/export-template/docs/assets/index.md.CHJVslga.js +1 -0
- package/export-template/docs/assets/index.md.CHJVslga.lean.js +1 -0
- package/export-template/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/export-template/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/export-template/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/export-template/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/export-template/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/export-template/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/export-template/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/export-template/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/export-template/docs/assets/join-strategy.C_FvrCEo.svg +1 -0
- package/export-template/docs/assets/join-strategy.dark.ChMLnNII.svg +1 -0
- package/export-template/docs/assets/memory-borrowing.BqQRJg0u.svg +1 -0
- package/export-template/docs/assets/memory-borrowing.dark.Yhh20O9C.svg +1 -0
- package/export-template/docs/assets/memory-regions.XHvO7jHG.svg +1 -0
- package/export-template/docs/assets/memory-regions.dark.D4TP9_08.svg +1 -0
- package/export-template/docs/assets/repartition-vs-coalesce.BovLRrpj.svg +1 -0
- package/export-template/docs/assets/repartition-vs-coalesce.dark.BhAczKZQ.svg +1 -0
- package/export-template/docs/assets/retry-escalation-ladder.DyTKJJmZ.svg +1 -0
- package/export-template/docs/assets/retry-escalation-ladder.dark.BdsabtU3.svg +1 -0
- package/export-template/docs/assets/shuffle-map-reduce.KuOEZVmg.svg +1 -0
- package/export-template/docs/assets/shuffle-map-reduce.dark.BgQZnFSb.svg +1 -0
- package/export-template/docs/assets/spill-classification.BU2euYDO.svg +1 -0
- package/export-template/docs/assets/spill-classification.dark.D7i1M40d.svg +1 -0
- package/export-template/docs/assets/style.DSixAiZE.css +1 -0
- package/export-template/docs/assets/tuning-reference_anti-patterns.md.Df1YMIHu.js +1 -0
- package/export-template/docs/assets/tuning-reference_anti-patterns.md.Df1YMIHu.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_aqe.md.BIsCtLzm.js +1 -0
- package/export-template/docs/assets/tuning-reference_aqe.md.BIsCtLzm.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-broadcast-sizing.md.CEstB3Ia.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-broadcast-sizing.md.CEstB3Ia.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-cold-start.md.CEuy-72y.js +7 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-cold-start.md.CEuy-72y.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-duplicate-plan-subtree.md.CIohQDfn.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-duplicate-plan-subtree.md.CIohQDfn.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-failures.md.4z5BXGJ2.js +6 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-failures.md.4z5BXGJ2.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-gc.md.DSxzZRK7.js +6 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-gc.md.DSxzZRK7.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-job-failure-rate.md.BaJl__1W.js +8 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-job-failure-rate.md.BaJl__1W.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-memory-utilization.md.DbP-SJZc.js +7 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-memory-utilization.md.DbP-SJZc.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-retry-waste.md.D5JMjVOt.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-retry-waste.md.D5JMjVOt.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-shuffle.md.CM-nTmIH.js +12 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-shuffle.md.CM-nTmIH.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-skew.md.BdUwiDhn.js +14 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-skew.md.BdUwiDhn.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-slow-host.md.BlIo6UDW.js +7 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-slow-host.md.BlIo6UDW.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-small-files.md.B8kloyx8.js +5 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-small-files.md.B8kloyx8.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-spill.md.PNH7mITt.js +6 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-spill.md.PNH7mITt.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-straggler.md.DY36fHN5.js +7 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-straggler.md.DY36fHN5.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-tiny-tasks.md.QTV7O8kU.js +8 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-tiny-tasks.md.QTV7O8kU.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-utilization.md.DTiueZC3.js +5 -0
- package/export-template/docs/assets/tuning-reference_bottleneck-utilization.md.DTiueZC3.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_caching.md.B7aQ8asB.js +1 -0
- package/export-template/docs/assets/tuning-reference_caching.md.B7aQ8asB.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_cluster-config.md.ZVmDGsQ3.js +1 -0
- package/export-template/docs/assets/tuning-reference_cluster-config.md.ZVmDGsQ3.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_config.md.UvveiWG3.js +1 -0
- package/export-template/docs/assets/tuning-reference_config.md.UvveiWG3.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_data-formats.md.bjCAWH3N.js +1 -0
- package/export-template/docs/assets/tuning-reference_data-formats.md.bjCAWH3N.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_index.md.BQ_NooMV.js +1 -0
- package/export-template/docs/assets/tuning-reference_index.md.BQ_NooMV.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_intro.md.CobD-lGB.js +1 -0
- package/export-template/docs/assets/tuning-reference_intro.md.CobD-lGB.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_joins.md.BtKs_CuW.js +1 -0
- package/export-template/docs/assets/tuning-reference_joins.md.BtKs_CuW.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_memory-model.md.DhT-n4y3.js +1 -0
- package/export-template/docs/assets/tuning-reference_memory-model.md.DhT-n4y3.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_metrics.md.mLOh7Apj.js +1 -0
- package/export-template/docs/assets/tuning-reference_metrics.md.mLOh7Apj.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_partitioning.md.q0zKF_8X.js +1 -0
- package/export-template/docs/assets/tuning-reference_partitioning.md.q0zKF_8X.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_pyspark.md.DDCfvN9t.js +6 -0
- package/export-template/docs/assets/tuning-reference_pyspark.md.DDCfvN9t.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_shuffle.md.BZZ7R4Ix.js +1 -0
- package/export-template/docs/assets/tuning-reference_shuffle.md.BZZ7R4Ix.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_spark-architecture.md.Dwzm5avO.js +1 -0
- package/export-template/docs/assets/tuning-reference_spark-architecture.md.Dwzm5avO.lean.js +1 -0
- package/export-template/docs/assets/tuning-reference_table-formats.md.D6wj-2dX.js +1 -0
- package/export-template/docs/assets/tuning-reference_table-formats.md.D6wj-2dX.lean.js +1 -0
- package/export-template/docs/assets/udf-execution-models.BUFDICuG.svg +1 -0
- package/export-template/docs/assets/udf-execution-models.dark.YTNS6GDq.svg +1 -0
- package/export-template/docs/assets/user-guide_alternative-log-retrieval.md.B4tPGIal.js +1 -0
- package/export-template/docs/assets/user-guide_alternative-log-retrieval.md.B4tPGIal.lean.js +1 -0
- package/export-template/docs/assets/user-guide_getting-started.md.BJvwLEIM.js +3 -0
- package/export-template/docs/assets/user-guide_getting-started.md.BJvwLEIM.lean.js +1 -0
- package/export-template/docs/assets/user-guide_mcp-tools.md.Vi3RoflJ.js +125 -0
- package/export-template/docs/assets/user-guide_mcp-tools.md.Vi3RoflJ.lean.js +1 -0
- package/export-template/docs/assets/user-guide_run-comparison.md.CQc1aoU8.js +1 -0
- package/export-template/docs/assets/user-guide_run-comparison.md.CQc1aoU8.lean.js +1 -0
- package/export-template/docs/assets/user-guide_understanding-findings.md.DL1UDhvR.js +1 -0
- package/export-template/docs/assets/user-guide_understanding-findings.md.DL1UDhvR.lean.js +1 -0
- package/export-template/docs/contributor-guide/architecture/board-widgets.html +25 -0
- package/export-template/docs/contributor-guide/architecture/detector-contract.html +25 -0
- package/export-template/docs/contributor-guide/architecture/drill-down.html +25 -0
- package/export-template/docs/contributor-guide/architecture/impact-estimation.html +25 -0
- package/export-template/docs/contributor-guide/architecture/index.html +25 -0
- package/export-template/docs/contributor-guide/architecture/overview.html +25 -0
- package/export-template/docs/contributor-guide/architecture/state-and-history.html +25 -0
- package/export-template/docs/contributor-guide/architecture/widget-rendering.html +25 -0
- package/export-template/docs/contributor-guide/architecture/worker-protocol.html +30 -0
- package/export-template/docs/contributor-guide/contributing.html +25 -0
- package/export-template/docs/contributor-guide/development-setup.html +36 -0
- package/export-template/docs/contributor-guide/testing.html +25 -0
- package/export-template/docs/favicon.svg +4 -0
- package/export-template/docs/hashmap.json +1 -0
- package/export-template/docs/index.html +25 -0
- package/export-template/docs/package.json +1 -0
- package/export-template/docs/tuning-reference/anti-patterns.html +25 -0
- package/export-template/docs/tuning-reference/aqe.html +25 -0
- package/export-template/docs/tuning-reference/bottleneck-broadcast-sizing.html +25 -0
- package/export-template/docs/tuning-reference/bottleneck-cold-start.html +31 -0
- package/export-template/docs/tuning-reference/bottleneck-duplicate-plan-subtree.html +25 -0
- package/export-template/docs/tuning-reference/bottleneck-failures.html +30 -0
- package/export-template/docs/tuning-reference/bottleneck-gc.html +30 -0
- package/export-template/docs/tuning-reference/bottleneck-job-failure-rate.html +32 -0
- package/export-template/docs/tuning-reference/bottleneck-memory-utilization.html +31 -0
- package/export-template/docs/tuning-reference/bottleneck-retry-waste.html +25 -0
- package/export-template/docs/tuning-reference/bottleneck-shuffle.html +36 -0
- package/export-template/docs/tuning-reference/bottleneck-skew.html +38 -0
- package/export-template/docs/tuning-reference/bottleneck-slow-host.html +31 -0
- package/export-template/docs/tuning-reference/bottleneck-small-files.html +29 -0
- package/export-template/docs/tuning-reference/bottleneck-spill.html +30 -0
- package/export-template/docs/tuning-reference/bottleneck-straggler.html +31 -0
- package/export-template/docs/tuning-reference/bottleneck-tiny-tasks.html +32 -0
- package/export-template/docs/tuning-reference/bottleneck-utilization.html +29 -0
- package/export-template/docs/tuning-reference/caching.html +25 -0
- package/export-template/docs/tuning-reference/cluster-config.html +25 -0
- package/export-template/docs/tuning-reference/config.html +25 -0
- package/export-template/docs/tuning-reference/data-formats.html +25 -0
- package/export-template/docs/tuning-reference/index.html +25 -0
- package/export-template/docs/tuning-reference/intro.html +25 -0
- package/export-template/docs/tuning-reference/joins.html +25 -0
- package/export-template/docs/tuning-reference/memory-model.html +25 -0
- package/export-template/docs/tuning-reference/metrics.html +25 -0
- package/export-template/docs/tuning-reference/partitioning.html +25 -0
- package/export-template/docs/tuning-reference/pyspark.html +30 -0
- package/export-template/docs/tuning-reference/shuffle.html +25 -0
- package/export-template/docs/tuning-reference/spark-architecture.html +25 -0
- package/export-template/docs/tuning-reference/table-formats.html +25 -0
- package/export-template/docs/user-guide/alternative-log-retrieval.html +25 -0
- package/export-template/docs/user-guide/getting-started.html +27 -0
- package/export-template/docs/user-guide/mcp-tools.html +149 -0
- package/export-template/docs/user-guide/run-comparison.html +25 -0
- package/export-template/docs/user-guide/understanding-findings.html +25 -0
- package/export-template/docs/vp-icons.css +0 -0
- package/export-template/favicon.svg +4 -0
- package/export-template/index.html +111 -0
- package/export-template/parser-worker-DyjiQvfP.js +112 -0
- package/export-template/sample-runs/sample-run.ndjson.gz +0 -0
- package/package.json +20 -6
- package/vendor-core/analyzer.js +74 -74
- package/vendor-core/cli/budgets.js +13 -27
- package/vendor-core/cli/collect-run.js +43 -19
- package/vendor-core/core-count.js +25 -27
- package/vendor-core/core-locality-ratio.js +4 -11
- package/vendor-core/core-time-series.js +6 -12
- package/vendor-core/core-usage-locality.js +3 -4
- package/vendor-core/detectors.js +395 -389
- package/vendor-core/docs-config.js +69 -21
- package/vendor-core/docs-content/chapters/01-intro.md +32 -0
- package/vendor-core/docs-content/chapters/02-spark-architecture.md +76 -0
- package/vendor-core/docs-content/chapters/03-memory-model.md +73 -0
- package/vendor-core/docs-content/chapters/04-partitioning.md +65 -0
- package/vendor-core/docs-content/chapters/05-joins.md +62 -0
- package/vendor-core/docs-content/chapters/06-shuffle.md +59 -0
- package/vendor-core/docs-content/chapters/07-data-formats.md +81 -0
- package/vendor-core/docs-content/chapters/07b-table-formats.md +56 -0
- package/vendor-core/docs-content/chapters/08-caching.md +58 -0
- package/vendor-core/docs-content/chapters/09-pyspark.md +78 -0
- package/vendor-core/docs-content/chapters/10-aqe.md +167 -0
- package/vendor-core/docs-content/chapters/11-cluster-config.md +170 -0
- package/vendor-core/docs-content/chapters/12-anti-patterns.md +171 -0
- package/vendor-core/docs-content/chapters/14-metrics.md +87 -0
- package/vendor-core/docs-content/chapters/15-config.md +93 -0
- package/vendor-core/docs-content/chapters/nav-index.json +370 -0
- package/vendor-core/docs-content/detection/cache.md +7 -0
- package/vendor-core/docs-content/detection/cfg.md +15 -0
- package/vendor-core/docs-content/detection/chrn.md +9 -0
- package/vendor-core/docs-content/detection/cold.md +4 -0
- package/vendor-core/docs-content/detection/cstor.md +4 -0
- package/vendor-core/docs-content/detection/fail.md +5 -0
- package/vendor-core/docs-content/detection/gc.md +4 -0
- package/vendor-core/docs-content/detection/host.md +5 -0
- package/vendor-core/docs-content/detection/incmp.md +6 -0
- package/vendor-core/docs-content/detection/jobs.md +4 -0
- package/vendor-core/docs-content/detection/local.md +6 -0
- package/vendor-core/docs-content/detection/mem.md +10 -0
- package/vendor-core/docs-content/detection/part.md +5 -0
- package/vendor-core/docs-content/detection/plan.md +14 -0
- package/vendor-core/docs-content/detection/retry.md +4 -0
- package/vendor-core/docs-content/detection/sfail.md +5 -0
- package/vendor-core/docs-content/detection/shape.md +5 -0
- package/vendor-core/docs-content/detection/shfl.md +4 -0
- package/vendor-core/docs-content/detection/skew.md +6 -0
- package/vendor-core/docs-content/detection/slow.md +6 -0
- package/vendor-core/docs-content/detection/spec.md +8 -0
- package/vendor-core/docs-content/detection/spill.md +7 -0
- package/vendor-core/docs-content/detection/strag.md +5 -0
- package/vendor-core/docs-content/detection/tiny.md +4 -0
- package/vendor-core/docs-content/detection/util.md +4 -0
- package/vendor-core/docs-content/diagrams/aqe-loop.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/aqe-loop.svg +1 -0
- package/vendor-core/docs-content/diagrams/broadcast-vs-shuffle.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/broadcast-vs-shuffle.svg +1 -0
- package/vendor-core/docs-content/diagrams/cache-lifecycle.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/cache-lifecycle.svg +1 -0
- package/vendor-core/docs-content/diagrams/cold-start-timeline.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/cold-start-timeline.svg +1 -0
- package/vendor-core/docs-content/diagrams/columnar-layout.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/columnar-layout.svg +1 -0
- package/vendor-core/docs-content/diagrams/container-memory.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/container-memory.svg +1 -0
- package/vendor-core/docs-content/diagrams/dag-stages.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/dag-stages.svg +1 -0
- package/vendor-core/docs-content/diagrams/driver-executor.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/driver-executor.svg +1 -0
- package/vendor-core/docs-content/diagrams/duplicate-plan-subtree.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/duplicate-plan-subtree.svg +1 -0
- package/vendor-core/docs-content/diagrams/join-strategy.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/join-strategy.svg +1 -0
- package/vendor-core/docs-content/diagrams/memory-borrowing.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/memory-borrowing.svg +1 -0
- package/vendor-core/docs-content/diagrams/memory-regions.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/memory-regions.svg +1 -0
- package/vendor-core/docs-content/diagrams/repartition-vs-coalesce.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/repartition-vs-coalesce.svg +1 -0
- package/vendor-core/docs-content/diagrams/retry-escalation-ladder.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/retry-escalation-ladder.svg +1 -0
- package/vendor-core/docs-content/diagrams/shuffle-map-reduce.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/shuffle-map-reduce.svg +1 -0
- package/vendor-core/docs-content/diagrams/spill-classification.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/spill-classification.svg +1 -0
- package/vendor-core/docs-content/diagrams/udf-execution-models.dark.svg +1 -0
- package/vendor-core/docs-content/diagrams/udf-execution-models.svg +1 -0
- package/vendor-core/docs-content/tuning/broadcast-sizing.md +78 -0
- package/vendor-core/docs-content/tuning/cold-start.md +81 -0
- package/vendor-core/docs-content/tuning/duplicate-plan-subtree.md +45 -0
- package/vendor-core/docs-content/tuning/failures.md +124 -0
- package/vendor-core/docs-content/tuning/gc.md +110 -0
- package/vendor-core/docs-content/tuning/job-failure-rate.md +101 -0
- package/vendor-core/docs-content/tuning/memory-utilization.md +58 -0
- package/vendor-core/docs-content/tuning/retry-waste.md +90 -0
- package/vendor-core/docs-content/tuning/shuffle.md +154 -0
- package/vendor-core/docs-content/tuning/skew.md +123 -0
- package/vendor-core/docs-content/tuning/slow-host.md +117 -0
- package/vendor-core/docs-content/tuning/small-files.md +99 -0
- package/vendor-core/docs-content/tuning/spill.md +114 -0
- package/vendor-core/docs-content/tuning/straggler.md +103 -0
- package/vendor-core/docs-content/tuning/tiny-tasks.md +94 -0
- package/vendor-core/docs-content/tuning/utilization.md +90 -0
- package/vendor-core/docs-site-config.js +10 -17
- package/vendor-core/efficiency-model.js +7 -13
- package/vendor-core/etl-phases.js +3 -5
- package/vendor-core/event-handlers.js +232 -134
- package/vendor-core/event-schemas.js +48 -114
- package/vendor-core/evidence-availability.js +5 -10
- package/vendor-core/evidence-report.js +73 -123
- package/vendor-core/export-data.js +48 -0
- package/vendor-core/finding-action-label.js +4 -10
- package/vendor-core/finding-filter-predicate.js +3 -7
- package/vendor-core/finding-generic-recommendation.js +112 -0
- package/vendor-core/finding-names.js +51 -0
- package/vendor-core/format-utils.js +112 -38
- package/vendor-core/impact-band.js +18 -24
- package/vendor-core/impact-estimator.js +38 -74
- package/vendor-core/ingest.js +7 -13
- package/vendor-core/job-groups.js +3 -6
- package/vendor-core/list-runs.js +278 -0
- package/vendor-core/load-vendored.js +6 -12
- package/vendor-core/log-header-peek.js +81 -0
- package/vendor-core/lz4-block.js +4 -6
- package/vendor-core/mcp-server-factory.js +38 -8
- package/vendor-core/mcp-tools.js +105 -76
- package/vendor-core/model-assembler.js +8 -16
- package/vendor-core/occupancy.js +5 -9
- package/vendor-core/parser-worker.js +20 -29
- package/vendor-core/plan-dot.js +2 -5
- package/vendor-core/plan-duration-attribution.js +78 -29
- package/vendor-core/plan-graph-model.js +126 -69
- package/vendor-core/plan-node-detail.js +31 -17
- package/vendor-core/plan-summary.js +19 -8
- package/vendor-core/recommendation-rollup.js +35 -39
- package/vendor-core/redact.js +72 -16
- package/vendor-core/rolling-log-reassembly.js +4 -6
- package/vendor-core/run-comparison.js +86 -72
- package/vendor-core/scaling-sim.js +5 -7
- package/vendor-core/session-snapshot.js +1 -1
- package/vendor-core/shs-fetch.js +4 -6
- package/vendor-core/shs-load.js +9 -13
- package/vendor-core/shs-request.js +1 -1
- package/vendor-core/stage-quantiles.js +14 -0
- package/vendor-core/types.js +78 -18
- package/vendor-core/wasted-core-hours.js +7 -12
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
// sparkPlanInfo: iterative (non-recursive-schema) tree parser
|
|
3
|
+
// sparkPlanInfo: iterative (non-recursive-schema) tree parser.
|
|
5
4
|
//
|
|
6
|
-
// Validates the raw, unbounded-depth
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// NEVER be validated with z.lazy(): it uses an explicit heap-allocated stack,
|
|
10
|
-
// the same iterative-over-recursive approach src/plan-tree-walk.js's
|
|
11
|
-
// walkPlanTree already uses for the *resolved* tree (that one walks an
|
|
12
|
-
// already-built tree; this one builds one from raw JSON).
|
|
13
|
-
// ---------------------------------------------------------------------------
|
|
5
|
+
// Validates the raw, unbounded-depth sparkPlanInfo tree on SQLExecutionStart/End events. Must
|
|
6
|
+
// NEVER be validated with z.lazy(): it uses an explicit heap-allocated stack so zod never sees the
|
|
7
|
+
// full tree depth in one call.
|
|
14
8
|
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
// validation before resolvePlanTree ever saw it, breaking metric resolution
|
|
19
|
-
// for every plan node once real events start flowing through
|
|
20
|
-
// SparkEventSchema.safeParse. Declared optional (not required) to keep
|
|
21
|
-
// accepting tests/event-schemas.test.js's existing 'value'-only fixture;
|
|
22
|
-
// resolvePlanTree already tolerates a missing accumulatorId (accumMap.has
|
|
23
|
-
// just resolves false, the metric contributes no value).
|
|
9
|
+
// resolvePlanTree reads m.accumulatorId to look up the accumulator's live value in accumMap.
|
|
10
|
+
// Optional (not required): resolvePlanTree tolerates a missing accumulatorId (accumMap.has
|
|
11
|
+
// resolves false, the metric contributes no value).
|
|
24
12
|
const SparkPlanMetricSchema = z.object({
|
|
25
13
|
name: z.string(),
|
|
26
14
|
accumulatorId: z.number().optional(),
|
|
@@ -28,17 +16,10 @@ const SparkPlanMetricSchema = z.object({
|
|
|
28
16
|
metricType: z.string().optional(),
|
|
29
17
|
});
|
|
30
18
|
|
|
31
|
-
// Shallow shape only. `children` is
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
// `metadata` (file-scan nodes carry Location/Format/ReadSchema/PushedFilters/
|
|
37
|
-
// PartitionFilters/DataFilters/Batched here) was missing from the original
|
|
38
|
-
// schema, so it was silently stripped before ever reaching the posted `sql`
|
|
39
|
-
// message's `sparkPlanInfo` (same data-loss class as the accumulatorId gap
|
|
40
|
-
// above). Nothing reads it yet, but it's real data crossing the worker
|
|
41
|
-
// boundary, so it's kept rather than dropped.
|
|
19
|
+
// Shallow shape only. `children` is z.array(z.unknown()): each child gets its own shallow parse
|
|
20
|
+
// in the iterative walk below, so this schema never recurses and zod never sees the full depth.
|
|
21
|
+
// `metadata` (file-scan Location/Format/ReadSchema/...) is kept though nothing reads it yet: real
|
|
22
|
+
// data crossing the worker boundary.
|
|
42
23
|
const SparkPlanInfoNodeSchema = z.object({
|
|
43
24
|
nodeName: z.string(),
|
|
44
25
|
simpleString: z.string().optional(),
|
|
@@ -94,11 +75,8 @@ export function parseSparkPlanInfoTree(raw ) {
|
|
|
94
75
|
throw new Error('unreachable: sparkPlanInfo tree stack exhausted without resolving root');
|
|
95
76
|
}
|
|
96
77
|
|
|
97
|
-
// A zod field
|
|
98
|
-
//
|
|
99
|
-
// `event.sparkPlanInfo ?? null` in startSqlExecution (event-handlers.js:448).
|
|
100
|
-
// Deliberately NOT z.lazy(): defers to the iterative parser above, so the
|
|
101
|
-
// full tree depth is still never handed to zod's own recursion.
|
|
78
|
+
// A zod field wrapping parseSparkPlanInfoTree for the SQLExecutionStart schema. Nullable/optional
|
|
79
|
+
// to mirror `event.sparkPlanInfo ?? null`. Deliberately NOT z.lazy(): defers to the iterative parser.
|
|
102
80
|
const SparkPlanInfoFieldSchema = z
|
|
103
81
|
.unknown()
|
|
104
82
|
.nullable()
|
|
@@ -113,19 +91,15 @@ const SparkPlanInfoFieldSchema = z
|
|
|
113
91
|
}
|
|
114
92
|
});
|
|
115
93
|
|
|
116
|
-
//
|
|
117
|
-
// Six fully-specified event schemas (verbatim per task-6-brief.md Step 3;
|
|
118
|
-
// backed by exact quoted source cited in each comment)
|
|
119
|
-
// ---------------------------------------------------------------------------
|
|
94
|
+
// Fully-specified event schemas.
|
|
120
95
|
|
|
121
|
-
//
|
|
122
|
-
// state.pendingSparkVersion)
|
|
96
|
+
// SparkListenerLogStart case (inline: sets state.pendingSparkVersion).
|
|
123
97
|
export const LogStartEventSchema = z.object({
|
|
124
98
|
Event: z.literal('SparkListenerLogStart'),
|
|
125
99
|
'Spark Version': z.string().optional(),
|
|
126
100
|
});
|
|
127
101
|
|
|
128
|
-
//
|
|
102
|
+
// startApplication.
|
|
129
103
|
export const ApplicationStartEventSchema = z.object({
|
|
130
104
|
Event: z.literal('SparkListenerApplicationStart'),
|
|
131
105
|
'App ID': z.string().optional(),
|
|
@@ -134,20 +108,9 @@ export const ApplicationStartEventSchema = z.object({
|
|
|
134
108
|
'Spark Version': z.string().optional(),
|
|
135
109
|
});
|
|
136
110
|
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
// Property VALUES were previously required to be z.string(), but
|
|
142
|
-
// normalizeSparkProperties (event-handlers.ts:211-226) just spread each
|
|
143
|
-
// value through (`{ ...(props ?? {}) }` / `map[pair[0]] = pair[1]`) with no
|
|
144
|
-
// requirement that it already be a string, so a real Spark config carrying a
|
|
145
|
-
// non-string-looking JSON value (a bare number or boolean) was rejecting the
|
|
146
|
-
// entire EnvironmentUpdate event instead of parsing it. Widened to the
|
|
147
|
-
// realistic set of raw JSON scalar types; normalizeSparkProperties now
|
|
148
|
-
// coerces each value to a string at the boundary so its `Record<string,
|
|
149
|
-
// string>` return contract (and every downstream reader of `app.config`)
|
|
150
|
-
// is unaffected.
|
|
111
|
+
// updateEnvironment: 'Spark Properties' is fed to normalizeSparkProperties, which accepts
|
|
112
|
+
// object | array | null. Property VALUES are string|number|boolean (a real config can carry a
|
|
113
|
+
// bare JSON number/boolean); normalizeSparkProperties coerces each to a string at the boundary.
|
|
151
114
|
const SparkPropertyValueSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
152
115
|
export const EnvironmentUpdateEventSchema = z.object({
|
|
153
116
|
Event: z.literal('SparkListenerEnvironmentUpdate'),
|
|
@@ -158,20 +121,15 @@ export const EnvironmentUpdateEventSchema = z.object({
|
|
|
158
121
|
]).optional(),
|
|
159
122
|
});
|
|
160
123
|
|
|
161
|
-
//
|
|
124
|
+
// inline ApplicationEnd case.
|
|
162
125
|
export const ApplicationEndEventSchema = z.object({
|
|
163
126
|
Event: z.literal('SparkListenerApplicationEnd'),
|
|
164
127
|
Timestamp: z.number().optional(),
|
|
165
128
|
});
|
|
166
129
|
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
// event['Resource Profile Id']`, so both locations must be declared or the
|
|
171
|
-
// nested (primary) one is silently stripped by object-schema validation.
|
|
172
|
-
// `Timestamp` is read as `event['Timestamp']` with no defensive operator, so
|
|
173
|
-
// per the optionality rule it's required, not guessed-optional (it also
|
|
174
|
-
// backs ExecutorAddedEvent.timestamp: number, a non-optional field).
|
|
130
|
+
// addExecutor. `Resource Profile Id` is read from BOTH inside 'Executor Info' (real Spark
|
|
131
|
+
// placement) and top-level (a variant that hoists it), so both must be declared or the nested one
|
|
132
|
+
// is silently stripped. `Timestamp` is read with no defensive operator, so it's required.
|
|
175
133
|
export const ExecutorAddedEventSchema = z.object({
|
|
176
134
|
Event: z.literal('SparkListenerExecutorAdded'),
|
|
177
135
|
Timestamp: z.number(),
|
|
@@ -184,9 +142,7 @@ export const ExecutorAddedEventSchema = z.object({
|
|
|
184
142
|
'Resource Profile Id': z.number().optional(),
|
|
185
143
|
});
|
|
186
144
|
|
|
187
|
-
//
|
|
188
|
-
// `event['Timestamp']` with no defensive operator, so per the optionality
|
|
189
|
-
// rule it's required (backs ExecutorRemovedEvent.timestamp: number).
|
|
145
|
+
// removeExecutor. `Timestamp` is read with no defensive operator, so it's required.
|
|
190
146
|
export const ExecutorRemovedEventSchema = z.object({
|
|
191
147
|
Event: z.literal('SparkListenerExecutorRemoved'),
|
|
192
148
|
Timestamp: z.number(),
|
|
@@ -194,18 +150,10 @@ export const ExecutorRemovedEventSchema = z.object({
|
|
|
194
150
|
'Removed Reason': z.string().optional(),
|
|
195
151
|
});
|
|
196
152
|
|
|
197
|
-
//
|
|
198
|
-
// Nine schemas transcribed from their handlers (task-6-brief.md Step 4). See
|
|
199
|
-
// task-6-report.md for the exact field-by-field derivation from each handler.
|
|
200
|
-
// ---------------------------------------------------------------------------
|
|
153
|
+
// Schemas transcribed from their handlers.
|
|
201
154
|
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
// `parseInt(sqlExecIdStr, 10)` (startJob, event-handlers.ts:498-501):
|
|
205
|
-
// parseInt coerces its argument to a string internally, so it tolerates the
|
|
206
|
-
// raw value already being a number just as well as a string; requiring
|
|
207
|
-
// z.string() here rejected the whole JobStart event for a log variant that
|
|
208
|
-
// emits this property as a JSON number instead of a numeric string.
|
|
155
|
+
// startJob. 'spark.sql.execution.id' is read then parseInt'd, which coerces to string internally,
|
|
156
|
+
// so it tolerates the raw value being a number; widened to string|number (some logs emit a JSON number).
|
|
209
157
|
export const JobStartEventSchema = z.object({
|
|
210
158
|
Event: z.literal('SparkListenerJobStart'),
|
|
211
159
|
'Job ID': z.number().optional(),
|
|
@@ -216,7 +164,7 @@ export const JobStartEventSchema = z.object({
|
|
|
216
164
|
}).optional(),
|
|
217
165
|
});
|
|
218
166
|
|
|
219
|
-
//
|
|
167
|
+
// endJob.
|
|
220
168
|
export const JobEndEventSchema = z.object({
|
|
221
169
|
Event: z.literal('SparkListenerJobEnd'),
|
|
222
170
|
'Job ID': z.number(),
|
|
@@ -229,9 +177,8 @@ export const JobEndEventSchema = z.object({
|
|
|
229
177
|
}).optional(),
|
|
230
178
|
});
|
|
231
179
|
|
|
232
|
-
//
|
|
233
|
-
//
|
|
234
|
-
// Info' object, so its 'RDD Info' reads are part of this event's shape too)
|
|
180
|
+
// submitStage + mergeStageRddInfo (called from submitStage with the same 'Stage Info', so its
|
|
181
|
+
// 'RDD Info' reads are part of this event's shape too).
|
|
235
182
|
const RddInfoSchema = z.object({
|
|
236
183
|
'RDD ID': z.number().optional(),
|
|
237
184
|
Name: z.string().optional(),
|
|
@@ -243,11 +190,8 @@ const RddInfoSchema = z.object({
|
|
|
243
190
|
Replication: z.number().optional(),
|
|
244
191
|
}).optional(),
|
|
245
192
|
'Number of Partitions': z.number().optional(),
|
|
246
|
-
// 'Number of Cached Partitions'
|
|
247
|
-
//
|
|
248
|
-
// 594-596): a `||` fallback is tolerant of the key being absent
|
|
249
|
-
// (undefined || ... just falls through to the next fallback), so a real
|
|
250
|
-
// event-log variant that omits one of these keys must still parse.
|
|
193
|
+
// 'Number of Cached Partitions'/'Memory Size'/'Disk Size' are read via `rdd[field] || prev || 0`,
|
|
194
|
+
// tolerant of the key being absent, so a variant that omits one must still parse.
|
|
251
195
|
'Number of Cached Partitions': z.number().optional(),
|
|
252
196
|
'Memory Size': z.number().optional(),
|
|
253
197
|
'Disk Size': z.number().optional(),
|
|
@@ -265,7 +209,7 @@ export const StageSubmittedEventSchema = z.object({
|
|
|
265
209
|
}),
|
|
266
210
|
});
|
|
267
211
|
|
|
268
|
-
//
|
|
212
|
+
// inline StageCompleted case.
|
|
269
213
|
export const StageCompletedEventSchema = z.object({
|
|
270
214
|
Event: z.literal('SparkListenerStageCompleted'),
|
|
271
215
|
'Stage Info': z.object({
|
|
@@ -275,7 +219,7 @@ export const StageCompletedEventSchema = z.object({
|
|
|
275
219
|
}),
|
|
276
220
|
});
|
|
277
221
|
|
|
278
|
-
//
|
|
222
|
+
// recordStageExecutorMetrics.
|
|
279
223
|
export const StageExecutorMetricsEventSchema = z.object({
|
|
280
224
|
Event: z.literal('SparkListenerStageExecutorMetrics'),
|
|
281
225
|
'Stage ID': z.number(),
|
|
@@ -285,7 +229,7 @@ export const StageExecutorMetricsEventSchema = z.object({
|
|
|
285
229
|
|
|
286
230
|
const MAX_ACCUMULABLES_PER_TASK = 10_000;
|
|
287
231
|
|
|
288
|
-
//
|
|
232
|
+
// accumulateTask.
|
|
289
233
|
export const TaskEndEventSchema = z.object({
|
|
290
234
|
Event: z.literal('SparkListenerTaskEnd'),
|
|
291
235
|
'Stage ID': z.number(),
|
|
@@ -296,26 +240,20 @@ export const TaskEndEventSchema = z.object({
|
|
|
296
240
|
'Task Info': z.object({
|
|
297
241
|
'Launch Time': z.number().optional(),
|
|
298
242
|
'Finish Time': z.number().optional(),
|
|
299
|
-
// Failed/Killed are read via `info['Failed'] || info['Killed']
|
|
300
|
-
//
|
|
301
|
-
// of either key being absent (undefined || undefined is falsy, no
|
|
302
|
-
// crash), so real event-log variants that omit these keys must still
|
|
303
|
-
// parse rather than have the whole TaskEnd event rejected.
|
|
243
|
+
// Failed/Killed are read via `info['Failed'] || info['Killed']`, tolerant of either being
|
|
244
|
+
// absent, so variants that omit them must still parse.
|
|
304
245
|
Failed: z.boolean().optional(),
|
|
305
246
|
Killed: z.boolean().optional(),
|
|
306
|
-
// Speculative is read via
|
|
307
|
-
// (accumulateTask, event-handlers.ts:347): a strict-equality check is
|
|
308
|
-
// also tolerant of the key being absent (undefined === true is just
|
|
309
|
-
// false), so this is optional too.
|
|
247
|
+
// Speculative is read via `=== true`, also tolerant of the key being absent, so it's optional too.
|
|
310
248
|
Speculative: z.boolean().optional(),
|
|
311
249
|
Host: z.string().optional(),
|
|
312
250
|
'Executor ID': z.string().optional(),
|
|
313
251
|
Locality: z.string().optional(),
|
|
314
252
|
Index: z.number().optional(),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
//
|
|
318
|
-
// which is never pruned for the life of the parse.
|
|
253
|
+
'Task ID': z.number().optional(),
|
|
254
|
+
'Attempt Number': z.number().optional(),
|
|
255
|
+
// Bounded well above any real per-task metric count: caps how much a crafted TaskEnd can grow
|
|
256
|
+
// taskAccumStages, which is never pruned for the life of the parse.
|
|
319
257
|
Accumulables: z.array(z.object({
|
|
320
258
|
ID: z.number(),
|
|
321
259
|
Update: z.union([z.string(), z.number()]).optional(),
|
|
@@ -346,7 +284,7 @@ export const TaskEndEventSchema = z.object({
|
|
|
346
284
|
}).optional(),
|
|
347
285
|
});
|
|
348
286
|
|
|
349
|
-
//
|
|
287
|
+
// startSqlExecution.
|
|
350
288
|
export const SqlExecutionStartEventSchema = z.object({
|
|
351
289
|
Event: z.literal('org.apache.spark.sql.execution.ui.SparkListenerSQLExecutionStart'),
|
|
352
290
|
executionId: z.number(),
|
|
@@ -356,8 +294,8 @@ export const SqlExecutionStartEventSchema = z.object({
|
|
|
356
294
|
sparkPlanInfo: SparkPlanInfoFieldSchema,
|
|
357
295
|
});
|
|
358
296
|
|
|
359
|
-
//
|
|
360
|
-
//
|
|
297
|
+
// applyAdaptiveExecutionUpdate: AQE re-plans mid-query and re-emits sparkPlanInfo for the same
|
|
298
|
+
// executionId; last write wins.
|
|
361
299
|
export const SqlAdaptiveExecutionUpdateEventSchema = z.object({
|
|
362
300
|
Event: z.literal('org.apache.spark.sql.execution.ui.SparkListenerSQLAdaptiveExecutionUpdate'),
|
|
363
301
|
executionId: z.number(),
|
|
@@ -365,25 +303,21 @@ export const SqlAdaptiveExecutionUpdateEventSchema = z.object({
|
|
|
365
303
|
sparkPlanInfo: SparkPlanInfoFieldSchema,
|
|
366
304
|
});
|
|
367
305
|
|
|
368
|
-
//
|
|
306
|
+
// endSqlExecution.
|
|
369
307
|
export const SqlExecutionEndEventSchema = z.object({
|
|
370
308
|
Event: z.literal('org.apache.spark.sql.execution.ui.SparkListenerSQLExecutionEnd'),
|
|
371
309
|
executionId: z.number(),
|
|
372
310
|
time: z.number(),
|
|
373
311
|
});
|
|
374
312
|
|
|
375
|
-
//
|
|
313
|
+
// applyDriverAccumUpdates.
|
|
376
314
|
export const DriverAccumUpdatesEventSchema = z.object({
|
|
377
315
|
Event: z.literal('org.apache.spark.sql.execution.ui.SparkListenerDriverAccumUpdates'),
|
|
378
316
|
executionId: z.number(),
|
|
379
317
|
accumUpdates: z.array(z.tuple([z.number(), z.number()])),
|
|
380
318
|
});
|
|
381
319
|
|
|
382
|
-
//
|
|
383
|
-
// Discriminated union: exactly 16 entries, one per `case` in processEvent's
|
|
384
|
-
// switch (event-handlers.js:514-577).
|
|
385
|
-
// ---------------------------------------------------------------------------
|
|
386
|
-
|
|
320
|
+
// Discriminated union: one entry per `case` in processEvent's switch.
|
|
387
321
|
export const SparkEventSchema = z.discriminatedUnion('Event', [
|
|
388
322
|
LogStartEventSchema,
|
|
389
323
|
ApplicationStartEventSchema,
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
// Not annotated `: number` on purpose: `const X = 1` infers the literal type
|
|
4
|
-
//
|
|
5
|
-
// checks below) and wherever the `EvidenceAvailability.schemaVersion: 1`
|
|
6
|
-
// literal field is expected (the `return` at the bottom of this file);
|
|
7
|
-
// widening it to `number` would break that assignment.
|
|
3
|
+
// Not annotated `: number` on purpose: `const X = 1` infers the literal type `1`, assignable to
|
|
4
|
+
// the EvidenceAvailability.schemaVersion:1 literal field; widening to `number` would break that.
|
|
8
5
|
export const EVIDENCE_AVAILABILITY_SCHEMA_VERSION = 1;
|
|
9
6
|
|
|
10
7
|
const SUMMARIES = {
|
|
@@ -46,11 +43,9 @@ function isPositiveFinite(value ) {
|
|
|
46
43
|
return typeof value === 'number' && Number.isFinite(value) && value > 0;
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
/** A stage contributes usable core-time evidence only when it both ran tasks
|
|
50
|
-
*
|
|
51
|
-
* with
|
|
52
|
-
* nothing, so it must not report `present`. Shared with ScalingSim so the
|
|
53
|
-
* two consumers cannot drift. */
|
|
46
|
+
/** A stage contributes usable core-time evidence only when it both ran tasks and produced a
|
|
47
|
+
* positive duration sum: a degenerate aggregate (every task finish <= launch) proves nothing.
|
|
48
|
+
* Shared with ScalingSim so the two consumers can't drift. */
|
|
54
49
|
export function hasUsableRunAggregates(runAggregates ) {
|
|
55
50
|
const perStage = (runAggregates )?.perStage;
|
|
56
51
|
return perStage != null
|