Skip to content

Commit

Permalink
[KYUUBI apache#1652] Remove unused util methods
Browse files Browse the repository at this point in the history
  • Loading branch information
link3280 committed Mar 25, 2023
1 parent dfd2777 commit 00f036b
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ package org.apache.kyuubi.engine.flink

import java.io.File
import java.net.URL
import java.nio.file.Paths

import scala.collection.JavaConverters._

import org.apache.commons.cli.{CommandLine, DefaultParser, Option, Options, ParseException}
import org.apache.flink.configuration.{Configuration, GlobalConfiguration}
import org.apache.flink.core.fs.Path
import org.apache.flink.runtime.util.EnvironmentInformation
import org.apache.flink.table.client.SqlClientException
Expand Down Expand Up @@ -133,19 +131,4 @@ object FlinkEngineUtils extends Logging {
}).toList
} else null
}

def loadFlinkConfFromHome(): Configuration = {
val flinkConfDir = sys.env.getOrElse(
"FLINK_CONF_DIR", {
val flinkHome = sys.env.getOrElse(
"FLINK_HOME", {
// detect the FLINK_HOME by flink-core*.jar location if unset
val jarLoc =
classOf[GlobalConfiguration].getProtectionDomain.getCodeSource.getLocation
new File(jarLoc.toURI).getParentFile.getParent
})
Paths.get(flinkHome, "conf").toString
})
GlobalConfiguration.loadConfiguration(flinkConfDir)
}
}

0 comments on commit 00f036b

Please sign in to comment.