&& parser.nextToken() == JsonToken.START_OBJECT) { if (posTimestampField != -1) { rowBuilder.set(posTimestampField, timeValue); rowBuilder.set(posTimestampField, timeValue); && parser.nextToken() == JsonToken.START_OBJECT) { if (posTimestampField != -1) { rowBuilder.set(posTimestampField, timeValue);
&& parser.nextToken() == JsonToken.START_OBJECT) { if (posTimestampField != -1) { rowBuilder.set(posTimestampField, timeValue); rowBuilder.set(posTimestampField, timeValue); && parser.nextToken() == JsonToken.START_OBJECT) { if (posTimestampField != -1) { rowBuilder.set(posTimestampField, timeValue);
public void send(Row row) { // TODO: fix the size of this row. RowBuilder builder = Row.newBuilder(grouping.cardinality()); int j = 0; for (Integer i : grouping) { builder.set(j++, row.getObject(i)); } Row key = builder.build(); if (!accumulators.containsKey(key)) { AccumulatorList list = new AccumulatorList(); for (AccumulatorFactory factory : accumulatorFactories) { list.add(factory.get()); } accumulators.put(key, list); } accumulators.get(key).send(row); }
final int fieldPos = posTimestampField != -1 ? posTimestampField : i; if (token == JsonToken.VALUE_NUMBER_INT) { rowBuilder.set(posTimestampField, parser.getLongValue()); return; } else { .set(fieldPos, UTC_TIMESTAMP_FORMAT.parse(parser.getText()).getTime()); } catch (ParseException e) { .set(fieldPos, TIMESTAMP_FORMAT.parse(parser.getText()).getTime()); } catch (ParseException e2) { rowBuilder.set(i, parser.getByteValue()); break; case SHORT: rowBuilder.set(i, parser.getShortValue()); break; case INTEGER: rowBuilder.set(i, parser.getIntValue()); break; case LONG: rowBuilder.set(i, parser.getLongValue()); break; case DOUBLE: rowBuilder.set(i, parser.getDoubleValue()); break; rowBuilder.set(i, true); break;
rowBuilder.set(posTimestampField, timeInMillis); rowBuilder.set(i, parser.getByteValue()); break; case SHORT: rowBuilder.set(i, parser.getShortValue()); break; case INTEGER: rowBuilder.set(i, parser.getIntValue()); break; case LONG: rowBuilder.set(i, parser.getLongValue()); break; case DOUBLE: rowBuilder.set(i, parser.getDoubleValue()); break; rowBuilder.set(i, true); break; case VALUE_FALSE: rowBuilder.set(i, false); break; case VALUE_NULL: rowBuilder.set(i, Long.valueOf(s)); break; case FLOAT: switch (s) {
public void end(Sink sink) throws InterruptedException { for (Map.Entry<Row, AccumulatorList> e : accumulators.entrySet()) { final Row key = e.getKey(); final AccumulatorList list = e.getValue(); RowBuilder rb = Row.newBuilder(outputRowLength); int index = 0; for (Integer groupPos : unionGroups) { if (grouping.get(groupPos)) { rb.set(index, key.getObject(index)); if (rel.indicator) { rb.set(unionGroups.cardinality() + index, true); } } // need to set false when not part of grouping set. index++; } list.end(rb); sink.send(rb.build()); } } }
public void send(Row row) { // TODO: fix the size of this row. RowBuilder builder = Row.newBuilder(grouping.cardinality()); int j = 0; for (Integer i : grouping) { builder.set(j++, row.getObject(i)); } Row key = builder.build(); if (!accumulators.containsKey(key)) { AccumulatorList list = new AccumulatorList(); for (AccumulatorFactory factory : accumulatorFactories) { list.add(factory.get()); } accumulators.put(key, list); } accumulators.get(key).send(row); }
public void end(Sink sink) throws InterruptedException { for (Map.Entry<Row, AccumulatorList> e : accumulators.entrySet()) { final Row key = e.getKey(); final AccumulatorList list = e.getValue(); RowBuilder rb = Row.newBuilder(outputRowLength); int index = 0; for (Integer groupPos : unionGroups) { if (grouping.get(groupPos)) { rb.set(index, key.getObject(index)); if (rel.indicator) { rb.set(unionGroups.cardinality() + index, true); } } // need to set false when not part of grouping set. index++; } list.end(rb); sink.send(rb.build()); } } }
public void end(RowBuilder r) { for (int accIndex = 0, rowIndex = r.size() - size(); rowIndex < r.size(); rowIndex++, accIndex++) { r.set(rowIndex, get(accIndex).end()); } } }
public void end(RowBuilder r) { for (int accIndex = 0, rowIndex = r.size() - size(); rowIndex < r.size(); rowIndex++, accIndex++) { r.set(rowIndex, get(accIndex).end()); } } }