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

HIVE-21740: Collect LLAP execution latency metrics #633

Closed
wants to merge 5 commits into from

Conversation

pvary
Copy link
Contributor

@pvary pvary commented May 17, 2019

Add a decaying metrics which measures the task latency.
Refactored the MockMetricsCollector to reuse that in the test.

Copy link
Contributor

@odraese odraese left a comment

Choose a reason for hiding this comment

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

Some minor changes (like isMapTask) should be done.
Also not sure if exponential decay is helping the cause here.

Peter Vary added 2 commits May 30, 2019 12:21
Copy link
Contributor

@b-slim b-slim left a comment

Choose a reason for hiding this comment

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

did a pass left some minor comments and nit recommendation that can be ignored but over all looks good to me.
Thanks.

hive-site.xml Outdated Show resolved Hide resolved
@@ -4438,6 +4438,8 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
LLAP_COLLECT_LOCK_METRICS("hive.llap.lockmetrics.collect", false,
"Whether lock metrics (wait times, counts) are collected for LLAP "
+ "related locks"),
LLAP_LATENCY_METRIC_WINDOW_SIZE("hive.llap.metrics.latency.window.size", 2048,
Copy link
Contributor

Choose a reason for hiding this comment

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

any clue on why 2k is the default ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By severeal TCPDS tests it seems that we require minimally around 1000 measurements to have a steady result for the average. Set it to 2k to be sure

@@ -1175,6 +1178,9 @@ public boolean deallocateTask(
LOG.debug("Processing deallocateTask for task={}, taskSucceeded={}, endReason={}", task,
taskSucceeded, endReason);
}
if (task instanceof TaskAttemptImpl && metrics != null) {
updateMetrics((TaskAttemptImpl)task);
Copy link
Contributor

Choose a reason for hiding this comment

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

style is off and not sure what case metrics is null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The metrics can be null in case of conf.getBoolean(ConfVars.HIVE_IN_TEST.varname, false)

I tried to find the style problem, but not sure which part should be written differently

metrics.addTaskLatency(nodeInfo.shortStringBase, taskAttempt.getFinishTime() - taskAttempt.getLaunchTime());
}

private boolean isMapTask(TaskAttemptImpl taskAttempt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this really the best way to find if this is a map task ?

Copy link
Contributor Author

@pvary pvary May 31, 2019

Choose a reason for hiding this comment

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

I am not yet entirely familiar with this part of the code.
I thought that the vertex can tell us more but getVertex is package private method for TaskAttemptImp, and getting the Vertex from would need something like this (found in getTransitiveVertexOutputs):


DagInfo info = getContext().getCurrentDagInfo();
if (!(info instanceof DAG)) {
LOG.warn("DAG info is not a DAG");
return;
}
DAG dag = (DAG) info;
Vertex vertex = dag.getVertex(taskAttempt.getVertexID());


I found casting DagInfo to DAG more shady than relying on counters, but feel free to disagree.
Also open to any suggestions where should I dig around more to find a better solution!

hive-site.xml Outdated Show resolved Hide resolved
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.

3 participants