Skip to content
Snippets Groups Projects
  1. Apr 20, 2015
    • Liang-Chi Hsieh's avatar
      [Minor][MLlib] Incorrect path to test data is used in DecisionTreeExample · 1ebceaa5
      Liang-Chi Hsieh authored
      It should load from `testInput` instead of `input` for test data.
      
      Author: Liang-Chi Hsieh <viirya@gmail.com>
      
      Closes #5594 from viirya/use_testinput and squashes the following commits:
      
      5e8b174 [Liang-Chi Hsieh] Fix style.
      b60b475 [Liang-Chi Hsieh] Use testInput.
      1ebceaa5
    • Elisey Zanko's avatar
      [SPARK-6661] Python type errors should print type, not object · 77176619
      Elisey Zanko authored
      Author: Elisey Zanko <elisey.zanko@gmail.com>
      
      Closes #5361 from 31z4/spark-6661 and squashes the following commits:
      
      73c5d79 [Elisey Zanko] Python type errors should print type, not object
      77176619
    • Aaron Davidson's avatar
      [SPARK-7003] Improve reliability of connection failure detection between Netty... · 968ad972
      Aaron Davidson authored
      [SPARK-7003] Improve reliability of connection failure detection between Netty block transfer service endpoints
      
      Currently we rely on the assumption that an exception will be raised and the channel closed if two endpoints cannot communicate over a Netty TCP channel. However, this guarantee does not hold in all network environments, and [SPARK-6962](https://issues.apache.org/jira/browse/SPARK-6962) seems to point to a case where only the server side of the connection detected a fault.
      
      This patch improves robustness of fetch/rpc requests by having an explicit timeout in the transport layer which closes the connection if there is a period of inactivity while there are outstanding requests.
      
      NB: This patch is actually only around 50 lines added if you exclude the testing-related code.
      
      Author: Aaron Davidson <aaron@databricks.com>
      
      Closes #5584 from aarondav/timeout and squashes the following commits:
      
      8699680 [Aaron Davidson] Address Reynold's comments
      37ce656 [Aaron Davidson] [SPARK-7003] Improve reliability of connection failure detection between Netty block transfer service endpoints
      968ad972
    • jrabary's avatar
      [SPARK-5924] Add the ability to specify withMean or withStd parameters with StandarScaler · 1be20707
      jrabary authored
      The current implementation call the default constructor of mllib.feature.StandarScaler without the possibility to specify withMean or withStd options.
      
      Author: jrabary <Jaonary@gmail.com>
      
      Closes #4704 from jrabary/master and squashes the following commits:
      
      fae8568 [jrabary] style fix
      8896b0e [jrabary] Comments fix
      ef96d73 [jrabary] style fix
      8e52607 [jrabary] style fix
      edd9d48 [jrabary] Fix default param initialization
      17e1a76 [jrabary] Fix default param initialization
      298f405 [jrabary] Typo fix
      45ed914 [jrabary] Add withMean and withStd params to StandarScaler
      1be20707
  2. Apr 19, 2015
  3. Apr 18, 2015
    • Olivier Girardot's avatar
      SPARK-6993 : Add default min, max methods for JavaDoubleRDD · 8fbd45c7
      Olivier Girardot authored
      The default method will use Guava's Ordering instead of
      java.util.Comparator.naturalOrder() because it's not available
      in Java 7, only in Java 8.
      
      Author: Olivier Girardot <o.girardot@lateral-thoughts.com>
      
      Closes #5571 from ogirardot/master and squashes the following commits:
      
      7fe2e9e [Olivier Girardot] SPARK-6993 : Add default min, max methods for JavaDoubleRDD
      8fbd45c7
    • Gaurav Nanda's avatar
      Fixed doc · 729885ec
      Gaurav Nanda authored
      Just fixed a doc.
      
      Author: Gaurav Nanda <gaurav324@gmail.com>
      
      Closes #5576 from gaurav324/master and squashes the following commits:
      
      8a7323f [Gaurav Nanda] Fixed doc
      729885ec
    • Nicholas Chammas's avatar
      [SPARK-6219] Reuse pep8.py · 28683b4d
      Nicholas Chammas authored
      Per the discussion in the comments on [this commit](https://github.com/apache/spark/commit/f17d43b033d928dbc46aef8e367aa08902e698ad#commitcomment-10780649), this PR allows the Python lint script to reuse `pep8.py` when possible.
      
      Author: Nicholas Chammas <nicholas.chammas@gmail.com>
      
      Closes #5561 from nchammas/save-dem-pep8-bytes and squashes the following commits:
      
      b7c91e6 [Nicholas Chammas] reuse pep8.py
      28683b4d
    • Marcelo Vanzin's avatar
      [core] [minor] Make sure ConnectionManager stops. · 327ebf0c
      Marcelo Vanzin authored
      My previous fix (force a selector wakeup) didn't seem to work since
      I ran into the hang again. So change the code a bit to be more
      explicit about the condition when the selector thread should exit.
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #5566 from vanzin/conn-mgr-hang and squashes the following commits:
      
      ddb2c03 [Marcelo Vanzin] [core] [minor] Make sure ConnectionManager stops.
      327ebf0c
    • Olivier Girardot's avatar
      SPARK-6992 : Fix documentation example for Spark SQL on StructType · 5f095d56
      Olivier Girardot authored
      
      This patch is fixing the Java examples for Spark SQL when defining
      programmatically a Schema and mapping Rows.
      
      Author: Olivier Girardot <o.girardot@lateral-thoughts.com>
      
      Closes #5569 from ogirardot/branch-1.3 and squashes the following commits:
      
      c29e58d [Olivier Girardot] SPARK-6992 : Fix documentation example for Spark SQL on StructType
      
      (cherry picked from commit c9b1ba4b16a7afe93d45bf75b128cc0dd287ded0)
      Signed-off-by: default avatarReynold Xin <rxin@databricks.com>
      5f095d56
  4. Apr 17, 2015
    • jerryshao's avatar
      [SPARK-6975][Yarn] Fix argument validation error · d850b4bd
      jerryshao authored
      `numExecutors` checking is failed when dynamic allocation is enabled with default configuration. Details can be seen is [SPARK-6975](https://issues.apache.org/jira/browse/SPARK-6975). sryza, please help me to review this, not sure is this the correct way, I think previous you change this part :)
      
      Author: jerryshao <saisai.shao@intel.com>
      
      Closes #5551 from jerryshao/SPARK-6975 and squashes the following commits:
      
      4335da1 [jerryshao] Change according to the comments
      77bdcbd [jerryshao] Fix argument validation error
      d850b4bd
    • Marcelo Vanzin's avatar
      [SPARK-5933] [core] Move config deprecation warnings to SparkConf. · 19913373
      Marcelo Vanzin authored
      I didn't find many deprecated configs after a grep-based search,
      but the ones I could find were moved to the centralized location
      in SparkConf.
      
      While there, I deprecated a couple more HS configs that mentioned
      time units.
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #5562 from vanzin/SPARK-5933 and squashes the following commits:
      
      dcb617e7 [Marcelo Vanzin] [SPARK-5933] [core] Move config deprecation warnings to SparkConf.
      19913373
    • Jongyoul Lee's avatar
      [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode · 6fbeb82e
      Jongyoul Lee authored
      - Defined executorCores from "spark.mesos.executor.cores"
      - Changed the amount of mesosExecutor's cores to executorCores.
      - Added new configuration option on running-on-mesos.md
      
      Author: Jongyoul Lee <jongyoul@gmail.com>
      
      Closes #5063 from jongyoul/SPARK-6350 and squashes the following commits:
      
      9238d6e [Jongyoul Lee] [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode - Fixed docs - Changed configuration name - Made mesosExecutorCores private
      2d41241 [Jongyoul Lee] [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode - Fixed docs
      89edb4f [Jongyoul Lee] [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode - Fixed docs
      8ba7694 [Jongyoul Lee] [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode - Fixed docs
      7549314 [Jongyoul Lee] [SPARK-6453][Mesos] Some Mesos*Suite have a different package with their classes - Fixed docs
      4ae7b0c [Jongyoul Lee] [SPARK-6453][Mesos] Some Mesos*Suite have a different package with their classes - Removed TODO
      c27efce [Jongyoul Lee] [SPARK-6453][Mesos] Some Mesos*Suite have a different package with their classes - Fixed Mesos*Suite for supporting integer WorkerOffers - Fixed Documentation
      1fe4c03 [Jongyoul Lee] [SPARK-6453][Mesos] Some Mesos*Suite have a different package with their classes - Change available resources of cpus to integer value beacuse WorkerOffer support the amount cpus as integer value
      5f3767e [Jongyoul Lee] Revert "[SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode"
      4b7c69e [Jongyoul Lee] [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode - Changed configruation name and description from "spark.mesos.executor.cores" to "spark.executor.frameworkCores"
      0556792 [Jongyoul Lee] [SPARK-6350][Mesos] Make mesosExecutorCores configurable in mesos "fine-grained" mode - Defined executorCores from "spark.mesos.executor.cores" - Changed the amount of mesosExecutor's cores to executorCores. - Added new configuration option on running-on-mesos.md
      6fbeb82e
    • Ilya Ganelin's avatar
      [SPARK-6703][Core] Provide a way to discover existing SparkContext's · c5ed5101
      Ilya Ganelin authored
      I've added a static getOrCreate method to the static SparkContext object that allows one to either retrieve a previously created SparkContext or to instantiate a new one with the provided config. The method accepts an optional SparkConf to make usage intuitive.
      
      Still working on a test for this, basically want to create a new context from scratch, then ensure that subsequent calls don't overwrite that.
      
      Author: Ilya Ganelin <ilya.ganelin@capitalone.com>
      
      Closes #5501 from ilganeli/SPARK-6703 and squashes the following commits:
      
      db9a963 [Ilya Ganelin] Closing second spark context
      1dc0444 [Ilya Ganelin] Added ref equality check
      8c884fa [Ilya Ganelin] Made getOrCreate synchronized
      cb0c6b7 [Ilya Ganelin] Doc updates and code cleanup
      270cfe3 [Ilya Ganelin] [SPARK-6703] Documentation fixes
      15e8dea [Ilya Ganelin] Updated comments and added MiMa Exclude
      0e1567c [Ilya Ganelin] Got rid of unecessary option for AtomicReference
      dfec4da [Ilya Ganelin] Changed activeContext to AtomicReference
      733ec9f [Ilya Ganelin] Fixed some bugs in test code
      8be2f83 [Ilya Ganelin] Replaced match with if
      e92caf7 [Ilya Ganelin] [SPARK-6703] Added test to ensure that getOrCreate both allows creation, retrieval, and a second context if desired
      a99032f [Ilya Ganelin] Spacing fix
      d7a06b8 [Ilya Ganelin] Updated SparkConf class to add getOrCreate method. Started test suite implementation
      c5ed5101
    • Reynold Xin's avatar
      Minor fix to SPARK-6958: Improve Python docstring for DataFrame.sort. · a452c592
      Reynold Xin authored
      As a follow up PR to #5544.
      
      cc davies
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #5558 from rxin/sort-doc-improvement and squashes the following commits:
      
      f4c276f [Reynold Xin] Review feedback.
      d2dcf24 [Reynold Xin] Minor fix to SPARK-6958: Improve Python docstring for DataFrame.sort.
      a452c592
    • Olivier Girardot's avatar
      SPARK-6988 : Fix documentation regarding DataFrames using the Java API · d305e686
      Olivier Girardot authored
      
      This patch includes :
       * adding how to use map after an sql query using javaRDD
       * fixing the first few java examples that were written in Scala
      
      Thank you for your time,
      
      Olivier.
      
      Author: Olivier Girardot <o.girardot@lateral-thoughts.com>
      
      Closes #5564 from ogirardot/branch-1.3 and squashes the following commits:
      
      9f8d60e [Olivier Girardot] SPARK-6988 : Fix documentation regarding DataFrames using the Java API
      
      (cherry picked from commit 6b528dc139da594ef2e651d84bd91fe0f738a39d)
      Signed-off-by: default avatarReynold Xin <rxin@databricks.com>
      d305e686
    • cafreeman's avatar
      [SPARK-6807] [SparkR] Merge recent SparkR-pkg changes · 59e206de
      cafreeman authored
      This PR pulls in recent changes in SparkR-pkg, including
      
      cartesian, intersection, sampleByKey, subtract, subtractByKey, except, and some API for StructType and StructField.
      
      Author: cafreeman <cfreeman@alteryx.com>
      Author: Davies Liu <davies@databricks.com>
      Author: Zongheng Yang <zongheng.y@gmail.com>
      Author: Shivaram Venkataraman <shivaram.venkataraman@gmail.com>
      Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
      Author: Sun Rui <rui.sun@intel.com>
      
      Closes #5436 from davies/R3 and squashes the following commits:
      
      c2b09be [Davies Liu] SQLTypes -> schema
      a5a02f2 [Davies Liu] Merge branch 'master' of github.com:apache/spark into R3
      168b7fe [Davies Liu] sort generics
      b1fe460 [Davies Liu] fix conflict in README.md
      e74c04e [Davies Liu] fix schema.R
      4f5ac09 [Davies Liu] Merge branch 'master' of github.com:apache/spark into R5
      41f8184 [Davies Liu] rm man
      ae78312 [Davies Liu] Merge pull request #237 from sun-rui/SPARKR-154_3
      1bdcb63 [Zongheng Yang] Updates to README.md.
      5a553e7 [cafreeman] Use object attribute instead of argument
      71372d9 [cafreeman] Update docs and examples
      8526d2e71 [cafreeman] Remove `tojson` functions
      6ef5f2d [cafreeman] Fix spacing
      7741d66 [cafreeman] Rename the SQL DataType function
      141efd8 [Shivaram Venkataraman] Merge pull request #245 from hqzizania/upstream
      9387402 [Davies Liu] fix style
      40199eb [Shivaram Venkataraman] Move except into sorted position
      07d0dbc [Sun Rui] [SPARKR-244] Fix test failure after integration of subtract() and subtractByKey() for RDD.
      7e8caa3 [Shivaram Venkataraman] Merge pull request #246 from hlin09/fixCombineByKey
      ed66c81 [cafreeman] Update `subtract` to work with `generics.R`
      f3ba785 [cafreeman] Fixed duplicate export
      275deb4 [cafreeman] Update `NAMESPACE` and tests
      1a3b63d [cafreeman] new version of `CreateDF`
      836c4bf [cafreeman] Update `createDataFrame` and `toDF`
      be5d5c1 [cafreeman] refactor schema functions
      40338a4 [Zongheng Yang] Merge pull request #244 from sun-rui/SPARKR-154_5
      20b97a6 [Zongheng Yang] Merge pull request #234 from hqzizania/assist
      ba54e34 [Shivaram Venkataraman] Merge pull request #238 from sun-rui/SPARKR-154_4
      c9497a3 [Shivaram Venkataraman] Merge pull request #208 from lythesia/master
      b317aa7 [Zongheng Yang] Merge pull request #243 from hqzizania/master
      136a07e [Zongheng Yang] Merge pull request #242 from hqzizania/stats
      cd66603 [cafreeman] new line at EOF
      8b76e81 [Shivaram Venkataraman] Merge pull request #233 from redbaron/fail-early-on-missing-dep
      7dd81b7 [cafreeman] Documentation
      0e2a94f [cafreeman] Define functions for schema and fields
      59e206de
    • Joseph K. Bradley's avatar
      [SPARK-6113] [ml] Stabilize DecisionTree API · a83571ac
      Joseph K. Bradley authored
      This is a PR for cleaning up and finalizing the DecisionTree API.  PRs for ensembles will follow once this is merged.
      
      ### Goal
      
      Here is the description copied from the JIRA (for both trees and ensembles):
      
      > **Issue**: The APIs for DecisionTree and ensembles (RandomForests and GradientBoostedTrees) have been experimental for a long time. The API has become very convoluted because trees and ensembles have many, many variants, some of which we have added incrementally without a long-term design.
      > **Proposal**: This JIRA is for discussing changes required to finalize the APIs. After we discuss, I will make a PR to update the APIs and make them non-Experimental. This will require making many breaking changes; see the design doc for details.
      > **[Design doc](https://docs.google.com/document/d/1rJ_DZinyDG3PkYkAKSsQlY0QgCeefn4hUv7GsPkzBP4)** : This outlines current issues and the proposed API.
      
      Overall code layout:
      * The old API in mllib.tree.* will remain the same.
      * The new API will reside in ml.classification.* and ml.regression.*
      
      ### Summary of changes
      
      Old API
      * Exactly the same, except I made 1 method in Loss private (but that is not a breaking change since that method was introduced after the Spark 1.3 release).
      
      New APIs
      * Under Pipeline API
      * The new API preserves functionality, except:
        * New API does NOT store prob (probability of label in classification).  I want to have it store the full vector of probabilities but feel that should be in a later PR.
      * Use abstractions for parameters, estimators, and models to avoid code duplication
      * Limit parameters to relevant algorithms
      * For enum-like types, only expose Strings
        * We can make these pluggable later on by adding new parameters.  That is a far-future item.
      
      Test suites
      * I organized DecisionTreeSuite, but I made absolutely no changes to the tests themselves.
      * The test suites for the new API only test (a) similarity with the results of the old API and (b) elements of the new API.
        * After code is moved to this new API, we should move the tests from the old suites which test the internals.
      
      ### Details
      
      #### Changed names
      
      Parameters
      * useNodeIdCache -> cacheNodeIds
      
      #### Other changes
      
      * Split: Changed categories to set instead of list
      
      #### Non-decision tree changes
      * AttributeGroup
        * Added parentheses to toMetadata, toStructField methods (These were removed in a previous PR, but I ran into 1 issue with the Scala compiler not being able to disambiguate between a toMetadata method with no parentheses and a toMetadata method which takes 1 argument.)
      * Attributes
        * Renamed: toMetadata -> toMetadataImpl
        * Added toMetadata methods which return ML metadata (keyed with “ML_ATTR”)
        * NominalAttribute: Added getNumValues method which examines both numValues and values.
      * Params.inheritValues: Checks whether the parent param really belongs to the child (to allow Estimator-Model pairs with different sets of parameters)
      
      ### Questions for reviewers
      
      * Is "DecisionTreeClassificationModel" too long a name?
      * Is this OK in the docs?
      ```
      class DecisionTreeRegressor extends TreeRegressor[DecisionTreeRegressionModel] with DecisionTreeParams[DecisionTreeRegressor] with TreeRegressorParams[DecisionTreeRegressor]
      ```
      
      ### Future
      
      We should open up the abstractions at some point.  E.g., it would be useful to be able to set tree-related parameters in 1 place and then pass those to multiple tree-based algorithms.
      
      Follow-up JIRAs will be (in this order):
      * Tree ensembles
      * Deprecate old tree code
      * Move DecisionTree implementation code to new API.
      * Move tests from the old suites which test the internals.
      * Update programming guide
      * Python API
      * Change RandomForest* to always use bootstrapping, even when numTrees = 1
      * Provide the probability of the predicted label for classification.  After we move code to the new API and update it to maintain probabilities for all labels, then we can add the probabilities to the new API.
      
      CC: mengxr  manishamde  codedeft  chouqin  MechCoder
      
      Author: Joseph K. Bradley <joseph@databricks.com>
      
      Closes #5530 from jkbradley/dt-api-dt and squashes the following commits:
      
      6aae255 [Joseph K. Bradley] Changed tree abstractions not to take type parameters, and for setters to return this.type instead
      ec17947 [Joseph K. Bradley] Updates based on code review.  Main changes were: moving public types from ml.impl.tree to ml.tree, modifying CategoricalSplit to take an Array of categories but store a Set internally, making more types sealed or final
      5626c81 [Joseph K. Bradley] style fixes
      f8fbd24 [Joseph K. Bradley] imported reorg of DecisionTreeSuite from old PR.  small cleanups
      7ef63ed [Joseph K. Bradley] Added DecisionTreeRegressor, test suites, and example (for real this time)
      e11673f [Joseph K. Bradley] Added DecisionTreeRegressor, test suites, and example
      119f407 [Joseph K. Bradley] added DecisionTreeClassifier example
      0bdc486 [Joseph K. Bradley] fixed issues after param PR was merged
      f9fbb60 [Joseph K. Bradley] Done with DecisionTreeClassifier, but no save/load yet.  Need to add example as well
      2532c9a [Joseph K. Bradley] partial move to spark.ml API, not done yet
      c72c1a0 [Joseph K. Bradley] Copied changes for common items, plus DecisionTreeClassifier from original PR
      a83571ac
    • Marcelo Vanzin's avatar
      [SPARK-2669] [yarn] Distribute client configuration to AM. · 50ab8a65
      Marcelo Vanzin authored
      Currently, when Spark launches the Yarn AM, the process will use
      the local Hadoop configuration on the node where the AM launches,
      if one is present. A more correct approach is to use the same
      configuration used to launch the Spark job, since the user may
      have made modifications (such as adding app-specific configs).
      
      The approach taken here is to use the distributed cache to make
      all files in the Hadoop configuration directory available to the
      AM. This is a little overkill since only the AM needs them (the
      executors use the broadcast Hadoop configuration from the driver),
      but is the easier approach.
      
      Even though only a few files in that directory may end up being
      used, all of them are uploaded. This allows supporting use cases
      such as when auxiliary configuration files are used for SSL
      configuration, or when uploading a Hive configuration directory.
      Not all of these may be reflected in a o.a.h.conf.Configuration object,
      but may be needed when a driver in cluster mode instantiates, for
      example, a HiveConf object instead.
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #4142 from vanzin/SPARK-2669 and squashes the following commits:
      
      f5434b9 [Marcelo Vanzin] Merge branch 'master' into SPARK-2669
      013f0fb [Marcelo Vanzin] Review feedback.
      f693152 [Marcelo Vanzin] Le sigh.
      ed45b7d [Marcelo Vanzin] Zip all config files and upload them as an archive.
      5927b6b [Marcelo Vanzin] Merge branch 'master' into SPARK-2669
      cbb9fb3 [Marcelo Vanzin] Remove stale test.
      e3e58d0 [Marcelo Vanzin] Merge branch 'master' into SPARK-2669
      e3d0613 [Marcelo Vanzin] Review feedback.
      34bdbd8 [Marcelo Vanzin] Fix test.
      022a688 [Marcelo Vanzin] Merge branch 'master' into SPARK-2669
      a77ddd5 [Marcelo Vanzin] Merge branch 'master' into SPARK-2669
      79221c7 [Marcelo Vanzin] [SPARK-2669] [yarn] Distribute client configuration to AM.
      50ab8a65
    • Davies Liu's avatar
      [SPARK-6957] [SPARK-6958] [SQL] improve API compatibility to pandas · c84d9169
      Davies Liu authored
      ```
      select(['cola', 'colb'])
      
      groupby(['colA', 'colB'])
      groupby([df.colA, df.colB])
      
      df.sort('A', ascending=True)
      df.sort(['A', 'B'], ascending=True)
      df.sort(['A', 'B'], ascending=[1, 0])
      ```
      
      cc rxin
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #5544 from davies/compatibility and squashes the following commits:
      
      4944058 [Davies Liu] add docstrings
      adb2816 [Davies Liu] Merge branch 'master' of github.com:apache/spark into compatibility
      bcbbcab [Davies Liu] support ascending as list
      8dabdf0 [Davies Liu] improve API compatibility to pandas
      c84d9169
    • linweizhong's avatar
      [SPARK-6604][PySpark]Specify ip of python server scoket · dc48ba9f
      linweizhong authored
      In driver now will start a server socket and use a wildcard ip, use 127.0.0.0 is more reasonable, as we only use it by local Python process.
      /cc davies
      
      Author: linweizhong <linweizhong@huawei.com>
      
      Closes #5256 from Sephiroth-Lin/SPARK-6604 and squashes the following commits:
      
      7b3c633 [linweizhong] rephrase
      dc48ba9f
    • Punya Biswal's avatar
      [SPARK-6952] Handle long args when detecting PID reuse · f6a9a57a
      Punya Biswal authored
      sbin/spark-daemon.sh used
      
          ps -p "$TARGET_PID" -o args=
      
      to figure out whether the process running with the expected PID is actually a Spark
      daemon. When running with a large classpath, the output of ps gets
      truncated and the check fails spuriously.
      
      This weakens the check to see if it's a java command (which is something
      we do in other parts of the script) rather than looking for the specific
      main class name. This means that SPARK-4832 might happen under a
      slightly broader range of circumstances (a java program happened to
      reuse the same PID), but it seems worthwhile compared to failing
      consistently with a large classpath.
      
      Author: Punya Biswal <pbiswal@palantir.com>
      
      Closes #5535 from punya/feature/SPARK-6952 and squashes the following commits:
      
      7ea12d1 [Punya Biswal] Handle long args when detecting PID reuse
      f6a9a57a
    • Marcelo Vanzin's avatar
      [SPARK-6046] [core] Reorganize deprecated config support in SparkConf. · 4527761b
      Marcelo Vanzin authored
      This change tries to follow the chosen way for handling deprecated
      configs in SparkConf: all values (old and new) are kept in the conf
      object, and newer names take precedence over older ones when
      retrieving the value.
      
      Warnings are logged when config options are set, which generally happens
      on the driver node (where the logs are most visible).
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #5514 from vanzin/SPARK-6046 and squashes the following commits:
      
      9371529 [Marcelo Vanzin] Avoid math.
      6cf3f11 [Marcelo Vanzin] Review feedback.
      2445d48 [Marcelo Vanzin] Fix (and cleanup) update interval initialization.
      b6824be [Marcelo Vanzin] Clean up the other deprecated config use also.
      ab20351 [Marcelo Vanzin] Update FsHistoryProvider to only retrieve new config key.
      2c93209 [Marcelo Vanzin] [SPARK-6046] [core] Reorganize deprecated config support in SparkConf.
      4527761b
    • Sean Owen's avatar
      SPARK-6846 [WEBUI] Stage kill URL easy to accidentally trigger and possibility for security issue · f7a25644
      Sean Owen authored
      kill endpoints now only accept a POST (kill stage, master kill app, master kill driver); kill link now POSTs
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #5528 from srowen/SPARK-6846 and squashes the following commits:
      
      137ac9f [Sean Owen] Oops, fix scalastyle line length probelm
      7c5f961 [Sean Owen] Add Imran's test of kill link
      59f447d [Sean Owen] kill endpoints now only accept a POST (kill stage, master kill app, master kill driver); kill link now POSTs
      f7a25644
  5. Apr 16, 2015
    • Michael Armbrust's avatar
      [SPARK-6972][SQL] Add Coalesce to DataFrame · 8220d526
      Michael Armbrust authored
      Author: Michael Armbrust <michael@databricks.com>
      
      Closes #5545 from marmbrus/addCoalesce and squashes the following commits:
      
      9fdf3f6 [Michael Armbrust] [SPARK-6972][SQL] Add Coalesce to DataFrame
      8220d526
    • Michael Armbrust's avatar
      [SPARK-6966][SQL] Use correct ClassLoader for JDBC Driver · e5949c28
      Michael Armbrust authored
      Otherwise we cannot add jars with drivers after the fact.
      
      Author: Michael Armbrust <michael@databricks.com>
      
      Closes #5543 from marmbrus/jdbcClassloader and squashes the following commits:
      
      d9930f3 [Michael Armbrust] fix imports
      73d0614 [Michael Armbrust] [SPARK-6966][SQL] Use correct ClassLoader for JDBC Driver
      e5949c28
    • Liang-Chi Hsieh's avatar
      [SPARK-6899][SQL] Fix type mismatch when using codegen with Average on DecimalType · 1e43851d
      Liang-Chi Hsieh authored
      JIRA https://issues.apache.org/jira/browse/SPARK-6899
      
      Author: Liang-Chi Hsieh <viirya@gmail.com>
      
      Closes #5517 from viirya/fix_codegen_average and squashes the following commits:
      
      8ae5f65 [Liang-Chi Hsieh] Add the case of DecimalType.Unlimited to Average.
      1e43851d
    • scwf's avatar
      [SQL][Minor] Fix foreachUp of treenode · d9660867
      scwf authored
      `foreachUp` should runs the given function recursively on [[children]] then on this node(just like transformUp). The current implementation does not follow this.
      
      This will leads to checkanalysis do not check from bottom of logical tree.
      
      Author: scwf <wangfei1@huawei.com>
      Author: Fei Wang <wangfei1@huawei.com>
      
      Closes #5518 from scwf/patch-1 and squashes the following commits:
      
      18e28b2 [scwf] added a test case
      1ccbfa8 [Fei Wang] fix foreachUp
      d9660867
    • Davies Liu's avatar
      [SPARK-6911] [SQL] improve accessor for nested types · 6183b5e2
      Davies Liu authored
      Support access columns by index in Python:
      ```
      >>> df[df[0] > 3].collect()
      [Row(age=5, name=u'Bob')]
      ```
      
      Access items in ArrayType or MapType
      ```
      >>> df.select(df.l.getItem(0), df.d.getItem("key")).show()
      >>> df.select(df.l[0], df.d["key"]).show()
      ```
      
      Access field in StructType
      ```
      >>> df.select(df.r.getField("b")).show()
      >>> df.select(df.r.a).show()
      ```
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #5513 from davies/access and squashes the following commits:
      
      e04d5a0 [Davies Liu] Update run-tests-jenkins
      7ada9eb [Davies Liu] update timeout
      d125ac4 [Davies Liu] check column name, improve scala tests
      6b62540 [Davies Liu] fix test
      db15b42 [Davies Liu] Merge branch 'master' of github.com:apache/spark into access
      6c32e79 [Davies Liu] add scala tests
      11f1df3 [Davies Liu] improve accessor for nested types
      6183b5e2
    • 云峤's avatar
      SPARK-6927 [SQL] Sorting Error when codegen on · 5fe43433
      云峤 authored
      Fix this error by adding BinaryType comparor in GenerateOrdering.
      JIRA https://issues.apache.org/jira/browse/SPARK-6927
      
      Author: 云峤 <chensong.cs@alibaba-inc.com>
      
      Closes #5524 from kaka1992/fix-codegen-sort and squashes the following commits:
      
      d7e2afe [云峤] fix codegen sorting error
      5fe43433
    • Davies Liu's avatar
      [SPARK-4897] [PySpark] Python 3 support · 04e44b37
      Davies Liu authored
      This PR update PySpark to support Python 3 (tested with 3.4).
      
      Known issue: unpickle array from Pyrolite is broken in Python 3, those tests are skipped.
      
      TODO: ec2/spark-ec2.py is not fully tested with python3.
      
      Author: Davies Liu <davies@databricks.com>
      Author: twneale <twneale@gmail.com>
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #5173 from davies/python3 and squashes the following commits:
      
      d7d6323 [Davies Liu] fix tests
      6c52a98 [Davies Liu] fix mllib test
      99e334f [Davies Liu] update timeout
      b716610 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      cafd5ec [Davies Liu] adddress comments from @mengxr
      bf225d7 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      179fc8d [Davies Liu] tuning flaky tests
      8c8b957 [Davies Liu] fix ResourceWarning in Python 3
      5c57c95 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      4006829 [Davies Liu] fix test
      2fc0066 [Davies Liu] add python3 path
      71535e9 [Davies Liu] fix xrange and divide
      5a55ab4 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      125f12c [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      ed498c8 [Davies Liu] fix compatibility with python 3
      820e649 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      e8ce8c9 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      ad7c374 [Davies Liu] fix mllib test and warning
      ef1fc2f [Davies Liu] fix tests
      4eee14a [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      20112ff [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      59bb492 [Davies Liu] fix tests
      1da268c [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      ca0fdd3 [Davies Liu] fix code style
      9563a15 [Davies Liu] add imap back for python 2
      0b1ec04 [Davies Liu] make python examples work with Python 3
      d2fd566 [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      a716d34 [Davies Liu] test with python 3.4
      f1700e8 [Davies Liu] fix test in python3
      671b1db [Davies Liu] fix test in python3
      692ff47 [Davies Liu] fix flaky test
      7b9699f [Davies Liu] invalidate import cache for Python 3.3+
      9c58497 [Davies Liu] fix kill worker
      309bfbf [Davies Liu] keep compatibility
      5707476 [Davies Liu] cleanup, fix hash of string in 3.3+
      8662d5b [Davies Liu] Merge branch 'master' of github.com:apache/spark into python3
      f53e1f0 [Davies Liu] fix tests
      70b6b73 [Davies Liu] compile ec2/spark_ec2.py in python 3
      a39167e [Davies Liu] support customize class in __main__
      814c77b [Davies Liu] run unittests with python 3
      7f4476e [Davies Liu] mllib tests passed
      d737924 [Davies Liu] pass ml tests
      375ea17 [Davies Liu] SQL tests pass
      6cc42a9 [Davies Liu] rename
      431a8de [Davies Liu] streaming tests pass
      78901a7 [Davies Liu] fix hash of serializer in Python 3
      24b2f2e [Davies Liu] pass all RDD tests
      35f48fe [Davies Liu] run future again
      1eebac2 [Davies Liu] fix conflict in ec2/spark_ec2.py
      6e3c21d [Davies Liu] make cloudpickle work with Python3
      2fb2db3 [Josh Rosen] Guard more changes behind sys.version; still doesn't run
      1aa5e8f [twneale] Turned out `pickle.DictionaryType is dict` == True, so swapped it out
      7354371 [twneale] buffer --> memoryview  I'm not super sure if this a valid change, but the 2.7 docs recommend using memoryview over buffer where possible, so hoping it'll work.
      b69ccdf [twneale] Uses the pure python pickle._Pickler instead of c-extension _pickle.Pickler. It appears pyspark 2.7 uses the pure python pickler as well, so this shouldn't degrade pickling performance (?).
      f40d925 [twneale] xrange --> range
      e104215 [twneale] Replaces 2.7 types.InstsanceType with 3.4 `object`....could be horribly wrong depending on how types.InstanceType is used elsewhere in the package--see http://bugs.python.org/issue8206
      79de9d0 [twneale] Replaces python2.7 `file` with 3.4 _io.TextIOWrapper
      2adb42d [Josh Rosen] Fix up some import differences between Python 2 and 3
      854be27 [Josh Rosen] Run `futurize` on Python code:
      7c5b4ce [Josh Rosen] Remove Python 3 check in shell.py.
      04e44b37
    • Shivaram Venkataraman's avatar
      [SPARK-6855] [SPARKR] Set R includes to get the right collate order. · 55f553a9
      Shivaram Venkataraman authored
      This prevents tools like devtools::document creating invalid collate orders
      
      Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
      
      Closes #5462 from shivaram/collate-order and squashes the following commits:
      
      f3db562 [Shivaram Venkataraman] Set R includes to get the right collate order. This prevents tools like devtools::document creating invalid collate orders
      55f553a9
    • zsxwing's avatar
      [SPARK-6934][Core] Use 'spark.akka.askTimeout' for the ask timeout · ef3fb801
      zsxwing authored
      Fixed my mistake in #4588
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #5529 from zsxwing/SPARK-6934 and squashes the following commits:
      
      9890b2d [zsxwing] Use 'spark.akka.askTimeout' for the ask timeout
      ef3fb801
    • Jin Adachi's avatar
      [SPARK-6694][SQL]SparkSQL CLI must be able to specify an option --database on the command line. · 3ae37b93
      Jin Adachi authored
      SparkSQL CLI has an option --database as follows.
      But, the option --database is ignored.
      
      ```
      $ spark-sql --help
      :
      CLI options:
          :
          --database <databasename>     Specify the database to use
      ```
      
      Author: Jin Adachi <adachij2002@yahoo.co.jp>
      Author: adachij <adachij@nttdata.co.jp>
      
      Closes #5345 from adachij2002/SPARK-6694 and squashes the following commits:
      
      8659084 [Jin Adachi] Merge branch 'master' of https://github.com/apache/spark into SPARK-6694
      0301eb9 [Jin Adachi] Merge branch 'master' of https://github.com/apache/spark into SPARK-6694
      df81086 [Jin Adachi] Modify code style.
      846f83e [Jin Adachi] Merge branch 'master' of https://github.com/apache/spark into SPARK-6694
      dbe8c63 [Jin Adachi] Change file permission to 644.
      7b58f42 [Jin Adachi] Merge branch 'master' of https://github.com/apache/spark into SPARK-6694
      c581d06 [Jin Adachi] Add an option --database test
      db56122 [Jin Adachi] Merge branch 'SPARK-6694' of https://github.com/adachij2002/spark into SPARK-6694
      ee09fa5 [adachij] Merge branch 'master' into SPARK-6694
      c804c03 [adachij] SparkSQL CLI must be able to specify an option --database on the command line.
      3ae37b93
    • Marcelo Vanzin's avatar
      [SPARK-4194] [core] Make SparkContext initialization exception-safe. · de4fa6b6
      Marcelo Vanzin authored
      SparkContext has a very long constructor, where multiple things are
      initialized, multiple threads are spawned, and multiple opportunities
      for exceptions to be thrown exist. If one of these happens at an
      innoportune time, lots of garbage tends to stick around.
      
      This patch re-organizes SparkContext so that its internal state is
      initialized in a big "try" block. The fields keeping state are now
      completely private to SparkContext, and are "vars", because Scala
      doesn't allow you to initialize a val later. The existing API interface
      is kept by turning vals into defs (which works because Scala guarantees
      the same binary interface for those).
      
      On top of that, a few things in other areas were changed to avoid more
      things leaking:
      
      - Executor was changed to explicitly wait for the heartbeat thread to
        stop. LocalBackend was changed to wait for the "StopExecutor"
        message to be received, since otherwise there could be a race
        between that message arriving and the actor system being shut down.
      - ConnectionManager could possibly hang during shutdown, because an
        interrupt at the wrong moment could cause the selector thread to
        still call select and then wait forever. So also wake up the
        selector so that this situation is avoided.
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #5335 from vanzin/SPARK-4194 and squashes the following commits:
      
      746b661 [Marcelo Vanzin] Fix borked merge.
      80fc00e [Marcelo Vanzin] Merge branch 'master' into SPARK-4194
      408dada [Marcelo Vanzin] Merge branch 'master' into SPARK-4194
      2621609 [Marcelo Vanzin] Merge branch 'master' into SPARK-4194
      6b73fcb [Marcelo Vanzin] Scalastyle.
      c671c46 [Marcelo Vanzin] Fix merge.
      3979aad [Marcelo Vanzin] Merge branch 'master' into SPARK-4194
      8caa8b3 [Marcelo Vanzin] [SPARK-4194] [core] Make SparkContext initialization exception-safe.
      071f16e [Marcelo Vanzin] Nits.
      27456b9 [Marcelo Vanzin] More exception safety.
      a0b0881 [Marcelo Vanzin] Stop alloc manager before scheduler.
      5545d83 [Marcelo Vanzin] [SPARK-6650] [core] Stop ExecutorAllocationManager when context stops.
      de4fa6b6
    • Sean Owen's avatar
      SPARK-4783 [CORE] System.exit() calls in SparkContext disrupt applications embedding Spark · 6179a948
      Sean Owen authored
      Avoid `System.exit(1)` in `TaskSchedulerImpl` and convert to `SparkException`; ensure scheduler calls `sc.stop()` even when this exception is thrown.
      
      CC mateiz aarondav as those who may have last touched this code.
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #5492 from srowen/SPARK-4783 and squashes the following commits:
      
      60dc682 [Sean Owen] Avoid System.exit(1) in TaskSchedulerImpl and convert to SparkException; ensure scheduler calls sc.stop() even when this exception is thrown
      6179a948
Loading