nicer serilization
This commit is contained in:
parent
910ad2a408
commit
49f8501a5b
|
@ -780,7 +780,7 @@ public class RecoveryAction extends AbstractIndexShardComponent implements Close
|
||||||
}
|
}
|
||||||
synchronized (indexOutput) {
|
synchronized (indexOutput) {
|
||||||
try {
|
try {
|
||||||
indexOutput.writeBytes(request.content, request.content.length);
|
indexOutput.writeBytes(request.content, request.contentLength);
|
||||||
if (indexOutput.getFilePointer() == request.length) {
|
if (indexOutput.getFilePointer() == request.length) {
|
||||||
// we are done
|
// we are done
|
||||||
indexOutput.close();
|
indexOutput.close();
|
||||||
|
@ -804,8 +804,7 @@ public class RecoveryAction extends AbstractIndexShardComponent implements Close
|
||||||
long position;
|
long position;
|
||||||
long length;
|
long length;
|
||||||
byte[] content;
|
byte[] content;
|
||||||
|
int contentLength;
|
||||||
transient int contentLength;
|
|
||||||
|
|
||||||
private FileChunk() {
|
private FileChunk() {
|
||||||
}
|
}
|
||||||
|
@ -822,7 +821,8 @@ public class RecoveryAction extends AbstractIndexShardComponent implements Close
|
||||||
name = in.readUTF();
|
name = in.readUTF();
|
||||||
position = in.readVLong();
|
position = in.readVLong();
|
||||||
length = in.readVLong();
|
length = in.readVLong();
|
||||||
content = new byte[in.readVInt()];
|
contentLength = in.readVInt();
|
||||||
|
content = new byte[contentLength];
|
||||||
in.readFully(content);
|
in.readFully(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue