code style

This commit is contained in:
CalvinKirs 2021-01-31 22:35:10 +08:00
parent 0a92a53f63
commit 93fb043be3
4 changed files with 7 additions and 9 deletions

View File

@ -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);
}

View File

@ -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/");

View File

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

View File

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