@@ -36,7 +36,7 @@ import org.json4s._
3636import org .json4s .jackson .{JsonMethods , Serialization }
3737import sourcecode .Enclosing
3838
39- final class Py4JQueryDriver (backend : Backend ) extends Closeable {
39+ final class Py4JQueryDriver (backend : Backend ) extends Closeable with Logging {
4040
4141 private [this ] val flags : HailFeatureFlags = HailFeatureFlags .fromEnv()
4242 private [this ] val hcl = new HailClassLoader (getClass.getClassLoader)
@@ -77,7 +77,7 @@ final class Py4JQueryDriver(backend: Backend) extends Closeable {
7777 localTmpdir = tmp
7878 backend match {
7979 case s : SparkBackend if tmp != " file://" + s.sc.getConf.get(" spark.local.dir" , " " ) =>
80- log .warn(
80+ logger .warn(
8181 " Cannot modify Spark's local directory at runtime. " +
8282 " Please stop and re-initialize hail with 'spark.local.dir' " +
8383 " in your Spark configuration."
@@ -234,7 +234,7 @@ final class Py4JQueryDriver(backend: Backend) extends Closeable {
234234 def pyReadMultipleMatrixTables (jsonQuery : String ): util.List [MatrixIR ] =
235235 withExecuteContext(selfContainedExecution = false ) { ctx =>
236236 implicit val fmts : Formats = DefaultFormats
237- log .info(" pyReadMultipleMatrixTables: got query" )
237+ logger .info(" pyReadMultipleMatrixTables: got query" )
238238
239239 val kvs = JsonMethods .parse(jsonQuery).extract[Map [String , JValue ]]
240240 val paths = kvs(" paths" ).extract[IndexedSeq [String ]]
@@ -246,12 +246,12 @@ final class Py4JQueryDriver(backend: Backend) extends Closeable {
246246 val opts = NativeReaderOptions (intervalObjects, intervalPointType)
247247 val matrixReaders : util.List [MatrixIR ] =
248248 paths.map { p =>
249- log .info(s " creating MatrixRead node for $p" )
249+ logger .info(s " creating MatrixRead node for $p" )
250250 val mnr = MatrixNativeReader (ctx.fs, p, Some (opts))
251251 MatrixRead (mnr.fullMatrixTypeWithoutUIDs, false , false , mnr): MatrixIR
252252 }.asJava
253253
254- log .info(" pyReadMultipleMatrixTables: returning N matrix tables" )
254+ logger .info(" pyReadMultipleMatrixTables: returning N matrix tables" )
255255 matrixReaders
256256 }._1
257257
@@ -293,10 +293,10 @@ final class Py4JQueryDriver(backend: Backend) extends Closeable {
293293
294294 def pyGrepPrint (regex : String , files : Seq [String ], maxLines : Int ): Unit =
295295 fileAndLineCounts(regex, files, maxLines).foreach { case (file, lines) =>
296- info(s " $file: ${lines.length} ${plural(lines.length, " match" , " matches" )}: " )
296+ logger. info(s " $file: ${lines.length} ${plural(lines.length, " match" , " matches" )}: " )
297297 lines.map(_.value).foreach { line =>
298298 val (screen, logged) = line.truncatable().strings
299- log .info(" \t " + logged)
299+ logger .info(" \t " + logged)
300300 println(s " \t $screen" )
301301 }
302302 }
0 commit comments