cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Autoloader: How to identify the backlog in RocksDB

brickster_2018
Databricks Employee
Databricks Employee

With S3-SQS it was easier to identify the backlog ( the messages that are fetched from SQS and not consumed by the streaming job)

How to find the same with Auto-loader

1 ACCEPTED SOLUTION

Accepted Solutions

brickster_2018
Databricks Employee
Databricks Employee

For DBR 8.2 or later, the backlog details are captured in the Streaming metrics

Eg:

image (11)

View solution in original post

2 REPLIES 2

brickster_2018
Databricks Employee
Databricks Employee

For DBR versions prior to 8.2 use the below code snippet:

import org.rocksdb.Options
import org.apache.hadoop.fs.Path
import com.databricks.sql.rocksdb.{CloudRocksDB, PutLogEntry}
val rocksdbPath: String = new Path("/tmp/hari/streaming/auto_loader2/sources/0/", "rocksdb").toString
val rocksDBOptions = new Options()
  rocksDBOptions
    .setCreateIfMissing(true)
    .setMaxTotalWalSize(Long.MaxValue)
    .setWalTtlSeconds(Long.MaxValue)
    .setWalSizeLimitMB(Long.MaxValue)
val rocksDB = CloudRocksDB.open(
    rocksdbPath,
    hadoopConf = spark.sessionState.newHadoopConf(),
    dbOptions = rocksDBOptions,
    opTypePrefix = "autoIngest")
println("Latest offset in RocksDB:" + rocksDB.latestDurableSequenceNumber) 
println("Number of files to be processed " + rocksDB.latestDurableSequenceNumber - latestSeqFromQueryProgression)

brickster_2018
Databricks Employee
Databricks Employee

For DBR 8.2 or later, the backlog details are captured in the Streaming metrics

Eg:

image (11)

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group