Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some constructor for chunk capacity #180

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

133tosakarin
Copy link

@133tosakarin 133tosakarin commented Jul 22, 2024

For ChunkWriter, we add some constructor with rowCount params to specific the capacity of bytestream such that we can reduce the bytestream grow times.
Note: these constructors are used just in iotdb currently

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi, this is your first pull request in the Apache TsFile project. Thanks for your contribution! TsFile will be better because of you.

@133tosakarin 133tosakarin force-pushed the add_some_constructor_for_chunk_capacity branch from 1c49df3 to 5fe593f Compare July 26, 2024 06:51
@@ -170,6 +204,11 @@ public int write(Tablet tablet) throws WriteProcessException, IOException {
emptyValueChunkWriters.add(entry.getValue());
}
}

for (int columnIndex = 0; columnIndex < measurementSchemas.size(); ++columnIndex) {
Copy link
Contributor

Choose a reason for hiding this comment

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

redundant?

@@ -80,6 +80,36 @@ public AlignedChunkWriterImpl(VectorMeasurementSchema schema) {
this.remainingPointsNumber = timeChunkWriter.getRemainingPointNumberForCurrentPage();
}

public AlignedChunkWriterImpl(VectorMeasurementSchema schema, int rowCount) {

Copy link
Contributor

Choose a reason for hiding this comment

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

empyt line

rowCount);

this.valueIndex = 0;

Copy link
Contributor

Choose a reason for hiding this comment

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

empty line

// init statistics for this chunk and page
this.statistics = Statistics.getStatsByType(dataType);

int bufferCount =
Copy link
Contributor

Choose a reason for hiding this comment

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

abstract function and add comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants