Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
3311795
WIP
attilakreiner Apr 30, 2024
9459823
rm old tests
attilakreiner Apr 30, 2024
96efda9
WIP
attilakreiner May 2, 2024
596b66e
fix ephemeral
attilakreiner May 6, 2024
77dacb9
Revert "fix ephemeral"
attilakreiner May 6, 2024
ad27f69
fix ephemeral in rpt's
attilakreiner May 6, 2024
75c0895
Add command-dump.spec
attilakreiner May 8, 2024
975cd4d
WIP timestamps
attilakreiner May 8, 2024
2c805b9
tmp rm zilla:timestamps
attilakreiner May 8, 2024
5e95550
tmp hardcode timestamp to 0
attilakreiner May 8, 2024
4de338a
Revert "tmp rm zilla:timestamps"
attilakreiner May 13, 2024
ef63644
Revert "tmp hardcode timestamp to 0"
attilakreiner May 13, 2024
60a2583
Merge branch 'develop' into dump-test
attilakreiner May 13, 2024
9f82137
application server accept timestamps
attilakreiner May 13, 2024
a2762ea
fix 1
attilakreiner May 13, 2024
4d74176
fix packages
attilakreiner May 13, 2024
625e178
fix packages 2
attilakreiner May 13, 2024
a3f50f7
fix pom
attilakreiner May 14, 2024
b5b283a
Add sse test
attilakreiner May 14, 2024
a7a93fe
Add ws test
attilakreiner May 14, 2024
41b461e
Add filesystem test
attilakreiner May 14, 2024
22cf0ad
fix filesystem test
attilakreiner May 14, 2024
907ab79
Add proxy test
attilakreiner May 15, 2024
6cceda1
Add mqtt publish test
attilakreiner May 15, 2024
d4938bf
Add mqtt subscribe test
attilakreiner May 15, 2024
c27147f
Add kafka describe test
attilakreiner May 15, 2024
1fefd93
Add kafka fetch test
attilakreiner May 15, 2024
a628633
Add kafka group test
attilakreiner May 15, 2024
b2070be
Add kafka initproducerid test
attilakreiner May 15, 2024
d47b40b
Add kafka merged test
attilakreiner May 15, 2024
a33ab8b
Add kafka meta test
attilakreiner May 15, 2024
cc7285b
Add kafka offsetcommit test
attilakreiner May 16, 2024
c7e8a37
Add kafka offsetfetch test
attilakreiner May 16, 2024
4430391
Add kafka produce test
attilakreiner May 16, 2024
162b7ec
Add amqp test
attilakreiner May 16, 2024
a06676e
Add tls test
attilakreiner May 16, 2024
928450d
fix after pom update
attilakreiner May 16, 2024
36f3a3e
WIP
attilakreiner May 17, 2024
5cb1ac0
WIP 2
attilakreiner May 17, 2024
55d8fd0
WIP 3
attilakreiner May 17, 2024
570d3ac
WIP mqtt
attilakreiner May 17, 2024
826f251
WIP http2
attilakreiner May 17, 2024
7b920bf
fix
attilakreiner May 18, 2024
6b378e3
tmp fix LabelManager
attilakreiner May 18, 2024
82ab796
cleanup
attilakreiner May 18, 2024
a2b3092
WIP grpc
attilakreiner May 18, 2024
4acab88
WIP proxy
attilakreiner May 18, 2024
6cfb14b
WIP kafka
attilakreiner May 18, 2024
59825e6
fix
attilakreiner May 18, 2024
43b30e3
WIP tls
attilakreiner May 18, 2024
4618b68
WIP sse
attilakreiner May 18, 2024
61f48b3
WIP ws
attilakreiner May 18, 2024
62fc037
WIP amqp
attilakreiner May 18, 2024
6a34466
cleanup 1
attilakreiner May 18, 2024
dc94b76
cleanup 2
attilakreiner May 18, 2024
eb3be2d
cleanup 3
attilakreiner May 18, 2024
8e5a4fd
cleanup 4
attilakreiner May 18, 2024
6a35aab
WIP filesystem
attilakreiner May 18, 2024
2d8163e
cleanup 5
attilakreiner May 18, 2024
d7852ad
cleanup 6
attilakreiner May 18, 2024
33896d8
fix LabelManager
attilakreiner May 18, 2024
a1559fc
ignore tls net
attilakreiner May 19, 2024
70fdb4b
fix snapshot
attilakreiner May 19, 2024
5770ba9
revert snapshot
attilakreiner May 19, 2024
29667dc
fix ZillaEngine
attilakreiner May 19, 2024
92c376e
Add writeClosed
attilakreiner May 19, 2024
9cec9dd
Add CustomFramesIT
attilakreiner May 19, 2024
d0a5320
WIP TlsNetworkIT
attilakreiner May 20, 2024
bdd1f85
fix
attilakreiner May 20, 2024
bb7d1b5
Merge branch 'develop' into dump-test
attilakreiner May 21, 2024
87c661b
fix LabelManager lastModifiedTime
attilakreiner May 21, 2024
55ac904
fix
attilakreiner May 22, 2024
843e56f
fix chkstyle
attilakreiner May 22, 2024
17fbccd
WIP close streams in the scripts; omit writeClosed
attilakreiner May 22, 2024
927ad40
revert writeClosed
attilakreiner May 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "fix ephemeral"
This reverts commit 596b66e.
  • Loading branch information
attilakreiner committed May 6, 2024
commit 77dacb9af4c3a4b302a565274a5b4d78f8e48f54
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
import io.aklivity.zilla.runtime.command.dump.internal.types.stream.WindowFW;
import io.aklivity.zilla.runtime.engine.binding.function.MessagePredicate;
import io.aklivity.zilla.runtime.engine.config.KindConfig;
import io.aklivity.zilla.runtime.engine.namespace.NamespacedId;
import io.aklivity.zilla.runtime.engine.reader.BindingsLayoutReader;

@Command(name = "dump", description = "Dump stream content")
Expand Down Expand Up @@ -187,11 +186,6 @@ public final class ZillaDumpCommand extends ZillaCommand
hidden = true)
public String propertiesPath;

@Option(name = {"--replace-namespace"},
description = "Replace namespace (old-namespace-name=new-namespace-name)",
hidden = true)
public String replaceNamespace;

@Option(name = "-e",
description = "Show exception traces",
hidden = true)
Expand Down Expand Up @@ -326,8 +320,7 @@ public void run()
final DumpHandler[] dumpHandlers = new DumpHandler[streamBufferCount];
for (int i = 0; i < streamBufferCount; i++)
{
dumpHandlers[i] = new DumpHandler(i, filter, labels::lookupLabel, labels::lookupLabelId,
bindings.bindings()::get, writer);
dumpHandlers[i] = new DumpHandler(i, filter, labels::lookupLabel, bindings.bindings()::get, writer);
}

final MutableDirectBuffer buffer = writeBuffer;
Expand Down Expand Up @@ -457,48 +450,32 @@ private final class DumpHandler
private final LongPredicate allowedBinding;
private final WritableByteChannel writer;
private final IntFunction<String> lookupLabel;
private final Function<String, Integer> lookupLabelId;
private final Function<Long, long[]> lookupBindingInfo;
private final CRC32C crc;
private final ExtensionFW extensionRO;
private final MutableDirectBuffer labelsBuffer;
private final Long2LongHashMap sequence;
private final Int2IntHashMap crcCache;
private final int oldNamespace;
private final int newNamespace;

private long nextTimestamp = Long.MAX_VALUE;

private DumpHandler(
int worker,
LongPredicate allowedBinding,
IntFunction<String> lookupLabel,
Function<String, Integer> lookupLabelId,
Function<Long, long[]> lookupBindingInfo,
WritableByteChannel writer)
{
this.worker = worker;
this.allowedBinding = allowedBinding;
this.lookupLabel = lookupLabel;
this.lookupLabelId = lookupLabelId;
this.lookupBindingInfo = lookupBindingInfo;
this.writer = writer;
this.crc = new CRC32C();
this.extensionRO = new ExtensionFW();
this.labelsBuffer = new UnsafeBuffer(ByteBuffer.allocate(LABELS_BUFFER_SLOT_CAPACITY));
this.sequence = new Long2LongHashMap(0L);
this.crcCache = new Int2IntHashMap(0);
if (replaceNamespace != null)
{
String[] namespaces = replaceNamespace.split("=");
oldNamespace = lookupLabelId.apply(namespaces[0]);
newNamespace = lookupLabelId.apply(namespaces[1]);
}
else
{
oldNamespace = 0;
newNamespace = 0;
}
}

private boolean nextTimestamp(
Expand Down Expand Up @@ -783,8 +760,8 @@ private int resolveProtocolTypeId(
long routedId)
{
int protocolTypeLabelId = 0;
long[] origin = lookupBindingInfo.apply(replaceNamespace(originId));
long[] routed = lookupBindingInfo.apply(replaceNamespace(routedId));
long[] origin = lookupBindingInfo.apply(originId);
long[] routed = lookupBindingInfo.apply(routedId);

if (origin != null && routed != null)
{
Expand All @@ -802,20 +779,6 @@ private int resolveProtocolTypeId(
return supplyLabelCrc(protocolTypeLabelId);
}

private long replaceNamespace(
long bindingId)
{
long result = bindingId;
if (oldNamespace != 0 && newNamespace != 0)
{
if (NamespacedId.namespaceId(bindingId) == oldNamespace)
{
result = NamespacedId.id(newNamespace, NamespacedId.localId(bindingId));
}
}
return result;
}

private void encodePcapHeader(
MutableDirectBuffer buffer,
long length,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public DumpCommandRunner()
command.verbose = true;
command.continuous = false;
command.properties = List.of(String.format("zilla.engine.directory=%s", ENGINE_PATH));
command.replaceNamespace = "ephemeral=test";
}

public void createPcap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public Container.ExecResult createTxt(
{
String containerPath = String.format("/opt/%s", file.getFileName());
tshark.copyFileToContainer(Transferable.of(Files.readAllBytes(file)), containerPath);
String protocols = "zilla,http,http2,tls,mqtt,kafka,amqp";
return tshark.execInContainer("tshark", "-O", protocols, "-r", containerPath);
return tshark.execInContainer("tshark", "-O", "zilla", "-r", containerPath);
}

private static Path resourceToPath(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 0, Ack: 1, Len:
Zilla Frame
Frame Type ID: 0x00000001
Frame Type: BEGIN
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 0
Offset: 0x00000060
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -157,8 +157,8 @@ Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 1, Ack: 1, Len:
Zilla Frame
Frame Type ID: 0x40000002
Frame Type: WINDOW
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 1
Offset: 0x000000b0
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -265,8 +265,8 @@ Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 302, Ack: 1, Le
Zilla Frame
Frame Type ID: 0x00000002
Frame Type: DATA
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 0
Offset: 0x000001c0
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -333,8 +333,8 @@ Transmission Control Protocol, Src Port: 0, Dst Port: 7114, Seq: 462, Ack: 1, Le
Zilla Frame
Frame Type ID: 0x00000003
Frame Type: END
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 0
Offset: 0x00000230
Origin ID: 0x0000000a00000008
Expand All @@ -361,8 +361,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 1, Ack: 143, Le
Zilla Frame
Frame Type ID: 0x00000001
Frame Type: BEGIN
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 1
Offset: 0x000001d0
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -508,8 +508,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 214, Ack: 143,
Zilla Frame
Frame Type ID: 0x00000002
Frame Type: DATA
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 1
Offset: 0x000002d8
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -548,8 +548,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 1, Ack: 587, Le
Zilla Frame
Frame Type ID: 0x40000002
Frame Type: WINDOW
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 0
Offset: 0x00000338
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -582,8 +582,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 375, Ack: 143,
Zilla Frame
Frame Type ID: 0x00000002
Frame Type: DATA
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 1
Offset: 0x00000348
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -662,8 +662,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 536, Ack: 143,
Zilla Frame
Frame Type ID: 0x00000003
Frame Type: END
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 1
Offset: 0x000003b8
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -769,8 +769,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 143, Ack: 587,
Zilla Frame
Frame Type ID: 0x40000002
Frame Type: WINDOW
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 0
Offset: 0x000004c8
Origin ID: 0x0000000a00000008
Expand Down Expand Up @@ -803,8 +803,8 @@ Transmission Control Protocol, Src Port: 7114, Dst Port: 0, Seq: 285, Ack: 587,
Zilla Frame
Frame Type ID: 0x40000002
Frame Type: WINDOW
Protocol Type ID: 0xf9c7583a
Protocol Type: grpc
Protocol Type ID: 0x00000000
Protocol Type:
Worker: 0
Offset: 0x00000528
Origin ID: 0x0000000a00000008
Expand Down
Loading