forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 50
External Group By to handle huge keys #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
mccheah
wants to merge
342
commits into
feature/external-group-by-base
from
feature/external-group-by-wip
Closed
Changes from 11 commits
Commits
Show all changes
342 commits
Select commit
Hold shift + click to select a range
608353c
[SPARK-9404][SPARK-9542][SQL] unsafe array data and map data
cloud-fan 98d6d9c
[SPARK-9549][SQL] fix bugs in expressions
yjshen 1ebd41b
[SPARK-9240] [SQL] Hybrid aggregate operator using unsafe row
yhuai 95dccc6
[SPARK-8873] [MESOS] Clean up shuffle files if external shuffle servi…
tnachen 137f478
[SPARK-9551][SQL] add a cheap version of copy for UnsafeRow to reuse …
cloud-fan 191bf26
[SPARK-9518] [SQL] cleanup generated UnsafeRowJoiner and fix bug
8be198c
Two minor comments from code review on 191bf2689.
rxin 69f5a7c
[SPARK-9528] [ML] Changed RandomForestClassifier to extend Probabilis…
jkbradley b41a327
[SPARK-1855] Local checkpointing
dfe7bd1
[SPARK-9511] [SQL] Fixed Table Name Parsing
7a9d09f
[SQL][minor] Simplify UnsafeRow.calculateBitSetWidthInBytes.
rxin 703e44b
[SPARK-9554] [SQL] Enables in-memory partition pruning by default
liancheng ff9169a
[SPARK-5133] [ML] Added featureImportance to RandomForestClassifier a…
jkbradley ba1c4e1
[SPARK-9558][DOCS]Update docs to follow the increase of memory defaults.
sarutak 8ca287e
[SPARK-9191] [ML] [Doc] Add ml.PCA user guide and code examples
yanboliang e4765a4
[SPARK-9544] [MLLIB] add Python API for RFormula
mengxr 702aa9d
[SPARK-8735] [SQL] Expose memory usage for shuffles, joins and aggreg…
b2e4b85
Revert "[SPARK-9372] [SQL] Filter nulls in join keys"
rxin a2409d1
[SPARK-8064] [SQL] Build against Hive 1.2.1
steveloughran 13675c7
[SPARK-8874] [ML] Add missing methods in Word2Vec
MechCoder 7abaaad
Add a prerequisites section for building docs
shivaram b79b4f5
[SPARK-9483] Fix UTF8String.getPrefix for big-endian.
mtbrandy 1633d0a
[SPARK-9263] Added flags to exclude dependencies when using --packages
brkyvz 3b0e444
[SPARK-8416] highlight and topping the executor threads in thread dum…
CodingCat 5eb89f6
[SPARK-9577][SQL] Surface concrete iterator types in various sort cla…
rxin 0afa6fb
[SPARK-9521] [DOCS] Addendum. Require Maven 3.3.3+ in the build
srowen 9e952ec
[SPARK-3190] [GRAPHX] Fix VertexRDD.count() overflow regression
ankurdave 76d7409
[SPARK-9534] [BUILD] Enable javac lint for scalac parity; fix a lot o…
srowen b211cbc
[SPARK-8064] [BUILD] Follow-up. Undo change from SPARK-9507 that was …
tedyu cb7fa0a
[SPARK-2016] [WEBUI] RDD partition table pagination for the RDD Page
carsonwang d702d53
[SPARK-9583] [BUILD] Do not print mvn debug messages to stdout.
b1f88a3
[SPARK-8244] [SQL] string function: find in set
tarekbecker 73dedb5
[SPARK-8246] [SQL] Implement get_json_object
b5034c9
[SPARK-9541] [SQL] DataTimeUtils cleanup
yjshen 6a0f8b9
[SPARK-9562] Change reference to amplab/spark-ec2 from mesos/
shivaram 34a0eb2
[SPARK-9512][SQL] Revert SPARK-9251, Allow evaluation while sorting
marmbrus 5a23213
[SPARK-8069] [ML] Add multiclass thresholds for ProbabilisticClassifier
holdenk a0cc017
[SPARK-9606] [SQL] Ignore flaky thrift server tests
marmbrus f4b1ac0
[SPARK-9553][SQL] remove the no-longer-necessary createCode and creat…
cloud-fan ab8ee1a
[SPARK-9452] [SQL] Support records larger than page size in UnsafeExt…
JoshRosen 9d668b7
[SPARK-9602] remove "Akka/Actor" words from comments
CodingCat e375456
[SPARK-9447] [ML] [PYTHON] Added HasRawPredictionCol, HasProbabilityC…
jkbradley ecd4163
Adding a comment
mccheah 1833d9c
[SPARK-9582] [ML] LDA cleanups
jkbradley 571d5b5
[SPARK-6485] [MLLIB] [PYTHON] Add CoordinateMatrix/RowMatrix/IndexedR…
dusenberrymw b77d3b9
[SPARK-9586] [ML] Update BinaryClassificationEvaluator to use setRawP…
jkbradley 7c8fc1f
[SPARK-9598][SQL] do not expose generic getter in internal row
cloud-fan 629e26f
[SPARK-9609] [MLLIB] Fix spelling of Strategy.defaultStrategy
d92fa14
[SPARK-8601] [ML] Add an option to disable standardization for linear…
holdenk a7fe48f
[SPARK-9432][SQL] Audit expression unit tests to make sure we pass th…
yjshen c9a4c36
[SPARK-8313] R Spark packages support
brkyvz 6f8f0e2
[SPARK-7119] [SQL] Give script a default serde with the user specific…
zhichao-li 2b67fdb
[SPARK-9513] [SQL] [PySpark] Add python API for DataFrame functions
d34bac0
[SPARK-9504] [STREAMING] [TESTS] Fix o.a.s.streaming.StreamingContext…
zsxwing f7abd6b
Update docs/README.md to put all prereqs together.
rxin a02bcf2
[SPARK-9540] [MLLIB] optimize PrefixSpan implementation
mengxr d345485
[SPARK-8231] [SQL] Add array_contains
781c8d7
[SPARK-9119] [SPARK-8359] [SQL] match Decimal.precision/scale with De…
c2a71f0
[SPARK-9217] [STREAMING] Make the kinesis receiver reliable by record…
tdas 1d1a76c
[SPARK-9581][SQL] Add unit test for JSON UDT
drubbo d8ef538
Closes #7917
rxin 6d8a6e4
[SPARK-9360] [SQL] Support BinaryType in PrefixComparators for Unsafe…
maropu 1bf608b
[SPARK-9601] [DOCS] Fix JavaPairDStream signature for stream-stream a…
namitk 1b0317f
[SPARK-8861][SPARK-8862][SQL] Add basic instrumentation to each Spark…
zsxwing 84ca318
[SPARK-9628][SQL]Rename int to SQLDate, long to SQLTimestamp for bett…
yjshen 26b06f1
[HOTFIX] Add static import to fix build break from #7676.
JoshRosen e27a8c4
[SPARK-9607] [SPARK-9608] fix zinc-port handling in build/mvn
ryan-williams 70112ff
[SPARK-9593] [SQL] Fixes Hadoop shims loading
liancheng eb8bfa3
[SPARK-9618] [SQL] Use the specified schema when reading Parquet files
519cf6d
[SPARK-9381] [SQL] Migrate JSON data source to the new partitioning d…
chenghao-intel 34dcf10
[SPARK-6486] [MLLIB] [PYTHON] Add BlockMatrix to PySpark.
dusenberrymw 23d9822
[SPARK-9141] [SQL] Remove project collapsing from DataFrame API
marmbrus 7a969a6
[SPARK-9519] [YARN] Confirm stop sc successfully when application was…
Sephiroth-Lin 1f8c364
[SPARK-9141] [SQL] [MINOR] Fix comments of PR #7920
yhuai e1e0587
[SPARK-9403] [SQL] Add codegen support in In and InSet
viirya eb5b8f4
Closes #7778 since it is done as #7893.
rxin 5f0fb64
[SPARK-9649] Fix flaky test MasterSuite - randomize ports
f9c2a2a
Closes #7474 since it's marked as won't fix.
rxin dac090d
[SPARK-9657] Fix return type of getMaxPatternLength
9c87892
[SPARK-9054] [SQL] Rename RowOrdering to InterpretedOrdering; use new…
JoshRosen a018b85
[SPARK-5895] [ML] Add VectorSlicer - updated
yinxusen 8c320e4
[SPARK-6591] [SQL] Python data source load options should auto conver…
yjshen 4399b7b
[SPARK-9651] Fix UnsafeExternalSorterSuite.
4581bad
[SPARK-9611] [SQL] Fixes a few corner cases when we spill a UnsafeFix…
yhuai 119b590
[SPARK-6923] [SPARK-7550] [SQL] Persists data source relations in Hiv…
chenghao-intel 9270bd0
[SPARK-9674][SQL] Remove GeneratedAggregate.
rxin d5a9af3
[SPARK-9664] [SQL] Remove UDAFRegistration and add apply to UserDefin…
yhuai aead18f
[SPARK-8266] [SQL] add function translate
zhichao-li 5b965d6
[SPARK-9644] [SQL] Support update DecimalType with precision > 18 in …
93085c9
[SPARK-9482] [SQL] Fix thread-safey issue of using UnsafeProjection i…
9f94c85
[SPARK-9593] [SQL] [HOTFIX] Makes the Hadoop shims loading fix more r…
liancheng c5c6ade
[SPARK-9112] [ML] Implement Stats for LogisticRegression
MechCoder 076ec05
[SPARK-9533] [PYSPARK] [ML] Add missing methods in Word2Vec ML
MechCoder 98e6946
[SPARK-9615] [SPARK-9616] [SQL] [MLLIB] Bugs related to FrequentItems…
brkyvz 5e1b0ef
[SPARK-9659][SQL] Rename inSet to isin to match Pandas function.
rxin 6e009cb
[SPARK-9632][SQL] update InternalRow.toSeq to make it accept data typ…
cloud-fan 2eca46a
Revert "[SPARK-9632][SQL] update InternalRow.toSeq to make it accept …
davies cdd53b7
[SPARK-9632] [SQL] [HOT-FIX] Fix build.
yhuai 0d7aac9
[SPARK-9641] [DOCS] spark.shuffle.service.port is not documented
srowen a1bbf1b
[SPARK-8978] [STREAMING] Implements the DirectKafkaRateController
nraychaudhuri 1f62f10
[SPARK-9632][SQL] update InternalRow.toSeq to make it accept data typ…
cloud-fan 54c0789
[SPARK-9493] [ML] add featureIndex to handle vector features in Isoto…
mengxr abfedb9
[SPARK-9211] [SQL] [TEST] normalize line separators before generating…
ckadner 21fdfd7
[SPARK-9548][SQL] Add a destructive iterator for BytesToBytesMap
viirya 0a07830
[SPARK-9556] [SPARK-9619] [SPARK-9624] [STREAMING] Make BlockGenerato…
tdas 1723e34
[DOCS] [STREAMING] make the existing parameter docs for OffsetRange ac…
koeninger 3462090
[SPARK-9639] [STREAMING] Fix a potential NPE in Streaming JobScheduler
zsxwing 3504bf3
[SPARK-9630] [SQL] Clean up new aggregate operators (SPARK-9240 follo…
yhuai e234ea1
[SPARK-9645] [YARN] [CORE] Allow shuffle service to read shuffle files.
681e302
[SPARK-9633] [BUILD] SBT download locations outdated; need an update
srowen baf4587
[SPARK-9691] [SQL] PySpark SQL rand function treats seed 0 as no seed
yhuai 4e70e82
[SPARK-9228] [SQL] use tungsten.enabled in public for both of codegen…
0867b23
[SPARK-9650][SQL] Fix quoting behavior on interpolated column names
marmbrus 49b1504
Revert "[SPARK-9228] [SQL] use tungsten.enabled in public for both of…
davies b878253
[SPARK-9692] Remove SqlNewHadoopRDD's generated Tuple2 and Interrupti…
rxin 014a9f9
[SPARK-9709] [SQL] Avoid starving unsafe operators that use sort
17284db
[SPARK-9228] [SQL] use tungsten.enabled in public for both of codegen…
fe12277
Fix doc typo
zjffdu 672f467
[SPARK-8057][Core]Call TaskAttemptContext.getTaskAttemptID using Refl…
zsxwing f0cda58
[SPARK-7550] [SQL] [MINOR] Fixes logs when persisting DataFrames
liancheng 7aaed1b
[SPARK-8862][SQL]Support multiple SQLContexts in Web UI
zsxwing 4309262
[SPARK-9700] Pick default page size more intelligently.
rxin 15bd6f3
[SPARK-9453] [SQL] support records larger than page size in UnsafeShu…
e57d6b5
[SPARK-9683] [SQL] copy UTF8String when convert unsafe array/map to safe
cloud-fan ebfd91c
[SPARK-9467][SQL]Add SQLMetric to specialize accumulators to avoid bo…
zsxwing 76eaa70
[SPARK-9674][SPARK-9667] Remove SparkSqlSerializer2
rxin 2432c2e
[SPARK-8382] [SQL] Improve Analysis Unit test framework
cloud-fan 9897cc5
[SPARK-9736] [SQL] JoinedRow.anyNull should delegate to the underlyin…
rxin aeddeaf
[SPARK-9667][SQL] followup: Use GenerateUnsafeProjection.canSupport t…
rxin 05d04e1
[SPARK-9733][SQL] Improve physical plan explain for data sources
rxin 881548a
[SPARK-9674] Re-enable ignored test in SQLQuerySuite
e2fbbe7
[SPARK-8481] [MLLIB] GaussianMixtureModel predict accepting single ve…
dkobylarz 902334f
[SPARK-9748] [MLLIB] Centriod typo in KMeansModel
BertrandDechoux 49702bd
[SPARK-8890] [SQL] Fallback on sorting when writing many dynamic part…
marmbrus cd540c1
[SPARK-9756] [ML] Make constructors in ML decision trees private
85be65b
[SPARK-9719] [ML] Clean up Naive Bayes doc
998f4ff
[SPARK-9754][SQL] Remove TypeCheck in debug package.
rxin c564b27
[SPARK-9753] [SQL] TungstenAggregate should also accept InternalRow i…
yhuai ef062c1
[SPARK-9731] Standalone scheduling incorrect cores if spark.executor.…
carsonwang 11caf1c
[SPARK-4176] [SQL] [MINOR] Should use unscaled Long to write decimals…
liancheng 106c078
[SPARK-9738] [SQL] remove FromUnsafe and add its codegen version to G…
cloud-fan 74a6541
[SPARK-4561] [PYSPARK] [SQL] turn Row into dict recursively
ac507a0
[SPARK-6902] [SQL] [PYSPARK] Row should be read-only
23695f1
[SPARK-9728][SQL]Support CalendarIntervalType in HiveQL
yjshen a3aec91
[SPARK-9486][SQL] Add data source aliasing for external packages
25c363e
[MINOR] inaccurate comments for showString()
CodingCat 3ca995b
[SPARK-6212] [SQL] The EXPLAIN output of CTAS only shows the analyzed…
yjshen e9c3693
[SPARK-9752][SQL] Support UnsafeRow in Sample operator.
rxin 68ccc6e
[SPARK-8930] [SQL] Throw a AnalysisException with meaningful messages…
yjshen 86fa4ba
[SPARK-9737] [YARN] Add the suggested configuration when required exe…
watermen a863348
Disable JobGeneratorSuite "Do not clear received block data too soon".
rxin 23cf5af
[SPARK-9703] [SQL] Refactor EnsureRequirements to avoid certain unnec…
JoshRosen 4602561
[CORE] [SPARK-9760] Use Option instead of Some for Ivy repos
shivaram be80def
[SPARK-9777] [SQL] Window operator can accept UnsafeRows
yhuai e3fef0f
[SPARK-9743] [SQL] Fixes JSONRelation refreshing
liancheng 0f3366a
[SPARK-9710] [TEST] Fix RPackageUtilsSuite when R is not available.
00b655c
[SPARK-9755] [MLLIB] Add docs to MultivariateOnlineSummarizer methods
d285212
Fixed AtmoicReference<> Example
lababidi 0fe6674
[SPARK-9784] [SQL] Exchange.isUnsafe should check whether codegen and…
JoshRosen 40ed2af
[SPARK-9763][SQL] Minimize exposure of internal SQL classes.
rxin fe2fb7f
[SPARK-9620] [SQL] generated UnsafeProjection should support many col…
c4fd2a2
[SPARK-9759] [SQL] improve decimal.times() and cast(int, decimalType)
853809e
[SPARK-5155] [PYSPARK] [STREAMING] Mqtt streaming support in Python
prabeesh 3c9802d
[SPARK-9801] [STREAMING] Check if file exists before deleting tempora…
viadea 071bbad
[SPARK-9340] [SQL] Fixes converting unannotated Parquet lists
dguy 91e9389
[SPARK-9729] [SPARK-9363] [SQL] Use sort merge join for left and righ…
JoshRosen 0f90d60
[SPARK-9640] [STREAMING] [TEST] Do not run Python Kinesis tests when …
tdas 55752d8
[SPARK-9810] [BUILD] Remove individual commit messages from the squas…
rxin 600031e
[SPARK-9727] [STREAMING] [BUILD] Updated streaming kinesis SBT projec…
tdas d378396
[SPARK-9815] Rename PlatformDependent.UNSAFE -> Platform.
rxin dfe347d
[SPARK-9785] [SQL] HashPartitioning compatibility should consider exp…
JoshRosen bce7279
Fix comment error
zjffdu 8cad854
[SPARK-8345] [ML] Add an SQL node as a feature transformer
yanboliang dbd778d
[SPARK-8764] [ML] string indexer should take option to handle unseen …
holdenk 5b8bb1b
[SPARK-9572] [STREAMING] [PYSPARK] Added StreamingContext.getActiveOr…
tdas 5831294
[SPARK-9646] [SQL] Add metrics for all join and aggregate operators
zsxwing 520ad44
[SPARK-9750] [MLLIB] Improve equals on SparseMatrix and DenseMatrix
2a3be4d
[SPARK-7726] Add import so Scaladoc doesn't fail.
pwendell 00c0272
[SPARK-9814] [SQL] EqualNotNull not passing to data sources
HyukjinKwon f16bc68
[SPARK-9824] [CORE] Fix the issue that InternalAccumulator leaks Weak…
zsxwing 423cdfd
Closes #1290
mengxr be3e271
[SPARK-9788] [MLLIB] Fix LDA Binary Compatibility
017b5de
[SPARK-8925] [MLLIB] Add @since tags to mllib.util
sthota2014 736af95
[HOTFIX] Fix style error caused by 017b5de
5a5bbc2
[SPARK-9074] [LAUNCHER] Allow arbitrary Spark args to be set.
afa757c
[SPARK-9849] [SQL] DirectParquetOutputCommitter qualified name should…
rxin ca8f70e
[SPARK-9649] Fix flaky test MasterSuite again - disable REST
3ef0f32
[SPARK-1517] Refactor release scripts to facilitate nightly publishing
pwendell 74a293f
[SPARK-9713] [ML] Document SparkR MLlib glm() integration in Spark 1.5
ericl c3e9a12
[SPARK-9831] [SQL] fix serialization with empty broadcast
b1581ac
[SPARK-9854] [SQL] RuleExecutor.timeMap should be thread-safe
JoshRosen b85f9a2
[SPARK-8366] maxNumExecutorsNeeded should properly handle failed tasks
XuTingjun a807fcb
[SPARK-9806] [WEB UI] Don't share ReplayListenerBus between multiple …
4e3f4b9
[SPARK-9829] [WEBUI] Display the update value for peak execution memory
zsxwing bab8923
[SPARK-9426] [WEBUI] Job page DAG visualization is not shown
carsonwang 5c99d8b
[SPARK-8798] [MESOS] Allow additional uris to be fetched with mesos
tnachen 741a29f
[SPARK-9575] [MESOS] Add docuemntation around Mesos shuffle service.
tnachen 9d08224
[SPARK-9182] [SQL] Filters are not passed through to jdbc source
yjshen 3ecb379
[SPARK-9407] [SQL] Relaxes Parquet ValidTypeMap to allow ENUM predica…
liancheng 2e68066
[SPARK-8625] [CORE] Propagate user exceptions in tasks back to driver
tomwhite be5d191
[SPARK-9795] Dynamic allocation: avoid double counting when killing s…
66d87c1
[SPARK-7583] [MLLIB] User guide update for RegexTokenizer
hhbyyh e011079
[SPARK-9747] [SQL] Avoid starving an unsafe operator in aggregation
57ec27d
[SPARK-9804] [HIVE] Use correct value for isSrcLocal parameter.
70fe558
[SPARK-9847] [ML] Modified copyValues to distinguish between default,…
jkbradley 60103ec
[SPARK-9726] [PYTHON] PySpark DF join no longer accepts on=None
btashton 762bacc
[SPARK-9766] [ML] [PySpark] check and add miss docs for PySpark ML
yanboliang 551def5
[SPARK-9789] [ML] Added logreg threshold param back
jkbradley 6f60298
[SPARK-8967] [DOC] add Since annotation
mengxr a17384f
[SPARK-9907] [SQL] Python crc32 is mistakenly calling md5
rxin 738f353
[SPARK-9092] Fixed incompatibility when both num-executors and dynami…
ab7e721
[SPARK-9826] [CORE] Fix cannot use custom classes in log4j.properties
michellemay 7035d88
[SPARK-9894] [SQL] Json writer should handle MapData.
yhuai caa14d9
[SPARK-9913] [MLLIB] LDAUtils should be private
mengxr 6e409bc
[SPARK-9909] [ML] [TRIVIAL] move weightCol to shared params
holdenk e6aef55
[SPARK-9912] [MLLIB] QRDecomposition should use QType and RType for t…
mengxr fc1c7fd
[SPARK-9915] [ML] stopWords should use StringArrayParam
mengxr 660e6dc
[SPARK-9449] [SQL] Include MetastoreRelation's inputFiles
marmbrus 8ce6096
[SPARK-9780] [STREAMING] [KAFKA] prevent NPE if KafkaRDD instantiation …
koeninger 0d1d146
[SPARK-9724] [WEB UI] Avoid unnecessary redirects in the Spark Web UI.
f4bc01f
[SPARK-9855] [SPARKR] Add expression functions into SparkR whose para…
yu-iskw 7b13ed2
[SPARK-9870] Disable driver UI and Master REST server in SparkSubmitS…
JoshRosen 7c35746
[SPARK-9827] [SQL] fix fd leak in UnsafeRowSerializer
4413d08
[SPARK-9908] [SQL] When spark.sql.tungsten.enabled is false, broadcas…
yhuai d2d5e7f
[SPARK-9704] [ML] Made ProbabilisticClassifier, Identifiable, VectorU…
jkbradley d7053be
[SPARK-9903] [MLLIB] skip local processing in PrefixSpan if there are…
mengxr 2fb4901
[SPARK-9916] [BUILD] [SPARKR] removed left-over sparkr.zip copy/creat…
brkyvz 2278219
[SPARK-9920] [SQL] The simpleString of TungstenAggregate does not sho…
yhuai a8ab263
[SPARK-9832] [SQL] add a thread-safe lookup for BytesToBytseMap
5fc058a
[SPARK-9917] [ML] add getMin/getMax and doc for originalMin/origianlM…
mengxr df54389
[SPARK-8922] [DOCUMENTATION, MLLIB] Add @since tags to mllib.evaluation
mosessky d7eb371
[SPARK-9914] [ML] define setters explicitly for Java and use setParam…
mengxr d0b1891
[SPARK-9927] [SQL] Revert 8049 since it's pushing wrong filter down
yjshen 68f9957
[SPARK-9918] [MLLIB] remove runs from k-means and rename epsilon to tol
mengxr 84a2791
[SPARK-9885] [SQL] Also pass barrierPrefixes and sharedPrefixes to Is…
yhuai 6993031
[SPARK-9757] [SQL] Fixes persistence of Parquet relation with decimal…
liancheng 2932e25
[SPARK-9073] [ML] spark.ml Models copy() should call setParent when t…
Lewuathe 7a539ef
[SPARK-8965] [DOCS] Add ml-guide Python Example: Estimator, Transform…
Rosstin 4b70798
[MINOR] [ML] change MultilayerPerceptronClassifierModel to Multilayer…
yanboliang 65fec79
[MINOR] [DOC] fix mllib pydoc warnings
mengxr 8815ba2
[SPARK-9649] Fix MasterSuite, third time's a charm
864de8e
[SPARK-9661] [MLLIB] [ML] Java compatibility
MechCoder a8d2f4c
[SPARK-9942] [PYSPARK] [SQL] ignore exceptions while try to import pa…
c2520f5
[SPARK-9935] [SQL] EqualNotNull not processed in ORC
HyukjinKwon 6c5858b
[SPARK-9922] [ML] rename StringIndexerReverse to IndexToString
mengxr 17c3f3d
Using ExternalList[_] in KryoSerializer. Clean up SpillableCollection…
mccheah 3d066fc
Fixing unit test
mccheah 083f9e2
Merge branch 'master' into external-group-by
mccheah 4c05110
Fix a whole ton of Scalastyle errors
mccheah 8f5d5e3
Continuing to sanitize unit tests
mccheah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
core/src/main/scala/org/apache/spark/ExecutorCleaner.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.spark | ||
|
|
||
| import java.io.File | ||
|
|
||
| import org.apache.spark.util.cleanup.{CleanupTask, CleanExternalList} | ||
| import org.apache.spark.util.collection.ExternalList | ||
|
|
||
| /** | ||
| * Asynchronous cleaner for objects created on the Executor. So far | ||
| * only supports cleaning up ExternalList objects. Equivalent to ContextCleaner | ||
| * but for objects on the Executor heap. | ||
| */ | ||
| private[spark] class ExecutorCleaner extends WeakReferenceCleaner { | ||
|
|
||
| def registerExternalListForCleanup(list: ExternalList[_]): Unit = { | ||
| registerForCleanup(list, CleanExternalList(list.getBackingFileLocations())) | ||
| } | ||
|
|
||
| def doCleanExternalList(paths: Iterable[String]): Unit = { | ||
| paths.map(path => new File(path)).foreach(f => { | ||
| if (f.exists()) f.delete() | ||
| }) | ||
| } | ||
|
|
||
| override protected def handleCleanupForSpecificTask(task: CleanupTask): Unit = { | ||
| task match { | ||
| case CleanExternalList(paths) => doCleanExternalList(paths) | ||
| case unknown => logWarning(s"Got cleanup task that cannot be handled by ExecutorCleaner: $unknown") | ||
| } | ||
| } | ||
|
|
||
| override protected def cleanupThreadName(): String = "Executor Cleaner" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
core/src/main/scala/org/apache/spark/WeakReferenceCleaner.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.spark | ||
|
|
||
| import java.lang.ref.ReferenceQueue | ||
|
|
||
| import scala.collection.mutable.{ArrayBuffer, SynchronizedBuffer} | ||
|
|
||
| import org.apache.spark.util.cleanup.{CleanupTask, CleanupTaskWeakReference} | ||
|
|
||
| /** | ||
| * Utility trait that keeps a long running thread for cleaning up weak references | ||
| * after they are GCed. Currently implemented by ContextCleaner and ExecutorCleaner | ||
| * only. | ||
| */ | ||
| private[spark] trait WeakReferenceCleaner extends Logging { | ||
|
|
||
| private val referenceBuffer = new ArrayBuffer[CleanupTaskWeakReference] | ||
| with SynchronizedBuffer[CleanupTaskWeakReference] | ||
|
|
||
| private val referenceQueue = new ReferenceQueue[AnyRef] | ||
|
|
||
| private val cleaningThread = new Thread() { override def run() { keepCleaning() }} | ||
|
|
||
| private var stopped = false | ||
|
|
||
| /** Start the cleaner. */ | ||
| def start(): Unit = { | ||
| cleaningThread.setDaemon(true) | ||
| cleaningThread.setName(cleanupThreadName()) | ||
| cleaningThread.start() | ||
| } | ||
|
|
||
| def stop(): Unit = { | ||
| stopped = true | ||
| synchronized { | ||
| // Interrupt the cleaning thread, but wait until the current task has finished before | ||
| // doing so. This guards against the race condition where a cleaning thread may | ||
| // potentially clean similarly named variables created by a different SparkContext, | ||
| // resulting in otherwise inexplicable block-not-found exceptions (SPARK-6132). | ||
| cleaningThread.interrupt() | ||
| } | ||
| cleaningThread.join() | ||
| } | ||
|
|
||
| protected def keepCleaning(): Unit = { | ||
| while (!stopped) { | ||
| try { | ||
| val reference = Option(referenceQueue.remove(WeakReferenceCleaner.REF_QUEUE_POLL_TIMEOUT)) | ||
| .map(_.asInstanceOf[CleanupTaskWeakReference]) | ||
| // Synchronize here to avoid being interrupted on stop() | ||
| synchronized { | ||
| reference.map(_.task).foreach { task => | ||
| logDebug("Got cleaning task " + task) | ||
| referenceBuffer -= reference.get | ||
| handleCleanupForSpecificTask(task) | ||
| } | ||
| } | ||
| } catch { | ||
| case ie: InterruptedException if stopped => // ignore | ||
| case e: Exception => logError("Error in cleaning thread", e) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| /** Register an object for cleanup. */ | ||
| protected def registerForCleanup(objectForCleanup: AnyRef, task: CleanupTask): Unit = { | ||
| referenceBuffer += new CleanupTaskWeakReference(task, objectForCleanup, referenceQueue) | ||
| } | ||
|
|
||
| protected def handleCleanupForSpecificTask(task: CleanupTask) | ||
| protected def cleanupThreadName(): String | ||
| } | ||
|
|
||
| private object WeakReferenceCleaner { | ||
| private val REF_QUEUE_POLL_TIMEOUT = 100 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ import org.apache.spark.mapreduce.SparkHadoopMapReduceUtil | |
| import org.apache.spark.partial.{BoundedDouble, PartialResult} | ||
| import org.apache.spark.serializer.Serializer | ||
| import org.apache.spark.util.{SerializableConfiguration, Utils} | ||
| import org.apache.spark.util.collection.CompactBuffer | ||
| import org.apache.spark.util.collection.{ExternalSorter, ExternalList, SizeTrackingCompactBuffer, CompactBuffer} | ||
| import org.apache.spark.util.random.StratifiedSamplingUtils | ||
|
|
||
| /** | ||
|
|
@@ -463,12 +463,25 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)]) | |
| // groupByKey shouldn't use map side combine because map side combine does not | ||
| // reduce the amount of data shuffled and requires all map side data be inserted | ||
| // into a hash table, leading to more objects in the old gen. | ||
| val createCombiner = (v: V) => CompactBuffer(v) | ||
| val mergeValue = (buf: CompactBuffer[V], v: V) => buf += v | ||
| val mergeCombiners = (c1: CompactBuffer[V], c2: CompactBuffer[V]) => c1 ++= c2 | ||
| val bufs = combineByKey[CompactBuffer[V]]( | ||
| createCombiner, mergeValue, mergeCombiners, partitioner, mapSideCombine = false) | ||
| bufs.asInstanceOf[RDD[(K, Iterable[V])]] | ||
| val createCombiner = (v: V) => ExternalList(v) | ||
| val mergeValue = (buf: ExternalList[V], v: V) => buf += v | ||
| val mergeCombiners = (c1: ExternalList[V], c2: ExternalList[V]) => { | ||
| c2.foreach(c => c1 += c) | ||
| c1 | ||
| } | ||
| val aggregator = new Aggregator[K, V, ExternalList[V]](createCombiner, mergeValue, mergeCombiners) | ||
| val shuffledRdd = if (self.partitioner != partitioner) { | ||
| self.partitionBy(partitioner) | ||
| } else { | ||
| self | ||
| } | ||
| def groupOnPartition(iterator: Iterator[(K, V)]): Iterator[(K, Iterable[V])] = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why aren't we using combineByKey like the old implementation? |
||
| val sorter = new ExternalSorter[K, V, ExternalList[V]](aggregator = Some(aggregator)) | ||
| sorter.insertAll(iterator) | ||
| sorter.iterator.map(keyAndGroup => (keyAndGroup._1, keyAndGroup._2.asInstanceOf[Iterable[V]])) | ||
| } | ||
|
|
||
| shuffledRdd.mapPartitions(groupOnPartition(_), preservesPartitioning = true) | ||
| } | ||
|
|
||
| /** | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this is frowned upon, because foreach could possibly implemented in a parallel way, leading to concurrency issues if c1 isn't thread safe. I think in this case, we should be fine because c2 is not a parallel collection but just flagging the pattern.
I think you can do this instead
http://www.scala-lang.org/api/current/index.html#scala.collection.generic.Growable@++=(xs:scala.collection.TraversableOnce[A]):Growable.this.type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to define ++= on ExternalList to do this. Which is doable, just it wasn't done.