it

Spark Structured Streaming Troubleshooting

spark structured streaming troubleshooting แกปญหา
Spark Structured Streaming Troubleshooting

Spark Streaming Troubleshooting

Spark Structured Streaming Troubleshooting

Spark Structured Streaming Troubleshooting แก้ปัญหา OOM Checkpoint Watermark Performance Kafka State Store AQE Partition Skew

ปัญหาสาเหตุวิธีแก้Priority
OOM (Out of Memory)State Store ใหญ่ / Shuffle / Large BatchWatermark + RocksDB + AQECritical
Slow BatchPartition Skew / No AQE / Low Parallelismเพิ่ม Partitions + AQE + BroadcastHigh
Checkpoint CorruptDisk Full / Schema Change / Bugลบ Checkpoint + Idempotent SinkHigh
Late Data LossWatermark ตัดข้อมูลเร็วเกินไปเพิ่ม Watermark DurationMedium
Data DuplicationCheckpoint Recovery / At-least-onceIdempotent Sink (Upsert)Medium
Kafka LagProcessing ช้ากว่า IngestionScale Executors + maxOffsetsPerTriggerHigh
Spark Structured Streaming Troubleshooting

เคล็ดลับ

  • Watermark: ตั้ง Watermark ทุก Stateful Query ป้องกัน State OOM
  • RocksDB: ใช้ RocksDB State Store สำหรับ State ขนาดใหญ่
  • AQE: เปิด Adaptive Query Execution ลด Skew อัตโนมัติ
  • Idempotent: ใช้ Idempotent Sink (Upsert) ป้องกันข้อมูลซ้ำ
  • Monitor: ดู Spark UI Batch Duration Processing Rate State Size

ปัญหาที่พบบ่อยมีอะไร

OOM State Store Partition Skew Slow Batch Checkpoint Corruption Late Data Kafka Offset Serialization Schema Evolution Backlog

XM Legend · เทรดเดอร์ & ผู้สอน Forex 13 ปี

ผู้ก่อตั้ง SiamCafe ตั้งแต่ปี 1997 · เทรดเดอร์สาย Forex มากกว่า 13 ปี ได้รับการยกย่องเป็น XM Legend · แบ่งปันความรู้ Forex, ไอที, AI และการเทรด จากประสบการณ์จริงในตลาดจริง