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
929dfa24
Commit
929dfa24
authored
9 years ago
by
Andrew Or
Browse files
Options
Downloads
Patches
Plain Diff
Revert "[SPARK-8781] Fix variables in published pom.xml are not resolved"
This reverts commit
82cf3315
. Conflicts: pom.xml
parent
9eae5fa6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
extras/kinesis-asl/pom.xml
+7
-0
7 additions, 0 deletions
extras/kinesis-asl/pom.xml
extras/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisReceiverSuite.scala
+8
-12
8 additions, 12 deletions
...apache/spark/streaming/kinesis/KinesisReceiverSuite.scala
with
15 additions
and
12 deletions
extras/kinesis-asl/pom.xml
+
7
−
0
View file @
929dfa24
...
@@ -40,6 +40,13 @@
...
@@ -40,6 +40,13 @@
<artifactId>
spark-streaming_${scala.binary.version}
</artifactId>
<artifactId>
spark-streaming_${scala.binary.version}
</artifactId>
<version>
${project.version}
</version>
<version>
${project.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.spark
</groupId>
<artifactId>
spark-core_${scala.binary.version}
</artifactId>
<version>
${project.version}
</version>
<type>
test-jar
</type>
<scope>
test
</scope>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.spark
</groupId>
<groupId>
org.apache.spark
</groupId>
<artifactId>
spark-streaming_${scala.binary.version}
</artifactId>
<artifactId>
spark-streaming_${scala.binary.version}
</artifactId>
...
...
This diff is collapsed.
Click to expand it.
extras/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisReceiverSuite.scala
+
8
−
12
View file @
929dfa24
...
@@ -26,23 +26,18 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn
...
@@ -26,23 +26,18 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn
import
com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason
import
com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason
import
com.amazonaws.services.kinesis.model.Record
import
com.amazonaws.services.kinesis.model.Record
import
org.mockito.Mockito._
import
org.mockito.Mockito._
// scalastyle:off
import
org.scalatest.
{
BeforeAndAfter
,
Matchers
}
// To avoid introducing a dependency on Spark core tests, simply use scalatest's FunSuite
// here instead of our own SparkFunSuite. Introducing the dependency has caused problems
// in the past (SPARK-8781) that are complicated by bugs in the maven shade plugin (MSHADE-148).
import
org.scalatest.
{
BeforeAndAfter
,
FunSuite
,
Matchers
}
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.mock.MockitoSugar
import
org.apache.spark.storage.StorageLevel
import
org.apache.spark.storage.StorageLevel
import
org.apache.spark.streaming.
{
Milliseconds
,
Seconds
,
StreamingContext
}
import
org.apache.spark.streaming.
{
Milliseconds
,
Seconds
,
StreamingContext
,
TestSuiteBase
}
import
org.apache.spark.util.
{
Clock
,
ManualClock
,
Utils
}
import
org.apache.spark.util.
{
Clock
,
ManualClock
,
Utils
}
/**
/**
* Suite of Kinesis streaming receiver tests focusing mostly on the KinesisRecordProcessor
* Suite of Kinesis streaming receiver tests focusing mostly on the KinesisRecordProcessor
*/
*/
class
KinesisReceiverSuite
extends
FunSuite
with
Matchers
with
BeforeAndAfter
class
KinesisReceiverSuite
extends
TestSuiteBase
with
Matchers
with
BeforeAndAfter
with
MockitoSugar
{
with
MockitoSugar
{
// scalastyle:on
val
app
=
"TestKinesisReceiver"
val
app
=
"TestKinesisReceiver"
val
stream
=
"mySparkStream"
val
stream
=
"mySparkStream"
...
@@ -62,7 +57,7 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
...
@@ -62,7 +57,7 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
var
checkpointStateMock
:
KinesisCheckpointState
=
_
var
checkpointStateMock
:
KinesisCheckpointState
=
_
var
currentClockMock
:
Clock
=
_
var
currentClockMock
:
Clock
=
_
before
{
override
def
beforeFunction
()
:
Unit
=
{
receiverMock
=
mock
[
KinesisReceiver
]
receiverMock
=
mock
[
KinesisReceiver
]
checkpointerMock
=
mock
[
IRecordProcessorCheckpointer
]
checkpointerMock
=
mock
[
IRecordProcessorCheckpointer
]
checkpointClockMock
=
mock
[
ManualClock
]
checkpointClockMock
=
mock
[
ManualClock
]
...
@@ -70,7 +65,8 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
...
@@ -70,7 +65,8 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
currentClockMock
=
mock
[
Clock
]
currentClockMock
=
mock
[
Clock
]
}
}
after
{
override
def
afterFunction
()
:
Unit
=
{
super
.
afterFunction
()
// Since this suite was originally written using EasyMock, add this to preserve the old
// Since this suite was originally written using EasyMock, add this to preserve the old
// mocking semantics (see SPARK-5735 for more details)
// mocking semantics (see SPARK-5735 for more details)
verifyNoMoreInteractions
(
receiverMock
,
checkpointerMock
,
checkpointClockMock
,
verifyNoMoreInteractions
(
receiverMock
,
checkpointerMock
,
checkpointClockMock
,
...
@@ -78,7 +74,7 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
...
@@ -78,7 +74,7 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
}
}
test
(
"KinesisUtils API"
)
{
test
(
"KinesisUtils API"
)
{
val
ssc
=
new
StreamingContext
(
"local[2]"
,
getClass
.
getSimpleName
,
Seconds
(
1
)
)
val
ssc
=
new
StreamingContext
(
master
,
framework
,
batchDuration
)
// Tests the API, does not actually test data receiving
// Tests the API, does not actually test data receiving
val
kinesisStream1
=
KinesisUtils
.
createStream
(
ssc
,
"mySparkStream"
,
val
kinesisStream1
=
KinesisUtils
.
createStream
(
ssc
,
"mySparkStream"
,
"https://kinesis.us-west-2.amazonaws.com"
,
Seconds
(
2
),
"https://kinesis.us-west-2.amazonaws.com"
,
Seconds
(
2
),
...
...
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