-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[MINOR][CORE] Cleanup dead code and duplication in Mem. Management #19254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MINOR][CORE] Cleanup dead code and duplication in Mem. Management #19254
Conversation
|
Test build #3922 has finished for PR 19254 at commit
|
|
Test failure in PySpark appears unrelated, various tests OOMed like e.g. FAILED (errors=2)
[Running <class 'pyspark.streaming.tests.StreamingListenerTests'>]
ERROR
======================================================================
ERROR: setUpClass (pyspark.streaming.tests.StreamingListenerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jenkins/workspace/NewSparkPullRequestBuilder/python/pyspark/streaming/tests.py", line 65, in setUpClass
cls.sc = SparkContext(appName=class_name, conf=conf)
File "/home/jenkins/workspace/NewSparkPullRequestBuilder/python/pyspark/context.py", line 118, in __init__
conf, jsc, profiler_cls)
File "/home/jenkins/workspace/NewSparkPullRequestBuilder/python/pyspark/context.py", line 180, in _do_init
self._jsc = jsc or self._initialize_context(self._conf._jconf)
File "/home/jenkins/workspace/NewSparkPullRequestBuilder/python/pyspark/context.py", line 270, in _initialize_context
return self._jvm.JavaSparkContext(jconf)
File "/home/jenkins/workspace/NewSparkPullRequestBuilder/python/lib/py4j-0.10.6-src.zip/py4j/java_gateway.py", line 1428, in __call__
answer, self._gateway_client, None, self._fqn)
File "/home/jenkins/workspace/NewSparkPullRequestBuilder/python/lib/py4j-0.10.6-src.zip/py4j/protocol.py", line 320, in get_return_value
format(target_id, ".", name), value)
py4j.protocol.Py4JJavaError: An error occurred while calling None.org.apache.spark.api.java.JavaSparkContext.
: java.lang.OutOfMemoryError: Java heap space |
srowen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK. Minor cleanup but valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While here, pull this check into the method and call it "checkAllocation" or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srowen I didn't do this on purpose so that allocatePage and allocateArray compile smaller since the condition isn't true very often. Not worth the duplication here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two if conditions could be collapsed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, will collapse those :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
Test build #3923 has finished for PR 19254 at commit
|
|
Test build #3924 has finished for PR 19254 at commit
|
|
Test failure looks unrelated (even though it happened twice in a row now): [info] org.apache.spark.sql.hive.HiveExternalCatalogVersionsSuite *** ABORTED *** (1 second, 114 milliseconds)
[info] spark-submit returned with exit code 1.
[info] Command line: './bin/spark-submit' '--name' 'prepare testing tables' '--master' 'local[2]' '--conf' 'spark.ui.enabled=false' '--conf' 'spark.master.rest.enabled=false' '--conf' 'spark.sql.warehouse.dir=/home/jenkins/workspace/NewSparkPullRequestBuilder/target/tmp/warehouse-10257aaf-1819-4ac2-a504-d4d325c474eb' '--conf' 'spark.sql.test.version.index=0' '--driver-java-options' '-Dderby.system.home=/home/jenkins/workspace/NewSparkPullRequestBuilder/target/tmp/warehouse-10257aaf-1819-4ac2-a504-d4d325c474eb' '/home/jenkins/workspace/NewSparkPullRequestBuilder/target/tmp/test5614170310518985767.py'
[info]
[info] 2017-09-17 06:11:01.557 - stderr> Error: Could not find or load main class org.apache.spark.launcher.Main (SparkSubmitTestUtils.scala:81)
[info] org.scalatest.exceptions.TestFailedException:
[info] at org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:528)
[info] at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1560)
[info] at org.scalatest.Assertions$class.fail(Assertions.scala:1089)
[info] at org.scalatest.FunSuite.fail(FunSuite.scala:1560)
[info] at org.apache.spark.sql.hive.SparkSubmitTestUtils$class.runSparkSubmit(SparkSubmitTestUtils.scala:81)
[info] at org.apache.spark.sql.hive.HiveExternalCatalogVersionsSuite.runSparkSubmit(HiveExternalCatalogVersionsSuite.scala:38)
[info] at org.apache.spark.sql.hive.HiveExternalCatalogVersionsSuite$$anonfun$beforeAll$1.apply(HiveExternalCatalogVersionsSuite.scala:120)
[info] at org.apache.spark.sql.hive.HiveExternalCatalogVersionsSuite$$anonfun$beforeAll$1.apply(HiveExternalCatalogVersionsSuite.scala:105)
[info] at scala.collection.immutable.List.foreach(List.scala:381)
[info] at org.apache.spark.sql.hive.HiveExternalCatalogVersionsSuite.beforeAll(HiveExternalCatalogVersionsSuite.scala:105)
[info] at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:212)
[info] at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:210)
[info] at org.apache.spark.SparkFunSuite.run(SparkFunSuite.scala:31)
[info] at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:314)
[info] at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:480)
[info] at sbt.ForkMain$Run$2.call(ForkMain.java:296)
[info] at sbt.ForkMain$Run$2.call(ForkMain.java:286)
[info] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[info] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[info] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[info] at java.lang.Thread.run(Thread.java:745)The same test passes fine for me locally (and passed on Jenkins once before when only PySpark failed). |
|
Seems to be broken on Jenkins |
|
I think it's a problem with a recent change, yeah. Just wait until it can be resolved then we can retest |
|
Sure, added a JIRA for the failure here https://issues.apache.org/jira/browse/SPARK-22047 :) |
* Removed the method `org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter#alignToWords`. It became unused as a result of 85b0a15 (SPARK-15962) introducing word alignment for unsafe arrays. * Cleaned up duplicate code in memory management and unsafe sorters * The change extracting the exception paths is more than just cosmetics since it def. reduces the size the affected methods compile to * Build still passes after removing the method, grepping the codebase for `alignToWords` shows no reference to it anywhere either. * Dried up code is covered by existing tests.
e2d05d1 to
6b408a0
Compare
|
Test build #3925 has finished for PR 19254 at commit
|
|
Merged to master |
What changes were proposed in this pull request?
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter#alignToWords.It became unused as a result of 85b0a15
(SPARK-15962) introducing word alignment for unsafe arrays.
How was this patch tested?
alignToWordsshows no reference to it anywhere either.