Skip to content
Snippets Groups Projects
  1. Mar 26, 2016
    • Liwei Lin's avatar
      [SPARK-14089][CORE][MLLIB] Remove methods that has been deprecated since 1.1,... · 62a85eb0
      Liwei Lin authored
      [SPARK-14089][CORE][MLLIB] Remove methods that has been deprecated since 1.1, 1.2, 1.3, 1.4, and 1.5
      
      ## What changes were proposed in this pull request?
      
      Removed methods that has been deprecated since 1.1, 1.2, 1.3, 1.4, and 1.5.
      
      ## How was this patch tested?
      
      - manully checked that no codes in Spark call these methods any more
      - existing test suits
      
      Author: Liwei Lin <lwlin7@gmail.com>
      Author: proflin <proflin.me@gmail.com>
      
      Closes #11910 from lw-lin/remove-deprecates.
      62a85eb0
    • Dongjoon Hyun's avatar
      [MINOR] Fix newly added java-lint errors · 18084658
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      This PR fixes some newly added java-lint errors(unused-imports, line-lengsth).
      
      ## How was this patch tested?
      
      Pass the Jenkins tests.
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #11968 from dongjoon-hyun/SPARK-14167.
      18084658
    • Shixiong Zhu's avatar
      [SPARK-13874][DOC] Remove docs of streaming-akka, streaming-zeromq,... · d23ad7c1
      Shixiong Zhu authored
      [SPARK-13874][DOC] Remove docs of streaming-akka, streaming-zeromq, streaming-mqtt and streaming-twitter
      
      ## What changes were proposed in this pull request?
      
      This PR removes all docs about the old streaming-akka, streaming-zeromq, streaming-mqtt and streaming-twitter projects since I have already copied them to https://github.com/spark-packages
      
      Also remove mqtt_wordcount.py that I forgot to remove previously.
      
      ## How was this patch tested?
      
      Jenkins PR Build.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #11824 from zsxwing/remove-doc.
      d23ad7c1
  2. Mar 25, 2016
    • Tathagata Das's avatar
      [SPARK-14109][SQL] Fix HDFSMetadataLog to fallback from FileContext to FileSystem API · 13945dd8
      Tathagata Das authored
      ## What changes were proposed in this pull request?
      
      HDFSMetadataLog uses newer FileContext API to achieve atomic renaming. However, FileContext implementations may not exist for many scheme for which there may be FileSystem implementations. In those cases, rather than failing completely, we should fallback to the FileSystem based implementation, and log warning that there may be file consistency issues in case the log directory is concurrently modified.
      
      In addition I have also added more tests to increase the code coverage.
      
      ## How was this patch tested?
      
      Unit test.
      Tested on cluster with custom file system.
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #11925 from tdas/SPARK-14109.
      13945dd8
    • Shixiong Zhu's avatar
      [SPARK-14073][STREAMING][TEST-MAVEN] Move flume back to Spark · 24587ce4
      Shixiong Zhu authored
      ## What changes were proposed in this pull request?
      
      This PR moves flume back to Spark as per the discussion in the dev mail-list.
      
      ## How was this patch tested?
      
      Existing Jenkins tests.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #11895 from zsxwing/move-flume-back.
      24587ce4
    • Joseph K. Bradley's avatar
      [SPARK-14159][ML] Fixed bug in StringIndexer + related issue in RFormula · 54d13bed
      Joseph K. Bradley authored
      ## What changes were proposed in this pull request?
      
      StringIndexerModel.transform sets the output column metadata to use name inputCol.  It should not.  Fixing this causes a problem with the metadata produced by RFormula.
      
      Fix in RFormula: I added the StringIndexer columns to prefixesToRewrite, and I modified VectorAttributeRewriter to find and replace all "prefixes" since attributes collect multiple prefixes from StringIndexer + Interaction.
      
      Note that "prefixes" is no longer accurate since internal strings may be replaced.
      
      ## How was this patch tested?
      
      Unit test which failed before this fix.
      
      Author: Joseph K. Bradley <joseph@databricks.com>
      
      Closes #11965 from jkbradley/StringIndexer-fix.
      54d13bed
    • Rajesh Balamohan's avatar
      [SPARK-14091][CORE] Improve performance of SparkContext.getCallSite() · ff7cc45f
      Rajesh Balamohan authored
      Currently SparkContext.getCallSite() makes a call to Utils.getCallSite().
      
      ```
       private[spark] def getCallSite(): CallSite = {
          val callSite = Utils.getCallSite()
          CallSite(
            Option(getLocalProperty(CallSite.SHORT_FORM)).getOrElse(callSite.shortForm),
            Option(getLocalProperty(CallSite.LONG_FORM)).getOrElse(callSite.longForm)
          )
        }
      ```
      However, in some places utils.withDummyCallSite(sc) is invoked to avoid expensive threaddumps within getCallSite(). But Utils.getCallSite() is evaluated earlier causing threaddumps to be computed.
      
      This can have severe impact on smaller queries (that finish in 10-20 seconds) having large number of RDDs.
      
      Creating this patch for lazy evaluation of  getCallSite.
      
      No new test cases are added. Following standalone test was tried out manually. Also, built entire spark binary and tried with few SQL queries in TPC-DS  and TPC-H in multi node cluster
      ```
      def run(): Unit = {
          val conf = new SparkConf()
          val sc = new SparkContext("local[1]", "test-context", conf)
          val start: Long = System.currentTimeMillis();
          val confBroadcast = sc.broadcast(new SerializableConfiguration(new Configuration()))
          Utils.withDummyCallSite(sc) {
            //Large tables end up creating 5500 RDDs
            for(i <- 1 to 5000) {
             //ignore nulls in RDD as its mainly for testing callSite
              val testRDD = new HadoopRDD(sc, confBroadcast, None, null,
                classOf[NullWritable], classOf[Writable], 10)
            }
          }
          val end: Long = System.currentTimeMillis();
          println("Time taken : " + (end - start))
        }
      
      def main(args: Array[String]): Unit = {
          run
        }
      ```
      
      Author: Rajesh Balamohan <rbalamohan@apache.org>
      
      Closes #11911 from rajeshbalamohan/SPARK-14091.
      ff7cc45f
    • Shixiong Zhu's avatar
      [SPARK-14131][SQL] Add a workaround for HADOOP-10622 to fix DataFrameReaderWriterSuite · b554b3c4
      Shixiong Zhu authored
      ## What changes were proposed in this pull request?
      
      There is a potential dead-lock in Hadoop Shell.runCommand before 2.5.0 ([HADOOP-10622](https://issues.apache.org/jira/browse/HADOOP-10622)). If we interrupt some thread running Shell.runCommand, we may hit this issue.
      
      This PR adds some protecion to prevent from interrupting the microBatchThread when we may run into Shell.runCommand. There are two places will call Shell.runCommand now:
      
      - offsetLog.add
      - FileStreamSource.getOffset
      
      They will create a file using HDFS API and call Shell.runCommand to set the file permission.
      
      ## How was this patch tested?
      
      Existing unit tests.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #11940 from zsxwing/workaround-for-HADOOP-10622.
      b554b3c4
    • Sameer Agarwal's avatar
      [SPARK-14137] [SPARK-14150] [SQL] Infer IsNotNull constraints from non-nullable attributes · afd0debe
      Sameer Agarwal authored
      ## What changes were proposed in this pull request?
      
      This PR adds support for automatically inferring `IsNotNull` constraints from any non-nullable attributes that are part of an operator's output. This also fixes the issue that causes the optimizer to hit the maximum number of iterations for certain queries in https://github.com/apache/spark/pull/11828.
      
      ## How was this patch tested?
      
      Unit test in `ConstraintPropagationSuite`
      
      Author: Sameer Agarwal <sameer@databricks.com>
      
      Closes #11953 from sameeragarwal/infer-isnotnull.
      afd0debe
    • Liang-Chi Hsieh's avatar
      [SPARK-12443][SQL] encoderFor should support Decimal · ca003354
      Liang-Chi Hsieh authored
      ## What changes were proposed in this pull request?
      
      JIRA: https://issues.apache.org/jira/browse/SPARK-12443
      
      `constructorFor` will call `dataTypeFor` to determine if a type is `ObjectType` or not. If there is not case for `Decimal`, it will be recognized as `ObjectType` and causes the bug.
      
      ## How was this patch tested?
      
      Test is added into `ExpressionEncoderSuite`.
      
      Author: Liang-Chi Hsieh <simonh@tw.ibm.com>
      Author: Liang-Chi Hsieh <viirya@gmail.com>
      
      Closes #10399 from viirya/fix-encoder-decimal.
      ca003354
    • Tathagata Das's avatar
      [SQL][HOTFIX] Fix flakiness in StateStoreRDDSuite · 11fa8741
      Tathagata Das authored
      ## What changes were proposed in this pull request?
      StateStoreCoordinator.reportActiveInstance is async, so subsequence state checks must be in eventually.
      ## How was this patch tested?
      Jenkins tests
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #11924 from tdas/state-store-flaky-fix.
      11fa8741
    • Sameer Agarwal's avatar
      [SPARK-14144][SQL] Explicitly identify/catch UnsupportedOperationException... · b5f8c36e
      Sameer Agarwal authored
      [SPARK-14144][SQL] Explicitly identify/catch UnsupportedOperationException during parquet reader initialization
      
      ## What changes were proposed in this pull request?
      
      This PR is a minor cleanup task as part of https://issues.apache.org/jira/browse/SPARK-14008 to explicitly identify/catch the `UnsupportedOperationException` while initializing the vectorized parquet reader. Other exceptions will simply be thrown back to `SqlNewHadoopPartition`.
      
      ## How was this patch tested?
      
      N/A (cleanup only; no new functionality added)
      
      Author: Sameer Agarwal <sameer@databricks.com>
      
      Closes #11950 from sameeragarwal/parquet-cleanup.
      b5f8c36e
    • Wenchen Fan's avatar
      [SPARK-14061][SQL] implement CreateMap · 43b15e01
      Wenchen Fan authored
      ## What changes were proposed in this pull request?
      
      As we have `CreateArray` and `CreateStruct`, we should also have `CreateMap`.  This PR adds the `CreateMap` expression, and the DataFrame API, and python API.
      
      ## How was this patch tested?
      
      various new tests.
      
      Author: Wenchen Fan <wenchen@databricks.com>
      
      Closes #11879 from cloud-fan/create_map.
      43b15e01
    • Davies Liu's avatar
      [SPARK-13919] [SQL] fix column pruning through filter · 6603d9f7
      Davies Liu authored
      ## What changes were proposed in this pull request?
      
      This PR fix the conflict between ColumnPruning and PushPredicatesThroughProject, because ColumnPruning will try to insert a Project before Filter, but PushPredicatesThroughProject will move the Filter before Project.This is fixed by remove the Project before Filter, if the Project only do column pruning.
      
      The RuleExecutor will fail the test if reached max iterations.
      
      Closes #11745
      
      ## How was this patch tested?
      
      Existing tests.
      
      This is a test case still failing, disabled for now, will be fixed by https://issues.apache.org/jira/browse/SPARK-14137
      
      Author: Davies Liu <davies@databricks.com>
      
      Closes #11828 from davies/fail_rule.
      6603d9f7
    • Holden Karau's avatar
      [SPARK-13887][PYTHON][TRIVIAL][BUILD] Make lint-python script fail fast · 55a60576
      Holden Karau authored
      ## What changes were proposed in this pull request?
      
      Change lint python script to stop on first error rather than building them up so its clearer why we failed (requested by rxin). Also while in the file, remove the commented out code.
      
      ## How was this patch tested?
      
      Manually ran lint-python script with & without pep8 errors locally and verified expected results.
      
      Author: Holden Karau <holden@us.ibm.com>
      
      Closes #11898 from holdenk/SPARK-13887-pylint-fast-fail.
      55a60576
    • Wenchen Fan's avatar
      [SPARK-13456][SQL][FOLLOW-UP] lazily generate the outer pointer for case class defined in REPL · e9b6e7d8
      Wenchen Fan authored
      ## What changes were proposed in this pull request?
      
      In https://github.com/apache/spark/pull/11410, we missed a corner case: define the inner class and use it in `Dataset` at the same time by using paste mode. For this case, the inner class and the `Dataset` are inside same line object, when we build the `Dataset`, we try to get outer pointer from line object, and it will fail because the line object is not initialized yet.
      
      https://issues.apache.org/jira/browse/SPARK-13456?focusedCommentId=15209174&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15209174 is an example for this corner case.
      
      This PR make the process of getting outer pointer from line object lazy, so that we can successfully build the `Dataset` and finish initializing the line object.
      
      ## How was this patch tested?
      
      new test in repl suite.
      
      Author: Wenchen Fan <wenchen@databricks.com>
      
      Closes #11931 from cloud-fan/repl.
      e9b6e7d8
    • Reynold Xin's avatar
      [SPARK-14149] Log exceptions in tryOrIOException · 70a6f0bb
      Reynold Xin authored
      ## What changes were proposed in this pull request?
      We ran into a problem today debugging some class loading problem during deserialization, and JVM was masking the underlying exception which made it very difficult to debug. We can however log the exceptions using try/catch ourselves in serialization/deserialization. The good thing is that all these methods are already using Utils.tryOrIOException, so we can just put the try catch and logging in a single place.
      
      ## How was this patch tested?
      A logging change with a manual test.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #11951 from rxin/SPARK-14149.
      70a6f0bb
    • Andrew Or's avatar
      [SPARK-14014][SQL] Integrate session catalog (attempt #2) · 20ddf5fd
      Andrew Or authored
      ## What changes were proposed in this pull request?
      
      This reopens #11836, which was merged but promptly reverted because it introduced flaky Hive tests.
      
      ## How was this patch tested?
      
      See `CatalogTestCases`, `SessionCatalogSuite` and `HiveContextSuite`.
      
      Author: Andrew Or <andrew@databricks.com>
      
      Closes #11938 from andrewor14/session-catalog-again.
      20ddf5fd
    • Reynold Xin's avatar
      [SPARK-14145][SQL] Remove the untyped version of Dataset.groupByKey · 1c70b765
      Reynold Xin authored
      ## What changes were proposed in this pull request?
      Dataset has two variants of groupByKey, one for untyped and the other for typed. It actually doesn't make as much sense to have an untyped API here, since apps that want to use untyped APIs should just use the groupBy "DataFrame" API.
      
      ## How was this patch tested?
      This patch removes a method, and removes the associated tests.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #11949 from rxin/SPARK-14145.
      1c70b765
    • Reynold Xin's avatar
      [SPARK-14142][SQL] Replace internal use of unionAll with union · 3619fec1
      Reynold Xin authored
      ## What changes were proposed in this pull request?
      unionAll has been deprecated in SPARK-14088.
      
      ## How was this patch tested?
      Should be covered by all existing tests.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #11946 from rxin/SPARK-14142.
      3619fec1
    • Yanbo Liang's avatar
      [SPARK-13010][ML][SPARKR] Implement a simple wrapper of AFTSurvivalRegression in SparkR · 13cbb2de
      Yanbo Liang authored
      ## What changes were proposed in this pull request?
      This PR continues the work in #11447, we implemented the wrapper of ```AFTSurvivalRegression``` named ```survreg``` in SparkR.
      
      ## How was this patch tested?
      Test against output from R package survival's survreg.
      
      cc mengxr felixcheung
      
      Close #11447
      
      Author: Yanbo Liang <ybliang8@gmail.com>
      
      Closes #11932 from yanboliang/spark-13010-new.
      13cbb2de
  3. Mar 24, 2016
    • gatorsmile's avatar
      [SPARK-13957][SQL] Support Group By Ordinal in SQL · 05f652d6
      gatorsmile authored
      #### What changes were proposed in this pull request?
      This PR is to support group by position in SQL. For example, when users input the following query
      ```SQL
      select c1 as a, c2, c3, sum(*) from tbl group by 1, 3, c4
      ```
      The ordinals are recognized as the positions in the select list. Thus, `Analyzer` converts it to
      ```SQL
      select c1, c2, c3, sum(*) from tbl group by c1, c3, c4
      ```
      
      This is controlled by the config option `spark.sql.groupByOrdinal`.
      - When true, the ordinal numbers in group by clauses are treated as the position in the select list.
      - When false, the ordinal numbers are ignored.
      - Only convert integer literals (not foldable expressions). If found foldable expressions, ignore them.
      - When the positions specified in the group by clauses correspond to the aggregate functions in select list, output an exception message.
      - star is not allowed to use in the select list when users specify ordinals in group by
      
      Note: This PR is taken from https://github.com/apache/spark/pull/10731. When merging this PR, please give the credit to zhichao-li
      
      Also cc all the people who are involved in the previous discussion:  rxin cloud-fan marmbrus yhuai hvanhovell adrian-wang chenghao-intel tejasapatil
      
      #### How was this patch tested?
      
      Added a few test cases for both positive and negative test cases.
      
      Author: gatorsmile <gatorsmile@gmail.com>
      Author: xiaoli <lixiao1983@gmail.com>
      Author: Xiao Li <xiaoli@Xiaos-MacBook-Pro.local>
      
      Closes #11846 from gatorsmile/groupByOrdinal.
      05f652d6
    • GayathriMurali's avatar
      [SPARK-13949][ML][PYTHON] PySpark ml DecisionTreeClassifier, Regressor support export/import · 0874ff3a
      GayathriMurali authored
      ## What changes were proposed in this pull request?
      
      Added MLReadable and MLWritable to Decision Tree Classifier and Regressor. Added doctests.
      
      ## How was this patch tested?
      
      Python Unit tests. Tests added to check persistence in DecisionTreeClassifier and DecisionTreeRegressor.
      
      Author: GayathriMurali <gayathri.m.softie@gmail.com>
      
      Closes #11892 from GayathriMurali/SPARK-13949.
      0874ff3a
    • sethah's avatar
      [SPARK-14107][PYSPARK][ML] Add seed as named argument to GBTs in pyspark · 58509771
      sethah authored
      ## What changes were proposed in this pull request?
      
      GBTs in pyspark previously had seed parameters, but they could not be passed as keyword arguments through the class constructor. This patch adds seed as a keyword argument and also sets default value.
      
      ## How was this patch tested?
      
      Doc tests were updated to pass a random seed through the GBTClassifier and GBTRegressor constructors.
      
      Author: sethah <seth.hendrickson16@gmail.com>
      
      Closes #11944 from sethah/SPARK-14107.
      58509771
    • Josh Rosen's avatar
      [SPARK-13980] Incrementally serialize blocks while unrolling them in MemoryStore · fdd460f5
      Josh Rosen authored
      When a block is persisted in the MemoryStore at a serialized storage level, the current MemoryStore.putIterator() code will unroll the entire iterator as Java objects in memory, then will turn around and serialize an iterator obtained from the unrolled array. This is inefficient and doubles our peak memory requirements.
      
      Instead, I think that we should incrementally serialize blocks while unrolling them.
      
      A downside to incremental serialization is the fact that we will need to deserialize the partially-unrolled data in case there is not enough space to unroll the block and the block cannot be dropped to disk. However, I'm hoping that the memory efficiency improvements will outweigh any performance losses as a result of extra serialization in that hopefully-rare case.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #11791 from JoshRosen/serialize-incrementally.
      fdd460f5
    • Xusen Yin's avatar
      [SPARK-11871] Add save/load for MLPC · 2cf46d5a
      Xusen Yin authored
      ## What changes were proposed in this pull request?
      
      https://issues.apache.org/jira/browse/SPARK-11871
      
      Add save/load for MLPC
      
      ## How was this patch tested?
      
      Test with Scala unit test
      
      Author: Xusen Yin <yinxusen@gmail.com>
      
      Closes #9854 from yinxusen/SPARK-11871.
      2cf46d5a
    • Xin Ren's avatar
      [SPARK-13017][DOCS] Replace example code in mllib-feature-extraction.md using include_example · d283223a
      Xin Ren authored
      Replace example code in mllib-feature-extraction.md using include_example
      https://issues.apache.org/jira/browse/SPARK-13017
      
      The example code in the user guide is embedded in the markdown and hence it is not easy to test. It would be nice to automatically test them. This JIRA is to discuss options to automate example code testing and see what we can do in Spark 1.6.
      
      Goal is to move actual example code to spark/examples and test compilation in Jenkins builds. Then in the markdown, we can reference part of the code to show in the user guide. This requires adding a Jekyll tag that is similar to https://github.com/jekyll/jekyll/blob/master/lib/jekyll/tags/include.rb, e.g., called include_example.
      `{% include_example scala/org/apache/spark/examples/mllib/TFIDFExample.scala %}`
      Jekyll will find `examples/src/main/scala/org/apache/spark/examples/mllib/TFIDFExample.scala` and pick code blocks marked "example" and replace code block in
      `{% highlight %}`
       in the markdown.
      
      See more sub-tasks in parent ticket: https://issues.apache.org/jira/browse/SPARK-11337
      
      Author: Xin Ren <iamshrek@126.com>
      
      Closes #11142 from keypointt/SPARK-13017.
      d283223a
    • Sean Owen's avatar
      Revert "[SPARK-2208] Fix for local metrics tests can fail on fast machines".... · 342079dc
      Sean Owen authored
      Revert "[SPARK-2208] Fix for local metrics tests can fail on fast machines". The test appears to still be flaky after this change, or more flaky.
      
      This reverts commit 5519760e.
      342079dc
    • Joan's avatar
      [SPARK-2208] Fix for local metrics tests can fail on fast machines · 5519760e
      Joan authored
      ## What changes were proposed in this pull request?
      
      A fix for local metrics tests that can fail on fast machines.
      This is probably what is suggested here #3380 by aarondav?
      
      ## How was this patch tested?
      
      CI Tests
      
      Cheers
      
      Author: Joan <joan@goyeau.com>
      
      Closes #11747 from joan38/SPARK-2208-Local-metrics-tests.
      5519760e
    • Xin Ren's avatar
      [SPARK-13019][DOCS] fix for scala-2.10 build: Replace example code in... · dd9ca7b9
      Xin Ren authored
      [SPARK-13019][DOCS] fix for scala-2.10 build: Replace example code in mllib-statistics.md using include_example
      
      ## What changes were proposed in this pull request?
      
      This PR for ticket SPARK-13019 is based on previous PR(https://github.com/apache/spark/pull/11108).
      Since PR(https://github.com/apache/spark/pull/11108) is breaking scala-2.10 build, more work is needed to fix build errors.
      
      What I did new in this PR is adding keyword argument for 'fractions':
      `    val approxSample = data.sampleByKey(withReplacement = false, fractions = fractions)`
      `    val exactSample = data.sampleByKeyExact(withReplacement = false, fractions = fractions)`
      
      I reopened ticket on JIRA but sorry I don't know how to reopen a GitHub pull request, so I just submitting a new pull request.
      ## How was this patch tested?
      
      Manual build testing on local machine, build based on scala-2.10.
      
      Author: Xin Ren <iamshrek@126.com>
      
      Closes #11901 from keypointt/SPARK-13019.
      dd9ca7b9
    • Ruifeng Zheng's avatar
      [SPARK-14030][MLLIB] Add parameter check to MLLIB · 048a7594
      Ruifeng Zheng authored
      ## What changes were proposed in this pull request?
      
      add parameter verification to MLLIB, like
      numCorrections > 0
      tolerance >= 0
      iters > 0
      regParam >= 0
      
      ## How was this patch tested?
      
      manual tests
      
      Author: Ruifeng Zheng <ruifengz@foxmail.com>
      Author: Zheng RuiFeng <mllabs@datanode1.(none)>
      Author: mllabs <mllabs@datanode1.(none)>
      Author: Zheng RuiFeng <ruifengz@foxmail.com>
      
      Closes #11852 from zhengruifeng/lbfgs_check.
      048a7594
    • Juarez Bochi's avatar
      Fix typo in ALS.scala · 1803bf63
      Juarez Bochi authored
      ## What changes were proposed in this pull request?
      
      Just a typo
      
      ## How was this patch tested?
      
      N/A
      
      Author: Juarez Bochi <jbochi@gmail.com>
      
      Closes #11896 from jbochi/patch-1.
      1803bf63
    • Tejas Patil's avatar
      [SPARK-14110][CORE] PipedRDD to print the command ran on non zero exit · 01849da0
      Tejas Patil authored
      ## What changes were proposed in this pull request?
      
      In case of failure in subprocess launched in PipedRDD, the failure exception reads “Subprocess exited with status XXX”. Debugging this is not easy for users especially if there are multiple pipe() operations in the Spark application.
      
      Changes done:
      - Changed the exception message when non-zero exit code is seen
      - If the reader and writer threads see exception, simply logging the command ran. The current model is to propagate the exception "as is" so that upstream Spark logic will take the right action based on what the exception was (eg. for fetch failure, it needs to retry; but for some fatal exception, it will decide to fail the stage / job). So wrapping the exception with a generic exception will not work. Altering the exception message will keep that guarantee but that is ugly (plus not all exceptions might have a constructor for a string message)
      
      ## How was this patch tested?
      
      - Added a new test case
      - Ran all existing tests for PipedRDD
      
      Author: Tejas Patil <tejasp@fb.com>
      
      Closes #11927 from tejasapatil/SPARK-14110-piperdd-failure.
      01849da0
    • Andrew Or's avatar
      c44d140c
  4. Mar 23, 2016
    • Joseph K. Bradley's avatar
      [SPARK-12183][ML][MLLIB] Remove mllib tree implementation, and wrap spark.ml one · cf823bea
      Joseph K. Bradley authored
      Primary change:
      * Removed spark.mllib.tree.DecisionTree implementation of tree and forest learning.
      * spark.mllib now calls the spark.ml implementation.
      * Moved unit tests (of tree learning internals) from spark.mllib to spark.ml as needed.
      
      ml.tree.DecisionTreeModel
      * Added toOld and made ```private[spark]```, implemented for Classifier and Regressor in subclasses.  These methods now use OldInformationGainStats.invalidInformationGainStats for LeafNodes in order to mimic the spark.mllib implementation.
      
      ml.tree.Node
      * Added ```private[tree] def deepCopy```, used by unit tests
      
      Copied developer comments from spark.mllib implementation to spark.ml one.
      
      Moving unit tests
      * Tree learning internals were tested by spark.mllib.tree.DecisionTreeSuite, or spark.mllib.tree.RandomForestSuite.
      * Those tests were all moved to spark.ml.tree.impl.RandomForestSuite.  The order in the file + the test names are the same, so you should be able to compare them by opening them in 2 windows side-by-side.
      * I made minimal changes to each test to allow it to run.  Each test makes the same checks as before, except for a few removed assertions which were checking irrelevant values.
      * No new unit tests were added.
      * mllib.tree.DecisionTreeSuite: I removed some checks of splits and bins which were not relevant to the unit tests they were in.  Those same split calculations were already being tested in other unit tests, for each dataset type.
      
      **Changes of behavior** (to be noted in SPARK-13448 once this PR is merged)
      * spark.ml.tree.impl.RandomForest: Rather than throwing an error when maxMemoryInMB is set to too small a value (to split any node), we now allow 1 node to be split, even if its memory requirements exceed maxMemoryInMB.  This involved removing the maxMemoryPerNode check in RandomForest.run, as well as modifying selectNodesToSplit().  Once this PR is merged, I will note the change of behavior on SPARK-13448.
      * spark.mllib.tree.DecisionTree: When a tree only has one node (root = leaf node), the "stats" field will now be empty, rather than being set to InformationGainStats.invalidInformationGainStats.  This does not remove information from the tree, and it will save a bit of storage.
      
      Author: Joseph K. Bradley <joseph@databricks.com>
      
      Closes #11855 from jkbradley/remove-mllib-tree-impl.
      cf823bea
    • gatorsmile's avatar
      [SPARK-14085][SQL] Star Expansion for Hash · f42eaf42
      gatorsmile authored
      #### What changes were proposed in this pull request?
      
      This PR is to support star expansion in hash. For example,
      ```SQL
      val structDf = testData2.select("a", "b").as("record")
      structDf.select(hash($"*")
      ```
      
      In addition, it refactors the codes for the rule `ResolveStar` and fixes a regression for star expansion in group by when using SQL API. For example,
      ```SQL
      SELECT * FROM testData2 group by a, b
      ```
      
      cc cloud-fan Now, the code for star resolution is much cleaner. The coverage is better. Could you check if this refactoring is good? Thanks!
      
      #### How was this patch tested?
      Added a few test cases to cover it.
      
      Author: gatorsmile <gatorsmile@gmail.com>
      
      Closes #11904 from gatorsmile/starResolution.
      f42eaf42
    • Liwei Lin's avatar
      [SPARK-14025][STREAMING][WEBUI] Fix streaming job descriptions on the event timeline · de4e48b6
      Liwei Lin authored
      ## What changes were proposed in this pull request?
      
      Removed the extra `<a href=...>...</a>` for each streaming job's description on the event timeline.
      
      ### [Before]
      ![before](https://cloud.githubusercontent.com/assets/15843379/13898653/0a6c1838-ee13-11e5-9761-14bb7b114c13.png)
      
      ### [After]
      ![after](https://cloud.githubusercontent.com/assets/15843379/13898650/012b8808-ee13-11e5-92a6-64aff0799c83.png)
      
      ## How was this patch tested?
      
      test suits, manual checks (see screenshots above)
      
      Author: Liwei Lin <proflin.me@gmail.com>
      Author: proflin <proflin.me@gmail.com>
      
      Closes #11845 from lw-lin/description-event-line.
      de4e48b6
    • sethah's avatar
      [SPARK-13952][ML] Add random seed to GBT · 69bc2c17
      sethah authored
      ## What changes were proposed in this pull request?
      
      `GBTClassifier` and `GBTRegressor` should use random seed for reproducible results. Because of the nature of current unit tests, which compare GBTs in ML and GBTs in MLlib for equality, I also added a random seed to MLlib GBT algorithm. I made alternate constructors in `mllib.tree.GradientBoostedTrees` to accept a random seed, but left them as private so as to not change the API unnecessarily.
      
      ## How was this patch tested?
      
      Existing unit tests verify that functionality did not change. Other ML algorithms do not seem to have unit tests that directly test the functionality of random seeding, but reproducibility with seeding for GBTs is effectively verified in existing tests. I can add more tests if needed.
      
      Author: sethah <seth.hendrickson16@gmail.com>
      
      Closes #11903 from sethah/SPARK-13952.
      69bc2c17
    • Andrew Or's avatar
      [SPARK-14014][SQL] Replace existing catalog with SessionCatalog · 5dfc0197
      Andrew Or authored
      ## What changes were proposed in this pull request?
      
      `SessionCatalog`, introduced in #11750, is a catalog that keeps track of temporary functions and tables, and delegates metastore operations to `ExternalCatalog`. This functionality overlaps a lot with the existing `analysis.Catalog`.
      
      As of this commit, `SessionCatalog` and `ExternalCatalog` will no longer be dead code. There are still things that need to be done after this patch, namely:
      - SPARK-14013: Properly implement temporary functions in `SessionCatalog`
      - SPARK-13879: Decide which DDL/DML commands to support natively in Spark
      - SPARK-?????: Implement the ones we do want to support through `SessionCatalog`.
      - SPARK-?????: Merge SQL/HiveContext
      
      ## How was this patch tested?
      
      This is largely a refactoring task so there are no new tests introduced. The particularly relevant tests are `SessionCatalogSuite` and `ExternalCatalogSuite`.
      
      Author: Andrew Or <andrew@databricks.com>
      Author: Yin Huai <yhuai@databricks.com>
      
      Closes #11836 from andrewor14/use-session-catalog.
      5dfc0197
    • Michael Armbrust's avatar
      [SPARK-14078] Streaming Parquet Based FileSink · 6bc4be64
      Michael Armbrust authored
      This PR adds a new `Sink` implementation that writes out Parquet files.  In order to correctly handle partial failures while maintaining exactly once semantics, the files for each batch are written out to a unique directory and then atomically appended to a metadata log.  When a parquet based `DataSource` is initialized for reading, we first check for this log directory and use it instead of file listing when present.
      
      Unit tests are added, as well as a stress test that checks the answer after non-deterministic injected failures.
      
      Author: Michael Armbrust <michael@databricks.com>
      
      Closes #11897 from marmbrus/fileSink.
      6bc4be64
Loading