Skip to content

Commit

Permalink
Merge pull request #5032 from FederatedAI/feature-2.0.0-beta-osx-new
Browse files Browse the repository at this point in the history
Feature 2.0.0 beta osx new
  • Loading branch information
forgivedengkai authored Aug 10, 2023
2 parents 8a446be + 697dc82 commit b12cf30
Show file tree
Hide file tree
Showing 328 changed files with 1,627 additions and 1,546 deletions.
14 changes: 7 additions & 7 deletions java/osx/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
# 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.
#
error_exit ()
{
error_exit (){
echo "ERROR: $1 !!"
exit 1
}
Expand Down Expand Up @@ -74,6 +72,8 @@ choose_gc_options()
JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0"
JAVA_OPT="${JAVA_OPT} -Xlog:gc*:file=${GC_LOG_DIR}/rmq_srv_gc_%p_%t.log:time,tags:filecount=5,filesize=30M"
fi

JAVA_OPT="${JAVA_OPT} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASE_DIR}/oom/heapdump.hprof "
}

choose_gc_log_directory
Expand All @@ -92,7 +92,7 @@ getpid() {
pid=$(cat ./bin/broker.pid)
fi
if [[ -n ${pid} ]]; then
count=$(ps -ef | grep $pid |grep 'com.osx' | grep -v "grep" | wc -l)
count=$(ps -ef | grep $pid | grep -v "grep" | wc -l)
if [[ ${count} -eq 0 ]]; then
rm ./bin/broker.pid
unset pid
Expand All @@ -110,7 +110,7 @@ mklogsdir() {
start() {
echo "try to start $1"
module=broker
main_class=com.osx.broker.Bootstrap
main_class= org.fedai.osx.broker.Bootstrap
getpid $module
if [[ ! -n ${pid} ]]; then JAVA_OPT="${JAVA_OPT} "
mklogsdir
Expand All @@ -135,7 +135,7 @@ start() {
debug() {
echo "try to start $1"
module=broker
main_class=com.osx.broker.Bootstrap
main_class= org.fedai.osx.broker.Bootstrap
getpid $module
if [[ ! -n ${pid} ]]; then JAVA_OPT="${JAVA_OPT} "
mklogsdir
Expand Down Expand Up @@ -208,4 +208,4 @@ inspect_pid() {
fi
done
fi
}
}
5 changes: 2 additions & 3 deletions java/osx/bin/service.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
Expand All @@ -15,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e
set -e
source ./bin/common.sh
#export JAVA_HOME=/data/projects/fate/common/jdk/jdk-8u192
#export PATH=$PATH:$JAVA_HOME/bin
Expand Down Expand Up @@ -60,4 +59,4 @@ case "$1" in
*)
echo "usage: $0 {start|stop|status|restart}"
exit 1
esac
esac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.osx.api.constants;
package org.fedai.osx.api.constants;

public enum Protocol {
grpc,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.osx.api.context;
package org.fedai.osx.api.context;

import com.osx.api.constants.Protocol;
import com.osx.api.router.RouterInfo;
import org.fedai.osx.api.constants.Protocol;
import org.fedai.osx.api.router.RouterInfo;

public interface Context {
public String getTechProviderCode() ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
* limitations under the License.
*/

package com.osx.api.router;
import com.osx.api.constants.Protocol;

package org.fedai.osx.api.router;
import org.fedai.osx.api.constants.Protocol;


public class RouterInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.osx.api.tech.provider;
package org.fedai.osx.api.tech.provider;
import io.grpc.stub.StreamObserver;
import org.ppc.ptp.Osx;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.osx.api.translator;
package org.fedai.osx.api.translator;


import com.osx.api.context.Context;
import org.fedai.osx.api.context.Context;
import org.ppc.ptp.Osx;
//用于转换不同厂商通信时的接收和发总数据,
public interface Translator {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.osx.broker;
import com.osx.core.config.MetaInfo;
import com.osx.core.jvm.JvmInfoCounter;
import com.osx.core.utils.PropertiesUtil;
import com.osx.core.utils.ServerUtil;
package org.fedai.osx.broker;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.lang3.StringUtils;
import org.fedai.osx.core.config.MetaInfo;
import org.fedai.osx.core.jvm.JvmInfoCounter;
import org.fedai.osx.core.utils.PropertiesUtil;
import org.fedai.osx.core.utils.ServerUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Properties;
public class Bootstrap {
static Logger logger = LoggerFactory.getLogger(Bootstrap.class);
Expand Down
Loading

0 comments on commit b12cf30

Please sign in to comment.