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 <atoi...@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 <kofsh...@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, "追忆-寻梦-呓" <runhus...@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"<qiaojia...@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 <atoi...@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 <qiaojia...@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 <saint...@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 <hhao...@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 <
> > qiaojia...@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;
> >
>

Reply via email to