You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by linwen <gi...@git.apache.org> on 2016/02/03 08:17:12 UTC
[GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
GitHub user linwen opened a pull request:
https://github.com/apache/incubator-hawq/pull/330
HAWQ-252. fix a coredump when yarn heartbeat thread doesn't exit quickly
Please review.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/linwen/incubator-hawq hawq-252
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-hawq/pull/330.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #330
----
commit 1f82000835670352bd81b5c0f3d9e85e1169d51a
Author: Wen Lin <wl...@pivotal.io>
Date: 2016-02-03T07:14:57Z
HAWQ-252. fix a coredump when yarn heartbeat thread doesn't exit quickly
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
Posted by linwen <gi...@git.apache.org>.
Github user linwen commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/330#discussion_r51702954
--- Diff: depends/libyarn/src/libyarnclient/LibYarnClient.cpp ---
@@ -106,7 +106,7 @@ list<ResourceRequest> LibYarnClient::getAskRequests() {
void* heartbeatFunc(void* args) {
--- End diff --
Thanks, I will refactor the whole file in future.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 commented on the pull request:
https://github.com/apache/incubator-hawq/pull/330#issuecomment-179071203
+1 The code change is ok to me.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
Posted by huor <gi...@git.apache.org>.
Github user huor commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/330#discussion_r51702311
--- Diff: depends/libyarn/src/libyarnclient/LibYarnClient.cpp ---
@@ -106,7 +106,7 @@ list<ResourceRequest> LibYarnClient::getAskRequests() {
void* heartbeatFunc(void* args) {
--- End diff --
1. Do we need to retry here as it already retries in "client->dummyAllocate();"?
2. If we need to retry, the code can be refined as below. The main points are:
1) use macro instead of magic number for maximum retry number
2) provide retry time in logging information
3) use /* ... */ for multiple line comment
{noformat}
#define HEARTBEAT_MAX_RETRY_NUM 2
int failcounter = 0;
LibYarnClient *client = (LibYarnClient*)args;
while (client->keepRun) {
try {
client->dummyAllocate();
failcounter = 0;
}
catch(const YarnException &e) {
failcounter++;
LOG(WARNING, "LibYarnClient::heartbeatFunc, dummy allocation "
"is not correctly executed in try %d with exception raised. %s",
failcounter;
e.msg());
if ( failcounter >= HEARTBEAT_MAX_RETRY_NUM ) {
/**
* In case retry too many times with errors/exceptions, this
* thread will return. LibYarn has to re-register application
* and start the heartbeat thread again.
*/
LOG(WARNING, "LibYarnClient::heartbeatFunc, there are too many "
"failures raised after %d maximum retries. This heart-beat thread exits now.", HEARTBEAT_MAX_RETRY_NUM);
client->keepRun = false;
break;
}
}
usleep((client->heartbeatInterval) * 1000);
}
{noformat}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
Posted by linwen <gi...@git.apache.org>.
Github user linwen closed the pull request at:
https://github.com/apache/incubator-hawq/pull/330
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
Posted by liming01 <gi...@git.apache.org>.
Github user liming01 commented on the pull request:
https://github.com/apache/incubator-hawq/pull/330#issuecomment-179140402
Looks good to me. +1.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---