chore(workflow-core): remove the unused TupleUtils.json2tuple - #8395
chore(workflow-core): remove the unused TupleUtils.json2tuple#8395aglinxinyuan wants to merge 1 commit into
Conversation
Automated Reviewer SuggestionsBased on the
|
There was a problem hiding this comment.
🟢 Approval recommended
This is a scoped, verified deletion of a dead method and its dedicated tests, and tuple2json remains in production use.
Pull request overview
Removes the unused TupleUtils.json2tuple method from workflow-core and deletes the tests that exclusively exercised that method, while keeping the still-used tuple2json API (confirmed in ExecutionResultService).
Changes:
- Delete
TupleUtils.json2tupleimplementation and its now-unneeded imports. - Remove
json2tuple-specific tests fromTupleUtilsSpec. - Remove the
TupleSpecround-trip test and correspondingTupleUtilsimports that depended onjson2tuple.
File summaries
| File | Description |
|---|---|
| common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/TupleUtils.scala | Deletes json2tuple and cleans up related imports; tuple2json remains intact. |
| common/workflow-core/src/test/scala/org/apache/texera/amber/core/tuple/TupleUtilsSpec.scala | Removes json2tuple tests, leaving tuple2json coverage. |
| common/workflow-core/src/test/scala/org/apache/texera/amber/core/tuple/TupleSpec.scala | Removes the tuple2json → json2tuple round-trip test and the now-unused imports. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8395 +/- ##
============================================
- Coverage 94.03% 94.02% -0.01%
+ Complexity 4821 4820 -1
============================================
Files 1204 1204
Lines 48991 48975 -16
Branches 5956 5955 -1
============================================
- Hits 46067 46050 -17
Misses 1458 1458
- Partials 1466 1467 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🟢 | bs=10 sw=10 sl=64 | 659 | 0.402 | 14,598/18,670/18,670 us | 🟢 -17.4% / 🔴 +16.8% |
| 🔴 | bs=100 sw=10 sl=64 | 1,291 | 0.788 | 76,397/100,104/100,104 us | 🟢 -26.6% / 🟢 +32.2% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,519 | 0.927 | 654,304/780,868/780,868 us | 🔴 +14.4% / 🟢 +50.9% |
Baseline details
Latest main 1cbe857 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 659 tuples/sec | 668 tuples/sec | 755.36 tuples/sec | -1.3% | -12.8% |
| bs=10 sw=10 sl=64 | MB/s | 0.402 MB/s | 0.408 MB/s | 0.461 MB/s | -1.5% | -12.8% |
| bs=10 sw=10 sl=64 | p50 | 14,598 us | 14,019 us | 12,938 us | +4.1% | +12.8% |
| bs=10 sw=10 sl=64 | p95 | 18,670 us | 22,601 us | 15,980 us | -17.4% | +16.8% |
| bs=10 sw=10 sl=64 | p99 | 18,670 us | 22,601 us | 19,233 us | -17.4% | -2.9% |
| bs=100 sw=10 sl=64 | throughput | 1,291 tuples/sec | 1,294 tuples/sec | 976.3 tuples/sec | -0.2% | +32.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.788 MB/s | 0.79 MB/s | 0.596 MB/s | -0.3% | +32.2% |
| bs=100 sw=10 sl=64 | p50 | 76,397 us | 71,610 us | 102,340 us | +6.7% | -25.4% |
| bs=100 sw=10 sl=64 | p95 | 100,104 us | 136,367 us | 109,262 us | -26.6% | -8.4% |
| bs=100 sw=10 sl=64 | p99 | 100,104 us | 136,367 us | 118,827 us | -26.6% | -15.8% |
| bs=1000 sw=10 sl=64 | throughput | 1,519 tuples/sec | 1,553 tuples/sec | 1,006 tuples/sec | -2.2% | +50.9% |
| bs=1000 sw=10 sl=64 | MB/s | 0.927 MB/s | 0.948 MB/s | 0.614 MB/s | -2.2% | +50.9% |
| bs=1000 sw=10 sl=64 | p50 | 654,304 us | 644,854 us | 999,855 us | +1.5% | -34.6% |
| bs=1000 sw=10 sl=64 | p95 | 780,868 us | 682,835 us | 1,042,833 us | +14.4% | -25.1% |
| bs=1000 sw=10 sl=64 | p99 | 780,868 us | 682,835 us | 1,070,722 us | +14.4% | -27.1% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,303.51,200,128000,659,0.402,14597.89,18669.89,18669.89
1,100,10,64,20,1549.04,2000,1280000,1291,0.788,76396.76,100103.84,100103.84
2,1000,10,64,20,13169.72,20000,12800000,1519,0.927,654303.77,780868.30,780868.30
What changes were proposed in this PR?
Deletes
TupleUtils.json2tuple, which has no production caller. Pure deletion, no behaviour change: −114 lines.Its sibling
tuple2jsonis live —ExecutionResultServiceuses it — and stays, as does the object.History
val newTuple = json2tuple(line)when rehydrating cached tuplesDead for about two years.
Any related issues, documentation, discussions?
Closes #8392
How was this PR tested?
Existing tests only — this PR adds none, since it removes a method and the tests that covered it.
Locally, from the repo root with Java 17:
sbt "WorkflowExecutionService/Test/compile"— success.sbt "WorkflowCore/testOnly *TupleSpec *TupleUtilsSpec"— 32 tests, all pass.sbt scalafmtCheckAll "scalafixAll --check"— clean.Verification, re-runnable by a reviewer:
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)