Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-21760

Structured streaming terminates with Exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: Structured Streaming
    • Labels:
      None

      Description

      We have seen Structured stream stops with exception below
      While analyzing the content we found that latest log file as just one line with version

      hdfs dfs -cat warehouse/latency_internal/_spark_metadata/1683
      v1

      Exception is below
      Exception in thread "stream execution thread for latency_internal [id = 39f35d01-60d5-40b4-826e-99e5e38d0077, runId = 95c95a01-bd4f-4604-8aae-c0c5d3e873e8]" java.lang.IllegalStateException: Incomplete log file
      at org.apache.spark.sql.execution.streaming.CompactibleFileStreamLog.deserialize(CompactibleFileStreamLog.scala:147)
      at org.apache.spark.sql.execution.streaming.CompactibleFileStreamLog.deserialize(CompactibleFileStreamLog.scala:42)
      at org.apache.spark.sql.execution.streaming.HDFSMetadataLog.get(HDFSMetadataLog.scala:237)
      at org.apache.spark.sql.execution.streaming.HDFSMetadataLog$$anonfun$getLatest$1.apply$mcVJ$sp(HDFSMetadataLog.scala:266)
      at org.apache.spark.sql.execution.streaming.HDFSMetadataLog$$anonfun$getLatest$1.apply(HDFSMetadataLog.scala:265)
      at org.apache.spark.sql.execution.streaming.HDFSMetadataLog$$anonfun$getLatest$1.apply(HDFSMetadataLog.scala:265)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.ArrayOps$ofLong.foreach(ArrayOps.scala:246)
      at org.apache.spark.sql.execution.streaming.HDFSMetadataLog.getLatest(HDFSMetadataLog.scala:265)
      at org.apache.spark.sql.execution.streaming.FileStreamSource.<init>(FileStreamSource.scala:60)
      at org.apache.spark.sql.execution.datasources.DataSource.createSource(DataSource.scala:256)
      at org.apache.spark.sql.execution.streaming.StreamExecution$$anonfun$logicalPlan$1.applyOrElse(StreamExecution.scala:127)
      at org.apache.spark.sql.execution.streaming.StreamExecution$$anonfun$logicalPlan$1.applyOrElse(StreamExecution.scala:123)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:288)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:288)
      at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:70)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:287)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$5.apply(TreeNode.scala:331)
      at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:188)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformChildren(TreeNode.scala:329)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$5.apply(TreeNode.scala:331)
      at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:188)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformChildren(TreeNode.scala:329)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$5.apply(TreeNode.scala:331)
      at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:188)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformChildren(TreeNode.scala:329)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$5.apply(TreeNode.scala:331)
      at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:188)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformChildren(TreeNode.scala:329)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:293)
      at org.apache.spark.sql.catalyst.trees.TreeNode.transform(TreeNode.scala:277)
      at org.apache.spark.sql.execution.streaming.StreamExecution.logicalPlan$lzycompute(StreamExecution.scala:123)
      at org.apache.spark.sql.execution.streaming.StreamExecution.logicalPlan(StreamExecution.scala:121)
      at org.apache.spark.sql.execution.streaming.StreamExecution.sources$lzycompute(StreamExecution.scala:137)
      at org.apache.spark.sql.execution.streaming.StreamExecution.sources(StreamExecution.scala:136)
      at org.apache.spark.sql.execution.streaming.StreamExecution.org$apache$spark$sql$execution$streaming$StreamExecution$$runBatches(StreamExecution.scala:288)
      at org.apache.spark.sql.execution.streaming.StreamExecution$$anon$1.run(StreamExecution.scala:177)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tanejagagan gagan taneja
                Shepherd:
                Tathagata Das
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: