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


> > > Data 1:
> > > row1: time, device1, s1, s2
> > > row2: time, device2, s3, s4
> > >
> > > Data 2:
> > > device1
> > > time, s1, s2, s3
> > > 1       1     
2    3
> > > 2       1     
2    3
> > > 3       1     
2    3

Good weather! Happy every day!
??????????????????????

 




------------------ ???????? ------------------
??????:&nbsp;"Jialin Qiao"<[email protected]&gt;;
????????:&nbsp;2020??4??18??(??????) ????4:12
??????:&nbsp;"dev"<[email protected]&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 <[email protected]&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 <[email protected]&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 <[email protected]&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 <[email protected]&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 
<[email protected]&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