Skip to content

Commit d59c89c

Browse files
littlegrasscaoSun Cao
and
Sun Cao
authored
Cherry pick pre-signed url cache PRs into branch-1.3 (#722)
* Enhance Pre-signed URL Cache with QuerySpecificTableCache Registration and Refresh (#708) * [DTS-5291] Modify pre-signed url cache to store all refreshers for identical queries * Adding tests * update comments * address comments * address comments * address comments * adding compute --------- Co-authored-by: Sun Cao <sun.cao+data@databricks.com> * Handle race condition between a refresh thread and register threads (#719) * Handle race condition between refresh thread and register thread * fix compile * update format * address comment --------- Co-authored-by: Sun Cao <sun.cao+data@databricks.com> --------- Co-authored-by: Sun Cao <sun.cao+data@databricks.com>
1 parent 137ba36 commit d59c89c

File tree

3 files changed

+985
-74
lines changed

3 files changed

+985
-74
lines changed

client/src/main/scala/io/delta/sharing/client/DeltaSharingProfileProvider.scala

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode
2626
import org.apache.commons.io.IOUtils
2727
import org.apache.hadoop.conf.Configuration
2828
import org.apache.hadoop.fs.Path
29-
import org.apache.spark.delta.sharing.TableRefreshResult
29+
import org.apache.spark.delta.sharing.{QuerySpecificCachedTable, TableRefreshResult}
3030

31-
import io.delta.sharing.client.DeltaSharingProfile.{validateNotNullAndEmpty, BEARER_TOKEN,
32-
OAUTH_CLIENT_CREDENTIALS}
31+
import io.delta.sharing.client.DeltaSharingProfile.{validateNotNullAndEmpty, BEARER_TOKEN, OAUTH_CLIENT_CREDENTIALS}
3332
import io.delta.sharing.client.util.JsonUtils
3433

3534
@JsonDeserialize(using = classOf[DeltaSharingProfileDeserializer])
@@ -174,6 +173,15 @@ trait DeltaSharingProfileProvider {
174173
refresher: Option[String] => TableRefreshResult): Option[String] => TableRefreshResult = {
175174
refresher
176175
}
176+
177+
// Returns an optional query identifier, which can be used to associate query-specific
178+
// refreshers with a table. This is useful for managing refreshers in scenarios where
179+
// multiple queries interact with the same table.
180+
def getCustomQueryId(): Option[String] = { None }
181+
182+
// Returns an optional refresher wrapper containing the server states required to execute
183+
// a refresh function.
184+
def getCustomRefresherWrapper(): Option[QuerySpecificCachedTable.RefresherWrapper] = { None }
177185
}
178186

179187
/**

0 commit comments

Comments
 (0)