Skip to content

Commit

Permalink
modify as review
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjiafu committed Nov 29, 2023
1 parent 3f18a3e commit 995c82e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Expand Up @@ -20,7 +20,6 @@ package org.apache.spark.sql.execution.streaming
import java.io.{FileNotFoundException, InputStream, IOException, OutputStream}
import java.nio.charset.StandardCharsets.UTF_8

import scala.annotation.nowarn
import scala.io.{Source => IOSource}
import scala.reflect.ClassTag

Expand Down Expand Up @@ -53,7 +52,7 @@ abstract class CompactibleFileStreamLog[T <: AnyRef : ClassTag](
private implicit val formats: Formats = Serialization.formats(NoTypeHints)

/** Needed to serialize type T into JSON when using Jackson */
@nowarn
@scala.annotation.nowarn
private implicit val manifest = Manifest.classType[T](implicitly[ClassTag[T]].runtimeClass)

protected val minBatchesToRetain = sparkSession.sessionState.conf.minBatchesToRetain
Expand Down
Expand Up @@ -33,8 +33,8 @@ class FileStreamSourceLog(
path: String)
extends CompactibleFileStreamLog[FileEntry](metadataLogVersion, sparkSession, path) {

import org.apache.spark.sql.execution.streaming.CompactibleFileStreamLog._
import org.apache.spark.sql.execution.streaming.FileStreamSourceLog._
import CompactibleFileStreamLog._
import FileStreamSourceLog._

// Configurations about metadata compaction
protected override val defaultCompactInterval: Int =
Expand Down
Expand Up @@ -21,7 +21,6 @@ import java.io._
import java.nio.charset.StandardCharsets
import java.util.{Collections, LinkedHashMap => JLinkedHashMap}

import scala.annotation.nowarn
import scala.jdk.CollectionConverters._
import scala.reflect.ClassTag

Expand Down Expand Up @@ -54,7 +53,7 @@ class HDFSMetadataLog[T <: AnyRef : ClassTag](sparkSession: SparkSession, path:
private implicit val formats: Formats = Serialization.formats(NoTypeHints)

/** Needed to serialize type T into JSON when using Jackson */
@nowarn
@scala.annotation.nowarn
private implicit val manifest = Manifest.classType[T](implicitly[ClassTag[T]].runtimeClass)

// Avoid serializing generic sequences, see SPARK-17372
Expand Down
Expand Up @@ -20,7 +20,6 @@ package org.apache.spark.sql.execution.streaming.state
import java.io.{BufferedReader, InputStreamReader}
import java.nio.charset.StandardCharsets

import scala.annotation.nowarn
import scala.reflect.ClassTag

import org.apache.hadoop.conf.Configuration
Expand Down Expand Up @@ -67,7 +66,7 @@ object OperatorStateMetadataV1 {

private implicit val formats: Formats = Serialization.formats(NoTypeHints)

@nowarn
@scala.annotation.nowarn
private implicit val manifest = Manifest
.classType[OperatorStateMetadataV1](implicitly[ClassTag[OperatorStateMetadataV1]].runtimeClass)

Expand Down

0 comments on commit 995c82e

Please sign in to comment.