Skip to content

Commit

Permalink
* log-exporter: export action and event in parquet format
Browse files Browse the repository at this point in the history
Signed-off-by: neo <1100909+neowu@users.noreply.github.com>
  • Loading branch information
neowu committed Mar 3, 2025
1 parent 7972e87 commit 533a8fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public ActionLogSchema() {
.optionalString("error_code")
.optionalString("error_message")
.requiredLong("elapsed")
.name("context").type().optional().type(SchemaBuilder.map().values(SchemaBuilder.array().items().stringType()))
.name("context").type().optional().type(SchemaBuilder.map().values(SchemaBuilder.array().items().nullable().stringType()))
.name("stats").type().optional().map().values().doubleType()
.name("perf_stats").type().optional().map().values().longType()
.endRecord();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.io.IOException;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -48,9 +49,11 @@ void handle() throws IOException {
message.result = "OK";
message.host = "host";
message.elapsed = 1000L;
message.context = Map.of("key", List.of("value1", "value2"));
List<String> keys = new ArrayList<>();
keys.add(null);
message.context = Map.of("customer_id", List.of("customer_id1", "customer_id2"), "key", keys);
message.performanceStats = Map.of("kafka", perfStats(1, 1000L, 10, 5),
"http", perfStats(1, 2000L, null, null));
"http", perfStats(2, 2000L, null, null));
message.traceLog = "trace";
handler.handle(List.of(new Message<>("key", message)));
handler.handle(List.of(new Message<>("key", message)));
Expand Down

0 comments on commit 533a8fe

Please sign in to comment.