Skip to content

Conversation

@daihuia
Copy link

@daihuia daihuia commented Apr 1, 2019

No description provided.

@neuyilan
Copy link
Member

neuyilan commented May 9, 2020

Hi, daihuia, this is indeed a very good job, but I have a question whether the implementation of this Go version has a performance improvement compared to the Java implementation of the same version?

@HTHou HTHou added the Module - TsFile data file format label Dec 21, 2020
Copy link
Member

@NiklasMerz NiklasMerz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I look quickly at the code and found a few bigger commented out code blocks, that could be removed for better readabilty. Please correct me if I am wrong.

Another question: Why is this not a Go Module and built with an old Go version on Travis? Newer Go versions (mine is 1.16) expect a go.mod file and module support. Even with putting the go files in my GOPATH it won't build

Engine_WriteTsPerfTest.go:30:2: cannot find package "tsfile/common/constant" in any of:
	/usr/local/go/src/tsfile/common/constant (from $GOROOT)
	/home/niklas/go/src/tsfile/common/constant (from $GOPATH)
Engine_GenFilePerfTest.go:29:2: cannot find package "tsfile/common/log" in any of:
	/usr/local/go/src/tsfile/common/log (from $GOROOT)
	/home/niklas/go/src/tsfile/common/log (from $GOPATH)
TsFileSequenceReader.go:28:2: cannot find package "tsfile/encoding/decoder" in any of:
	/usr/local/go/src/tsfile/encoding/decoder (from $GOROOT)
	/home/niklas/go/src/tsfile/encoding/decoder (from $GOPATH)
Engine_PerfTest.go:26:2: cannot find package "tsfile/timeseries/filter" in any of:
	/usr/local/go/src/tsfile/timeseries/filter (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/filter (from $GOPATH)
Engine_PerfTest.go:27:2: cannot find package "tsfile/timeseries/filter/operator" in any of:
	/usr/local/go/src/tsfile/timeseries/filter/operator (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/filter/operator (from $GOPATH)
Engine_PerfTest.go:28:2: cannot find package "tsfile/timeseries/query" in any of:
	/usr/local/go/src/tsfile/timeseries/query (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/query (from $GOPATH)
Engine_PerfTest.go:29:2: cannot find package "tsfile/timeseries/query/engine" in any of:
	/usr/local/go/src/tsfile/timeseries/query/engine (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/query/engine (from $GOPATH)
Engine_PerfTest.go:30:2: cannot find package "tsfile/timeseries/read" in any of:
	/usr/local/go/src/tsfile/timeseries/read (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/read (from $GOPATH)
TsFileSequenceReader.go:31:2: cannot find package "tsfile/timeseries/read/reader/impl/basic" in any of:
	/usr/local/go/src/tsfile/timeseries/read/reader/impl/basic (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/read/reader/impl/basic (from $GOPATH)
Engine_WriteTsPerfTest.go:32:2: cannot find package "tsfile/timeseries/write/sensorDescriptor" in any of:
	/usr/local/go/src/tsfile/timeseries/write/sensorDescriptor (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/write/sensorDescriptor (from $GOPATH)
Engine_WriteTsPerfTest.go:33:2: cannot find package "tsfile/timeseries/write/tsFileWriter" in any of:
	/usr/local/go/src/tsfile/timeseries/write/tsFileWriter (from $GOROOT)
	/home/niklas/go/src/tsfile/timeseries/write/tsFileWriter (from $GOPATH)

* specific language governing permissions and limitations
* under the License.
*/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has no test in the name.

}
}

var is_comment bool = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this variable be in loadItem?

offset := pos + width - 1
for i := 0; i < width; i++ {
index := offset - i
//value = setIntN(value, i, getByteN(data[index/8], index))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

}

func WriteLongLittleEndianPaddedOnBitWidth(value int64, out *bytes.Buffer, bitWidth int) {
//paddedByteNum := (bitWidth + 7) / 8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

return buffer.Bytes()
}

//func Int64ToByteLittleEndian(num int64) []byte {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

if valueCount == 0 {
aa := []byte{24}
v.timeBuf.Write(aa)
//s.timeBuf.Write(utils.BoolToByte(true))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

return t.DataPointSli
}

//func PushBack(t *TsRecord, tuple dataPoint.DataPoint) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

value int32
}

//func (d *DataPoint) Write(v []byte) ([]byte,error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

if pageHeaderErr != nil {
log.Error("init pageHeader error: ", pageHeaderErr)
}
// write pageheader to pageBuf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

//start_edit wangcan 2018-10-15
//if contain, _ := utils.MapContains(r.dataSeriesWriters, sd.GetSensorId()); !contain {
_, contain := r.dataSeriesWriters[sd.GetSensorId()]
if !contain {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old code?

neuyilan added a commit to neuyilan/iotdb that referenced this pull request Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module - TsFile data file format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants