mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 12:48:46 +08:00
code style
This commit is contained in:
parent
0a92a53f63
commit
93fb043be3
@ -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);
|
||||
}
|
||||
|
@ -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/");
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package org.apache.dolphinscheduler.rpc.protocol;
|
||||
|
||||
public class RpcProtocol<T>{
|
||||
public class RpcProtocol<T> {
|
||||
|
||||
private MessageHeader msgHeader;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user