RexXiong commented on code in PR #2699:
URL: https://github.com/apache/celeborn/pull/2699#discussion_r1730539249


##########
bin/celeborn-cli:
##########
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+

Review Comment:
   IMO celeborn-cli need put into sbin directory like other scripts, I am not 
sure we should add those `--add-opens` for cli like start-master.sh when use 
jdk17



##########
cli/src/main/scala/org/apache/celeborn/cli/config/CliConfigManager.scala:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.celeborn.cli.config
+
+import java.io.{File, PrintWriter}
+
+import scala.io.Source
+
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.fasterxml.jackson.databind.ObjectMapper
+import com.fasterxml.jackson.module.scala.DefaultScalaModule
+
+import org.apache.celeborn.cli.config.CliConfigManager.cliConfigFilePath
+
+case class CliConfig(@JsonProperty("cliConfigData") cliConfigData: Map[String, 
String])
+
+object CliConfigManager {
+  val cliConfigFilePath = s"${sys.env.getOrElse("HOME", 
".")}/.celeborn-cli/celeborn-cli.conf"

Review Comment:
   better put celeborn-cli.conf into  `$CELEBORN_CONF_DIR` or directly use 
celeborn-default.conf 



##########
cli/src/main/scala/org/apache/celeborn/cli/common/CliVersionProvider.scala:
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.celeborn.cli.common
+
+import java.nio.file.{Files, Paths}
+
+import scala.io.Source
+import scala.util.matching.Regex
+
+import picocli.CommandLine.IVersionProvider
+
+class CliVersionProvider extends IVersionProvider with CliLogging {
+
+  override def getVersion: Array[String] = {
+    val versionFile = Paths.get(sys.env.getOrElse("CELEBORN_HOME", "") + 
"/RELEASE")
+    val prefix = "Celeborn CLI"
+    if (Files.exists(versionFile)) {
+      val versionPattern: Regex = """(Celeborn\s+\d+\.\d+\.\d+)""".r

Review Comment:
   Maybe we can use (Celeborn\s+\S+) as the version may contain SNAPSHOT or 
other word?



##########
build/release/release.sh:
##########
@@ -133,6 +133,9 @@ upload_nexus_staging() {
 
   echo "Deploying celeborn-spi"
   ${PROJECT_DIR}/build/sbt "clean;celeborn-spi/publishSigned"
+
+    echo "Deploying celeborn-cli"

Review Comment:
   The format of the code is not aligned with the other lines.



##########
bin/celeborn-cli:
##########
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [ -z "${CELEBORN_HOME}" ]; then
+  export CELEBORN_HOME="$(cd "`dirname "$0"`"/..; pwd)"
+fi

Review Comment:
   better put celeborn-cli.conf into  `$CELEBORN_CONF_DIR`



-- 
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