Skip to content

Commit

Permalink
GEOMESA-3442 Accumulo - Fix spurious warnings when table creation is …
Browse files Browse the repository at this point in the history
…slow (#3268)
  • Loading branch information
elahrvivaz authored Jan 31, 2025
1 parent 6beee21 commit 9e427b3
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,17 @@ object TableManager {
tableCache.get(table, _ => {
withLock(tablePath(table), timeoutMillis, {
val tableOps = client.tableOperations()
while (!tableOps.exists(table)) {
if (!tableOps.exists(table)) {
try {
tableOps.create(table, new NewTableConfiguration().setTimeType(timeType))
created = true
} catch {
case _: TableExistsException => onTableExists(table)
}
val start = System.currentTimeMillis()
while (!tableOps.exists(table) && System.currentTimeMillis() - start < timeoutMillis) {
Thread.sleep(10)
}
}
})
java.lang.Boolean.FALSE
Expand All @@ -182,10 +186,14 @@ object TableManager {
nsCache.get(ns, _ => {
withLock(nsPath(ns), timeoutMillis, {
val nsOps = client.namespaceOperations
while (!nsOps.exists(ns)) {
if (!nsOps.exists(ns)) {
try { nsOps.create(ns) } catch {
case _: NamespaceExistsException => onNamespaceExists(ns)
}
val start = System.currentTimeMillis()
while (!nsOps.exists(ns) && System.currentTimeMillis() - start < timeoutMillis) {
Thread.sleep(10)
}
}
})
java.lang.Boolean.FALSE
Expand Down

0 comments on commit 9e427b3

Please sign in to comment.