You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by yi...@apache.org on 2025/10/12 06:55:39 UTC
(texera) 02/02: fix: relocate file-service
This is an automated email from the ASF dual-hosted git repository.
yiconghuang pushed a commit to branch chore/relocate-file-service
in repository https://gitbox.apache.org/repos/asf/texera.git
commit a806a0bcc11b514a605245ac725dbeb9b8cf6da1
Author: Yicong Huang <17...@users.noreply.github.com>
AuthorDate: Sat Oct 11 23:55:06 2025 -0700
fix: relocate file-service
---
.../src/main/scala/org/apache/amber/util/PathUtils.scala | 2 --
.../main/scala/org/apache/texera/service/FileService.scala | 13 ++++++-------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/core/config/src/main/scala/org/apache/amber/util/PathUtils.scala b/core/config/src/main/scala/org/apache/amber/util/PathUtils.scala
index 0cbf40ec3b..3b71848961 100644
--- a/core/config/src/main/scala/org/apache/amber/util/PathUtils.scala
+++ b/core/config/src/main/scala/org/apache/amber/util/PathUtils.scala
@@ -54,8 +54,6 @@ object PathUtils {
}
}
- lazy val fileServicePath: Path = corePath.resolve("file-service")
-
lazy val configServicePath: Path = corePath.resolve("config-service")
lazy val accessControlServicePath: Path = corePath.resolve("access-control-service")
diff --git a/file-service/src/main/scala/org/apache/texera/service/FileService.scala b/file-service/src/main/scala/org/apache/texera/service/FileService.scala
index ab6a5c2386..c55f200e7c 100644
--- a/file-service/src/main/scala/org/apache/texera/service/FileService.scala
+++ b/file-service/src/main/scala/org/apache/texera/service/FileService.scala
@@ -27,19 +27,16 @@ import io.dropwizard.core.Application
import io.dropwizard.core.setup.{Bootstrap, Environment}
import org.apache.amber.config.StorageConfig
import org.apache.amber.core.storage.util.LakeFSStorageClient
-import org.apache.amber.util.PathUtils.fileServicePath
import org.apache.texera.auth.{JwtAuthFilter, SessionUser}
import org.apache.texera.dao.SqlServer
import org.apache.texera.service.`type`.DatasetFileNode
import org.apache.texera.service.`type`.serde.DatasetFileNodeSerializer
-import org.apache.texera.service.resource.{
- DatasetAccessResource,
- DatasetResource,
- HealthCheckResource
-}
+import org.apache.texera.service.resource.{DatasetAccessResource, DatasetResource, HealthCheckResource}
import org.apache.texera.service.util.S3StorageClient
import org.eclipse.jetty.server.session.SessionHandler
+import java.nio.file.Path
+
class FileService extends Application[FileServiceConfiguration] with LazyLogging {
override def initialize(bootstrap: Bootstrap[FileServiceConfiguration]): Unit = {
// Register Scala module to Dropwizard default object mapper
@@ -86,7 +83,9 @@ class FileService extends Application[FileServiceConfiguration] with LazyLogging
object FileService {
def main(args: Array[String]): Unit = {
// Set the configuration file's path
- val configFilePath = fileServicePath
+ val configFilePath = Path
+ .of(sys.env.getOrElse("TEXERA_HOME", "."))
+ .resolve("file-service")
.resolve("src")
.resolve("main")
.resolve("resources")