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
ad5f579c
Commit
ad5f579c
authored
11 years ago
by
Patrick Wendell
Browse files
Options
Downloads
Patches
Plain Diff
Style fixes
parent
e5f6d569
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
streaming/src/test/java/org/apache/spark/streaming/JavaTestUtils.scala
+9
-9
9 additions, 9 deletions
.../test/java/org/apache/spark/streaming/JavaTestUtils.scala
with
9 additions
and
9 deletions
streaming/src/test/java/org/apache/spark/streaming/JavaTestUtils.scala
+
9
−
9
View file @
ad5f579c
...
...
@@ -33,9 +33,9 @@ trait JavaTestBase extends TestSuiteBase {
* The stream will be derived from the supplied lists of Java objects.
**/
def
attachTestInputStream
[
T
](
ssc
:
JavaStreamingContext
,
data
:
JList
[
JList
[
T
]],
numPartitions
:
Int
)
=
{
ssc
:
JavaStreamingContext
,
data
:
JList
[
JList
[
T
]],
numPartitions
:
Int
)
=
{
val
seqData
=
data
.
map
(
Seq
(
_:_
*
))
implicit
val
cm
:
ClassManifest
[
T
]
=
...
...
@@ -50,7 +50,7 @@ trait JavaTestBase extends TestSuiteBase {
* [[org.apache.spark.streaming.TestOutputStream]].
**/
def
attachTestOutputStream
[
T
,
This
<:
JavaDStreamLike
[
T
,
This
,
R
]
,
R
<:
JavaRDDLike
[
T
,
R
]](
dstream
:
JavaDStreamLike
[
T
,
This
,
R
])
=
dstream
:
JavaDStreamLike
[
T
,
This
,
R
])
=
{
implicit
val
cm
:
ClassManifest
[
T
]
=
implicitly
[
ClassManifest
[
AnyRef
]].
asInstanceOf
[
ClassManifest
[
T
]]
...
...
@@ -66,7 +66,7 @@ trait JavaTestBase extends TestSuiteBase {
* Returns a list of items for each RDD.
*/
def
runStreams
[
V
](
ssc
:
JavaStreamingContext
,
numBatches
:
Int
,
numExpectedOutput
:
Int
)
:
JList
[
JList
[
V
]]
=
{
ssc
:
JavaStreamingContext
,
numBatches
:
Int
,
numExpectedOutput
:
Int
)
:
JList
[
JList
[
V
]]
=
{
implicit
val
cm
:
ClassManifest
[
V
]
=
implicitly
[
ClassManifest
[
AnyRef
]].
asInstanceOf
[
ClassManifest
[
V
]]
val
res
=
runStreams
[
V
](
ssc
.
ssc
,
numBatches
,
numExpectedOutput
)
...
...
@@ -83,16 +83,16 @@ trait JavaTestBase extends TestSuiteBase {
* Returns a sequence of RDD's. Each RDD is represented as several sequences of items, each
* representing one partition.
*/
def
runStreamsWithPartitions
[
V
](
ssc
:
JavaStreamingContext
,
numBatches
:
Int
,
numExpectedOutput
:
Int
)
:
JList
[
JList
[
JList
[
V
]]]
=
{
def
runStreamsWithPartitions
[
V
](
ssc
:
JavaStreamingContext
,
numBatches
:
Int
,
numExpectedOutput
:
Int
)
:
JList
[
JList
[
JList
[
V
]]]
=
{
implicit
val
cm
:
ClassManifest
[
V
]
=
implicitly
[
ClassManifest
[
AnyRef
]].
asInstanceOf
[
ClassManifest
[
V
]]
val
res
=
runStreamsWithPartitions
[
V
](
ssc
.
ssc
,
numBatches
,
numExpectedOutput
)
val
out
=
new
ArrayList
[
JList
[
JList
[
V
]]]()
res
.
map
(
entry
=>
{
res
.
map
{
entry
=>
val
lists
=
entry
.
map
(
new
ArrayList
[
V
](
_
))
out
.
append
(
new
ArrayList
[
JList
[
V
]](
lists
))
}
)
}
out
}
}
...
...
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