pingsutw commented on a change in pull request #822: URL: https://github.com/apache/submarine/pull/822#discussion_r765520336
########## File path: submarine-server/server-submitter/submarine-k8s-agent/src/main/java/org/apache/submarine/server/k8s/agent/handler/CustomResourceHandler.java ########## @@ -0,0 +1,74 @@ +/* + * 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.submarine.server.k8s.agent.handler; + +import java.io.IOException; + +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.apis.CoreV1Api; +import io.kubernetes.client.util.Config; + +public abstract class CustomResourceHandler { + private CoreV1Api coreApi; + private ApiClient client = null; + private String namespace; + private String crType; + private String crName; + + public CustomResourceHandler() throws IOException { + this.client = Config.defaultClient(); + Configuration.setDefaultApiClient(client); + this.coreApi = new CoreV1Api(this.client); + } + + public abstract void init(String namespace, String crType, String crName); + public abstract void run(); + public abstract void onAddEvent(); + public abstract void onModifyEvent(); + public abstract void onDeleteEvent(); + + public String getNamespace() { + return namespace; + } + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + public String getCrType() { + return crType; + } + + public void setCrType(String crType) { + this.crType = crType; + } + + public String getCrName() { + return crName; + } + + public void setCrName(String crName) { + this.crName = crName; + } + + + Review comment: ```suggestion ```suggestion ``` ``` ########## File path: bin/submarine-daemon.sh ########## @@ -120,9 +120,9 @@ function start() { initialize_default_directories - echo "SUBMARINE_SERVER_CLASSPATH: ${SUBMARINE_SERVER_CLASSPATH}" >> "${SUBMARINE_SERVER_LOGFILE}" + echo "SUBMARINE_SERVER_CLASSPATH: ${SUBMARINE_APP_CLASSPATH}" >> "${SUBMARINE_SERVER_LOGFILE}" Review comment: ```suggestion echo "SUBMARINE_APP_CLASSPATH: ${SUBMARINE_APP_CLASSPATH}" >> "${SUBMARINE_SERVER_LOGFILE}" ``` -- 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]
