Skip to content

Commit

Permalink
move package com.osx To org.fedai.osx
Browse files Browse the repository at this point in the history
Signed-off-by: v_wbxiongli <740332065@qq.com>
  • Loading branch information
Xiong-Li-github committed Aug 9, 2023
1 parent 99b5985 commit 852c4a3
Show file tree
Hide file tree
Showing 319 changed files with 1,073 additions and 1,188 deletions.
4 changes: 2 additions & 2 deletions java/osx/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.

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
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.osx.broker;


import com.osx.broker.consumer.ConsumerManager;
import com.osx.broker.eggroll.EventDriverMsgManager;
import com.osx.broker.grpc.PcpGrpcService;
import com.osx.broker.grpc.ProxyGrpcService;
import com.osx.broker.http.HttpClientPool;

import com.osx.broker.interceptor.RouterInterceptor;
import com.osx.broker.message.AllocateMappedFileService;
import com.osx.broker.queue.TransferQueueManager;
import com.osx.broker.router.DefaultFateRouterServiceImpl;
import com.osx.broker.router.FateRouterService;
import com.osx.broker.router.RouterRegister;
import com.osx.broker.security.TokenGeneratorRegister;
import com.osx.broker.security.TokenValidatorRegister;
import com.osx.broker.server.OsxServer;
import com.osx.broker.service.PushService;
import com.osx.broker.service.TokenApplyService;
import com.osx.broker.service.UnaryCallService;
import com.osx.broker.store.MessageStore;
import com.osx.broker.token.DefaultTokenService;
import com.osx.broker.zk.CuratorZookeeperClient;
import com.osx.broker.zk.ZkConfig;
import com.osx.core.config.MetaInfo;
import com.osx.core.flow.ClusterFlowRuleManager;
import com.osx.core.flow.FlowCounterManager;
import com.osx.core.service.AbstractServiceAdaptor;
import com.osx.tech.provider.TechProviderRegister;
package org.fedai.osx.broker;


import org.fedai.osx.broker.consumer.ConsumerManager;
import org.fedai.osx.broker.eggroll.EventDriverMsgManager;
import org.fedai.osx.broker.grpc.PcpGrpcService;
import org.fedai.osx.broker.http.HttpClientPool;
import org.fedai.osx.broker.queue.TransferQueueManager;
import org.fedai.osx.broker.router.DefaultFateRouterServiceImpl;
import org.fedai.osx.broker.router.FateRouterService;
import org.fedai.osx.broker.router.RouterRegister;
import org.fedai.osx.broker.security.TokenGeneratorRegister;
import org.fedai.osx.broker.security.TokenValidatorRegister;
import org.fedai.osx.broker.server.OsxServer;
import org.fedai.osx.broker.service.TokenApplyService;
import org.fedai.osx.broker.token.DefaultTokenService;
import org.fedai.osx.broker.zk.CuratorZookeeperClient;
import org.fedai.osx.broker.zk.ZkConfig;
import org.fedai.osx.core.config.MetaInfo;
import org.fedai.osx.core.flow.ClusterFlowRuleManager;
import org.fedai.osx.core.flow.FlowCounterManager;
import org.fedai.osx.core.service.AbstractServiceAdaptor;
import org.fedai.osx.tech.provider.TechProviderRegister;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

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.broker.buffer;
package org.fedai.osx.broker.buffer;

public enum BufferStatus {
FREE,
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.broker.buffer;
package org.fedai.osx.broker.buffer;

public class ReadResult {
ReadStatus status;
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.broker.buffer;
package org.fedai.osx.broker.buffer;

public enum ReadStatus {
OK, ERROR, DISCARD;
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.broker.buffer;
package org.fedai.osx.broker.buffer;

import java.nio.ByteBuffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.osx.broker.buffer;
package org.fedai.osx.broker.buffer;


import com.osx.core.utils.JsonUtil;
import org.fedai.osx.core.utils.JsonUtil;

public class WriteResult {
WriteStatus status;
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.broker.buffer;
package org.fedai.osx.broker.buffer;

public enum WriteStatus {
OK, FULL, ERROR
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.broker.callback;
package org.fedai.osx.broker.callback;

@FunctionalInterface
public interface CompleteCallback {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.osx.broker.callback;
package org.fedai.osx.broker.callback;

import com.osx.broker.ServiceContainer;
import com.osx.broker.consumer.GrpcEventHandler;
import com.osx.broker.eggroll.PushEventHandler;
import com.osx.broker.message.Message;
import com.osx.broker.message.MessageExt;
import com.osx.broker.queue.TransferQueue;
import org.fedai.osx.broker.ServiceContainer;
import org.fedai.osx.broker.consumer.GrpcEventHandler;
import org.fedai.osx.broker.message.MessageExt;
import org.fedai.osx.broker.queue.TransferQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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.broker.callback;
package org.fedai.osx.broker.callback;

@FunctionalInterface
public interface DestoryCallback {
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.broker.callback;
package org.fedai.osx.broker.callback;

public interface ErrorCallback {
public void callback(Throwable e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//package com.osx.broker.callback;
//package org.fedai.osx.broker.callback;
//
//import com.google.protobuf.ByteString;
//import com.google.protobuf.InvalidProtocolBufferException;
//import com.osx.broker.ServiceContainer;
//import com.osx.broker.constants.MessageFlag;
//import com.osx.broker.consumer.GrpcEventHandler;
//import com.osx.broker.consumer.MessageEvent;
//import com.osx.broker.message.MessageExt;
//import com.osx.broker.util.TransferUtil;
//import com.osx.core.constant.Dict;
//import com.osx.core.constant.TransferStatus;
//import com.osx.core.frame.GrpcConnectionFactory;
//import com.osx.core.ptp.TargetMethod;
//import com.osx.core.router.RouterInfo;
//import org.fedai.osx.broker.ServiceContainer;
//import org.fedai.osx.broker.constants.MessageFlag;
//import org.fedai.osx.broker.consumer.GrpcEventHandler;
//import org.fedai.osx.broker.consumer.MessageEvent;
//import org.fedai.osx.broker.message.MessageExt;
//import org.fedai.osx.broker.util.TransferUtil;
//import org.fedai.osx.core.constant.Dict;
//import org.fedai.osx.core.constant.TransferStatus;
//import org.fedai.osx.core.frame.GrpcConnectionFactory;
//import org.fedai.osx.core.ptp.TargetMethod;
//import org.fedai.osx.core.router.RouterInfo;
//import com.webank.ai.eggroll.api.networking.proxy.DataTransferServiceGrpc;
//import io.grpc.ManagedChannel;
//import org.ppc.ptp.Osx;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.fedai.osx.broker.callback;

import org.fedai.osx.broker.message.MessageExt;
import org.fedai.osx.broker.queue.TransferQueue;

@FunctionalInterface
public interface MsgEventCallback {
void callback(TransferQueue transferQueue , MessageExt message) throws Exception;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package com.osx.broker.callback;
package org.fedai.osx.broker.callback;

import com.osx.broker.ServiceContainer;
import com.osx.broker.consumer.EventDrivenConsumer;
import com.osx.broker.consumer.MessageEvent;
import com.osx.broker.message.Message;
import com.osx.broker.message.MessageExt;
import com.osx.broker.queue.TransferQueue;
import com.osx.core.constant.Dict;

import javax.xml.ws.Service;
import org.fedai.osx.broker.ServiceContainer;
import org.fedai.osx.broker.consumer.EventDrivenConsumer;
import org.fedai.osx.broker.message.MessageExt;
import org.fedai.osx.broker.queue.TransferQueue;

public class MsgEventDispatchCallback implements MsgEventCallback{

Expand All @@ -18,7 +13,7 @@ public class MsgEventDispatchCallback implements MsgEventCallback{
public void callback(TransferQueue transferQueue, MessageExt message) throws Exception {

String topic = transferQueue.getTransferId();
EventDrivenConsumer eventDrivenConsumer = ServiceContainer.consumerManager.getEventDrivenConsumer(topic);
EventDrivenConsumer eventDrivenConsumer = ServiceContainer.consumerManager.getEventDrivenConsumer(topic);
if(eventDrivenConsumer!=null){
if(!transferQueue.isHasEventMsgDestoryCallback()) {
transferQueue.registerDestoryCallback(() -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.osx.broker.constants;
package org.fedai.osx.broker.constants;

public enum Direction {
// RECEIVE,
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.broker.constants;
package org.fedai.osx.broker.constants;

public enum MessageFlag {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.osx.broker.consumer;
package org.fedai.osx.broker.consumer;

import com.google.common.collect.Maps;
import com.osx.core.frame.Lifecycle;
import com.osx.core.frame.ServiceThread;
import org.fedai.osx.core.frame.Lifecycle;
import org.fedai.osx.core.frame.ServiceThread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package com.osx.broker.consumer;
package org.fedai.osx.broker.consumer;

import com.lmax.disruptor.BlockingWaitStrategy;

import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
import com.lmax.disruptor.util.DaemonThreadFactory;
import com.osx.broker.message.MessageExt;
import org.fedai.osx.broker.message.MessageExt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.osx.broker.consumer;
package org.fedai.osx.broker.consumer;

import org.fedai.osx.broker.queue.TransferQueue;

import com.osx.broker.queue.TransferQueue;
@FunctionalInterface
public interface EventDriverRule {
boolean isMatch(TransferQueue queue);
Expand Down
Loading

0 comments on commit 852c4a3

Please sign in to comment.