Skip to content

Commit

Permalink
[SQL] Lock metastore client in analyzeTable
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus authored and yhuai committed Apr 2, 2015
1 parent 7667030 commit 59c884f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
val tableFullName =
relation.hiveQlTable.getDbName + "." + relation.hiveQlTable.getTableName

catalog.client.alterTable(tableFullName, new Table(hiveTTable))
catalog.synchronized {
catalog.client.alterTable(tableFullName, new Table(hiveTTable))
}
}
case otherRelation =>
throw new NotImplementedError(
Expand Down

0 comments on commit 59c884f

Please sign in to comment.