Skip to content
Snippets Groups Projects
  1. Dec 03, 2015
    • Carson Wang's avatar
      [SPARK-11206] Support SQL UI on the history server (resubmit) · b6e9963e
      Carson Wang authored
      Resubmit #9297 and #9991
      On the live web UI, there is a SQL tab which provides valuable information for the SQL query. But once the workload is finished, we won't see the SQL tab on the history server. It will be helpful if we support SQL UI on the history server so we can analyze it even after its execution.
      
      To support SQL UI on the history server:
      1. I added an onOtherEvent method to the SparkListener trait and post all SQL related events to the same event bus.
      2. Two SQL events SparkListenerSQLExecutionStart and SparkListenerSQLExecutionEnd are defined in the sql module.
      3. The new SQL events are written to event log using Jackson.
      4. A new trait SparkHistoryListenerFactory is added to allow the history server to feed events to the SQL history listener. The SQL implementation is loaded at runtime using java.util.ServiceLoader.
      
      Author: Carson Wang <carson.wang@intel.com>
      
      Closes #10061 from carsonwang/SqlHistoryUI.
      b6e9963e
    • Anderson de Andrade's avatar
      [SPARK-12056][CORE] Create a TaskAttemptContext only after calling setConf. · f434f36d
      Anderson de Andrade authored
      TaskAttemptContext's constructor will clone the configuration instead of referencing it. Calling setConf after creating TaskAttemptContext makes any changes to the configuration made inside setConf unperceived by RecordReader instances.
      
      As an example, Titan's InputFormat will change conf when calling setConf. They wrap their InputFormat around Cassandra's ColumnFamilyInputFormat, and append Cassandra's configuration. This change fixes the following error when using Titan's CassandraInputFormat with Spark:
      
      *java.lang.RuntimeException: org.apache.thrift.protocol.TProtocolException: Required field 'keyspace' was not present! Struct: set_key space_args(keyspace:null)*
      
      There's a discussion of this error here: https://groups.google.com/forum/#!topic/aureliusgraphs/4zpwyrYbGAE
      
      Author: Anderson de Andrade <adeandrade@verticalscope.com>
      
      Closes #10046 from adeandrade/newhadooprdd-fix.
      f434f36d
    • felixcheung's avatar
      [SPARK-12019][SPARKR] Support character vector for sparkR.init(), check param and fix doc · 2213441e
      felixcheung authored
      and add tests.
      Spark submit expects comma-separated list
      
      Author: felixcheung <felixcheung_m@hotmail.com>
      
      Closes #10034 from felixcheung/sparkrinitdoc.
      2213441e
    • Tathagata Das's avatar
      [FLAKY-TEST-FIX][STREAMING][TEST] Make sure StreamingContexts are shutdown after test · a02d4727
      Tathagata Das authored
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #10124 from tdas/InputStreamSuite-flaky-test.
      a02d4727
    • Nicholas Chammas's avatar
      [SPARK-12107][EC2] Update spark-ec2 versions · ad7cea6f
      Nicholas Chammas authored
      I haven't created a JIRA. If we absolutely need one I'll do it, but I'm fine with not getting mentioned in the release notes if that's the only purpose it'll serve.
      
      cc marmbrus - We should include this in 1.6-RC2 if there is one. I can open a second PR against branch-1.6 if necessary.
      
      Author: Nicholas Chammas <nicholas.chammas@gmail.com>
      
      Closes #10109 from nchammas/spark-ec2-versions.
      ad7cea6f
    • Yanbo Liang's avatar
      [MINOR][ML] Use coefficients replace weights · d576e76b
      Yanbo Liang authored
      Use ```coefficients``` replace ```weights```, I wish they are the last two.
      mengxr
      
      Author: Yanbo Liang <ybliang8@gmail.com>
      
      Closes #10065 from yanboliang/coefficients.
      d576e76b
    • Andrew Or's avatar
      [SPARK-12108] Make event logs smaller · 688e521c
      Andrew Or authored
      **Problem.** Event logs in 1.6 were much bigger than 1.5. I ran page rank and the event log size in 1.6 was almost 5x that in 1.5. I did a bisect to find that the RDD callsite added in #9398 is largely responsible for this.
      
      **Solution.** This patch removes the long form of the callsite (which is not used!) from the event log. This reduces the size of the event log significantly.
      
      *Note on compatibility*: if this patch is to be merged into 1.6.0, then it won't break any compatibility. Otherwise, if it is merged into 1.6.1, then we might need to add more backward compatibility handling logic (currently does not exist yet).
      
      Author: Andrew Or <andrew@databricks.com>
      
      Closes #10115 from andrewor14/smaller-event-logs.
      688e521c
    • Shixiong Zhu's avatar
      [SPARK-12101][CORE] Fix thread pools that cannot cache tasks in Worker and AppClient · 649be4fa
      Shixiong Zhu authored
      `SynchronousQueue` cannot cache any task. This issue is similar to #9978. It's an easy fix. Just use the fixed `ThreadUtils.newDaemonCachedThreadPool`.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #10108 from zsxwing/fix-threadpool.
      649be4fa
    • jerryshao's avatar
      [SPARK-12059][CORE] Avoid assertion error when unexpected state transition met in Master · 7bc9e1db
      jerryshao authored
      Downgrade to warning log for unexpected state transition.
      
      andrewor14 please review, thanks a lot.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #10091 from jerryshao/SPARK-12059.
      7bc9e1db
    • Steve Loughran's avatar
      [SPARK-11314][YARN] add service API and test service for Yarn Cluster schedulers · 8fa3e474
      Steve Loughran authored
      This is purely the yarn/src/main and yarn/src/test bits of the YARN ATS integration: the extension model to load and run implementations of `SchedulerExtensionService` in the yarn cluster scheduler process —and to stop them afterwards.
      
      There's duplication between the two schedulers, yarn-client and yarn-cluster, at least in terms of setting everything up, because the common superclass, `YarnSchedulerBackend` is in spark-core, and the extension services need the YARN app/attempt IDs.
      
      If you look at how the the extension services are loaded, the case class `SchedulerExtensionServiceBinding` is used to pass in config info -currently just the spark context and the yarn IDs, of which one, the attemptID, will be null when running client-side. I'm passing in a case class to ensure that it would be possible in future to add extra arguments to the binding class, yet, as the method signature will not have changed, still be able to load existing services.
      
      There's no functional extension service here, just one for testing. The real tests come in the bigger pull requests. At the same time, there's no restriction of this extension service purely to the ATS history publisher. Anything else that wants to listen to the spark context and publish events could use this, and I'd also consider writing one for the YARN-913 registry service, so that the URLs of the web UI would be locatable through that (low priority; would make more sense if integrated with a REST client).
      
      There's no minicluster test. Given the test execution overhead of setting up minicluster tests, it'd  probably be better to add an extension service into one of the existing tests.
      
      Author: Steve Loughran <stevel@hortonworks.com>
      
      Closes #9182 from steveloughran/stevel/feature/SPARK-1537-service.
      8fa3e474
    • felixcheung's avatar
      [SPARK-12116][SPARKR][DOCS] document how to workaround function name conflicts with dplyr · 43c575cb
      felixcheung authored
      shivaram
      
      Author: felixcheung <felixcheung_m@hotmail.com>
      
      Closes #10119 from felixcheung/rdocdplyrmasked.
      43c575cb
    • microwishing's avatar
      [DOCUMENTATION][KAFKA] fix typo in kafka/OffsetRange.scala · 95b3cf12
      microwishing authored
      this is to fix some typo in external/kafka/src/main/scala/org/apache/spark/streaming/kafka/OffsetRange.scala
      
      Author: microwishing <wei.zhu@kaiyuandao.com>
      
      Closes #10121 from microwishing/master.
      95b3cf12
    • Jeff Zhang's avatar
      [DOCUMENTATION][MLLIB] typo in mllib doc · 7470d9ed
      Jeff Zhang authored
      \cc mengxr
      
      Author: Jeff Zhang <zjffdu@apache.org>
      
      Closes #10093 from zjffdu/mllib_typo.
      7470d9ed
    • Huaxin Gao's avatar
      [SPARK-12088][SQL] check connection.isClosed before calling connection… · 5349851f
      Huaxin Gao authored
      In Java Spec java.sql.Connection, it has
      boolean getAutoCommit() throws SQLException
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed connection
      
      So if conn.getAutoCommit is called on a closed connection, a SQLException will be thrown. Even though the code catch the SQLException and program can continue, I think we should check conn.isClosed before calling conn.getAutoCommit to avoid the unnecessary SQLException.
      
      Author: Huaxin Gao <huaxing@oc0558782468.ibm.com>
      
      Closes #10095 from huaxingao/spark-12088.
      5349851f
  2. Dec 02, 2015
  3. Dec 01, 2015
    • Liang-Chi Hsieh's avatar
      [SPARK-11949][SQL] Check bitmasks to set nullable property · 0f37d1d7
      Liang-Chi Hsieh authored
      Following up #10038.
      
      We can use bitmasks to determine which grouping expressions need to be set as nullable.
      
      cc yhuai
      
      Author: Liang-Chi Hsieh <viirya@appier.com>
      
      Closes #10067 from viirya/fix-cube-following.
      0f37d1d7
    • Tathagata Das's avatar
      [SPARK-12087][STREAMING] Create new JobConf for every batch in saveAsHadoopFiles · 8a75a304
      Tathagata Das authored
      The JobConf object created in `DStream.saveAsHadoopFiles` is used concurrently in multiple places:
      * The JobConf is updated by `RDD.saveAsHadoopFile()` before the job is launched
      * The JobConf is serialized as part of the DStream checkpoints.
      These concurrent accesses (updating in one thread, while the another thread is serializing it) can lead to concurrentModidicationException in the underlying Java hashmap using in the internal Hadoop Configuration object.
      
      The solution is to create a new JobConf in every batch, that is updated by `RDD.saveAsHadoopFile()`, while the checkpointing serializes the original JobConf.
      
      Tests to be added in #9988 will fail reliably without this patch. Keeping this patch really small to make sure that it can be added to previous branches.
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #10088 from tdas/SPARK-12087.
      8a75a304
    • Davies Liu's avatar
      [SPARK-12077][SQL] change the default plan for single distinct · 96691fea
      Davies Liu authored
      Use try to match the behavior for single distinct aggregation with Spark 1.5, but that's not scalable, we should be robust by default, have a flag to address performance regression for low cardinality aggregation.
      
      cc yhuai nongli
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #10075 from davies/agg_15.
      96691fea
    • Andrew Or's avatar
      [SPARK-12081] Make unified memory manager work with small heaps · d96f8c99
      Andrew Or authored
      The existing `spark.memory.fraction` (default 0.75) gives the system 25% of the space to work with. For small heaps, this is not enough: e.g. default 1GB leaves only 250MB system memory. This is especially a problem in local mode, where the driver and executor are crammed in the same JVM. Members of the community have reported driver OOM's in such cases.
      
      **New proposal.** We now reserve 300MB before taking the 75%. For 1GB JVMs, this leaves `(1024 - 300) * 0.75 = 543MB` for execution and storage. This is proposal (1) listed in the [JIRA](https://issues.apache.org/jira/browse/SPARK-12081).
      
      Author: Andrew Or <andrew@databricks.com>
      
      Closes #10081 from andrewor14/unified-memory-small-heaps.
      d96f8c99
    • Andrew Or's avatar
      [SPARK-8414] Ensure context cleaner periodic cleanups · 1ce4adf5
      Andrew Or authored
      Garbage collection triggers cleanups. If the driver JVM is huge and there is little memory pressure, we may never clean up shuffle files on executors. This is a problem for long-running applications (e.g. streaming).
      
      Author: Andrew Or <andrew@databricks.com>
      
      Closes #10070 from andrewor14/periodic-gc.
      1ce4adf5
    • Yin Huai's avatar
      [SPARK-11596][SQL] In TreeNode's argString, if a TreeNode is not a child of... · e96a70d5
      Yin Huai authored
      [SPARK-11596][SQL] In TreeNode's argString, if a TreeNode is not a child of the current TreeNode, we should only return the simpleString.
      
      In TreeNode's argString, if a TreeNode is not a child of the current TreeNode, we will only return the simpleString.
      
      I tested the [following case provided by Cristian](https://issues.apache.org/jira/browse/SPARK-11596?focusedCommentId=15019241&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15019241).
      ```
      val c = (1 to 20).foldLeft[Option[DataFrame]] (None) { (curr, idx) =>
          println(s"PROCESSING >>>>>>>>>>> $idx")
          val df = sqlContext.sparkContext.parallelize((0 to 10).zipWithIndex).toDF("A", "B")
          val union = curr.map(_.unionAll(df)).getOrElse(df)
          union.cache()
          Some(union)
        }
      
      c.get.explain(true)
      ```
      
      Without the change, `c.get.explain(true)` took 100s. With the change, `c.get.explain(true)` took 26ms.
      
      https://issues.apache.org/jira/browse/SPARK-11596
      
      Author: Yin Huai <yhuai@databricks.com>
      
      Closes #10079 from yhuai/SPARK-11596.
      e96a70d5
    • Yin Huai's avatar
      [SPARK-11352][SQL] Escape */ in the generated comments. · 5872a9d8
      Yin Huai authored
      https://issues.apache.org/jira/browse/SPARK-11352
      
      Author: Yin Huai <yhuai@databricks.com>
      
      Closes #10072 from yhuai/SPARK-11352.
      5872a9d8
    • Huaxin Gao's avatar
      [SPARK-11788][SQL] surround timestamp/date value with quotes in JDBC data source · 5a8b5fdd
      Huaxin Gao authored
      When query the Timestamp or Date column like the following
      val filtered = jdbcdf.where($"TIMESTAMP_COLUMN" >= beg && $"TIMESTAMP_COLUMN" < end)
      The generated SQL query is "TIMESTAMP_COLUMN >= 2015-01-01 00:00:00.0"
      It should have quote around the Timestamp/Date value such as "TIMESTAMP_COLUMN >= '2015-01-01 00:00:00.0'"
      
      Author: Huaxin Gao <huaxing@oc0558782468.ibm.com>
      
      Closes #9872 from huaxingao/spark-11788.
      5a8b5fdd
    • Nong Li's avatar
      [SPARK-11328][SQL] Improve error message when hitting this issue · 47a0abc3
      Nong Li authored
      The issue is that the output commiter is not idempotent and retry attempts will
      fail because the output file already exists. It is not safe to clean up the file
      as this output committer is by design not retryable. Currently, the job fails
      with a confusing file exists error. This patch is a stop gap to tell the user
      to look at the top of the error log for the proper message.
      
      This is difficult to test locally as Spark is hardcoded not to retry. Manually
      verified by upping the retry attempts.
      
      Author: Nong Li <nong@databricks.com>
      Author: Nong Li <nongli@gmail.com>
      
      Closes #10080 from nongli/spark-11328.
      47a0abc3
    • Josh Rosen's avatar
      [SPARK-12075][SQL] Speed up HiveComparisionTest by avoiding / speeding up TestHive.reset() · ef6790fd
      Josh Rosen authored
      When profiling HiveCompatibilitySuite, I noticed that most of the time seems to be spent in expensive `TestHive.reset()` calls. This patch speeds up suites based on HiveComparisionTest, such as HiveCompatibilitySuite, with the following changes:
      
      - Avoid `TestHive.reset()` whenever possible:
        - Use a simple set of heuristics to guess whether we need to call `reset()` in between tests.
        - As a safety-net, automatically re-run failed tests by calling `reset()` before the re-attempt.
      - Speed up the expensive parts of `TestHive.reset()`: loading the `src` and `srcpart` tables took roughly 600ms per test, so we now avoid this by using a simple heuristic which only loads those tables by tests that reference them. This is based on simple string matching over the test queries which errs on the side of loading in more situations than might be strictly necessary.
      
      After these changes, HiveCompatibilitySuite seems to run in about 10 minutes.
      
      This PR is a revival of #6663, an earlier experimental PR from June, where I played around with several possible speedups for this suite.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #10055 from JoshRosen/speculative-testhive-reset.
      ef6790fd
    • jerryshao's avatar
      [SPARK-12002][STREAMING][PYSPARK] Fix python direct stream checkpoint recovery issue · f292018f
      jerryshao authored
      Fixed a minor race condition in #10017
      
      Closes #10017
      
      Author: jerryshao <sshao@hortonworks.com>
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #10074 from zsxwing/review-pr10017.
      f292018f
    • Xusen Yin's avatar
      [SPARK-11961][DOC] Add docs of ChiSqSelector · e76431f8
      Xusen Yin authored
      https://issues.apache.org/jira/browse/SPARK-11961
      
      Author: Xusen Yin <yinxusen@gmail.com>
      
      Closes #9965 from yinxusen/SPARK-11961.
      e76431f8
    • Shixiong Zhu's avatar
    • Tathagata Das's avatar
      [SPARK-12004] Preserve the RDD partitioner through RDD checkpointing · 60b541ee
      Tathagata Das authored
      The solution is the save the RDD partitioner in a separate file in the RDD checkpoint directory. That is, `<checkpoint dir>/_partitioner`.  In most cases, whether the RDD partitioner was recovered or not, does not affect the correctness, only reduces performance. So this solution makes a best-effort attempt to save and recover the partitioner. If either fails, the checkpointing is not affected. This makes this patch safe and backward compatible.
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #9983 from tdas/SPARK-12004.
      60b541ee
    • Nong Li's avatar
      [SPARK-12030] Fix Platform.copyMemory to handle overlapping regions. · 2cef1cdf
      Nong Li authored
      This bug was exposed as memory corruption in Timsort which uses copyMemory to copy
      large regions that can overlap. The prior implementation did not handle this case
      half the time and always copied forward, resulting in the data being corrupt.
      
      Author: Nong Li <nong@databricks.com>
      
      Closes #10068 from nongli/spark-12030.
      2cef1cdf
    • Josh Rosen's avatar
      [SPARK-12065] Upgrade Tachyon from 0.8.1 to 0.8.2 · 34e7093c
      Josh Rosen authored
      This commit upgrades the Tachyon dependency from 0.8.1 to 0.8.2.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #10054 from JoshRosen/upgrade-to-tachyon-0.8.2.
      34e7093c
    • woj-i's avatar
      [SPARK-11821] Propagate Kerberos keytab for all environments · 6a8cf80c
      woj-i authored
      andrewor14 the same PR as in branch 1.5
      harishreedharan
      
      Author: woj-i <wojciechindyk@gmail.com>
      
      Closes #9859 from woj-i/master.
      6a8cf80c
Loading