Browse Source

code style

pull/3/MERGE
CalvinKirs 4 years ago
parent
commit
93fb043be3
  1. 5
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/codec/NettyDecoder.java
  2. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/config/ServiceBean.java
  3. 3
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/protocol/MessageHeader.java
  4. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/protocol/RpcProtocol.java

5
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/codec/NettyDecoder.java

@ -17,7 +17,6 @@
package org.apache.dolphinscheduler.rpc.codec;
import org.apache.dolphinscheduler.rpc.serializer.ProtoStuffUtils;
import org.apache.dolphinscheduler.rpc.serializer.RpcSerializer;
import org.apache.dolphinscheduler.rpc.serializer.Serializer;
@ -52,10 +51,10 @@ public class NettyDecoder extends ByteToMessageDecoder {
byteBuf.resetReaderIndex();
}
byte serializerType=1;
byte serializerType = 1;
byte[] data = new byte[dataLength];
byteBuf.readBytes(data);
Serializer serializer=RpcSerializer.getSerializerByType(serializerType);
Serializer serializer = RpcSerializer.getSerializerByType(serializerType);
Object obj = serializer.deserialize(data, genericClass);
list.add(obj);
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/config/ServiceBean.java

@ -46,7 +46,7 @@ public class ServiceBean {
private static synchronized void init() {
// todo config
if(initialized.get()){
if (initialized.get()) {
return;
}
Reflections f = new Reflections("org/apache/dolphinscheduler/");

3
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/protocol/MessageHeader.java

@ -19,7 +19,7 @@ package org.apache.dolphinscheduler.rpc.protocol;
public class MessageHeader {
private byte magic=(byte) 0xbabe;
private byte magic = (byte) 0xbabe;
/**
* context length
@ -40,7 +40,6 @@ public class MessageHeader {
private byte serialization;
public int getContextLength() {
return contextLength;
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/protocol/RpcProtocol.java

@ -17,7 +17,7 @@
package org.apache.dolphinscheduler.rpc.protocol;
public class RpcProtocol<T>{
public class RpcProtocol<T> {
private MessageHeader msgHeader;

Loading…
Cancel
Save