Skip to content

Commit 797e758

Browse files
Maciej Brynskisrowen
Maciej Brynski
authored andcommitted
[SPARK-15541] Casting ConcurrentHashMap to ConcurrentMap (branch-1.6)
## What changes were proposed in this pull request? Casting ConcurrentHashMap to ConcurrentMap allows to run code compiled with Java 8 on Java 7 ## How was this patch tested? Compilation. Existing automatic tests Author: Maciej Brynski <maciej.brynski@adpilot.pl> Closes #14390 from maver1ck/spark-15541.
1 parent 8a22275 commit 797e758

File tree

1 file changed

+3
-2
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis

1 file changed

+3
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Catalog.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark.sql.catalyst.analysis
1919

20-
import java.util.concurrent.ConcurrentHashMap
20+
import java.util.concurrent.{ConcurrentHashMap, ConcurrentMap}
2121

2222
import scala.collection.JavaConverters._
2323
import scala.collection.mutable
@@ -80,7 +80,8 @@ trait Catalog {
8080
}
8181

8282
class SimpleCatalog(val conf: CatalystConf) extends Catalog {
83-
private[this] val tables = new ConcurrentHashMap[String, LogicalPlan]
83+
private[this] val tables: ConcurrentMap[String, LogicalPlan] =
84+
new ConcurrentHashMap[String, LogicalPlan]
8485

8586
override def registerTable(tableIdent: TableIdentifier, plan: LogicalPlan): Unit = {
8687
tables.put(getTableName(tableIdent), plan)

0 commit comments

Comments
 (0)