Skip to content

Commit

Permalink
GEOMESA-3402 CLI - Fix required Hadoop dependency (#3214)
Browse files Browse the repository at this point in the history
  • Loading branch information
elahrvivaz authored Oct 10, 2024
1 parent daa465e commit d8b5150
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ object PathUtils extends FileSystemDelegate with LazyLogging {

// delegate allows us to avoid a runtime dependency on hadoop
private val hadoopDelegate: FileSystemDelegate =
Try(Class.forName("org.locationtech.geomesa.utils.hadoop.HadoopDelegate").newInstance())
.getOrElse(null)
.asInstanceOf[FileSystemDelegate]
try {
Class.forName("org.locationtech.geomesa.utils.hadoop.HadoopDelegate")
.getDeclaredConstructor().newInstance().asInstanceOf[FileSystemDelegate]
} catch {
case _: Throwable => null
}

override def interpretPath(path: String): Seq[FileHandle] = chooseDelegate(path).interpretPath(path)

Expand Down

0 comments on commit d8b5150

Please sign in to comment.