Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
f4a9e1b9
Commit
f4a9e1b9
authored
12 years ago
by
Reynold Xin
Browse files
Options
Downloads
Patches
Plain Diff
Fixed the broken Java unit test from SPARK-635.
parent
05e225f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/test/scala/spark/JavaAPISuite.java
+9
-7
9 additions, 7 deletions
core/src/test/scala/spark/JavaAPISuite.java
with
9 additions
and
7 deletions
core/src/test/scala/spark/JavaAPISuite.java
+
9
−
7
View file @
f4a9e1b9
package
spark
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.Serializable
;
import
java.util.*
;
import
scala.Tuple2
;
import
com.google.common.base.Charsets
;
import
com.google.common.io.Files
;
import
org.apache.hadoop.io.IntWritable
;
...
...
@@ -12,8 +19,6 @@ import org.junit.Assert;
import
org.junit.Before
;
import
org.junit.Test
;
import
scala.Tuple2
;
import
spark.api.java.JavaDoubleRDD
;
import
spark.api.java.JavaPairRDD
;
import
spark.api.java.JavaRDD
;
...
...
@@ -24,10 +29,6 @@ import spark.partial.PartialResult;
import
spark.storage.StorageLevel
;
import
spark.util.StatCounter
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.Serializable
;
import
java.util.*
;
// The test suite itself is Serializable so that anonymous Function implementations can be
// serialized, as an alternative to converting these anonymous classes to static inner classes;
...
...
@@ -383,7 +384,8 @@ public class JavaAPISuite implements Serializable {
@Test
public
void
iterator
()
{
JavaRDD
<
Integer
>
rdd
=
sc
.
parallelize
(
Arrays
.
asList
(
1
,
2
,
3
,
4
,
5
),
2
);
Assert
.
assertEquals
(
1
,
rdd
.
iterator
(
rdd
.
splits
().
get
(
0
)).
next
().
intValue
());
TaskContext
context
=
new
TaskContext
(
0
,
0
,
0
);
Assert
.
assertEquals
(
1
,
rdd
.
iterator
(
rdd
.
splits
().
get
(
0
),
context
).
next
().
intValue
());
}
@Test
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment