jerryshao commented on code in PR #4005:
URL: https://github.com/apache/gravitino/pull/4005#discussion_r1672029988


##########
build.gradle.kts:
##########
@@ -580,6 +609,33 @@ tasks {
     destinationDirectory.set(projectDir.dir("distribution"))
   }
 
+  val assembleIcebergRESTServer by registering(Tar::class) {
+    dependsOn("iceberg-rest-server:copyLibs")
+    group = "gravitino distribution"
+    finalizedBy("checksumIcebergRESTServerDistribution")
+    into("${rootProject.name}-iceberg-rest-server-$version-bin")
+    from(copyIcebergRESTServer.map { it.outputs.files.single() })
+    compression = Compression.GZIP
+    
archiveFileName.set("${rootProject.name}-iceberg-rest-server-$version-bin.tar.gz")
+    destinationDirectory.set(projectDir.dir("distribution"))
+  }
+
+  register("checksumIcebergRESTServerDistribution") {
+    group = "gravitino distribution"
+    dependsOn(assembleIcebergRESTServer)
+    val archiveFile = assembleIcebergRESTServer.flatMap { it.archiveFile }
+    val checksumFile = archiveFile.map { archive ->
+      archive.asFile.let { it.resolveSibling("${it.name}.sha256") }
+    }
+    inputs.file(archiveFile)
+    outputs.file(checksumFile)
+    doLast {
+      checksumFile.get().writeText(
+        
serviceOf<ChecksumService>().sha256(archiveFile.get().asFile).toString()
+      )
+    }
+  }

Review Comment:
   Besides, I think `assembleDistribution` should also assemble an Iceberg rest 
 server package.



##########
build.gradle.kts:
##########
@@ -558,6 +564,29 @@ tasks {
     }
   }
 
+  val copyIcebergRESTServer by registering {
+    dependsOn("iceberg-rest-server:copyLibs")
+    group = "gravitino distribution"
+    
outputs.dir(projectDir.dir("distribution/package/extensions/iceberg-rest-server"))

Review Comment:
   Why do you put Iceberg rest server into the `extensions`, how do you use it?



##########
conf/gravitino.conf.template:
##########
@@ -63,9 +63,12 @@ gravitino.catalog.cache.evictionIntervalMs = 3600000
 # Auxiliary service names, separate by ','
 gravitino.auxService.names = iceberg-rest
 # Iceberg REST service classpath
-gravitino.auxService.iceberg-rest.classpath = catalogs/lakehouse-iceberg/libs, 
catalogs/lakehouse-iceberg/conf
+gravitino.iceberg-rest.classpath = extensions/iceberg-rest-server/libs

Review Comment:
   Do we still need a classpath for iceberg rest server, or we can put iceberg 
related jars directly in “libs”, what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to