Skip to content
Snippets Groups Projects
  1. Jun 05, 2017
    • Shixiong Zhu's avatar
      [SPARK-20957][SS][TESTS] Fix o.a.s.sql.streaming.StreamingQueryManagerSuite listing · bc537e40
      Shixiong Zhu authored
      ## What changes were proposed in this pull request?
      
      When stopping StreamingQuery, StreamExecution will set `streamDeathCause` then notify StreamingQueryManager to remove this query. So it's possible that when `q2.exception.isDefined` returns `true`, StreamingQueryManager's active list still has `q2`.
      
      This PR just puts the checks into `eventually` to fix the flaky test.
      
      ## How was this patch tested?
      
      Jenkins
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #18180 from zsxwing/SPARK-20957.
      bc537e40
    • jerryshao's avatar
      [SPARK-20981][SPARKSUBMIT] Add new configuration spark.jars.repositories as... · 06c05441
      jerryshao authored
      [SPARK-20981][SPARKSUBMIT] Add new configuration spark.jars.repositories as equivalence of --repositories
      
      ## What changes were proposed in this pull request?
      
      In our use case of launching Spark applications via REST APIs (Livy), there's no way for user to specify command line arguments, all Spark configurations are set through configurations map. For "--repositories" because there's no equivalent Spark configuration, so we cannot specify the custom repository through configuration.
      
      So here propose to add "--repositories" equivalent configuration in Spark.
      
      ## How was this patch tested?
      
      New UT added.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #18201 from jerryshao/SPARK-20981.
      06c05441
    • sethah's avatar
      [SPARK-19762][ML] Hierarchy for consolidating ML aggregator/loss code · 1665b5f7
      sethah authored
      ## What changes were proposed in this pull request?
      
      JIRA: [SPARK-19762](https://issues.apache.org/jira/browse/SPARK-19762)
      
      The larger changes in this patch are:
      
      * Adds a `DifferentiableLossAggregator` trait which is intended to be used as a common parent trait to all Spark ML aggregator classes. It factors out the common methods: `merge, gradient, loss, weight` from the aggregator subclasses.
      * Adds a `RDDLossFunction` which is intended to be the only implementation of Breeze's `DiffFunction` necessary in Spark ML, and can be used by all other algorithms. It takes the aggregator type as a type parameter, and maps the aggregator over an RDD. It additionally takes in a optional regularization loss function for applying the differentiable part of regularization.
      * Factors out the regularization from the data part of the cost function, and treats regularization as a separate independent cost function which can be evaluated and added to the data cost function.
      * Changes `LinearRegression` to use this new hierarchy as a proof of concept.
      * Adds the following new namespaces `o.a.s.ml.optim.loss` and `o.a.s.ml.optim.aggregator`
      
      Also note that none of these are public-facing changes. All of these classes are internal to Spark ML and remain that way.
      
      **NOTE: The large majority of the "lines added" and "lines deleted" are simply code moving around or unit tests.**
      
      BTW, I also converted LinearSVC to this framework as a way to prove that this new hierarchy is flexible enough for the other algorithms, but I backed those changes out because the PR is large enough as is.
      
      ## How was this patch tested?
      Test suites are added for the new components, and some test suites are also added to provide coverage where there wasn't any before.
      
      * DifferentiablLossAggregatorSuite
      * LeastSquaresAggregatorSuite
      * RDDLossFunctionSuite
      * DifferentiableRegularizationSuite
      
      Below are some performance testing numbers. Run on a 6 node virtual cluster with 44 cores and ~110G RAM, the dataset size is about 37G. These are not "large-scale" tests, but we really want to just make sure the iteration times don't increase with this patch. Notably we are doing the regularization a bit differently than before, but that should cost very little. I think there's very little risk otherwise, and these numbers don't show a difference. Of course I'm happy to add more tests as we think it's necessary, but I think the patch is ready for review now.
      
      **Note:** timings are best of 3 runs.
      
      |    |   numFeatures |   numPoints |   maxIter |   regParam |   elasticNetParam |   SPARK-19762 (sec) |   master (sec) |
      |----|---------------|-------------|-----------|------------|-------------------|---------------------|----------------|
      |  0 |          5000 |       1e+06 |        30 |       0    |               0   |             129.594 |        131.153 |
      |  1 |          5000 |       1e+06 |        30 |       0.1  |               0   |             135.54  |        136.327 |
      |  2 |          5000 |       1e+06 |        30 |       0.01 |               0.5 |             135.148 |        129.771 |
      |  3 |         50000 |  100000     |        30 |       0    |               0   |             145.764 |        144.096 |
      
      ## Follow ups
      
      If this design is accepted, we will convert the other ML algorithms that use this aggregator pattern to this new hierarchy in follow up PRs.
      
      Author: sethah <seth.hendrickson16@gmail.com>
      Author: sethah <shendrickson@cloudera.com>
      
      Closes #17094 from sethah/ml_aggregators.
      1665b5f7
    • Zheng RuiFeng's avatar
      [SPARK-20930][ML] Destroy broadcasted centers after computing cost in KMeans · 98b5ccd3
      Zheng RuiFeng authored
      ## What changes were proposed in this pull request?
       Destroy broadcasted centers after computing cost
      ## How was this patch tested?
      existing tests
      
      Author: Zheng RuiFeng <ruifengz@foxmail.com>
      
      Closes #18152 from zhengruifeng/destroy_kmeans_model.
      98b5ccd3
    • liupengcheng's avatar
      [SPARK-20945] Fix TID key not found in TaskSchedulerImpl · 2d39711b
      liupengcheng authored
      ## What changes were proposed in this pull request?
      
      This pull request fix the TaskScheulerImpl bug in some condition.
      Detail see:
      https://issues.apache.org/jira/browse/SPARK-20945
      
      (Please fill in changes proposed in this fix)
      
      ## How was this patch tested?
      manual tests
      (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
      (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
      
      Please review http://spark.apache.org/contributing.html before opening a pull request.
      
      Author: liupengcheng <liupengcheng@xiaomi.com>
      Author: PengchengLiu <pengchengliu_bupt@163.com>
      
      Closes #18171 from liupc/Fix-tid-key-not-found-in-TaskSchedulerImpl.
      2d39711b
  2. Jun 04, 2017
  3. Jun 03, 2017
    • Wieland Hoffmann's avatar
      [DOCS] Fix a typo in Encoder.clsTag · c70c38eb
      Wieland Hoffmann authored
      ## What changes were proposed in this pull request?
      
      Fixes a typo: `and` -> `an`
      
      ## How was this patch tested?
      
      Not at all.
      
      Author: Wieland Hoffmann <mineo@users.noreply.github.com>
      
      Closes #17759 from mineo/patch-1.
      c70c38eb
    • zuotingbing's avatar
      [SPARK-20936][CORE] Lack of an important case about the test of resolveURI in... · 887cf0ec
      zuotingbing authored
      [SPARK-20936][CORE] Lack of an important case about the test of resolveURI in UtilsSuite, and add it as needed.
      
      ## What changes were proposed in this pull request?
      1.  add `assert(resolve(before) === after)` to check before and after in test of resolveURI.
      the function `assertResolves(before: String, after: String)` have two params, it means we should check the before value whether equals the after value which we want.
      e.g. the after value of Utils.resolveURI("hdfs:///root/spark.jar#app.jar").toString should be "hdfs:///root/spark.jar#app.jar" rather than "hdfs:/root/spark.jar#app.jar". we need `assert(resolve(before) === after)` to make it more safe.
      2. identify the cases between resolveURI and resolveURIs.
      3. delete duplicate cases and some small fix make this suit more clear.
      
      ## How was this patch tested?
      
      unit tests
      
      Author: zuotingbing <zuo.tingbing9@zte.com.cn>
      
      Closes #18158 from zuotingbing/spark-UtilsSuite.
      887cf0ec
    • David Eis's avatar
      [SPARK-20790][MLLIB] Remove extraneous logging in test · 96e6ba6c
      David Eis authored
      ## What changes were proposed in this pull request?
      
      Remove extraneous logging.
      
      ## How was this patch tested?
      
      Unit tests pass.
      
      Author: David Eis <deis@bloomberg.net>
      
      Closes #18188 from davideis/fix-test.
      96e6ba6c
    • Ruben Berenguel Montoro's avatar
      [SPARK-19732][SQL][PYSPARK] Add fill functions for nulls in bool fields of datasets · 6cbc61d1
      Ruben Berenguel Montoro authored
      ## What changes were proposed in this pull request?
      
      Allow fill/replace of NAs with booleans, both in Python and Scala
      
      ## How was this patch tested?
      
      Unit tests, doctests
      
      This PR is original work from me and I license this work to the Spark project
      
      Author: Ruben Berenguel Montoro <ruben@mostlymaths.net>
      Author: Ruben Berenguel <ruben@mostlymaths.net>
      
      Closes #18164 from rberenguel/SPARK-19732-fillna-bools.
      6cbc61d1
  4. Jun 02, 2017
  5. Jun 01, 2017
    • Bogdan Raducanu's avatar
      [SPARK-20854][SQL] Extend hint syntax to support expressions · 2134196a
      Bogdan Raducanu authored
      ## What changes were proposed in this pull request?
      
      SQL hint syntax:
      * support expressions such as strings, numbers, etc. instead of only identifiers as it is currently.
      * support multiple hints, which was missing compared to the DataFrame syntax.
      
      DataFrame API:
      * support any parameters in DataFrame.hint instead of just strings
      
      ## How was this patch tested?
      Existing tests. New tests in PlanParserSuite. New suite DataFrameHintSuite.
      
      Author: Bogdan Raducanu <bogdan@databricks.com>
      
      Closes #18086 from bogdanrdc/SPARK-20854.
      2134196a
    • Marcelo Vanzin's avatar
      [SPARK-20922][CORE] Add whitelist of classes that can be deserialized by the launcher. · 8efc6e98
      Marcelo Vanzin authored
      Blindly deserializing classes using Java serialization opens the code up to
      issues in other libraries, since just deserializing data from a stream may
      end up execution code (think readObject()).
      
      Since the launcher protocol is pretty self-contained, there's just a handful
      of classes it legitimately needs to deserialize, and they're in just two
      packages, so add a filter that throws errors if classes from any other
      package show up in the stream.
      
      This also maintains backwards compatibility (the updated launcher code can
      still communicate with the backend code in older Spark releases).
      
      Tested with new and existing unit tests.
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #18166 from vanzin/SPARK-20922.
      8efc6e98
    • Li Yichao's avatar
      [SPARK-20365][YARN] Remove local scheme when add path to ClassPath. · 640afa49
      Li Yichao authored
      In Spark on YARN, when configuring "spark.yarn.jars" with local jars (jars started with "local" scheme), we will get inaccurate classpath for AM and containers. This is because we don't remove "local" scheme when concatenating classpath. It is OK to run because classpath is separated with ":" and java treat "local" as a separate jar. But we could improve it to remove the scheme.
      
      Updated `ClientSuite` to check "local" is not in the classpath.
      
      cc jerryshao
      
      Author: Li Yichao <lyc@zhihu.com>
      Author: Li Yichao <liyichao.good@gmail.com>
      
      Closes #18129 from liyichao/SPARK-20365.
      640afa49
    • Xiao Li's avatar
      [SPARK-20941][SQL] Fix SubqueryExec Reuse · f7cf2096
      Xiao Li authored
      ### What changes were proposed in this pull request?
      Before this PR, Subquery reuse does not work. Below are three issues:
      - Subquery reuse does not work.
      - It is sharing the same `SQLConf` (`spark.sql.exchange.reuse`) with the one for Exchange Reuse.
      - No test case covers the rule Subquery reuse.
      
      This PR is to fix the above three issues.
      - Ignored the physical operator `SubqueryExec` when comparing two plans.
      - Added a dedicated conf `spark.sql.subqueries.reuse` for controlling Subquery Reuse
      - Added a test case for verifying the behavior
      
      ### How was this patch tested?
      N/A
      
      Author: Xiao Li <gatorsmile@gmail.com>
      
      Closes #18169 from gatorsmile/subqueryReuse.
      f7cf2096
    • John Compitello's avatar
      [SPARK-20109][MLLIB] Rewrote toBlockMatrix method on IndexedRowMatrix · 0975019c
      John Compitello authored
      ## What changes were proposed in this pull request?
      
      - ~~I added the method `toBlockMatrixDense` to the IndexedRowMatrix class. The current implementation of `toBlockMatrix` is insufficient for users with relatively dense IndexedRowMatrix objects, since it assumes sparsity.~~
      
      EDIT: Ended up deciding that there should be just a single `toBlockMatrix` method, which creates a BlockMatrix whose blocks may be dense or sparse depending on the sparsity of the rows. This method will work better on any current use case of `toBlockMatrix` and doesn't go through `CoordinateMatrix` like the old method.
      
      ## How was this patch tested?
      
      ~~I used the same tests already written for `toBlockMatrix()` to test this method. I also added a new additional unit test for an edge case that was not adequately tested by current test suite.~~
      
      I ran the original `IndexedRowMatrix` tests, plus wrote more to better handle edge cases ignored by original tests.
      
      Author: John Compitello <johnc@broadinstitute.org>
      
      Closes #17459 from johnc1231/johnc-fix-ir-to-block.
      0975019c
    • Yuming Wang's avatar
      [SPARK-20910][SQL] Add build-in SQL function - UUID · 6d05c1c1
      Yuming Wang authored
      ## What changes were proposed in this pull request?
      
      Add build-int SQL function - UUID.
      
      ## How was this patch tested?
      
      unit tests
      
      Author: Yuming Wang <wgyumg@gmail.com>
      
      Closes #18136 from wangyum/SPARK-20910.
      6d05c1c1
    • Yuming Wang's avatar
      [MINOR][SQL] Fix a few function description error. · c8045f8b
      Yuming Wang authored
      ## What changes were proposed in this pull request?
      
      Fix a few function description error.
      
      ## How was this patch tested?
      
      manual tests
      
      ![descissues](https://cloud.githubusercontent.com/assets/5399861/26619392/d547736c-4610-11e7-85d7-aeeb09c02cc8.gif)
      
      Author: Yuming Wang <wgyumg@gmail.com>
      
      Closes #18157 from wangyum/DescIssues.
      c8045f8b
    • Dongjoon Hyun's avatar
      [SPARK-20708][CORE] Make `addExclusionRules` up-to-date · 34661d8a
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      Since [SPARK-9263](https://issues.apache.org/jira/browse/SPARK-9263), `resolveMavenCoordinates` ignores Spark and Spark's dependencies by using `addExclusionRules`. This PR aims to make [addExclusionRules](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala#L956-L974) up-to-date to neglect correctly because it fails to neglect some components like the following.
      
      **mllib (correct)**
      ```
      $ bin/spark-shell --packages org.apache.spark:spark-mllib_2.11:2.1.1
      ...
      ---------------------------------------------------------------------
      |                  |            modules            ||   artifacts   |
      |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
      ---------------------------------------------------------------------
      |      default     |   0   |   0   |   0   |   0   ||   0   |   0   |
      ---------------------------------------------------------------------
      ```
      
      **mllib-local (wrong)**
      ```
      $ bin/spark-shell --packages org.apache.spark:spark-mllib-local_2.11:2.1.1
      ...
      ---------------------------------------------------------------------
      |                  |            modules            ||   artifacts   |
      |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
      ---------------------------------------------------------------------
      |      default     |   15  |   2   |   2   |   0   ||   15  |   2   |
      ---------------------------------------------------------------------
      ```
      
      ## How was this patch tested?
      
      Pass the Jenkins with a updated test case.
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #17947 from dongjoon-hyun/SPARK-20708.
      34661d8a
    • jerryshao's avatar
      [SPARK-20244][CORE] Handle incorrect bytesRead metrics when using PySpark · 5854f77c
      jerryshao authored
      ## What changes were proposed in this pull request?
      
      Hadoop FileSystem's statistics in based on thread local variables, this is ok if the RDD computation chain is running in the same thread. But if child RDD creates another thread to consume the iterator got from Hadoop RDDs, the bytesRead computation will be error, because now the iterator's `next()` and `close()` may run in different threads. This could be happened when using PySpark with PythonRDD.
      
      So here building a map to track the `bytesRead` for different thread and add them together. This method will be used in three RDDs, `HadoopRDD`, `NewHadoopRDD` and `FileScanRDD`. I assume `FileScanRDD` cannot be called directly, so I only fixed `HadoopRDD` and `NewHadoopRDD`.
      
      ## How was this patch tested?
      
      Unit test and local cluster verification.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #17617 from jerryshao/SPARK-20244.
      5854f77c
  6. May 31, 2017
    • Shixiong Zhu's avatar
      [SPARK-20940][CORE] Replace IllegalAccessError with IllegalStateException · 24db3582
      Shixiong Zhu authored
      ## What changes were proposed in this pull request?
      
      `IllegalAccessError` is a fatal error (a subclass of LinkageError) and its meaning is `Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to`. Throwing a fatal error for AccumulatorV2 is not necessary and is pretty bad because it usually will just kill executors or SparkContext ([SPARK-20666](https://issues.apache.org/jira/browse/SPARK-20666) is an example of killing SparkContext due to `IllegalAccessError`). I think the correct type of exception in AccumulatorV2 should be `IllegalStateException`.
      
      ## How was this patch tested?
      
      Jenkins
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #18168 from zsxwing/SPARK-20940.
      24db3582
    • Shixiong Zhu's avatar
      [SPARK-20894][SS] Resolve the checkpoint location in driver and use the... · 2bc32728
      Shixiong Zhu authored
      [SPARK-20894][SS] Resolve the checkpoint location in driver and use the resolved path in state store
      
      ## What changes were proposed in this pull request?
      
      When the user runs a Structured Streaming query in a cluster, if the driver uses the local file system, StateStore running in executors will throw a file-not-found exception. However, the current error is not obvious.
      
      This PR makes StreamExecution resolve the path in driver and uses the full path including the scheme part (such as `hdfs:/`, `file:/`) in StateStore.
      
      Then if the above error happens, StateStore will throw an error with this full path which starts with `file:/`, and it makes this error obvious: the checkpoint location is on the local file system.
      
      One potential minor issue is that the user cannot use different default file system settings in driver and executors (e.g., use a public HDFS address in driver and a private HDFS address in executors) after this change. However, since the batch query also has this issue (See https://github.com/apache/spark/blob/4bb6a53ebd06de3de97139a2dbc7c85fc3aa3e66/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L402), it doesn't make things worse.
      
      ## How was this patch tested?
      
      The new added test.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #18149 from zsxwing/SPARK-20894.
      2bc32728
    • gatorsmile's avatar
      [SPARK-19236][SQL][FOLLOW-UP] Added createOrReplaceGlobalTempView method · de934e67
      gatorsmile authored
      ### What changes were proposed in this pull request?
      This PR does the following tasks:
      - Added  since
      - Added the Python API
      - Added test cases
      
      ### How was this patch tested?
      Added test cases to both Scala and Python
      
      Author: gatorsmile <gatorsmile@gmail.com>
      
      Closes #18147 from gatorsmile/createOrReplaceGlobalTempView.
      de934e67
    • Liu Shaohui's avatar
      [SPARK-20633][SQL] FileFormatWriter should not wrap FetchFailedException · d0f36bcb
      Liu Shaohui authored
      ## What changes were proposed in this pull request?
      
      Explicitly handle the FetchFailedException in FileFormatWriter, so it does not get wrapped.
      
      Note that this is no longer strictly necessary after SPARK-19276, but it improves error messages and also will help avoid others stumbling across this in the future.
      
      ## How was this patch tested?
      
      Existing unit tests.
      
      Closes https://github.com/apache/spark/pull/17893
      
      Author: Liu Shaohui <liushaohui@xiaomi.com>
      
      Closes #18145 from squito/SPARK-20633.
      d0f36bcb
    • jinxing's avatar
      [SPARK-20288] Avoid generating the MapStatus by stageId in BasicSchedulerIntegrationSuite · ac7fc307
      jinxing authored
      ## What changes were proposed in this pull request?
      
      ShuffleId is determined before job submitted. But it's hard to predict stageId by shuffleId.
      Stage is created in DAGScheduler(
      https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala#L381), but the order is n
      ot determined in `HashSet`.
      I added a log(println(s"Creating ShufflMapStage-$id on shuffle-${shuffleDep.shuffleId}")) after (https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala#L331), when testing BasicSchedulerIntegrationSuite:"multi-stage job". It will print:
      Creating ShufflMapStage-0 on shuffle-0
      Creating ShufflMapStage-1 on shuffle-2
      Creating ShufflMapStage-2 on shuffle-1
      Creating ShufflMapStage-3 on shuffle-3
      or
      Creating ShufflMapStage-0 on shuffle-1
      Creating ShufflMapStage-1 on shuffle-3
      Creating ShufflMapStage-2 on shuffle-0
      Creating ShufflMapStage-3 on shuffle-2
      It might be better to avoid generating the MapStatus by stageId.
      
      Author: jinxing <jinxing6042@126.com>
      
      Closes #17603 from jinxing64/SPARK-20288.
      ac7fc307
    • David Eis's avatar
      [SPARK-20790][MLLIB] Correctly handle negative values for implicit feedback in ALS · d52f6362
      David Eis authored
      ## What changes were proposed in this pull request?
      
      Revert the handling of negative values in ALS with implicit feedback, so that the confidence is the absolute value of the rating and the preference is 0 for negative ratings. This was the original behavior.
      
      ## How was this patch tested?
      
      This patch was tested with the existing unit tests and an added unit test to ensure that negative ratings are not ignored.
      
      mengxr
      
      Author: David Eis <deis@bloomberg.net>
      
      Closes #18022 from davideis/bugfix/negative-rating.
      d52f6362
    • Jacek Laskowski's avatar
      [DOCS][MINOR] Scaladoc fixes (aka typo hunting) · beed5e20
      Jacek Laskowski authored
      ## What changes were proposed in this pull request?
      
      Minor changes to scaladoc
      
      ## How was this patch tested?
      
      Local build
      
      Author: Jacek Laskowski <jacek@japila.pl>
      
      Closes #18074 from jaceklaskowski/scaladoc-fixes.
      beed5e20
    • Felix Cheung's avatar
      [SPARK-20877][SPARKR][WIP] add timestamps to test runs · 382fefd1
      Felix Cheung authored
      ## What changes were proposed in this pull request?
      
      to investigate how long they run
      
      ## How was this patch tested?
      
      Jenkins, AppVeyor
      
      Author: Felix Cheung <felixcheung_m@hotmail.com>
      
      Closes #18104 from felixcheung/rtimetest.
      382fefd1
  7. May 30, 2017
    • Wenchen Fan's avatar
      1f5dddff
    • jerryshao's avatar
      [SPARK-20275][UI] Do not display "Completed" column for in-progress applications · 52ed9b28
      jerryshao authored
      ## What changes were proposed in this pull request?
      
      Current HistoryServer will display completed date of in-progress application as `1969-12-31 23:59:59`, which is not so meaningful. Instead of unnecessarily showing this incorrect completed date, here propose to make this column invisible for in-progress applications.
      
      The purpose of only making this column invisible rather than deleting this field is that: this data is fetched through REST API, and in the REST API  the format is like below shows, in which `endTime` matches `endTimeEpoch`. So instead of changing REST API to break backward compatibility, here choosing a simple solution to only make this column invisible.
      
      ```
      [ {
        "id" : "local-1491805439678",
        "name" : "Spark shell",
        "attempts" : [ {
          "startTime" : "2017-04-10T06:23:57.574GMT",
          "endTime" : "1969-12-31T23:59:59.999GMT",
          "lastUpdated" : "2017-04-10T06:23:57.574GMT",
          "duration" : 0,
          "sparkUser" : "",
          "completed" : false,
          "startTimeEpoch" : 1491805437574,
          "endTimeEpoch" : -1,
          "lastUpdatedEpoch" : 1491805437574
        } ]
      } ]%
      ```
      
      Here is UI before changed:
      
      <img width="1317" alt="screen shot 2017-04-10 at 3 45 57 pm" src="https://cloud.githubusercontent.com/assets/850797/24851938/17d46cc0-1e08-11e7-84c7-90120e171b41.png">
      
      And after:
      
      <img width="1281" alt="screen shot 2017-04-10 at 4 02 35 pm" src="https://cloud.githubusercontent.com/assets/850797/24851945/1fe9da58-1e08-11e7-8d0d-9262324f9074.png">
      
      ## How was this patch tested?
      
      Manual verification.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #17588 from jerryshao/SPARK-20275.
      52ed9b28
    • Wenchen Fan's avatar
      [SPARK-20213][SQL] Fix DataFrameWriter operations in SQL UI tab · 10e526e7
      Wenchen Fan authored
      ## What changes were proposed in this pull request?
      
      Currently the `DataFrameWriter` operations have several problems:
      
      1. non-file-format data source writing action doesn't show up in the SQL tab in Spark UI
      2. file-format data source writing action shows a scan node in the SQL tab, without saying anything about writing. (streaming also have this issue, but not fixed in this PR)
      3. Spark SQL CLI actions don't show up in the SQL tab.
      
      This PR fixes all of them, by refactoring the `ExecuteCommandExec` to make it have children.
      
       close https://github.com/apache/spark/pull/17540
      
      ## How was this patch tested?
      
      existing tests.
      
      Also test the UI manually. For a simple command: `Seq(1 -> "a").toDF("i", "j").write.parquet("/tmp/qwe")`
      
      before this PR:
      <img width="266" alt="qq20170523-035840 2x" src="https://cloud.githubusercontent.com/assets/3182036/26326050/24e18ba2-3f6c-11e7-8817-6dd275bf6ac5.png">
      after this PR:
      <img width="287" alt="qq20170523-035708 2x" src="https://cloud.githubusercontent.com/assets/3182036/26326054/2ad7f460-3f6c-11e7-8053-d68325beb28f.png">
      
      Author: Wenchen Fan <wenchen@databricks.com>
      
      Closes #18064 from cloud-fan/execution.
      10e526e7
    • Tathagata Das's avatar
      [SPARK-20883][SPARK-20376][SS] Refactored StateStore APIs and added conf to choose implementation · fa757ee1
      Tathagata Das authored
      ## What changes were proposed in this pull request?
      
      A bunch of changes to the StateStore APIs and implementation.
      Current state store API has a bunch of problems that causes too many transient objects causing memory pressure.
      
      - `StateStore.get(): Option` forces creation of Some/None objects for every get. Changed this to return the row or null.
      - `StateStore.iterator(): (UnsafeRow, UnsafeRow)` forces creation of new tuple for each record returned. Changed this to return a UnsafeRowTuple which can be reused across records.
      - `StateStore.updates()` requires the implementation to keep track of updates, while this is used minimally (only by Append mode in streaming aggregations). Removed updates() and updated StateStoreSaveExec accordingly.
      - `StateStore.filter(condition)` and `StateStore.remove(condition)` has been merge into a single API `getRange(start, end)` which allows a state store to do optimized range queries (i.e. avoid full scans). Stateful operators have been updated accordingly.
      - Removed a lot of unnecessary row copies Each operator copied rows before calling StateStore.put() even if the implementation does not require it to be copied. It is left up to the implementation on whether to copy the row or not.
      
      Additionally,
      - Added a name to the StateStoreId so that each operator+partition can use multiple state stores (different names)
      - Added a configuration that allows the user to specify which implementation to use.
      - Added new metrics to understand the time taken to update keys, remove keys and commit all changes to the state store. These metrics will be visible on the plan diagram in the SQL tab of the UI.
      - Refactored unit tests such that they can be reused to test any implementation of StateStore.
      
      ## How was this patch tested?
      Old and new unit tests
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #18107 from tdas/SPARK-20376.
      fa757ee1
Loading