提交 ebb18f21 编写于 作者: M Márton Balassi 提交者: Stephan Ewen

[streaming] StreamRecordTest fixed

上级 130e5f15
......@@ -318,9 +318,11 @@ public class StreamRecord implements IOReadableWritable, Serializable {
}
private void writeTuple(Tuple tuple, DataOutput out) {
Class[] basicTypes = new Class[tuple.getArity()];
StringBuilder basicTypeNames = new StringBuilder();
//TODO: exception for empty record - no getField!
for (int i = 0; i < basicTypes.length; i++) {
basicTypes[i] = tuple.getField(i).getClass();
basicTypeNames.append(basicTypes[i].getName() + ",");
......
......@@ -47,7 +47,6 @@ import eu.stratosphere.types.IntValue;
public class StreamComponentTest {
private static Map<Integer, Integer> data = new HashMap<Integer, Integer>();
private static FieldsPartitioner fP = new FieldsPartitioner(0, IntValue.class);
private static boolean fPTest = true;
public static class MySource extends UserSourceInvokable {
......@@ -58,7 +57,7 @@ public class StreamComponentTest {
public void invoke() throws Exception {
StreamRecord record = new StreamRecord(new Tuple1<Integer>(-1));
for (int i = 0; i < 1000; i++) {
record.setField(0, new IntValue(i));
record.setField(0, i);
emit(record);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册