hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huor <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-252. fix a coredump when yarn he...
Date Wed, 03 Feb 2016 10:23:20 GMT
Github user huor commented on a diff in the pull request:

    --- 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
    	int failcounter = 0;
    	LibYarnClient *client = (LibYarnClient*)args;
    	while (client->keepRun) {
    		try {
    			failcounter = 0;
    		catch(const YarnException &e) {
    			LOG(WARNING, "LibYarnClient::heartbeatFunc, dummy allocation "
    						 "is not correctly executed in try %d with exception raised. %s",
    			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.",
    				client->keepRun = false;
    		usleep((client->heartbeatInterval) * 1000);

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.

View raw message