Hi, 

but I think this might be an issue when writing data to a TSFile on one machine 
and sending the TSFile to another for injestion.

This is a scenario I'm particularly thinking of. 

I want to be able to collect data on super small edge devices. These write 
TSFiles but have no other means of processing it. The TSFiles are sent to a 
central server based on optimized utilization of the transport medium and 
bandwidth. 

I've seen many different variants where LE or BE is being used. So we should 
either stick to one endianess when writing these files or we should document 
which endianess was used in the TSFile and we should be able to injest both 
vriants.

I would assume this would be more challenging and I personally would prefer 
sticking to one endianess ... us using Java on the Server, this preference 
would be more towards Big Endian.

Chris


-----Ursprüngliche Nachricht-----
Von: JT <[email protected]> 
Gesendet: Montag, 27. September 2021 04:25
An: [email protected]
Betreff: 回复: Endianess.

Hi,
When considering disk write, it is a purely program-defined behavior because 
the underlying filesystem provides only interfaces that write bytes, so how you 
organize bytes on disk is your own business. Java serialization use bit 
operations to get each byte of integers and floats, so it does not concern the 
programmer how the hardware organize the bytes in memory, which can be referred 
to for your C implementation.

Best
Tian Jiang

发件人: Jamber Zhang
发送时间: 2021年9月27日 10:10
收件人: [email protected]
主题: Re: Endianess.

Hi,
Normally, in Java's default configuration,  ByteBuffer  is BigEndian.
Network protocol  often use BigEndian.
For C/C++, the endian depends on CPU type. X86 CPU use  LittleEndian.

Best
-----------------------
Jamber

Yuan Tian <[email protected]> 于2021年9月27日周一 上午9:50写道:

> Hi,
> I remember that the default endian in C++ seems to be LittleEndian.
>
> Best,
> -------------------
> Yuan Tian
>
> On Mon, Sep 27, 2021 at 2:26 AM Giorgio Zoppi 
> <[email protected]>
> wrote:
>
> > Hello IoTDBers,
> > on disk, the java writes in BigEndian the buffer right?
> > I am looking at parquet, especially the implementation in C++, there 
> > are similarities. Why did you choose your own?
> > BR,
> > Giorgio.
> >
>


Reply via email to