Skip to content

Commit

Permalink
Fix JvmStatisticsHeap serialization to Parquet (#222)
Browse files Browse the repository at this point in the history
The class requires to have also the header fields

Co-authored-by: William Montaz <[email protected]>
  • Loading branch information
Willymontaz and William Montaz authored Oct 24, 2022
1 parent ab1f6eb commit e3ae055
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.criteo.hadoop.garmadon.hdfs;

import com.criteo.hadoop.garmadon.event.proto.*;
import com.criteo.hadoop.garmadon.hdfs.proto.JVMStatisticsExplodedProtos;
import com.criteo.hadoop.garmadon.protobuf.ProtoConcatenator;
import com.google.protobuf.Descriptors;
import com.google.protobuf.DynamicMessage;
Expand All @@ -20,9 +21,9 @@ public static Descriptors.Descriptor getDescriptor() throws Descriptors.Descript
}
}

public static abstract class JvmStatsEvent implements Message {
public static abstract class JvmStatisticsHeap implements Message {
public static Descriptors.Descriptor getDescriptor() throws Descriptors.DescriptorValidationException {
return descriptorForTypeWithHeader(JVMStatisticsEventsProtos.JVMStatisticsData.getDescriptor());
return descriptorForTypeWithHeader(JVMStatisticsExplodedProtos.JvmStatisticsHeap.getDescriptor());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private static void addJvmStatHeapMessage(Map<Integer, GarmadonEventDescriptor>
out,
GarmadonSerialization.TypeMarker.JVMSTATS_EVENT,
"jvmstats_heap_event",
JVMStatisticsExplodedProtos.JvmStatisticsHeap.class,
EventsWithHeader.JvmStatisticsHeap.class,
JVMStatisticsExplodedProtos.JvmStatisticsHeap.newBuilder(),
body -> {
JVMStatisticsEventsProtos.JVMStatisticsData jvmStatisticsData = (JVMStatisticsEventsProtos.JVMStatisticsData) body;
Expand Down

0 comments on commit e3ae055

Please sign in to comment.