提交 a00ef7a7 编写于 作者: S Stephan Ewen

Fix TaskDeploymentDescriptor serialization

上级 cd699c56
......@@ -280,9 +280,9 @@ public final class TaskDeploymentDescriptor implements IOReadableWritable {
inputGates = readGateList(in);
outputGates = readGateList(in);
String[] jarFiles = new String[in.readInt()];
for (int i = 0; i < jarFiles.length; i++) {
jarFiles[i] = StringValue.readString(in);
this.requiredJarFiles = new String[in.readInt()];
for (int i = 0; i < this.requiredJarFiles.length; i++) {
this.requiredJarFiles[i] = StringValue.readString(in);
}
}
......
......@@ -20,9 +20,11 @@ package org.apache.flink.runtime.deployment;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.flink.configuration.Configuration;
......@@ -70,6 +72,8 @@ public class TaskDeploymentDescriptorTest {
assertEquals(orig.getCurrentNumberOfSubtasks(), copy.getCurrentNumberOfSubtasks());
assertEquals(orig.getOutputGates(), copy.getOutputGates());
assertEquals(orig.getInputGates(), copy.getInputGates());
assertTrue(Arrays.equals(orig.getRequiredJarFiles(), copy.getRequiredJarFiles()));
}
catch (Exception e) {
e.printStackTrace();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册