Skip to content

Commit afb1214

Browse files
committed
[ZEPPELIN-926] Set maxClassfileName to 128
### What is this PR for? set scala Settings.numClassFileSetting to 128 to prevent "Getting 'File name too long'" error. See https://issues.apache.org/jira/browse/SPARK-4820 ### What type of PR is it? Bug Fix ### Todos * [x] - Programatically set numClassFileSetting to 128 ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-926 https://issues.apache.org/jira/browse/SPARK-4820 ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Lee moon soo <[email protected]> Closes #935 from Leemoonsoo/maxClassfileName and squashes the following commits: 596a33a [Lee moon soo] Set maxClassfileName to 128
1 parent bdc78da commit afb1214

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
import scala.tools.nsc.Settings;
7171
import scala.tools.nsc.interpreter.Completion.Candidates;
7272
import scala.tools.nsc.interpreter.Completion.ScalaCompleter;
73+
import scala.tools.nsc.settings.MutableSettings;
7374
import scala.tools.nsc.settings.MutableSettings.BooleanSetting;
7475
import scala.tools.nsc.settings.MutableSettings.PathSetting;
7576

@@ -462,6 +463,12 @@ public void open() {
462463

463464
System.setProperty("scala.repl.name.line", "line" + this.hashCode() + "$");
464465

466+
// To prevent 'File name too long' error on some file system.
467+
MutableSettings.IntSetting numClassFileSetting = settings.maxClassfileName();
468+
numClassFileSetting.v_$eq(128);
469+
settings.scala$tools$nsc$settings$ScalaSettings$_setter_$maxClassfileName_$eq(
470+
numClassFileSetting);
471+
465472
synchronized (sharedInterpreterLock) {
466473
/* create scala repl */
467474
if (printREPLOutput()) {

0 commit comments

Comments
 (0)