I solved the problem, and it turned out that the "Spark Project Source Drain" was excluded when importing the Spark source code into the default settings.
What I've done:
- File → Project Structure → Modules → “Source Stream-flume-sink_2.10” → Sources
- a folder is displayed in the tree, initially the "target" folder is excluded, but the classes "SparkFlumeProtocol" and "EventBatch" are compiled into this folder .
- set the "target" folder as "Sources", then leave everything under "target" as "Excluded", except for "scala -2.10", see attached screenshot.
In this way, compilation classes are included, and classes can be correctly resolved after the reassembly project.

--- June 8, 2016 update --------
or, more specifically, the whole path of this module
pay attention to the type and color, this will affect the package name
package org.apache.spark.streaming.flume.sink;

source share