Skip to content

Commit ee012e0

Browse files
dragospwendell
authored andcommitted
[SPARK-7726] Fix Scaladoc false errors
Visibility rules for static members are different in Scala and Java, and this case requires an explicit static import. Even though these are Java files, they are run through scaladoc, which enforces Scala rules. Also reverted the commit that reverts the upgrade to 2.11.6 Author: Iulian Dragos <[email protected]> Closes #6260 from dragos/issue/scaladoc-false-error and squashes the following commits: f2e998e [Iulian Dragos] Revert "[HOTFIX] Revert "[SPARK-7092] Update spark scala version to 2.11.6"" 0bad052 [Iulian Dragos] Fix scaladoc faux-error. (cherry picked from commit 3c4c1f9) Signed-off-by: Patrick Wendell <[email protected]>
1 parent cd3093e commit ee012e0

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

network/shuffle/src/main/java/org/apache/spark/network/shuffle/protocol/OpenBlocks.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
import org.apache.spark.network.protocol.Encoders;
2626

27+
// Needed by ScalaDoc. See SPARK-7726
28+
import static org.apache.spark.network.shuffle.protocol.BlockTransferMessage.Type;
29+
2730
/** Request to read a set of blocks. Returns {@link StreamHandle}. */
2831
public class OpenBlocks extends BlockTransferMessage {
2932
public final String appId;

network/shuffle/src/main/java/org/apache/spark/network/shuffle/protocol/RegisterExecutor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222

2323
import org.apache.spark.network.protocol.Encoders;
2424

25+
// Needed by ScalaDoc. See SPARK-7726
26+
import static org.apache.spark.network.shuffle.protocol.BlockTransferMessage.Type;
27+
2528
/**
2629
* Initial registration message between an executor and its local shuffle server.
2730
* Returns nothing (empty bye array).

network/shuffle/src/main/java/org/apache/spark/network/shuffle/protocol/StreamHandle.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import com.google.common.base.Objects;
2121
import io.netty.buffer.ByteBuf;
2222

23+
// Needed by ScalaDoc. See SPARK-7726
24+
import static org.apache.spark.network.shuffle.protocol.BlockTransferMessage.Type;
25+
2326
/**
2427
* Identifier for a fixed number of chunks to read from a stream created by an "open blocks"
2528
* message. This is used by {@link org.apache.spark.network.shuffle.OneForOneBlockFetcher}.

network/shuffle/src/main/java/org/apache/spark/network/shuffle/protocol/UploadBlock.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
import org.apache.spark.network.protocol.Encoders;
2626

27+
// Needed by ScalaDoc. See SPARK-7726
28+
import static org.apache.spark.network.shuffle.protocol.BlockTransferMessage.Type;
29+
2730

2831
/** Request to upload a block with a certain StorageLevel. Returns nothing (empty byte array). */
2932
public class UploadBlock extends BlockTransferMessage {

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,9 +1799,9 @@
17991799
<property><name>scala-2.11</name></property>
18001800
</activation>
18011801
<properties>
1802-
<scala.version>2.11.2</scala.version>
1802+
<scala.version>2.11.6</scala.version>
18031803
<scala.binary.version>2.11</scala.binary.version>
1804-
<jline.version>2.12</jline.version>
1804+
<jline.version>2.12.1</jline.version>
18051805
<jline.groupid>jline</jline.groupid>
18061806
</properties>
18071807
</profile>

repl/scala-2.11/src/main/scala/org/apache/spark/repl/SparkIMain.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ class SparkIMain(@BeanProperty val factory: ScriptEngineFactory, initialSettings
11291129

11301130
def apply(line: String): Result = debugging(s"""parse("$line")""") {
11311131
var isIncomplete = false
1132-
currentRun.reporting.withIncompleteHandler((_, _) => isIncomplete = true) {
1132+
currentRun.parsing.withIncompleteHandler((_, _) => isIncomplete = true) {
11331133
reporter.reset()
11341134
val trees = newUnitParser(line).parseStats()
11351135
if (reporter.hasErrors) Error

0 commit comments

Comments
 (0)