Skip to content

Commit 533a8fe

Browse files
committed
* log-exporter: export action and event in parquet format
Signed-off-by: neo <[email protected]>
1 parent 7972e87 commit 533a8fe

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ext/log-exporter/src/main/java/core/log/domain/ActionLogSchema.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public ActionLogSchema() {
2828
.optionalString("error_code")
2929
.optionalString("error_message")
3030
.requiredLong("elapsed")
31-
.name("context").type().optional().type(SchemaBuilder.map().values(SchemaBuilder.array().items().stringType()))
31+
.name("context").type().optional().type(SchemaBuilder.map().values(SchemaBuilder.array().items().nullable().stringType()))
3232
.name("stats").type().optional().map().values().doubleType()
3333
.name("perf_stats").type().optional().map().values().longType()
3434
.endRecord();

ext/log-exporter/src/test/java/core/log/kafka/ActionLogMessageHandlerTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import java.io.IOException;
1616
import java.time.Instant;
17+
import java.util.ArrayList;
1718
import java.util.List;
1819
import java.util.Map;
1920

@@ -48,9 +49,11 @@ void handle() throws IOException {
4849
message.result = "OK";
4950
message.host = "host";
5051
message.elapsed = 1000L;
51-
message.context = Map.of("key", List.of("value1", "value2"));
52+
List<String> keys = new ArrayList<>();
53+
keys.add(null);
54+
message.context = Map.of("customer_id", List.of("customer_id1", "customer_id2"), "key", keys);
5255
message.performanceStats = Map.of("kafka", perfStats(1, 1000L, 10, 5),
53-
"http", perfStats(1, 2000L, null, null));
56+
"http", perfStats(2, 2000L, null, null));
5457
message.traceLog = "trace";
5558
handler.handle(List.of(new Message<>("key", message)));
5659
handler.handle(List.of(new Message<>("key", message)));

0 commit comments

Comments
 (0)