Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit 83f96be

Browse files
committed
refresh branch from upstream
1 parent 4309f32 commit 83f96be

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ limitations under the License.
1919
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2020
<modelVersion>4.0.0</modelVersion>
2121
<groupId>com.microsoft.azure</groupId>
22-
<artifactId>azure-cosmosdb-spark_2.4.0_2.11</artifactId>
22+
<artifactId>azure-cosmosdb-spark_2.4.0_2.12</artifactId>
2323
<packaging>jar</packaging>
2424
<version>3.0.6</version>
2525
<name>${project.groupId}:${project.artifactId}</name>
@@ -32,8 +32,8 @@ limitations under the License.
3232
</license>
3333
</licenses>
3434
<properties>
35-
<scala.version>2.11.12</scala.version>
36-
<scala.binary.version>2.11</scala.binary.version>
35+
<scala.version>2.12.11</scala.version>
36+
<scala.binary.version>2.12</scala.binary.version>
3737
<sonar.projectBaseDir>azure-cosmosdb-spark</sonar.projectBaseDir>
3838
<scala.test.version>3.1.1</scala.test.version>
3939
<spark.version>2.4.4</spark.version>

src/main/scala/com/microsoft/azure/cosmosdb/spark/rdd/CosmosDBRDD.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ class CosmosDBRDD(
115115
case cosmosDBPartition: CosmosDBPartition =>
116116
logInfo(s"CosmosDBRDD:compute: Start CosmosDBRDD compute task for partition key range id ${cosmosDBPartition.partitionKeyRangeId}")
117117

118-
val taskCompletionListener:TaskCompletionListener = (ctx: TaskContext) => {
119-
logInfo(s"CosmosDBRDD:compute: CosmosDBRDD compute task completed for partition key range id ${cosmosDBPartition.partitionKeyRangeId}")
118+
val completionListener: TaskCompletionListener = new TaskCompletionListener() {
119+
override def onTaskCompletion(context: TaskContext): Unit =
120+
logInfo(s"CosmosDBRDD:compute: CosmosDBRDD compute task completed for partition key range id ${cosmosDBPartition.partitionKeyRangeId}")
120121
}
121-
context.addTaskCompletionListener(taskCompletionListener)
122+
context.addTaskCompletionListener(completionListener)
122123

123124
new CosmosDBRDDIterator(
124125
hadoopConfig,

src/main/scala/com/microsoft/azure/cosmosdb/spark/rdd/CosmosDBRDDIterator.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,13 @@ class CosmosDBRDDIterator(hadoopConfig: mutable.Map[String, String],
425425
})
426426

427427
// Register an on-task-completion callback to close the input stream.
428-
val taskCompletionListener: TaskCompletionListener = new TaskCompletionListener() {
429-
override def onTaskCompletion(context: TaskContext): Unit = closeIfNeeded()
428+
val taskCompletionListerner = new TaskCompletionListener() {
429+
override def onTaskCompletion(context: TaskContext): Unit = {
430+
closeIfNeeded()
431+
}
430432
}
431-
taskContext.addTaskCompletionListener(taskCompletionListener)
433+
434+
taskContext.addTaskCompletionListener(taskCompletionListerner)
432435

433436
if (!readingChangeFeed) {
434437
queryDocuments

0 commit comments

Comments
 (0)