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

log sizes of created smoosh files #3817

Merged
merged 2 commits into from
Jan 5, 2017
Merged

Conversation

himanshug
Copy link
Contributor

just adding logs to primarily understand impact of changing maxRowsInMemory setting during batch ingestion on size of intermediate segments created.

@himanshug himanshug added this to the 0.10.0 milestone Jan 4, 2017
@@ -695,9 +695,12 @@ public void doRun()
for (File file : toMerge) {
indexes.add(HadoopDruidIndexerConfig.INDEX_IO.loadIndex(file));
}

log.info("starting merge of intermediate persisted segments...");
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be debug level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is only going to get printed once during batch ingestion and most of the time users are not running indexing with debug level. its not going to pollute the logs really.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, can the formatting be made more consistent with other logging messages. like simply

Starting merge of intermediate persisted segments

Copy link
Contributor

Choose a reason for hiding this comment

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

Same request with other logging statements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

mergedBase = mergeQueryableIndex(
indexes, aggregators, new File(baseFlushFile, "merged"), progressIndicator
);
log.info("finished merge of intermediate persisted segments...");
Copy link
Contributor

Choose a reason for hiding this comment

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

same question, can this be debug level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same reason as above


FileOutputStream outStream = new FileOutputStream(outFile);
this.channel = outStream.getChannel();
closer.register(outStream);
Copy link
Contributor

Choose a reason for hiding this comment

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

can you move the closer to the same place the file output stream is created?

final FileOutputStream outStream = closer.register(new FileOutputStream(outFile));

should work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -494,6 +498,7 @@ public boolean isOpen()
public void close() throws IOException
{
closer.close();
FileSmoosher.LOG.info("Created smoosh file [%s] of size [%s] bytes.", outFile.getAbsolutePath(), outFile.length());
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question, can this be debug level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same reason.... mostly we look at logs afterwards where most jobs would've run without debug level logs.

@@ -695,9 +695,12 @@ public void doRun()
for (File file : toMerge) {
indexes.add(HadoopDruidIndexerConfig.INDEX_IO.loadIndex(file));
}

log.info("starting merge of intermediate persisted segments...");
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, can the formatting be made more consistent with other logging messages. like simply

Starting merge of intermediate persisted segments

@@ -695,9 +695,12 @@ public void doRun()
for (File file : toMerge) {
indexes.add(HadoopDruidIndexerConfig.INDEX_IO.loadIndex(file));
}

log.info("starting merge of intermediate persisted segments...");
Copy link
Contributor

Choose a reason for hiding this comment

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

Same request with other logging statements

@drcrallen
Copy link
Contributor

Minor logging format request, 👍 after that

@himanshug
Copy link
Contributor Author

@drcrallen updated formatting.

mergedBase = mergeQueryableIndex(
indexes, aggregators, new File(baseFlushFile, "merged"), progressIndicator
);
log.info("finished merge of intermediate persisted segments.");
Copy link
Contributor

Choose a reason for hiding this comment

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

can u log the time taken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@fjy fjy merged commit 7ced0e8 into apache:master Jan 5, 2017
dgolitsyn pushed a commit to metamx/druid that referenced this pull request Feb 14, 2017
* log when merging of intermediate segments starts during batch ingestion

* log sizes of created smoosh files
@himanshug himanshug deleted the dump_segment_sizes branch December 29, 2017 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants