You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by 追忆-寻梦-呓 <ru...@foxmail.com> on 2020/04/18 08:24:57 UTC

回复: [Discuss] Method names in Session

Hi, I'd like to call&nbsp;&nbsp;the batch insertion of data2 as insertTimeAlignedBatch and call the batch insertion of data1 insertSingleDeviceRowBatch.


&gt; &gt; &gt; Data 1:
&gt; &gt; &gt; row1: time, device1, s1, s2
&gt; &gt; &gt; row2: time, device2, s3, s4
&gt; &gt; &gt;
&gt; &gt; &gt; Data 2:
&gt; &gt; &gt; device1
&gt; &gt; &gt; time, s1, s2, s3
&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3

Good weather! Happy every day!
天气不错,祝开开心心!

&nbsp;




------------------&nbsp;原始邮件&nbsp;------------------
发件人:&nbsp;"Jialin Qiao"<qiaojialin@apache.org&gt;;
发送时间:&nbsp;2020年4月18日(星期六) 下午4:12
收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;

主题:&nbsp;Re: [Discuss] Method names in Session



Hi,

There are mainly four interfaces in Session.

(1) insert(String deviceId, long time, List<String&gt; measurements,
List<String&gt; values)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert some measurements of a device at a timestamp
(2) insertInBatch(List<String&gt; deviceIds, List<Long&gt; times,
List<List<String&gt;&gt; measurementsList, List<List<String&gt;&gt; valuesList)
&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insert"
(3) insertBatch(RowBatch rowBatch)
&nbsp;&nbsp;&nbsp;&nbsp; insert some data of one device
(4) insertMultipleDeviceBatch(Map<String, RowBatch&gt; rowBatchMap)
&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insertBatch"


&gt; InsertDevice()
&gt; InsertMutiDevice() or InsertBatch()

Could you tell the relationship between these two naming with the existing
four?

Thanks,
—————————————————
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院


Dawei Liu <atoildw@163.com&gt; 于2020年4月18日周六 下午3:58写道:

&gt; hi,
&gt; I don’t like AlignXX , the device and signal items should be intuitively
&gt; considered in the user's mind
&gt;
&gt;
&gt; So I think the method name should be:
&gt; InsertDevice()
&gt; InsertMutiDevice() or InsertBatch()
&gt;
&gt;
&gt; Thanks
&gt; ———
&gt; Dawei Liu
&gt; On 04/18/2020 15:24, Xiangdong Huang wrote:
&gt; Hi,
&gt;
&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
&gt;
&gt; A little better than SeriesBatch and ColumnBatch.
&gt;
&gt; Best,
&gt; -----------------------------------
&gt; Xiangdong Huang
&gt; School of Software, Tsinghua University
&gt;
&gt; 黄向东
&gt; 清华大学 软件学院
&gt;
&gt;
&gt; Jialin Qiao <qiaojialin@apache.org&gt; 于2020年4月18日周六 下午3:13写道:
&gt;
&gt; &gt; Hi,
&gt; &gt;
&gt; &gt; insertAlignedColumns is fine to me.
&gt; &gt;
&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
&gt; &gt;
&gt; &gt; Thanks,
&gt; &gt; —————————————————
&gt; &gt; Jialin Qiao
&gt; &gt; School of Software, Tsinghua University
&gt; &gt;
&gt; &gt; 乔嘉林
&gt; &gt; 清华大学 软件学院
&gt; &gt;
&gt; &gt;
&gt; &gt; Xiangdong Huang <sainthxd@gmail.com&gt; 于2020年4月18日周六 下午3:09写道:
&gt; &gt;
&gt; &gt; &gt; Hi,
&gt; &gt; &gt;
&gt; &gt; &gt; If you call the batch insertion of Data 1 as insertRows(),
&gt; &gt; &gt; why not call the batch insertion of Data 2 as&nbsp; insertColumns()? or,
&gt; &gt; &gt; insertAlignedColumns();
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
&gt; &gt; &gt;
&gt; &gt; &gt; I think the name is not clear. Is there better suggestion?
&gt; &gt; &gt;
&gt; &gt; &gt; Data 1:
&gt; &gt; &gt; row1: time, device1, s1, s2
&gt; &gt; &gt; row2: time, device2, s3, s4
&gt; &gt; &gt;
&gt; &gt; &gt; Data 2:
&gt; &gt; &gt; device1
&gt; &gt; &gt; time, s1, s2, s3
&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt;
&gt; &gt; &gt; Best,
&gt; &gt; &gt; -----------------------------------
&gt; &gt; &gt; Xiangdong Huang
&gt; &gt; &gt; School of Software, Tsinghua University
&gt; &gt; &gt;
&gt; &gt; &gt;&nbsp; 黄向东
&gt; &gt; &gt; 清华大学 软件学院
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; Haonan Hou <hhaonan@outlook.com&gt; 于2020年4月18日周六 下午1:39写道:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; Hi,
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; +1. The new way of naming seems more straight forward.
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thanks,
&gt; &gt; &gt; &gt; Haonan
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; On Apr 18, 2020, at 1:29 PM, Jialin Qiao <qiaojialin@apache.org&gt;
&gt; &gt; &gt; wrote:
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Hi,
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; The native API Session provides many methods. However, their names
&gt; &gt; are
&gt; &gt; &gt; &gt; &gt; confusing. For example, insertBatch and insertInBatch.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; (1) insertBatch actually receives a RowBatch structure, which
&gt; &gt; contains
&gt; &gt; &gt; &gt; data
&gt; &gt; &gt; &gt; &gt; of multiple measurements of a device, these measurements data share
&gt; &gt; the
&gt; &gt; &gt; &gt; &gt; same time column.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; If we treat it as a table, the table name is deviceId, the columns
&gt; &gt; are
&gt; &gt; &gt; &gt; &gt; Timestamp, measurements name.&nbsp; This table should not contain null
&gt; &gt; &gt; value.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; For example
&gt; &gt; &gt; &gt; &gt; device1
&gt; &gt; &gt; &gt; &gt; time, s1, s2, s3
&gt; &gt; &gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; (2) insertInBatch insert multiple rows, each row contains a
&gt; &gt; timestamp,
&gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; deviceID and arbitrary measurements with values. Each row is
&gt; &gt; &gt; independent.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; For example,
&gt; &gt; &gt; &gt; &gt; row1: time, device1, s1, s2
&gt; &gt; &gt; &gt; &gt; row2: time, device2, s3, s4
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; So I plan to rename these methods.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
&gt; &gt; &gt; &gt; &gt; insertBatch -&gt; insertSeriesBatch or ColumnBatch
&gt; &gt; &gt; &gt; &gt; insertInBatch -&gt; insertRows
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Does this look good to you?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Thanks,
&gt; &gt; &gt; &gt; &gt; —————————————————
&gt; &gt; &gt; &gt; &gt; Jialin Qiao
&gt; &gt; &gt; &gt; &gt; School of Software, Tsinghua University
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; 乔嘉林
&gt; &gt; &gt; &gt; &gt; 清华大学 软件学院
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;

Re: [Discuss] Method names in Session

Posted by Jialin Qiao <qj...@mails.tsinghua.edu.cn>.
Hi,

- insertRecord
- insertDeviceTablet (or insertTablet)
- insertMultiDeviceTables (or insertTablets)
- insertRecords

I prefer DeviceTablet. insertRecord and insertRecords are both ok.

Thanks,
--
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院

> -----原始邮件-----
> 发件人: "Xiangdong Huang" <sa...@gmail.com>
> 发送时间: 2020-04-23 17:17:15 (星期四)
> 收件人: dev@iotdb.apache.org
> 抄送: 
> 主题: Re: [Discuss] Method names in Session
> 
> Hi,
> 
> (A little long and you can skip the content to just read the conclusion.)
> 
> Initially, I agreed with Daiwei's naming solution. But after reviewing
> these APIs,
> I find the "insertMutiDevicesRecord" (or, insertMutiDevicesSingleRecord) is
> not good.
> It is because users can write several records that belong to the same
> device using this API.
> 
> OK, let's rethink the APIs we mentioned.
> 
> Suppose we have 2 devices (d1, d2) and each device has 3 measurements (s1,
> s2, s3).
> 
> 1.  The first API.
> We can insert one data point, e.g., `insert into d1(time, s1) values
> (now(), 1)`.
> Also, we can insert a set of data points that belong to the same device
> with a specific timestamp,
> e.g., `insert into d1(time, s1, s2, s3) values (now(), 1, 2, 3)`.
> 
> Let's consider it as the basic insert method or the unit operation of IoTDB.
> 
> We can call the point pairs "d1, now(), (s1, 1), (s2, 2), (s3, 3)" as a
> RECORD.
> 
> So, I'd like to call the first API as "insertRecord()";
> 
> 2. The second API.
> Ok, now we want to insert some points that belong to the same device.
> Consider the following data:
> 
> device1
> time, s1, s2, s3
> 1       1     2    3
> 2       1     2    3
> 3       1     2    3
> 
> In v0.9, we call such data as "RowBatch". I asked Jialin why it is called
> "rowBatch", he said the name
> is from ORC file...
> 
> If let me name it, I think "Tablet" is suitable.
> 
> If so, naming the API as "insertDeviceTablet()" is fine.
> 
> Notice that the in this API, we do not allow "null" cell in the Tablet.
> 
> As the first API is a unit operation, the second API is equally to calling
> the first API several times.
> The difference is, the second API is more efficient for this case.
> 
> 
> 3. The third API
> 
> Ok, considering another scenario,  the IoT gateway packs several devices'
> data into one packet and sends it
> to the server. On the server-side, after unpacking, IoTDB receives data
> like:
> 
> device1
> time, s1, s2, s3
> 1       1     2    3
> 2       1     2    3
> 3       1     2    3
> device2
> time, s1, s2
> 1       1     2
> 3       1     2
> 4       1     2
> 
> Ok... The difference between it and the second API is this one can write
> data of several devices.
> 
> So, the name can be "insertMultiDeviceTablets()".
> 
> The constraint is, for each device's Tablet, there is no "null" cell.
> But, two devices can have different columns.
> 
> This API  is equally to calling the second API several times.
> But, hope the implementation of this API more efficient.
> 
> 4.The fourth API.
> 
> Well, API 1 is unit but can insert a few data for each call.
> API 2 and 3 can write more data for each call, but have some constraint.
> So, can we have a API that can write data in batch and have no constraint?
> 
> Yes, that is why we have the fourth API.
> 
> Considering the batch data is:
> 
> device1
> time, s1, s2, s3
> 1       1     2    3
> 2       1     null    3
> 3       1     null    null
> device2
> time, s1, s2
> 1       1     2
> 3       null     2
> 4       1     null
> 
> In this case, you can not consider the data that belong to a device as a
> tablet,
> because we consider there is no null cell in a tablet.
> 
> Then, for the above data example, we can consider the data as 6 Records.
> 
> So, I'd like to name the API as insertRecords().
> 
> Conclusion,
> 
> The four API suits for 4 scenarios, and the name can be:
> 
> - insertRecord
> - insertDeviceTablet (or insertTablet)
> - insertMultiDeviceTables (or insertTablets)
> - insertRecords
> 
> How do you think about that?
> 
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
> 
>  黄向东
> 清华大学 软件学院
> 
> 
> >
> >

Re: [Discuss] Method names in Session

Posted by Xiangdong Huang <sa...@gmail.com>.
Hi,

(A little long and you can skip the content to just read the conclusion.)

Initially, I agreed with Daiwei's naming solution. But after reviewing
these APIs,
I find the "insertMutiDevicesRecord" (or, insertMutiDevicesSingleRecord) is
not good.
It is because users can write several records that belong to the same
device using this API.

OK, let's rethink the APIs we mentioned.

Suppose we have 2 devices (d1, d2) and each device has 3 measurements (s1,
s2, s3).

1.  The first API.
We can insert one data point, e.g., `insert into d1(time, s1) values
(now(), 1)`.
Also, we can insert a set of data points that belong to the same device
with a specific timestamp,
e.g., `insert into d1(time, s1, s2, s3) values (now(), 1, 2, 3)`.

Let's consider it as the basic insert method or the unit operation of IoTDB.

We can call the point pairs "d1, now(), (s1, 1), (s2, 2), (s3, 3)" as a
RECORD.

So, I'd like to call the first API as "insertRecord()";

2. The second API.
Ok, now we want to insert some points that belong to the same device.
Consider the following data:

device1
time, s1, s2, s3
1       1     2    3
2       1     2    3
3       1     2    3

In v0.9, we call such data as "RowBatch". I asked Jialin why it is called
"rowBatch", he said the name
is from ORC file...

If let me name it, I think "Tablet" is suitable.

If so, naming the API as "insertDeviceTablet()" is fine.

Notice that the in this API, we do not allow "null" cell in the Tablet.

As the first API is a unit operation, the second API is equally to calling
the first API several times.
The difference is, the second API is more efficient for this case.


3. The third API

Ok, considering another scenario,  the IoT gateway packs several devices'
data into one packet and sends it
to the server. On the server-side, after unpacking, IoTDB receives data
like:

device1
time, s1, s2, s3
1       1     2    3
2       1     2    3
3       1     2    3
device2
time, s1, s2
1       1     2
3       1     2
4       1     2

Ok... The difference between it and the second API is this one can write
data of several devices.

So, the name can be "insertMultiDeviceTablets()".

The constraint is, for each device's Tablet, there is no "null" cell.
But, two devices can have different columns.

This API  is equally to calling the second API several times.
But, hope the implementation of this API more efficient.

4.The fourth API.

Well, API 1 is unit but can insert a few data for each call.
API 2 and 3 can write more data for each call, but have some constraint.
So, can we have a API that can write data in batch and have no constraint?

Yes, that is why we have the fourth API.

Considering the batch data is:

device1
time, s1, s2, s3
1       1     2    3
2       1     null    3
3       1     null    null
device2
time, s1, s2
1       1     2
3       null     2
4       1     null

In this case, you can not consider the data that belong to a device as a
tablet,
because we consider there is no null cell in a tablet.

Then, for the above data example, we can consider the data as 6 Records.

So, I'd like to name the API as insertRecords().

Conclusion,

The four API suits for 4 scenarios, and the name can be:

- insertRecord
- insertDeviceTablet (or insertTablet)
- insertMultiDeviceTables (or insertTablets)
- insertRecords

How do you think about that?

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院


>
>

Re: [Discuss] Method names in Session

Posted by Jialin Qiao <qi...@apache.org>.
Hi,

>(1) InsertBatch() can be renamed with its parameter, that is
InsertRowBatch() when accepting a RowBatch. If we rename RowBatch to
AlignedColumns, then InsertAlignedColumns() is fine.
> (2) For insertInBatch(), It looks to me that this method is designed to
be the batch-insert version of insert(). So it would be better to build
some connections between these two methods' names. Perhaps we could
consider changing insertInBatch() to insertBatch() or BatchInsert().

These two rules are good. we do need to connect insert with insertInBatch.

I would like to give the whole naming:

insert -> insertRecord
insertInBatch -> insertRecords
RowBatch -> DeviceBatch
insertBatch -> insertDeviceBatch
insertMultipleDeviceBatch -> insertDeviceBatches


Thanks,
—————————————————
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院


Dawei Liu <at...@163.com> 于2020年4月19日周日 上午2:01写道:

> Hi,
>
>
> (1) insert(String deviceId, long time, List<String> measurements,
> List<String> values)
>       insert some measurements of a device at a timestamp
>
>
> insertSingleDeviceRecord
>
>
>
>
> (2) insertInBatch(List<String> deviceIds, List<Long> times,
> List<List<String>> measurementsList, List<List<String>> valuesList)
>      multiple independent "insert"
>
>
> insertMutiDevicesRecord
>
>
>
>
> (3) insertBatch(RowBatch rowBatch)
>      insert some data of one device
>
>
> insertSingleDeviceMutiRecords
>
>
> (4) insertMultipleDeviceBatch(Map<String, RowBatch> rowBatchMap)
>      multiple independent "insertBatch"
>
>
> insertMutiDevicesMutiRecords
>
>
> Thanks
> ———
> Dawei Liu
>
>
> 在2020年04月19日 00:58,Xiangdong Huang 写道:
> Hi Wei Shao,
>
> > If we rename RowBatch to AlignedColumns
>
> If the name is confusing, why not change the name?
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 黄向东
> 清华大学 软件学院
>
>
> Wei Shao <ko...@163.com> 于2020年4月18日周六 下午6:51写道:
>
> > Hi,
> >
> >
> > Here is my idea for your reference:
> > (1) InsertBatch() can be renamed with its parameter, that is
> > InsertRowBatch() when accepting a RowBatch. If we rename RowBatch to
> > AlignedColumns, then InsertAlignedColumns() is fine.
> > (2) For insertInBatch(), It looks to me that this method is designed to
> be
> > the batch-insert version of insert(). So it would be better to build some
> > connections between these two methods' names. Perhaps we could consider
> > changing insertInBatch() to insertBatch() or BatchInsert().
> >
> >
> > Thanks,
> > Wei
> >
> >
> >
> >
> >
> >
> >
> >
> > At 2020-04-18 16:24:57, "追忆-寻梦-呓" <ru...@foxmail.com> wrote:
> > >Hi, I'd like to call&nbsp;&nbsp;the batch insertion of data2 as
> > insertTimeAlignedBatch and call the batch insertion of data1
> > insertSingleDeviceRowBatch.
> > >
> > >
> > >&gt; &gt; &gt; Data 1:
> > >&gt; &gt; &gt; row1: time, device1, s1, s2
> > >&gt; &gt; &gt; row2: time, device2, s3, s4
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; Data 2:
> > >&gt; &gt; &gt; device1
> > >&gt; &gt; &gt; time, s1, s2, s3
> > >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >
> > >Good weather! Happy every day!
> > >天气不错,祝开开心心!
> > >
> > >&nbsp;
> > >
> > >
> > >
> > >
> > >------------------&nbsp;原始邮件&nbsp;------------------
> > >发件人:&nbsp;"Jialin Qiao"<qiaojialin@apache.org&gt;;
> > >发送时间:&nbsp;2020年4月18日(星期六) 下午4:12
> > >收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;
> > >
> > >主题:&nbsp;Re: [Discuss] Method names in Session
> > >
> > >
> > >
> > >Hi,
> > >
> > >There are mainly four interfaces in Session.
> > >
> > >(1) insert(String deviceId, long time, List<String&gt; measurements,
> > >List<String&gt; values)
> > >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert some measurements of a device at a
> > timestamp
> > >(2) insertInBatch(List<String&gt; deviceIds, List<Long&gt; times,
> > >List<List<String&gt;&gt; measurementsList, List<List<String&gt;&gt;
> > valuesList)
> > >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insert"
> > >(3) insertBatch(RowBatch rowBatch)
> > >&nbsp;&nbsp;&nbsp;&nbsp; insert some data of one device
> > >(4) insertMultipleDeviceBatch(Map<String, RowBatch&gt; rowBatchMap)
> > >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insertBatch"
> > >
> > >
> > >&gt; InsertDevice()
> > >&gt; InsertMutiDevice() or InsertBatch()
> > >
> > >Could you tell the relationship between these two naming with the
> existing
> > >four?
> > >
> > >Thanks,
> > >—————————————————
> > >Jialin Qiao
> > >School of Software, Tsinghua University
> > >
> > >乔嘉林
> > >清华大学 软件学院
> > >
> > >
> > >Dawei Liu <atoildw@163.com&gt; 于2020年4月18日周六 下午3:58写道:
> > >
> > >&gt; hi,
> > >&gt; I don’t like AlignXX , the device and signal items should be
> > intuitively
> > >&gt; considered in the user's mind
> > >&gt;
> > >&gt;
> > >&gt; So I think the method name should be:
> > >&gt; InsertDevice()
> > >&gt; InsertMutiDevice() or InsertBatch()
> > >&gt;
> > >&gt;
> > >&gt; Thanks
> > >&gt; ———
> > >&gt; Dawei Liu
> > >&gt; On 04/18/2020 15:24, Xiangdong Huang wrote:
> > >&gt; Hi,
> > >&gt;
> > >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> > >&gt;
> > >&gt; A little better than SeriesBatch and ColumnBatch.
> > >&gt;
> > >&gt; Best,
> > >&gt; -----------------------------------
> > >&gt; Xiangdong Huang
> > >&gt; School of Software, Tsinghua University
> > >&gt;
> > >&gt; 黄向东
> > >&gt; 清华大学 软件学院
> > >&gt;
> > >&gt;
> > >&gt; Jialin Qiao <qiaojialin@apache.org&gt; 于2020年4月18日周六 下午3:13写道:
> > >&gt;
> > >&gt; &gt; Hi,
> > >&gt; &gt;
> > >&gt; &gt; insertAlignedColumns is fine to me.
> > >&gt; &gt;
> > >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> > >&gt; &gt;
> > >&gt; &gt; Thanks,
> > >&gt; &gt; —————————————————
> > >&gt; &gt; Jialin Qiao
> > >&gt; &gt; School of Software, Tsinghua University
> > >&gt; &gt;
> > >&gt; &gt; 乔嘉林
> > >&gt; &gt; 清华大学 软件学院
> > >&gt; &gt;
> > >&gt; &gt;
> > >&gt; &gt; Xiangdong Huang <sainthxd@gmail.com&gt; 于2020年4月18日周六
> 下午3:09写道:
> > >&gt; &gt;
> > >&gt; &gt; &gt; Hi,
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; If you call the batch insertion of Data 1 as
> insertRows(),
> > >&gt; &gt; &gt; why not call the batch insertion of Data 2 as&nbsp;
> > insertColumns()? or,
> > >&gt; &gt; &gt; insertAlignedColumns();
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; I think the name is not clear. Is there better
> suggestion?
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; Data 1:
> > >&gt; &gt; &gt; row1: time, device1, s1, s2
> > >&gt; &gt; &gt; row2: time, device2, s3, s4
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; Data 2:
> > >&gt; &gt; &gt; device1
> > >&gt; &gt; &gt; time, s1, s2, s3
> > >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; Best,
> > >&gt; &gt; &gt; -----------------------------------
> > >&gt; &gt; &gt; Xiangdong Huang
> > >&gt; &gt; &gt; School of Software, Tsinghua University
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt;&nbsp; 黄向东
> > >&gt; &gt; &gt; 清华大学 软件学院
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; Haonan Hou <hhaonan@outlook.com&gt; 于2020年4月18日周六
> > 下午1:39写道:
> > >&gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; Hi,
> > >&gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; +1. The new way of naming seems more straight
> forward.
> > >&gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; Thanks,
> > >&gt; &gt; &gt; &gt; Haonan
> > >&gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; On Apr 18, 2020, at 1:29 PM, Jialin Qiao <
> > qiaojialin@apache.org&gt;
> > >&gt; &gt; &gt; wrote:
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; Hi,
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; The native API Session provides many methods.
> > However, their names
> > >&gt; &gt; are
> > >&gt; &gt; &gt; &gt; &gt; confusing. For example, insertBatch and
> > insertInBatch.
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; (1) insertBatch actually receives a RowBatch
> > structure, which
> > >&gt; &gt; contains
> > >&gt; &gt; &gt; &gt; data
> > >&gt; &gt; &gt; &gt; &gt; of multiple measurements of a device, these
> > measurements data share
> > >&gt; &gt; the
> > >&gt; &gt; &gt; &gt; &gt; same time column.
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; If we treat it as a table, the table name is
> > deviceId, the columns
> > >&gt; &gt; are
> > >&gt; &gt; &gt; &gt; &gt; Timestamp, measurements name.&nbsp; This table
> > should not contain null
> > >&gt; &gt; &gt; value.
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; For example
> > >&gt; &gt; &gt; &gt; &gt; device1
> > >&gt; &gt; &gt; &gt; &gt; time, s1, s2, s3
> > >&gt; &gt; &gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; (2) insertInBatch insert multiple rows, each
> row
> > contains a
> > >&gt; &gt; timestamp,
> > >&gt; &gt; &gt; a
> > >&gt; &gt; &gt; &gt; &gt; deviceID and arbitrary measurements with
> values.
> > Each row is
> > >&gt; &gt; &gt; independent.
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; For example,
> > >&gt; &gt; &gt; &gt; &gt; row1: time, device1, s1, s2
> > >&gt; &gt; &gt; &gt; &gt; row2: time, device2, s3, s4
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; So I plan to rename these methods.
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> > >&gt; &gt; &gt; &gt; &gt; insertBatch -&gt; insertSeriesBatch or
> > ColumnBatch
> > >&gt; &gt; &gt; &gt; &gt; insertInBatch -&gt; insertRows
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; Does this look good to you?
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; Thanks,
> > >&gt; &gt; &gt; &gt; &gt; —————————————————
> > >&gt; &gt; &gt; &gt; &gt; Jialin Qiao
> > >&gt; &gt; &gt; &gt; &gt; School of Software, Tsinghua University
> > >&gt; &gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt; &gt; 乔嘉林
> > >&gt; &gt; &gt; &gt; &gt; 清华大学 软件学院
> > >&gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt; &gt;
> > >&gt; &gt; &gt;
> > >&gt; &gt;
> > >&gt;
> >
>

回复:[Discuss] Method names in Session

Posted by Dawei Liu <at...@163.com>.
Hi,


(1) insert(String deviceId, long time, List<String> measurements,
List<String> values)
      insert some measurements of a device at a timestamp


insertSingleDeviceRecord




(2) insertInBatch(List<String> deviceIds, List<Long> times,
List<List<String>> measurementsList, List<List<String>> valuesList)
     multiple independent "insert"


insertMutiDevicesRecord




(3) insertBatch(RowBatch rowBatch)
     insert some data of one device


insertSingleDeviceMutiRecords


(4) insertMultipleDeviceBatch(Map<String, RowBatch> rowBatchMap)
     multiple independent "insertBatch"


insertMutiDevicesMutiRecords


Thanks 
———
Dawei Liu 


在2020年04月19日 00:58,Xiangdong Huang 写道:
Hi Wei Shao,

> If we rename RowBatch to AlignedColumns

If the name is confusing, why not change the name?

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

黄向东
清华大学 软件学院


Wei Shao <ko...@163.com> 于2020年4月18日周六 下午6:51写道:

> Hi,
>
>
> Here is my idea for your reference:
> (1) InsertBatch() can be renamed with its parameter, that is
> InsertRowBatch() when accepting a RowBatch. If we rename RowBatch to
> AlignedColumns, then InsertAlignedColumns() is fine.
> (2) For insertInBatch(), It looks to me that this method is designed to be
> the batch-insert version of insert(). So it would be better to build some
> connections between these two methods' names. Perhaps we could consider
> changing insertInBatch() to insertBatch() or BatchInsert().
>
>
> Thanks,
> Wei
>
>
>
>
>
>
>
>
> At 2020-04-18 16:24:57, "追忆-寻梦-呓" <ru...@foxmail.com> wrote:
> >Hi, I'd like to call&nbsp;&nbsp;the batch insertion of data2 as
> insertTimeAlignedBatch and call the batch insertion of data1
> insertSingleDeviceRowBatch.
> >
> >
> >&gt; &gt; &gt; Data 1:
> >&gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 2:
> >&gt; &gt; &gt; device1
> >&gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >
> >Good weather! Happy every day!
> >天气不错,祝开开心心!
> >
> >&nbsp;
> >
> >
> >
> >
> >------------------&nbsp;原始邮件&nbsp;------------------
> >发件人:&nbsp;"Jialin Qiao"<qiaojialin@apache.org&gt;;
> >发送时间:&nbsp;2020年4月18日(星期六) 下午4:12
> >收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;
> >
> >主题:&nbsp;Re: [Discuss] Method names in Session
> >
> >
> >
> >Hi,
> >
> >There are mainly four interfaces in Session.
> >
> >(1) insert(String deviceId, long time, List<String&gt; measurements,
> >List<String&gt; values)
> >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert some measurements of a device at a
> timestamp
> >(2) insertInBatch(List<String&gt; deviceIds, List<Long&gt; times,
> >List<List<String&gt;&gt; measurementsList, List<List<String&gt;&gt;
> valuesList)
> >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insert"
> >(3) insertBatch(RowBatch rowBatch)
> >&nbsp;&nbsp;&nbsp;&nbsp; insert some data of one device
> >(4) insertMultipleDeviceBatch(Map<String, RowBatch&gt; rowBatchMap)
> >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insertBatch"
> >
> >
> >&gt; InsertDevice()
> >&gt; InsertMutiDevice() or InsertBatch()
> >
> >Could you tell the relationship between these two naming with the existing
> >four?
> >
> >Thanks,
> >—————————————————
> >Jialin Qiao
> >School of Software, Tsinghua University
> >
> >乔嘉林
> >清华大学 软件学院
> >
> >
> >Dawei Liu <atoildw@163.com&gt; 于2020年4月18日周六 下午3:58写道:
> >
> >&gt; hi,
> >&gt; I don’t like AlignXX , the device and signal items should be
> intuitively
> >&gt; considered in the user's mind
> >&gt;
> >&gt;
> >&gt; So I think the method name should be:
> >&gt; InsertDevice()
> >&gt; InsertMutiDevice() or InsertBatch()
> >&gt;
> >&gt;
> >&gt; Thanks
> >&gt; ———
> >&gt; Dawei Liu
> >&gt; On 04/18/2020 15:24, Xiangdong Huang wrote:
> >&gt; Hi,
> >&gt;
> >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> >&gt;
> >&gt; A little better than SeriesBatch and ColumnBatch.
> >&gt;
> >&gt; Best,
> >&gt; -----------------------------------
> >&gt; Xiangdong Huang
> >&gt; School of Software, Tsinghua University
> >&gt;
> >&gt; 黄向东
> >&gt; 清华大学 软件学院
> >&gt;
> >&gt;
> >&gt; Jialin Qiao <qiaojialin@apache.org&gt; 于2020年4月18日周六 下午3:13写道:
> >&gt;
> >&gt; &gt; Hi,
> >&gt; &gt;
> >&gt; &gt; insertAlignedColumns is fine to me.
> >&gt; &gt;
> >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> >&gt; &gt;
> >&gt; &gt; Thanks,
> >&gt; &gt; —————————————————
> >&gt; &gt; Jialin Qiao
> >&gt; &gt; School of Software, Tsinghua University
> >&gt; &gt;
> >&gt; &gt; 乔嘉林
> >&gt; &gt; 清华大学 软件学院
> >&gt; &gt;
> >&gt; &gt;
> >&gt; &gt; Xiangdong Huang <sainthxd@gmail.com&gt; 于2020年4月18日周六 下午3:09写道:
> >&gt; &gt;
> >&gt; &gt; &gt; Hi,
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; If you call the batch insertion of Data 1 as insertRows(),
> >&gt; &gt; &gt; why not call the batch insertion of Data 2 as&nbsp;
> insertColumns()? or,
> >&gt; &gt; &gt; insertAlignedColumns();
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; I think the name is not clear. Is there better suggestion?
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 1:
> >&gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 2:
> >&gt; &gt; &gt; device1
> >&gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Best,
> >&gt; &gt; &gt; -----------------------------------
> >&gt; &gt; &gt; Xiangdong Huang
> >&gt; &gt; &gt; School of Software, Tsinghua University
> >&gt; &gt; &gt;
> >&gt; &gt; &gt;&nbsp; 黄向东
> >&gt; &gt; &gt; 清华大学 软件学院
> >&gt; &gt; &gt;
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Haonan Hou <hhaonan@outlook.com&gt; 于2020年4月18日周六
> 下午1:39写道:
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; Hi,
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; +1. The new way of naming seems more straight forward.
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; Thanks,
> >&gt; &gt; &gt; &gt; Haonan
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; On Apr 18, 2020, at 1:29 PM, Jialin Qiao <
> qiaojialin@apache.org&gt;
> >&gt; &gt; &gt; wrote:
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Hi,
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; The native API Session provides many methods.
> However, their names
> >&gt; &gt; are
> >&gt; &gt; &gt; &gt; &gt; confusing. For example, insertBatch and
> insertInBatch.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; (1) insertBatch actually receives a RowBatch
> structure, which
> >&gt; &gt; contains
> >&gt; &gt; &gt; &gt; data
> >&gt; &gt; &gt; &gt; &gt; of multiple measurements of a device, these
> measurements data share
> >&gt; &gt; the
> >&gt; &gt; &gt; &gt; &gt; same time column.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; If we treat it as a table, the table name is
> deviceId, the columns
> >&gt; &gt; are
> >&gt; &gt; &gt; &gt; &gt; Timestamp, measurements name.&nbsp; This table
> should not contain null
> >&gt; &gt; &gt; value.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; For example
> >&gt; &gt; &gt; &gt; &gt; device1
> >&gt; &gt; &gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; (2) insertInBatch insert multiple rows, each row
> contains a
> >&gt; &gt; timestamp,
> >&gt; &gt; &gt; a
> >&gt; &gt; &gt; &gt; &gt; deviceID and arbitrary measurements with values.
> Each row is
> >&gt; &gt; &gt; independent.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; For example,
> >&gt; &gt; &gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; So I plan to rename these methods.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> >&gt; &gt; &gt; &gt; &gt; insertBatch -&gt; insertSeriesBatch or
> ColumnBatch
> >&gt; &gt; &gt; &gt; &gt; insertInBatch -&gt; insertRows
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Does this look good to you?
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Thanks,
> >&gt; &gt; &gt; &gt; &gt; —————————————————
> >&gt; &gt; &gt; &gt; &gt; Jialin Qiao
> >&gt; &gt; &gt; &gt; &gt; School of Software, Tsinghua University
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; 乔嘉林
> >&gt; &gt; &gt; &gt; &gt; 清华大学 软件学院
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt;
> >&gt; &gt;
> >&gt;
>

Re: 回复: [Discuss] Method names in Session

Posted by Xiangdong Huang <sa...@gmail.com>.
Hi Wei Shao,

> If we rename RowBatch to AlignedColumns

If the name is confusing, why not change the name?

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院


Wei Shao <ko...@163.com> 于2020年4月18日周六 下午6:51写道:

> Hi,
>
>
> Here is my idea for your reference:
> (1) InsertBatch() can be renamed with its parameter, that is
> InsertRowBatch() when accepting a RowBatch. If we rename RowBatch to
> AlignedColumns, then InsertAlignedColumns() is fine.
> (2) For insertInBatch(), It looks to me that this method is designed to be
> the batch-insert version of insert(). So it would be better to build some
> connections between these two methods' names. Perhaps we could consider
> changing insertInBatch() to insertBatch() or BatchInsert().
>
>
> Thanks,
> Wei
>
>
>
>
>
>
>
>
> At 2020-04-18 16:24:57, "追忆-寻梦-呓" <ru...@foxmail.com> wrote:
> >Hi, I'd like to call&nbsp;&nbsp;the batch insertion of data2 as
> insertTimeAlignedBatch and call the batch insertion of data1
> insertSingleDeviceRowBatch.
> >
> >
> >&gt; &gt; &gt; Data 1:
> >&gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 2:
> >&gt; &gt; &gt; device1
> >&gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >
> >Good weather! Happy every day!
> >天气不错,祝开开心心!
> >
> >&nbsp;
> >
> >
> >
> >
> >------------------&nbsp;原始邮件&nbsp;------------------
> >发件人:&nbsp;"Jialin Qiao"<qiaojialin@apache.org&gt;;
> >发送时间:&nbsp;2020年4月18日(星期六) 下午4:12
> >收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;
> >
> >主题:&nbsp;Re: [Discuss] Method names in Session
> >
> >
> >
> >Hi,
> >
> >There are mainly four interfaces in Session.
> >
> >(1) insert(String deviceId, long time, List<String&gt; measurements,
> >List<String&gt; values)
> >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert some measurements of a device at a
> timestamp
> >(2) insertInBatch(List<String&gt; deviceIds, List<Long&gt; times,
> >List<List<String&gt;&gt; measurementsList, List<List<String&gt;&gt;
> valuesList)
> >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insert"
> >(3) insertBatch(RowBatch rowBatch)
> >&nbsp;&nbsp;&nbsp;&nbsp; insert some data of one device
> >(4) insertMultipleDeviceBatch(Map<String, RowBatch&gt; rowBatchMap)
> >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insertBatch"
> >
> >
> >&gt; InsertDevice()
> >&gt; InsertMutiDevice() or InsertBatch()
> >
> >Could you tell the relationship between these two naming with the existing
> >four?
> >
> >Thanks,
> >—————————————————
> >Jialin Qiao
> >School of Software, Tsinghua University
> >
> >乔嘉林
> >清华大学 软件学院
> >
> >
> >Dawei Liu <atoildw@163.com&gt; 于2020年4月18日周六 下午3:58写道:
> >
> >&gt; hi,
> >&gt; I don’t like AlignXX , the device and signal items should be
> intuitively
> >&gt; considered in the user's mind
> >&gt;
> >&gt;
> >&gt; So I think the method name should be:
> >&gt; InsertDevice()
> >&gt; InsertMutiDevice() or InsertBatch()
> >&gt;
> >&gt;
> >&gt; Thanks
> >&gt; ———
> >&gt; Dawei Liu
> >&gt; On 04/18/2020 15:24, Xiangdong Huang wrote:
> >&gt; Hi,
> >&gt;
> >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> >&gt;
> >&gt; A little better than SeriesBatch and ColumnBatch.
> >&gt;
> >&gt; Best,
> >&gt; -----------------------------------
> >&gt; Xiangdong Huang
> >&gt; School of Software, Tsinghua University
> >&gt;
> >&gt; 黄向东
> >&gt; 清华大学 软件学院
> >&gt;
> >&gt;
> >&gt; Jialin Qiao <qiaojialin@apache.org&gt; 于2020年4月18日周六 下午3:13写道:
> >&gt;
> >&gt; &gt; Hi,
> >&gt; &gt;
> >&gt; &gt; insertAlignedColumns is fine to me.
> >&gt; &gt;
> >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> >&gt; &gt;
> >&gt; &gt; Thanks,
> >&gt; &gt; —————————————————
> >&gt; &gt; Jialin Qiao
> >&gt; &gt; School of Software, Tsinghua University
> >&gt; &gt;
> >&gt; &gt; 乔嘉林
> >&gt; &gt; 清华大学 软件学院
> >&gt; &gt;
> >&gt; &gt;
> >&gt; &gt; Xiangdong Huang <sainthxd@gmail.com&gt; 于2020年4月18日周六 下午3:09写道:
> >&gt; &gt;
> >&gt; &gt; &gt; Hi,
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; If you call the batch insertion of Data 1 as insertRows(),
> >&gt; &gt; &gt; why not call the batch insertion of Data 2 as&nbsp;
> insertColumns()? or,
> >&gt; &gt; &gt; insertAlignedColumns();
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; I think the name is not clear. Is there better suggestion?
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 1:
> >&gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 2:
> >&gt; &gt; &gt; device1
> >&gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Best,
> >&gt; &gt; &gt; -----------------------------------
> >&gt; &gt; &gt; Xiangdong Huang
> >&gt; &gt; &gt; School of Software, Tsinghua University
> >&gt; &gt; &gt;
> >&gt; &gt; &gt;&nbsp; 黄向东
> >&gt; &gt; &gt; 清华大学 软件学院
> >&gt; &gt; &gt;
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Haonan Hou <hhaonan@outlook.com&gt; 于2020年4月18日周六
> 下午1:39写道:
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; Hi,
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; +1. The new way of naming seems more straight forward.
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; Thanks,
> >&gt; &gt; &gt; &gt; Haonan
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; On Apr 18, 2020, at 1:29 PM, Jialin Qiao <
> qiaojialin@apache.org&gt;
> >&gt; &gt; &gt; wrote:
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Hi,
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; The native API Session provides many methods.
> However, their names
> >&gt; &gt; are
> >&gt; &gt; &gt; &gt; &gt; confusing. For example, insertBatch and
> insertInBatch.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; (1) insertBatch actually receives a RowBatch
> structure, which
> >&gt; &gt; contains
> >&gt; &gt; &gt; &gt; data
> >&gt; &gt; &gt; &gt; &gt; of multiple measurements of a device, these
> measurements data share
> >&gt; &gt; the
> >&gt; &gt; &gt; &gt; &gt; same time column.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; If we treat it as a table, the table name is
> deviceId, the columns
> >&gt; &gt; are
> >&gt; &gt; &gt; &gt; &gt; Timestamp, measurements name.&nbsp; This table
> should not contain null
> >&gt; &gt; &gt; value.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; For example
> >&gt; &gt; &gt; &gt; &gt; device1
> >&gt; &gt; &gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; (2) insertInBatch insert multiple rows, each row
> contains a
> >&gt; &gt; timestamp,
> >&gt; &gt; &gt; a
> >&gt; &gt; &gt; &gt; &gt; deviceID and arbitrary measurements with values.
> Each row is
> >&gt; &gt; &gt; independent.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; For example,
> >&gt; &gt; &gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; So I plan to rename these methods.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> >&gt; &gt; &gt; &gt; &gt; insertBatch -&gt; insertSeriesBatch or
> ColumnBatch
> >&gt; &gt; &gt; &gt; &gt; insertInBatch -&gt; insertRows
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Does this look good to you?
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Thanks,
> >&gt; &gt; &gt; &gt; &gt; —————————————————
> >&gt; &gt; &gt; &gt; &gt; Jialin Qiao
> >&gt; &gt; &gt; &gt; &gt; School of Software, Tsinghua University
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; 乔嘉林
> >&gt; &gt; &gt; &gt; &gt; 清华大学 软件学院
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt;
> >&gt; &gt;
> >&gt;
>

Re:回复: [Discuss] Method names in Session

Posted by Wei Shao <ko...@163.com>.
Hi,


Here is my idea for your reference:
(1) InsertBatch() can be renamed with its parameter, that is InsertRowBatch() when accepting a RowBatch. If we rename RowBatch to AlignedColumns, then InsertAlignedColumns() is fine.
(2) For insertInBatch(), It looks to me that this method is designed to be the batch-insert version of insert(). So it would be better to build some connections between these two methods' names. Perhaps we could consider changing insertInBatch() to insertBatch() or BatchInsert(). 


Thanks, 
Wei








At 2020-04-18 16:24:57, "追忆-寻梦-呓" <ru...@foxmail.com> wrote:
>Hi, I'd like to call&nbsp;&nbsp;the batch insertion of data2 as insertTimeAlignedBatch and call the batch insertion of data1 insertSingleDeviceRowBatch.
>
>
>&gt; &gt; &gt; Data 1:
>&gt; &gt; &gt; row1: time, device1, s1, s2
>&gt; &gt; &gt; row2: time, device2, s3, s4
>&gt; &gt; &gt;
>&gt; &gt; &gt; Data 2:
>&gt; &gt; &gt; device1
>&gt; &gt; &gt; time, s1, s2, s3
>&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>
>Good weather! Happy every day!
>天气不错,祝开开心心!
>
>&nbsp;
>
>
>
>
>------------------&nbsp;原始邮件&nbsp;------------------
>发件人:&nbsp;"Jialin Qiao"<qiaojialin@apache.org&gt;;
>发送时间:&nbsp;2020年4月18日(星期六) 下午4:12
>收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;
>
>主题:&nbsp;Re: [Discuss] Method names in Session
>
>
>
>Hi,
>
>There are mainly four interfaces in Session.
>
>(1) insert(String deviceId, long time, List<String&gt; measurements,
>List<String&gt; values)
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert some measurements of a device at a timestamp
>(2) insertInBatch(List<String&gt; deviceIds, List<Long&gt; times,
>List<List<String&gt;&gt; measurementsList, List<List<String&gt;&gt; valuesList)
>&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insert"
>(3) insertBatch(RowBatch rowBatch)
>&nbsp;&nbsp;&nbsp;&nbsp; insert some data of one device
>(4) insertMultipleDeviceBatch(Map<String, RowBatch&gt; rowBatchMap)
>&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insertBatch"
>
>
>&gt; InsertDevice()
>&gt; InsertMutiDevice() or InsertBatch()
>
>Could you tell the relationship between these two naming with the existing
>four?
>
>Thanks,
>—————————————————
>Jialin Qiao
>School of Software, Tsinghua University
>
>乔嘉林
>清华大学 软件学院
>
>
>Dawei Liu <atoildw@163.com&gt; 于2020年4月18日周六 下午3:58写道:
>
>&gt; hi,
>&gt; I don’t like AlignXX , the device and signal items should be intuitively
>&gt; considered in the user's mind
>&gt;
>&gt;
>&gt; So I think the method name should be:
>&gt; InsertDevice()
>&gt; InsertMutiDevice() or InsertBatch()
>&gt;
>&gt;
>&gt; Thanks
>&gt; ———
>&gt; Dawei Liu
>&gt; On 04/18/2020 15:24, Xiangdong Huang wrote:
>&gt; Hi,
>&gt;
>&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
>&gt;
>&gt; A little better than SeriesBatch and ColumnBatch.
>&gt;
>&gt; Best,
>&gt; -----------------------------------
>&gt; Xiangdong Huang
>&gt; School of Software, Tsinghua University
>&gt;
>&gt; 黄向东
>&gt; 清华大学 软件学院
>&gt;
>&gt;
>&gt; Jialin Qiao <qiaojialin@apache.org&gt; 于2020年4月18日周六 下午3:13写道:
>&gt;
>&gt; &gt; Hi,
>&gt; &gt;
>&gt; &gt; insertAlignedColumns is fine to me.
>&gt; &gt;
>&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
>&gt; &gt;
>&gt; &gt; Thanks,
>&gt; &gt; —————————————————
>&gt; &gt; Jialin Qiao
>&gt; &gt; School of Software, Tsinghua University
>&gt; &gt;
>&gt; &gt; 乔嘉林
>&gt; &gt; 清华大学 软件学院
>&gt; &gt;
>&gt; &gt;
>&gt; &gt; Xiangdong Huang <sainthxd@gmail.com&gt; 于2020年4月18日周六 下午3:09写道:
>&gt; &gt;
>&gt; &gt; &gt; Hi,
>&gt; &gt; &gt;
>&gt; &gt; &gt; If you call the batch insertion of Data 1 as insertRows(),
>&gt; &gt; &gt; why not call the batch insertion of Data 2 as&nbsp; insertColumns()? or,
>&gt; &gt; &gt; insertAlignedColumns();
>&gt; &gt; &gt;
>&gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
>&gt; &gt; &gt;
>&gt; &gt; &gt; I think the name is not clear. Is there better suggestion?
>&gt; &gt; &gt;
>&gt; &gt; &gt; Data 1:
>&gt; &gt; &gt; row1: time, device1, s1, s2
>&gt; &gt; &gt; row2: time, device2, s3, s4
>&gt; &gt; &gt;
>&gt; &gt; &gt; Data 2:
>&gt; &gt; &gt; device1
>&gt; &gt; &gt; time, s1, s2, s3
>&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt;
>&gt; &gt; &gt; Best,
>&gt; &gt; &gt; -----------------------------------
>&gt; &gt; &gt; Xiangdong Huang
>&gt; &gt; &gt; School of Software, Tsinghua University
>&gt; &gt; &gt;
>&gt; &gt; &gt;&nbsp; 黄向东
>&gt; &gt; &gt; 清华大学 软件学院
>&gt; &gt; &gt;
>&gt; &gt; &gt;
>&gt; &gt; &gt; Haonan Hou <hhaonan@outlook.com&gt; 于2020年4月18日周六 下午1:39写道:
>&gt; &gt; &gt;
>&gt; &gt; &gt; &gt; Hi,
>&gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; +1. The new way of naming seems more straight forward.
>&gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; Thanks,
>&gt; &gt; &gt; &gt; Haonan
>&gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; On Apr 18, 2020, at 1:29 PM, Jialin Qiao <qiaojialin@apache.org&gt;
>&gt; &gt; &gt; wrote:
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; Hi,
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; The native API Session provides many methods. However, their names
>&gt; &gt; are
>&gt; &gt; &gt; &gt; &gt; confusing. For example, insertBatch and insertInBatch.
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; (1) insertBatch actually receives a RowBatch structure, which
>&gt; &gt; contains
>&gt; &gt; &gt; &gt; data
>&gt; &gt; &gt; &gt; &gt; of multiple measurements of a device, these measurements data share
>&gt; &gt; the
>&gt; &gt; &gt; &gt; &gt; same time column.
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; If we treat it as a table, the table name is deviceId, the columns
>&gt; &gt; are
>&gt; &gt; &gt; &gt; &gt; Timestamp, measurements name.&nbsp; This table should not contain null
>&gt; &gt; &gt; value.
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; For example
>&gt; &gt; &gt; &gt; &gt; device1
>&gt; &gt; &gt; &gt; &gt; time, s1, s2, s3
>&gt; &gt; &gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; (2) insertInBatch insert multiple rows, each row contains a
>&gt; &gt; timestamp,
>&gt; &gt; &gt; a
>&gt; &gt; &gt; &gt; &gt; deviceID and arbitrary measurements with values. Each row is
>&gt; &gt; &gt; independent.
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; For example,
>&gt; &gt; &gt; &gt; &gt; row1: time, device1, s1, s2
>&gt; &gt; &gt; &gt; &gt; row2: time, device2, s3, s4
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; So I plan to rename these methods.
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
>&gt; &gt; &gt; &gt; &gt; insertBatch -&gt; insertSeriesBatch or ColumnBatch
>&gt; &gt; &gt; &gt; &gt; insertInBatch -&gt; insertRows
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; Does this look good to you?
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; Thanks,
>&gt; &gt; &gt; &gt; &gt; —————————————————
>&gt; &gt; &gt; &gt; &gt; Jialin Qiao
>&gt; &gt; &gt; &gt; &gt; School of Software, Tsinghua University
>&gt; &gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt; &gt; 乔嘉林
>&gt; &gt; &gt; &gt; &gt; 清华大学 软件学院
>&gt; &gt; &gt; &gt;
>&gt; &gt; &gt; &gt;
>&gt; &gt; &gt;
>&gt; &gt;
>&gt;