Questions tagged [chronicle-bytes]

20 questions
3
votes
1 answer

Chronicle Values: What's the point if it still needs to allocate an instance on heap?

I'm having trouble understanding how to use this library correctly, because it's creating garbage per allocation and that seems to be the intention? Is the library intended to be used with these characteristics? Or am I missing something, and is…
Jire
  • 9,680
  • 14
  • 52
  • 87
3
votes
1 answer

Chronicle Bytes from InputStream

I'm trying to use saxophone for parsing json to protobuf message on the fly, and want to avoid creating string instances for each response. For that i need to create Bytes instance from InputStream (that is provided from apache http entity). I'm…
vach
  • 10,571
  • 12
  • 68
  • 106
2
votes
2 answers

Chronicle Queue reading any kind of message with readDocument

In the Chronicle Queue I have two types of messages written. I wanna read this messages using the same tailer and if it is possible with the same method for example using tailer.readDocument(). Anyone now if it is possible, the message types are…
2
votes
1 answer

chronicle-bytes shared DirectBytesStores

I've created a MappedBytes instance to a file that I'm using as shared cache between different Java processes. I would like to be able to split out additional MappedByte instances (or ByteBuffer or any other instance) from the original that provide…
2
votes
1 answer

Reading messages in Chronicle Queue Tailer (v5.16.11) does not auto-move the index to next roll cycle

I use CQ v5.16.11 (with openjdk 11) to save data with daily roll cycles. The process runs non-stop from Sun to Fri so I have 5 cq4 files per week. I ran the process for 1.5 weeks and have 8 files (3 for 1st and 5 for 2nd week). So the files that I…
Sam
  • 61
  • 6
2
votes
1 answer

Re-using Chronicle Bytes' OutputStream

I'm utilizing a third party binary encoder that takes an OutputStream. I retrieve the OutputStream from a Marshallable's writeMarshallable method similar to this: public void writeMarshallable(WireOut wire) { OutputStream outputStream =…
A. Oswald
  • 21
  • 2
1
vote
1 answer

How to effectively parse and store data to Chronicle Map

I'm trying to figure out shortest and effective path to parse values from json and store some of them into chronicle map. My current solution: String data = ...; ChronicleMap map = ...; JSONWire wire = new…
1
vote
1 answer

chronicle with corretto jdk17 java.lang.NoSuchMethodError: 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner()'

Trying to follow the guide on the chronicle blog. Have upgraded jars and added the following jvm options…
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
1
vote
1 answer

Chronicle Bytes: How to write bytes in big endian order on a little endian machine?

I'm using the Bytes interface from here. The underlying buffer is created as follow: Bytes buf = Bytes.elasticHeapByteBuffer(MAX_SIZE); buf.writeLong(l); // writes in little endian Given my machine byte order is little endian, how can I…
ccnlui
  • 91
  • 5
1
vote
1 answer

Chronicle Bytes Release Method Deprecated

I recently moved to JDK 17 from JDK 11 which triggered an update to the Chronicle Wire library. We used to use version 2.17.50 with JDK 11 and now we have moved to chronicle-wire version 2.22.17 and chronicle-bytes version 2.22.21. Following code…
ATO
  • 574
  • 4
  • 14
1
vote
1 answer

Multi threaded writes to a MappedFile / MappedBytes

Is it possible in theory to write using Chornicle Bytes from multiple threads in different locations of the same memory mapped file (using a MappedBytes / MappedFile)? What do I need to pay attention to? I sometimes get segmentation faults.
jack malkovick
  • 503
  • 2
  • 14
1
vote
1 answer

Chronicle write introducing 1-2 sec latency at file roll over time

We have a single threaded java process that is writing messages into chronicle queue. The queue (SingleChronicleQueue) is configured with RollCycle HOURLY. At the hourly mark, when the file roll happens, chronicle write takes more than a second…
1
vote
1 answer

Log level set to "TRACE" for chronicle-logger causes AbstractMethodError

I have set chronicle logger level to trace as below rootLogger.level=trace rootLogger.appenderRefs=chronicle rootLogger.appenderRef.stdout.ref=CHRONICLE1 Which causes below error Exception in thread "main" java.lang.AbstractMethodError: Method…
Rimash Mohomed
  • 143
  • 1
  • 12
1
vote
1 answer

Is there a super fast compare byte[] method in Chronicle Bytes?

I'm storing a Murmur3 64-bit hash as a byte array in a Chronicle bytes object. I trying to sort these keys as fast as physically possible. I implemented quick sort to do that. I noticed there a set of compare and swap methods but nothing for a byte…
Stefan G
  • 11
  • 1
1
vote
1 answer

chronicle-bytes raising a segfault

following the accepted solution in chronicle-bytes shared DirectBytesStores I have now set up my code in the same way to the accepted answer. I'm generating 1,000,000 objects that I write out to a MappedFile and I would like each object to be able…
1
2