Search in sources :

Example 1 with SparkEnv

use of org.apache.spark.SparkEnv in project beam by apache.

the class GlobalWatermarkHolder method clear.

@VisibleForTesting
public static synchronized void clear() {
    sourceTimes.clear();
    lastWatermarkedBatchTime = 0;
    writeLocalWatermarkCopy(null);
    final SparkEnv sparkEnv = SparkEnv.get();
    if (sparkEnv != null) {
        final BlockManager blockManager = sparkEnv.blockManager();
        blockManager.removeBlock(WATERMARKS_BLOCK_ID, true);
    }
}
Also used : BlockManager(org.apache.spark.storage.BlockManager) SparkEnv(org.apache.spark.SparkEnv) VisibleForTesting(org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting)

Aggregations

VisibleForTesting (org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting)1 SparkEnv (org.apache.spark.SparkEnv)1 BlockManager (org.apache.spark.storage.BlockManager)1