2323
2424/**
2525 * An input partition returned by {@link DataSourceReader#planInputPartitions()} and is
26- * responsible for creating the actual data reader. The relationship between
27- * {@link InputPartition} and {@link InputPartitionReader}
26+ * responsible for creating the actual data reader of one RDD partition.
27+ * The relationship between {@link InputPartition} and {@link InputPartitionReader}
2828 * is similar to the relationship between {@link Iterable} and {@link java.util.Iterator}.
2929 *
30- * Note that input partitions will be serialized and sent to executors, then the partition reader
31- * will be created on executors and do the actual reading. So {@link InputPartition} must be
32- * serializable and {@link InputPartitionReader} doesn't need to be.
30+ * Note that {@link InputPartition}s will be serialized and sent to executors, then
31+ * {@link InputPartitionReader}s will be created on executors to do the actual reading. So
32+ * {@link InputPartition} must be serializable while {@link InputPartitionReader} doesn't need to
33+ * be.
3334 */
3435@ InterfaceStability .Evolving
3536public interface InputPartition <T > extends Serializable {
@@ -42,7 +43,7 @@ public interface InputPartition<T> extends Serializable {
4243 *
4344 * Note that if a host name cannot be recognized by Spark, it will be ignored as it was not in
4445 * the returned locations. By default this method returns empty string array, which means this
45- * task has no location preference.
46+ * data reader has no location preference.
4647 *
4748 * If this method fails (by throwing an exception), the action would fail and no Spark job was
4849 * submitted.
0 commit comments