@Test public void testMerge() { List<byte[]> list = Arrays.asList(b1, b2); Iterator<byte[]> it = list.iterator(); List<byte[]> list2 = Arrays.asList(b3, b4); Iterator<byte[]> it2 = list2.iterator(); byte[] a1 = example.aggregate(new HashMap<>(), it); byte[] a2 = example.aggregate(new HashMap<>(), it2); Iterator<byte[]> mergedIt = Arrays.asList(a1, a2).iterator(); byte[] mergedByteArray = example.merge(new HashMap<>(), mergedIt); List<DataMessage> mergedMessageList = ExampleReader.readMessages(mergedByteArray); assertEquals(m1, mergedMessageList.get(0)); assertEquals(m2, mergedMessageList.get(1)); assertEquals(m3, mergedMessageList.get(2)); assertEquals(m4, mergedMessageList.get(3)); }
@Override public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) { return ParquetHelper.mergeFiles(files); }
SensorisParquetSplittedUDFExample implements SplittedUDF { @Override public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) { return ParquetHelper.mergeFiles(files); } }
SensorisParquetSplittedUDFExample implements SplittedUDF { @Override public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) { return ParquetHelper.mergeFiles(files); }  }
SensorisParquetSplittedUDFExample implements SplittedUDF { @Override public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) { return ParquetHelper.mergeFiles(files); }  @Override Map<Map<String, Object>, byte[]> getSplittedKeys(
      Map<MetadataName, String> map, byte[] bytes); @Override byte[] aggregate(Map<String, Object> keys, Iterator<byte[]> messages); @Override byte[] merge(Map<String, Object> keys, Iterator<byte[]> files); long truncateToTimeWindow(long timestamp); }
SensorisParquetSplittedUDFExample implements SplittedUDF { @Override public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) { return ParquetHelper.mergeFiles(files); }  @Override Map<Map<String, Object>, byte[]> getSplittedKeys(
      Map<MetadataName, String> map, byte[] bytes); @Override byte[] aggregate(Map<String, Object> keys, Iterator<byte[]> messages); @Override byte[] merge(Map<String, Object> keys, Iterator<byte[]> files); long truncateToTimeWindow(long timestamp); static final double SENSORIS_GEOGRAPHIC_SURFACE_RESOLUTION; static final double SENSORIS_GEOGRAPHIC_ALTITUDE_RESOLUTION; }