hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iw...@apache.org
Subject [2/2] incubator-hawq git commit: HAWQ-77. Fix source code comment for new ALTER/CREATE RESOURCE QUEUE ddl statements Fix contains: 1. start error message with a lowercase letter 2. avoid contractions in error message 3. refine "can not" t
Date Tue, 06 Dec 2016 02:40:59 GMT
HAWQ-77. Fix source code comment for new ALTER/CREATE RESOURCE QUEUE ddl statements
    Fix contains:
    1. start error message with a lowercase letter
    2. avoid contractions in error message
    3. refine "can not" to "cannot"
    4. add single quote to resource queue name
    5. remove unused function "getLocalTmpDirFromMasterRM"


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/10c5bb8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/10c5bb8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/10c5bb8a

Branch: refs/heads/master
Commit: 10c5bb8a190ec7daa437dc6c608dd505e7da7ec2
Parents: 174673d
Author: stanlyxiang <stanly.sxiang@gmail.com>
Authored: Wed Nov 16 21:58:12 2016 +1100
Committer: ivan <iweng@pivotal.io>
Committed: Tue Dec 6 10:40:15 2016 +0800

----------------------------------------------------------------------
 src/backend/commands/user.c                     |  18 +-
 .../communication/rmcomm_QD2RM.c                | 115 ++----
 src/backend/resourcemanager/requesthandler.c    |  50 +--
 .../resourcemanager/requesthandler_ddl.c        | 136 ++++---
 .../resourcebroker_LIBYARN_proc.c               |  31 +-
 src/backend/resourcemanager/resourcemanager.c   |  50 +--
 .../resourcemanager/resourcemanager_RMSEG.c     |   2 +-
 src/backend/resourcemanager/resourcepool.c      |  18 +-
 src/backend/resourcemanager/resqueuecommand.c   |  12 +-
 src/backend/resourcemanager/resqueuemanager.c   | 352 +++++++++----------
 10 files changed, 363 insertions(+), 421 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/commands/user.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 65047f3..a132adb 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -565,7 +565,7 @@ CreateRole(CreateRoleStmt *stmt)
 			releaseResourceContextWithErrorReport(resourceid);
 			ereport(ERROR,
 					(errcode(ERRCODE_RESERVED_NAME),
-					 errmsg("Resource queue name \"%s\" is reserved",
+					 errmsg("resource queue name \"%s\" is reserved",
 							resqueue), errOmitLocation(true)));
 		}
 
@@ -576,7 +576,7 @@ CreateRole(CreateRoleStmt *stmt)
 			releaseResourceContextWithErrorReport(resourceid);
 			ereport(ERROR,
 					(errcode(ERRCODE_UNDEFINED_OBJECT),
-					 errmsg("Resource queue \"%s\" does not exist",
+					 errmsg("resource queue \"%s\" does not exist",
 							resqueue), errOmitLocation(true)));
 		}
 
@@ -586,7 +586,7 @@ CreateRole(CreateRoleStmt *stmt)
 			releaseResourceContextWithErrorReport(resourceid);
 			ereport(ERROR,
 					(errcode(ERRCODE_UNDEFINED_OBJECT),
-					 errmsg("Can't assign a branch resource queue \"%s\" to role",
+					 errmsg("cannot assign non-leaf resource queue \"%s\" to role",
 							resqueue), errOmitLocation(true)));
 		}
 
@@ -640,7 +640,7 @@ CreateRole(CreateRoleStmt *stmt)
 					(errcode(IS_TO_RM_RPC_ERROR(res) ?
 							 ERRCODE_INTERNAL_ERROR :
 							 ERRCODE_INVALID_OBJECT_DEFINITION),
-					 errmsg("Can not apply CREATE ROLE because of %s", errorbuf)));
+					 errmsg("cannot apply CREATE ROLE because of %s", errorbuf)));
 		}
 	}
 
@@ -982,7 +982,7 @@ AlterRole(AlterRoleStmt *stmt)
     	Assert( res == COMM2RM_CLIENT_FULL_RESOURCECONTEXT );
     	ereport(ERROR,
     			(errcode(ERRCODE_INTERNAL_ERROR),
-    			         errmsg("Too many existing resource context.")));
+    			         errmsg("too many existing resource context.")));
     }
 
 	/* Here, using user oid is more convenient. */
@@ -1238,7 +1238,7 @@ AlterRole(AlterRoleStmt *stmt)
 				releaseResourceContextWithErrorReport(resourceid);
 				ereport(ERROR,
 						(errcode(ERRCODE_UNDEFINED_OBJECT),
-						 errmsg("can't assign a branch resource queue \"%s\" to role",
+						 errmsg("cannot assign non-leaf resource queue \"%s\" to role",
 								resqueue),
 										   errOmitLocation(true)));
 			}
@@ -1287,7 +1287,7 @@ AlterRole(AlterRoleStmt *stmt)
 					(errcode(IS_TO_RM_RPC_ERROR(res) ?
 							 ERRCODE_INTERNAL_ERROR :
 							 ERRCODE_INVALID_OBJECT_DEFINITION),
-					 errmsg("Can not apply ALTER ROLE because of %s", errorbuf)));
+					 errmsg("cannot apply ALTER ROLE because of %s", errorbuf)));
 		}
 	}
 
@@ -1636,7 +1636,7 @@ DropRole(DropRoleStmt *stmt)
 			Assert( res == COMM2RM_CLIENT_FULL_RESOURCECONTEXT );
 			ereport(ERROR,
 					(errcode(ERRCODE_INTERNAL_ERROR),
-							 errmsg("Can not apply DROP ROLE. "
+							 errmsg("cannot apply DROP ROLE. "
 									"Because too many resource contexts were created.")));
 		}
 
@@ -1672,7 +1672,7 @@ DropRole(DropRoleStmt *stmt)
 					(errcode(IS_TO_RM_RPC_ERROR(res) ?
 							 ERRCODE_INTERNAL_ERROR :
 							 ERRCODE_INVALID_OBJECT_DEFINITION),
-					 errmsg("Can not apply DROP ROLE because of %s", errorbuf)));
+					 errmsg("cannot apply DROP ROLE because of %s", errorbuf)));
 		}
 
 		/*

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
index ad2d59b..5d02130 100644
--- a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
+++ b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
@@ -220,7 +220,7 @@ void initializeQD2RMComm(void)
     res = createDRMInstance();
     if ( res != FUNC_RETURN_OK )
     {
-    	elog(ERROR, "Fail to initialize data structure for communicating with "
+    	elog(ERROR, "failed to initialize data structure for communicating with "
                 	"resource manager.");
     }
 
@@ -239,7 +239,7 @@ void initializeQD2RMComm(void)
     res = initializeDRMInstanceForQD();
     if ( res != FUNC_RETURN_OK )
     {
-		elog(ERROR, "Failed to initialize data structure for communicating with "
+		elog(ERROR, "failed to initialize data structure for communicating with "
 					"resource manager.");
     }
 
@@ -259,7 +259,7 @@ void initializeQD2RMComm(void)
     /* Init mutex for accessing resource sets. */
     if ( pthread_mutex_init(&ResourceSetsMutex, NULL) != 0 )
     {
-    	elog(ERROR, "Fail to build mutex for communication with resource manager.");
+    	elog(ERROR, "failed to build mutex for communication with resource manager.");
     }
 
     /* Start resource heart-beat thread. */
@@ -457,7 +457,7 @@ int cleanupQD2RMComm(void)
 	int res = FUNC_RETURN_OK;
 	char errorbuf[ERRORMESSAGE_SIZE];
 
-	elog(LOG, "Clean up communication to resource manager now.");
+	elog(LOG, "clean up communication to resource manager now.");
 
 	initializeQD2RMComm();
 
@@ -468,7 +468,7 @@ int cleanupQD2RMComm(void)
         {
             if ( QD2RM_ResourceSets[i]->QD_ResourceList != NULL )
             {
-            	elog(WARNING, "Un-returned resource is probed, will be returned. "
+            	elog(WARNING, "un-returned resource is probed, will be returned. "
                               "(%d MB, %lf CORE) x %d. Conn ID=%d",
 							  QD2RM_ResourceSets[i]->QD_SegMemoryMB,
 							  QD2RM_ResourceSets[i]->QD_SegCore,
@@ -497,7 +497,7 @@ int cleanupQD2RMComm(void)
         ResourceHeartBeatRunning = false;
         res = pthread_join(ResourceHeartBeatThreadHandle, NULL);
         if ( res != FUNC_RETURN_OK ) {
-            elog(WARNING, "Fail to cancel resource heartbeat thread.");
+            elog(WARNING, "failed to cancel resource heartbeat thread.");
         }
     }
 
@@ -1012,12 +1012,12 @@ int manipulateResourceQueue(int 	 index,
 		RPCResponseHeadManipulateResQueueERROR error =
 			SMBUFF_HEAD(RPCResponseHeadManipulateResQueueERROR, recvbuffer);
 
-		elog(LOG, "Fail to manipulate resource queue because %s",
+		elog(LOG, "failed to manipulate resource queue because %s",
 				  error->ErrorText);
 		snprintf(errorbuf, errorbufsize, "%s", error->ErrorText);
 	}
 
-	elog(DEBUG3, "Manipulated resource queue and got result %d", response->Result);
+	elog(DEBUG3, "manipulated resource queue and got result %d", response->Result);
 
 	return response->Result;
 }
@@ -1062,12 +1062,12 @@ int manipulateRoleForResourceQueue (int 	  index,
 	}
 	else
 	{
-		elog(WARNING, "Resource manager finds in valid role name %s.", rolename);
+		elog(WARNING, "resource manager finds invalid role name %s.", rolename);
 		snprintf(errorbuf, errorbufsize, "invalid role name %s.", rolename);
 		return RESQUEMGR_NO_USERID;
 	}
 
-	elog(DEBUG3, "Resource manager (manipulateRoleForResourceQueue) "
+	elog(DEBUG3, "resource manager (manipulateRoleForResourceQueue) "
 				 "role oid:%d, queueID:%d, isSuper:%d, roleName:%s, action:%d",
 				 request.RoleOID, request.QueueOID, request.isSuperUser,
 				 request.Name, request.Action);
@@ -1099,7 +1099,7 @@ int manipulateRoleForResourceQueue (int 	  index,
 		RPCResponseHeadManipulateRoleERROR error =
 			SMBUFF_HEAD(RPCResponseHeadManipulateRoleERROR, recvbuffer);
 
-		elog(WARNING, "Resource manager failed to manipulate role %s. %s",
+		elog(WARNING, "resource manager failed to manipulate role %s. %s",
 					  rolename,
 					  error->ErrorText);
 		snprintf(errorbuf, errorbufsize, "%s", error->ErrorText);
@@ -1206,11 +1206,11 @@ void sendFailedNodeToResourceManager(int hostNum, char **pghost)
 	for ( int i = 0 ; i < hostNum ; ++i )
 	{
 		appendSMBStr(&sendbuffer, pghost[i]);
-		elog(LOG, "Dispatcher thinks %s is down.", pghost[i]);
+		elog(LOG, "dispatcher thinks %s is down.", pghost[i]);
 	}
 	appendSelfMaintainBufferTill64bitAligned(&sendbuffer);
 
-	elog(LOG, "Dispatcher sends %d failed host(s) to resource manager.",
+	elog(LOG, "dispatcher sends %d failed host(s) to resource manager.",
 			  hostNum);
 
 	errorbuf2[0] = '\0';
@@ -1224,73 +1224,18 @@ void sendFailedNodeToResourceManager(int hostNum, char **pghost)
 
     if ( res != FUNC_RETURN_OK )
     {
-    	elog(WARNING, "Fail to get response from resource manager RPC. %s",
+    	elog(WARNING, "failed to get response from resource manager RPC. %s",
     				  errorbuf2);
     	goto exit;
     }
 
-    elog(LOG, "Succeed in sending failed host to resource manager.");
+    elog(LOG, "succeed in sending failed host to resource manager.");
 
 exit:
 	destroySelfMaintainBuffer(&sendbuffer);
 	destroySelfMaintainBuffer(&recvbuffer);
 }
 
-/*
-int getLocalTmpDirFromMasterRM(char *errorbuf, int errorbufsize)
-{
-	static char 	 errorbuf2[ERRORMESSAGE_SIZE];
-    initializeQD2RMComm();
-
-	int 				   res 		   = FUNC_RETURN_OK;
-	SelfMaintainBufferData sendbuffer;
-	SelfMaintainBufferData recvbuffer;
-	initializeSelfMaintainBuffer(&sendbuffer, QD2RM_CommContext);
-	initializeSelfMaintainBuffer(&recvbuffer, QD2RM_CommContext);
-
-    RPCRequestTmpDirForQDData request;
-    request.Reserved = 0;
-	appendSMBVar(&sendbuffer, request);
-
-	errorbuf2[0] = '\0';
-	res = callSyncRPCToRM(SMBUFF_CONTENT(&sendbuffer),
-						  getSMBContentSize(&sendbuffer),
-						  REQUEST_QD_TMPDIR,
-						  RESPONSE_QD_TMPDIR,
-						  &recvbuffer,
-						  errorbuf2,
-						  sizeof(errorbuf2));
-    if ( res != FUNC_RETURN_OK ) 
-    {
-        snprintf(errorbuf, errorbufsize,
-        		 "failed to get temporary directory from resource manager, %s",
-        		 errorbuf2);
-        goto exit;
-    }
-
-    RPCResponseTmpDirForQD response = SMBUFF_HEAD(RPCResponseTmpDirForQD,
-    											  &recvbuffer);
-    if ( response->Result != FUNC_RETURN_OK ) 
-    {
-    	char *errorstr = SMBUFF_CONTENT(&recvbuffer) +
-    					 sizeof(RPCResponseTmpDirForQDData);
-    	snprintf(errorbuf, errorbufsize,
-    			 "failed to get temporary directory from resource manager, %s",
-				 errorstr);
-    	res = response->Result;
-    	goto exit;
-    }
-
-    LocalTempPath = pstrdup(response->tmpdir);
-    elog(LOG, "Got temporary directory %s", LocalTempPath);
-
-exit:
-	destroySelfMaintainBuffer(&sendbuffer);
-	destroySelfMaintainBuffer(&recvbuffer);
-	return res;
-}
-*/
-
 int acquireResourceQuotaFromRM(int64_t		user_oid,
 							   uint32_t		max_seg_count_fix,
 							   uint32_t		min_seg_count_fix,
@@ -1877,7 +1822,7 @@ extern Datum pg_explain_resource_distribution(PG_FUNCTION_ARGS)
 		ret = createNewResourceContext(&resourceId);
 		if ( ret != FUNC_RETURN_OK )
 		{
-			elog(ERROR, "Fail to create resource context. %d", ret);
+			elog(ERROR, "failed to create resource context. %d", ret);
 		}
 		/* STEP 2. Register. */
 		errorbuf[0] = '\0';
@@ -2160,7 +2105,7 @@ extern Datum pg_play_resource_action(PG_FUNCTION_ARGS)
 		int res = loadTestActionScript(actfile.Str, &actions);
 		if ( res != FUNC_RETURN_OK )
 		{
-			elog(ERROR, "Fail to load resource play actions from %s.", actfile.Str);
+			elog(ERROR, "failed to load resource play actions from %s.", actfile.Str);
 		}
 
 		/* Perform action script. */
@@ -2175,7 +2120,7 @@ extern Datum pg_play_resource_action(PG_FUNCTION_ARGS)
 			actsize += list_length(actconn->Actions);
 		}
 
-		elog(LOG, "Total action item size is %d", actsize);
+		elog(LOG, "total action item size is %d", actsize);
 
 		/* STEP 7. Construct a tuple descriptor for the result rows. */
 		TupleDesc tupledesc = CreateTemplateTupleDesc(PG_PLAY_RESOURCE_ACTION_COLUMNS, false);
@@ -2321,7 +2266,7 @@ int setResourceManagerQuotaControl(bool 	pause,
 
 	appendSMBVar(&sendbuffer, request);
 
-	elog(LOG, "Request GRM container life cycle phase %d %s",
+	elog(LOG, "request GRM container life cycle phase %d %s",
 			  phase,
 			  pause?"paused":"resumed");
 
@@ -2345,7 +2290,7 @@ int setResourceManagerQuotaControl(bool 	pause,
 	RPCResponseQuotaControl response = SMBUFF_HEAD(RPCResponseQuotaControl,
 												   &recvbuffer);
 	Assert( response->Result == FUNC_RETURN_OK );
-	elog(LOG, "Succeeded in setting container life cycle phase %d %s",
+	elog(LOG, "succeeded in setting container life cycle phase %d %s",
 			  phase,
 			  pause?"paused":"resumed");
 exit:
@@ -2369,7 +2314,7 @@ int loadTestActionScript(const char *filename, List **actions)
 		return FUNC_RETURN_FAIL;
 	}
 
-	elog(LOG, "Start loading action file %s", filename);
+	elog(LOG, "start loading action file %s", filename);
 
 	MEMORY_CONTEXT_SWITCH_TO(QD2RM_CommContext)
 
@@ -2386,7 +2331,7 @@ int loadTestActionScript(const char *filename, List **actions)
 			linesize--;
 		}
 
-		elog(LOG, "Loaded action line : %s", line);
+		elog(LOG, "loaded action line : %s", line);
 
 		TestActionItem newitem = (TestActionItem)
 								 rm_palloc0(QD2RM_CommContext,
@@ -2408,7 +2353,7 @@ int loadTestActionScript(const char *filename, List **actions)
 			{
 				/* it is a connection name. */
 				strncpy(connname, word, sizeof(connname)-1);
-				elog(LOG, "Get action play argument connection name %s", connname);
+				elog(LOG, "get action play argument connection name %s", connname);
 			}
 			else  if ( argidx == 1 )
 			{
@@ -2416,11 +2361,11 @@ int loadTestActionScript(const char *filename, List **actions)
 				if ( strlen(word) < sizeof(newitem->ActionName) )
 				{
 					strcpy(newitem->ActionName, word);
-					elog(LOG, "Get action play argument action name %s", newitem->ActionName);
+					elog(LOG, "get action play argument action name %s", newitem->ActionName);
 				}
 				else
 				{
-					elog(ERROR, "Too long action name %s that is not legal.",
+					elog(ERROR, "too long action name %s that is not legal.",
 								newitem->ActionName);
 				}
 			}
@@ -2430,7 +2375,7 @@ int loadTestActionScript(const char *filename, List **actions)
 				char *newarg = rm_palloc0(QD2RM_CommContext, strlen(word) + 1);
 				strcpy(newarg, word);
 				newitem->Arguments = lappend(newitem->Arguments, newarg);
-				elog(LOG, "Appended action play argument %s", newarg);
+				elog(LOG, "appended action play argument %s", newarg);
 			}
 		}
 
@@ -2461,7 +2406,7 @@ int loadTestActionScript(const char *filename, List **actions)
 			newactconn->Actions 	 = lappend(newactconn->Actions, newitem);
 			strcpy(newactconn->ConnectionName, connname);
 			*actions = lappend(*actions, newactconn);
-			elog(LOG, "Build action play connection %s", connname);
+			elog(LOG, "build action play connection %s", connname);
 		}
 	}
 
@@ -2489,7 +2434,7 @@ int loadTestActionScript(const char *filename, List **actions)
 			}
 
 			appendSMBStr(&smb, "$");
-			elog(LOG, "Loaded action play :: %s", SMBUFF_CONTENT(&smb));
+			elog(LOG, "loaded action play :: %s", SMBUFF_CONTENT(&smb));
 			destroySelfMaintainBuffer(&smb);
 		}
 	}
@@ -2548,7 +2493,7 @@ int runTestActionScript(List *actions, const char *filename)
 				ret = createNewResourceContext(&(actconn->ResourceID));
 				if ( ret != FUNC_RETURN_OK )
 				{
-					elog(ERROR, "Fail to create resource context. %d", ret);
+					elog(ERROR, "failed to create resource context. %d", ret);
 				}
 				/* STEP 2. Register. */
 				char *role = (char *)lfirst(list_head(actitem->Arguments));
@@ -2630,7 +2575,7 @@ int runTestActionScript(List *actions, const char *filename)
 										  token1->Str,
 										  token2->Str);
 							}
-							elog(LOG, "Parse locality data %d hosts", infosize);
+							elog(LOG, "parse locality data %d hosts", infosize);
 						}
 						freeSimpleStringTokens(&locality, &tokens, toksize);
 						freeSimpleStringContent(&locality);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/requesthandler.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/requesthandler.c b/src/backend/resourcemanager/requesthandler.c
index 976156b..c6adfb0 100644
--- a/src/backend/resourcemanager/requesthandler.c
+++ b/src/backend/resourcemanager/requesthandler.c
@@ -44,7 +44,7 @@
 	if ( (*conntrack)->ConnID == INVALID_CONNID ) {                            \
 		res = retrieveConnectionTrack((*conntrack), connid);				   \
 		if ( res != FUNC_RETURN_OK ) {                                         \
-			elog(LOG, "Not valid resource context with id %d.", connid);  	   \
+			elog(LOG, "invalid resource context with id %d.", connid);  	   \
 			goto sendresponse;                                                 \
 		}                                                                      \
 		elog(DEBUG5, "HAWQ RM :: Fetched existing connection track "           \
@@ -279,7 +279,7 @@ bool handleRMRequestConnectionUnReg(void **arg)
 	 */
 	else if ( (*conntrack)->Progress == CONN_PP_REGISTER_DONE )
 	{
-		elog(WARNING, "Resource manager finds possible not handled resource "
+		elog(WARNING, "resource manager finds possible not handled resource "
 					  "request from ConnID %d.",
 					  request->ConnID);
 		removeResourceRequestInConnHavingReqeusts(request->ConnID);
@@ -357,7 +357,7 @@ bool handleRMRequestAcquireResource(void **arg)
 		 rm_nocluster_timeout * 1000000LL &&
 		 PRESPOOL->RBClusterReportCounter == 0 )
 	{
-		elog(DEBUG3, "Resource manager defers the resource request.");
+		elog(DEBUG3, "resource manager defers the resource request.");
 		return false;
 	}
 
@@ -367,7 +367,7 @@ bool handleRMRequestAcquireResource(void **arg)
 	 */
 	if ( PQUEMGR->RootTrack->QueueInfo->ClusterMemoryMB <= 0 )
 	{
-		elog(DEBUG3, "Resource manager defers the resource request because the "
+		elog(DEBUG3, "resource manager defers the resource request because the "
 					 "resource queues have no valid resource capacities yet.");
 		return false;
 	}
@@ -603,7 +603,7 @@ sendresponse:
 bool handleRMSEGRequestIMAlive(void **arg)
 {
 	ConnectionTrack conntrack = (ConnectionTrack)(*arg);
-	elog(RMLOG, "Resource manager receives segment heart-beat information.");
+	elog(RMLOG, "resource manager receives segment heart-beat information.");
 
 	SelfMaintainBufferData machinereport;
 	initializeSelfMaintainBuffer(&machinereport,PCONTEXT);
@@ -612,7 +612,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 
 	generateSegStatReport(segstat, &machinereport);
 
-	elog(RMLOG, "Resource manager received segment machine information, %s",
+	elog(RMLOG, "resource manager received segment machine information, %s",
 				SMBUFF_CONTENT(&machinereport));
 	destroySelfMaintainBuffer(&machinereport);
 
@@ -629,7 +629,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 	fts_client_host = gethostbyaddr(&fts_client_addr, 4, AF_INET);
 	if (fts_client_host == NULL)
 	{
-		elog(WARNING, "Failed to reverse DNS lookup for ip %s.", fts_client_ip);
+		elog(WARNING, "failed to reverse DNS lookup for ip %s.", fts_client_ip);
 		return true;
 	}
 
@@ -665,7 +665,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 	appendSMBVar(&newseginfo,addroffset);
 	appendSMBVar(&newseginfo,addrattr);
 
-	elog(RMLOG, "Resource manager received IMAlive message, this segment's IP "
+	elog(RMLOG, "resource manager received IMAlive message, this segment's IP "
 				"address count: %d",
 				fts_client_seginfo->HostAddrCount);
 
@@ -705,7 +705,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 	appendSMBStr(&newseginfo,fts_client_ip);
 	appendSelfMaintainBufferTill64bitAligned(&newseginfo);
 
-	elog(RMLOG, "Resource manager received IMAlive message, "
+	elog(RMLOG, "resource manager received IMAlive message, "
 				"this segment's IP address: %s\n",
 				fts_client_ip);
 
@@ -732,7 +732,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 		newseginfoptr->FailedTmpDirOffset = getSMBContentSize(&newseginfo);
 		newseginfoptr->FailedTmpDirLen = strlen(GET_SEGINFO_FAILEDTMPDIR(fts_client_seginfo));
 		appendSMBStr(&newseginfo, GET_SEGINFO_FAILEDTMPDIR(fts_client_seginfo));
-		elog(RMLOG, "Resource manager received IMAlive message, "
+		elog(RMLOG, "resource manager received IMAlive message, "
 					"failed temporary directory:%s",
 					GET_SEGINFO_FAILEDTMPDIR(fts_client_seginfo));
 		appendSelfMaintainBufferTill64bitAligned(&newseginfo);
@@ -750,7 +750,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 	newseginfoptr->GRMRackNameLen = 0;
 	newseginfoptr->GRMRackNameOffset = 0;
 
-	elog(RMLOG, "Resource manager received IMAlive message, "
+	elog(RMLOG, "resource manager received IMAlive message, "
 				"this segment's hostname: %s\n",
 				fts_client_host->h_name);
 
@@ -806,7 +806,7 @@ bool handleRMSEGRequestIMAlive(void **arg)
 							   conntrack->MessageMark2,
 							   RESPONSE_RM_IMALIVE);
 
-	elog(DEBUG3, "Resource manager accepted segment machine.");
+	elog(DEBUG3, "resource manager accepted segment machine.");
 
 	conntrack->ResponseSent = false;
 	MEMORY_CONTEXT_SWITCH_TO(PCONTEXT)
@@ -831,7 +831,7 @@ bool handleRMRequestAcquireResourceQuota(void **arg)
 		 rm_nocluster_timeout * 1000000LL &&
 		 PRESPOOL->RBClusterReportCounter == 0 )
 	{
-		elog(DEBUG3, "Resource manager defers the resource request.");
+		elog(DEBUG3, "resource manager defers the resource request.");
 		return false;
 	}
 
@@ -841,7 +841,7 @@ bool handleRMRequestAcquireResourceQuota(void **arg)
 	 */
 	if ( PQUEMGR->RootTrack->QueueInfo->ClusterMemoryMB <= 0 )
 	{
-		elog(DEBUG3, "Resource manager defers the resource request because the "
+		elog(DEBUG3, "resource manager defers the resource request because the "
 					 "resource queues have no valid resource capacities yet.");
 		return false;
 	}
@@ -994,7 +994,7 @@ bool handleRMRequestRefreshResource(void **arg)
 						(SMBUFF_CONTENT(&(conntrack->MessageBuff)) +
 						 sizeof(RPCRequestHeadRefreshResourceHeartBeatData));
 
-	elog(DEBUG3, "Resource manager refreshes %d ConnIDs.", request->ConnIDCount);
+	elog(DEBUG3, "resource manager refreshes %d ConnIDs.", request->ConnIDCount);
 
 	for ( int i = 0 ; i < request->ConnIDCount ; ++i )
 	{
@@ -1003,11 +1003,11 @@ bool handleRMRequestRefreshResource(void **arg)
 		if ( res == FUNC_RETURN_OK )
 		{
 			oldct->LastActTime = curmsec;
-			elog(RMLOG, "Refreshed resource context connection id %d", connids[i]);
+			elog(RMLOG, "refreshed resource context connection id %d", connids[i]);
 		}
 		else
 		{
-			elog(WARNING, "Can not find resource context connection id %d for "
+			elog(WARNING, "cannot find resource context connection id %d for "
 						  "resource refreshing.",
 					      connids[i]);
 		}
@@ -1054,19 +1054,19 @@ bool handleRMRequestSegmentIsDown(void **arg)
 
 			if ( !IS_SEGSTAT_FTSAVAILABLE(segres->Stat) )
 			{
-				elog(WARNING, "Resource manager does not probe the status of "
+				elog(WARNING, "resource manager does not probe the status of "
 							  "host %s because it is down already.",
 							  hostname);
 			}
 			else if ( segres->RUAlivePending )
 			{
-				elog(LOG, "Resource manager does not probe the status of host %s "
+				elog(LOG, "resource manager does not probe the status of host %s "
 						  "because it is in RUAlive pending status already.",
 						  hostname);
 			}
 			else
 			{
-				elog(RMLOG, "Resource manager probes the status of host %s by "
+				elog(RMLOG, "resource manager probes the status of host %s by "
 							"sending RUAlive request.",
 							hostname);
 
@@ -1101,19 +1101,19 @@ bool handleRMRequestSegmentIsDown(void **arg)
 					}
 
 					/* Set the host down. */
-					elog(LOG, "Resource manager sets host %s from up to down "
+					elog(LOG, "resource manager sets host %s from up to down "
 							  "due to not reaching host.", hostname);
 				}
 				else
 				{
-					elog(RMLOG, "Resource manager triggered RUAlive request to "
+					elog(RMLOG, "resource manager triggered RUAlive request to "
 								"host %s.",
 								hostname);
 				}
 			}
 		}
 		else {
-			elog(WARNING, "Resource manager cannot find host %s to check status, "
+			elog(WARNING, "resource manager cannot find host %s to check status, "
 						  "skip it.",
 						  hostname);
 		}
@@ -1214,7 +1214,7 @@ bool handleRMRequestDumpStatus(void **arg)
     RPCRequestDumpStatus request = SMBUFF_HEAD(RPCRequestDumpStatus,
     										   &(conntrack->MessageBuff));
 
-    elog(DEBUG3, "Resource manager dump type %u data to file %s",
+    elog(DEBUG3, "resource manager dump type %u data to file %s",
     			 request->type,
 				 request->dump_file);
 
@@ -1287,7 +1287,7 @@ bool handleRMRequestQuotaControl(void **arg)
 	PRESPOOL->pausePhase[request->Phase] = request->Pause;
 	if ( oldvalue != PRESPOOL->pausePhase[request->Phase] )
 	{
-		elog(LOG, "Resource manager resource quota life cycle pause setting %d "
+		elog(LOG, "resource manager resource quota life cycle pause setting %d "
 				  "changes to %s",
 				  request->Phase,
 				  PRESPOOL->pausePhase[request->Phase]?"paused":"resumed");

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/requesthandler_ddl.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/requesthandler_ddl.c b/src/backend/resourcemanager/requesthandler_ddl.c
index adb2330..b719f36 100644
--- a/src/backend/resourcemanager/requesthandler_ddl.c
+++ b/src/backend/resourcemanager/requesthandler_ddl.c
@@ -101,22 +101,22 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 	RPCRequestHeadManipulateResQueue request = (RPCRequestHeadManipulateResQueue)
 											   ((*conntrack)->MessageBuff.Buffer);
 
-	elog(LOG, "Resource manager gets a request from ConnID %d to submit resource "
+	elog(LOG, "resource manager gets a request from ConnID %d to submit resource "
 			  "queue DDL statement.",
 			  request->ConnID);
 
-	elog(DEBUG3, "With attribute list size %d", request->WithAttrLength);
+	elog(DEBUG3, "with attribute list size %d", request->WithAttrLength);
 
 	if ( (*conntrack)->ConnID == INVALID_CONNID )
 	{
 		res = retrieveConnectionTrack((*conntrack), request->ConnID);
 		if ( res != FUNC_RETURN_OK )
 		{
-			elog(WARNING, "Not valid resource context with id %d.", request->ConnID);
+			elog(WARNING, "invalid resource context with id %d.", request->ConnID);
 			goto senderr;
 		}
 
-		elog(DEBUG5, "Resource manager fetched existing connection track "
+		elog(DEBUG5, "resource manager fetched existing connection track "
 					 "ID=%d, Progress=%d.",
 					 (*conntrack)->ConnID,
 					 (*conntrack)->Progress);
@@ -173,7 +173,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 	foreach(cell, rsqattr)
 	{
 		KVProperty attribute = lfirst(cell);
-		elog(RMLOG, "Resource manager received DDL Request: %s=%s",
+		elog(RMLOG, "resource manager received DDL Request: %s=%s",
 				    attribute->Key.Str,
 					attribute->Val.Str);
 	}
@@ -186,7 +186,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 	if (res != FUNC_RETURN_OK)
 	{
 		ddlres = res;
-		elog(WARNING, "Cannot recognize DDL attribute, %s", errorbuf);
+		elog(WARNING, "cannot recognize DDL attribute, %s", errorbuf);
 		goto senderr;
 	}
 
@@ -210,7 +210,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 				snprintf(errorbuf, sizeof(errorbuf),
 						"exceed maximum resource queue number %d",
 						rm_nresqueue_limit);
-				elog(WARNING, "Resource manager can not create resource queue "
+				elog(WARNING, "resource manager cannot create resource queue "
 							  "because %s",
 							  errorbuf);
 				goto senderr;
@@ -227,7 +227,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			{
 				rm_pfree(PCONTEXT, newqueue);
 				ddlres = res;
-				elog(WARNING, "Resource manager can not create resource queue "
+				elog(WARNING, "resource manager cannot create resource queue "
 							  "with its attributes because %s",
 							  errorbuf);
 				goto senderr;
@@ -240,7 +240,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			{
 				rm_pfree(PCONTEXT, newqueue);
 				ddlres = res;
-				elog(WARNING, "Resource manager can not complete resource queue's "
+				elog(WARNING, "resource manager cannot complete resource queue's "
 							  "attributes because %s",
 							  errorbuf);
 				goto senderr;
@@ -254,8 +254,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 				if (newtrack != NULL)
 					rm_pfree(PCONTEXT, newtrack);
 				ddlres = res;
-				elog(WARNING, "Resource manager can not create resource queue %s "
-							  "because %s",
+				elog(WARNING, "resource manager cannot create resource queue \'%s\', %s",
 							  newqueue->Name,
 							  errorbuf);
 				goto senderr;
@@ -267,14 +266,13 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			if (res != FUNC_RETURN_OK)
 			{
 				ddlres = res;
-				elog(WARNING, "Cannot update resource queue changes in pg_resqueue.");
+				elog(WARNING, "cannot update resource queue changes in pg_resqueue.");
 
 				/* If fail in updating catalog table, revert previous operations in RM. */
 				res = dropQueueAndTrack(newtrack, errorbuf, sizeof(errorbuf));
 				if (res != FUNC_RETURN_OK)
 				{
-					elog(WARNING, "Resource manager cannot drop queue and track "
-								  "because %s",
+					elog(WARNING, "resource manager cannot drop queue and track, %s",
 								  errorbuf);
 				}
 				goto senderr;
@@ -332,7 +330,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			{
 				rm_pfree(PCONTEXT, newqueue);
 				ddlres = res;
-				elog(WARNING, "Resource manager cannot alter resource queue %s, %s",
+				elog(WARNING, "resource manager cannot alter resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 							  errorbuf);
 				goto senderr;
@@ -346,7 +344,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			{
 				ddlres = RESQUEMGR_NO_QUENAME;
 				snprintf(errorbuf, sizeof(errorbuf), "the queue doesn't exist");
-				elog(WARNING, "Resource manager cannot alter resource queue %s, %s",
+				elog(WARNING, "resource manager cannot alter resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 							  errorbuf);
 				goto senderr;
@@ -374,13 +372,13 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 					{
 						ddlres = RESQUEMGR_ALTERQUEUE_NOTALLOWED;
 						snprintf(errorbuf, sizeof(errorbuf),
-								 "user can only alter branch resource queue %s "
+								 "user can only alter branch resource queue \'%s\' "
 								 "attributes %s and %s",
 								 nameattr->Val.Str,
 								 RSQDDLAttrNames[RSQ_DDL_ATTR_MEMORY_LIMIT_CLUSTER],
 								 RSQDDLAttrNames[RSQ_DDL_ATTR_CORE_LIMIT_CLUSTER]);
-						elog(WARNING, "Resource manager cannot alter resource "
-									  "queue %s, %s",
+						elog(WARNING, "resource manager cannot alter resource "
+									  "queue \'%s\', %s",
 									  nameattr->Val.Str,
 									  errorbuf);
 						goto senderr;
@@ -399,7 +397,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			if (res != FUNC_RETURN_OK)
 			{
 				ddlres = res;
-				elog(WARNING, "Resource manager cannot update resource queue with "
+				elog(WARNING, "resource manager cannot update resource queue with "
 							  "its attributes, %s",
 							  errorbuf);
 				cleanupQueueTrackShadows(&qhavingshadow);
@@ -413,7 +411,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			if (res != FUNC_RETURN_OK)
 			{
 				ddlres = res;
-				elog(WARNING, "Resource manager cannot complete resource queue "
+				elog(WARNING, "resource manager cannot complete resource queue "
 							  "attributes, %s",
 							  errorbuf);
 				cleanupQueueTrackShadows(&qhavingshadow);
@@ -452,7 +450,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			if ( res != FUNC_RETURN_OK )
 			{
 				ddlres = res;
-				elog(WARNING, "Can not apply alter resource queue changes, %s",
+				elog(WARNING, "cannot apply alter resource queue changes, %s",
 							  errorbuf);
 				cleanupQueueTrackShadows(&qhavingshadow);
 				goto senderr;
@@ -465,7 +463,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			if (res != FUNC_RETURN_OK)
 			{
 				ddlres = res;
-				elog(WARNING, "Cannot alter resource queue changes in pg_resqueue.");
+				elog(WARNING, "cannot alter resource queue changes in pg_resqueue.");
 				cleanupQueueTrackShadows(&qhavingshadow);
 				goto senderr;
 			}
@@ -485,9 +483,9 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			{
 				ddlres = RESQUEMGR_NO_QUENAME;
 				snprintf(errorbuf, sizeof(errorbuf),
-						 "resource queue %s doesn't exist",
+						 "resource queue \'%s\' doesn't exist",
 						 nameattr->Val.Str);
-				elog(WARNING, "Resource manager cannot drop resource queue %s, %s",
+				elog(WARNING, "resource manager cannot drop resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 							  errorbuf);
 				goto senderr;
@@ -497,9 +495,9 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			{
 				ddlres = RESQUEMGR_IN_USE;
 				snprintf(errorbuf, sizeof(errorbuf),
-						 "resource queue %s is a branch queue",
+						 "resource queue \'%s\' is a branch queue",
 						 todroptrack->QueueInfo->Name);
-				elog(WARNING, "Resource manager cannot drop resource queue %s, %s",
+				elog(WARNING, "Resource manager cannot drop resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 							  errorbuf);
 				goto senderr;
@@ -509,9 +507,9 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 				 todroptrack->QueryResRequests.NodeCount > 0 )
 			{
 				ddlres = RESQUEMGR_IN_USE;
-				snprintf(errorbuf, sizeof(errorbuf), "resource queue %s is busy",
+				snprintf(errorbuf, sizeof(errorbuf), "resource queue \'%s\' is busy",
 						 todroptrack->QueueInfo->Name);
-				elog(WARNING, "Resource manager cannot drop resource queue %s, %s",
+				elog(WARNING, "resource manager cannot drop resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 							  errorbuf);
 				goto senderr;
@@ -525,7 +523,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 				ddlres = res;
 				snprintf(errorbuf, sizeof(errorbuf),
 						 "cannot update resource queue changes in pg_resqueue");
-				elog(WARNING, "Resource manager cannot drop resource queue %s, %s",
+				elog(WARNING, "Resource manager cannot drop resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 							  errorbuf);
 				goto senderr;
@@ -535,7 +533,7 @@ bool handleRMDDLRequestManipulateResourceQueue(void **arg)
 			if (res != FUNC_RETURN_OK)
 			{
 				ddlres = res;
-				elog(WARNING, "Resource manager cannot drop resource queue %s, %s",
+				elog(WARNING, "resource manager cannot drop resource queue \'%s\', %s",
 							  nameattr->Val.Str,
 						      errorbuf);
 				goto senderr;
@@ -632,7 +630,7 @@ bool handleRMDDLRequestManipulateRole(void **arg)
 			user->isSuperUser = request->isSuperUser;
 			strncpy(user->Name, request->Name, sizeof(user->Name)-1);
 			createUser(user);
-			elog(LOG, "Resource manager handles request CREATE ROLE oid:%d, "
+			elog(LOG, "resource manager handles request CREATE ROLE oid:%d, "
 					  "queueID:%d, isSuper:%d, roleName:%s",
 					  request->RoleOID,
 					  request->QueueOID,
@@ -657,7 +655,7 @@ bool handleRMDDLRequestManipulateRole(void **arg)
 			user->isSuperUser = request->isSuperUser;
 			strncpy(user->Name, request->Name, sizeof(user->Name)-1);
 			createUser(user);
-			elog(LOG, "Resource manager handles request ALTER ROLE oid:%d, "
+			elog(LOG, "resource manager handles request ALTER ROLE oid:%d, "
 					  "queueID:%d, isSuper:%d, roleName:%s",
 					  request->RoleOID,
 					  request->QueueOID,
@@ -671,7 +669,7 @@ bool handleRMDDLRequestManipulateRole(void **arg)
 			int64_t roleoid = request->RoleOID;
 			res = dropUser(roleoid, request->Name);
 			Assert(res == FUNC_RETURN_OK);
-			elog(LOG, "Resource manager handles request drop role oid:%d, "
+			elog(LOG, "resource manager handles request drop role oid:%d, "
 					  "roleName:%s",
 					  request->RoleOID,
 					  request->Name);
@@ -722,7 +720,7 @@ int updateResqueueCatalog(int					 action,
 		res = performInsertActionForPGResqueue(insertaction, &newoid);
 		if(res != FUNC_RETURN_OK)
 		{
-			elog(WARNING, "Resource manager performs insert operation on "
+			elog(WARNING, "resource manager performs insert operation on "
 						  "pg_resqueue failed : %d",
 						  res);
 
@@ -761,9 +759,9 @@ int updateResqueueCatalog(int					 action,
 			res = performUpdateActionForPGResqueue(updateaction, parentname);
 			if(res != FUNC_RETURN_OK)
 			{
-				elog(WARNING, "Resource manager updates the status of the parent "
-							  "resource queue %s failed when create resource "
-							  "queue %s",
+				elog(WARNING, "resource manager updates the status of the parent "
+							  "resource queue \'%s\' failed when create resource "
+							  "queue \'%s\'",
 							  parenttrack->QueueInfo->Name,
 							  queuetrack->QueueInfo->Name);
 				DRMGlobalInstance->ResManagerMainKeepRun = false;
@@ -786,8 +784,8 @@ int updateResqueueCatalog(int					 action,
 		res = performUpdateActionForPGResqueue(updateaction, queuename);
 		if(res != FUNC_RETURN_OK)
 		{
-			elog(WARNING, "Resource manager performs update operation on "
-						  "pg_resqueue failed when update resource queue %s",
+			elog(WARNING, "resource manager performs update operation on "
+						  "pg_resqueue failed when update resource queue \'%s\'",
 						  queuename);
 			DRMGlobalInstance->ResManagerMainKeepRun = false;
 		}
@@ -800,8 +798,8 @@ int updateResqueueCatalog(int					 action,
 		res = performDeleteActionForPGResqueue(queuename);
 		if(res != FUNC_RETURN_OK)
 		{
-			elog(WARNING, "Resource manager performs delete operation on "
-						  "pg_resqueue failed when drop resource queue %s.",
+			elog(WARNING, "resource manager performs delete operation on "
+						  "pg_resqueue failed when drop resource queue \'%s\'.",
 						  queuename);
 			DRMGlobalInstance->ResManagerMainKeepRun = false;
 			break;
@@ -833,8 +831,8 @@ int updateResqueueCatalog(int					 action,
 			res = performUpdateActionForPGResqueue(updateaction, parentname);
 			if(res != FUNC_RETURN_OK)
 			{
-				elog(WARNING, "Resource manager updates the status of the parent "
-							  "resource queue %s failed when drop resource queue %s",
+				elog(WARNING, "resource manager updates the status of the parent "
+							  "resource queue \'%s\' failed when drop resource queue \'%s\'",
 							  parenttrack->QueueInfo->Name,
 							  queuetrack->QueueInfo->Name);
 				DRMGlobalInstance->ResManagerMainKeepRun = false;
@@ -1136,7 +1134,7 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 	conn = PQconnectdb(conninfo);
 	if ((libpqres = PQstatus(conn)) != CONNECTION_OK)
 	{
-		elog(WARNING, "Resource manager failed to connect database when insert "
+		elog(WARNING, "resource manager failed to connect database when insert "
 					  "row into pg_resqueue, error code: %d, reason: %s",
 				      libpqres,
 				      PQerrorMessage(conn));
@@ -1147,7 +1145,7 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 	result = PQexec(conn, "BEGIN");
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
 	{
-		elog(WARNING, "Resource manager failed to run SQL: %s when insert row "
+		elog(WARNING, "resource manager failed to run SQL: %s when insert row "
 					  "into pg_resqueue, reason: %s",
 				      "BEGIN",
 				      PQresultErrorMessage(result));
@@ -1163,7 +1161,7 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 	sql = createPQExpBuffer();
 	if ( sql == NULL )
 	{
-		elog(WARNING, "Resource manager failed to allocate buffer for building "
+		elog(WARNING, "resource manager failed to allocate buffer for building "
 					  "sql statement.");
 		goto cleanup;
 	}
@@ -1206,11 +1204,11 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 	}
 	appendPQExpBuffer(sql,"%s",")");
 
-	elog(LOG, "Resource manager created a new queue: %s", sql->data);
+	elog(LOG, "resource manager created a new queue: %s", sql->data);
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
 	{
-		elog(WARNING, "Resource manager failed to run SQL: %s failed "
+		elog(WARNING, "resource manager failed to run SQL: %s failed "
 				      "when insert row into pg_resqueue, reason : %s",
 				      sql->data,
 				      PQresultErrorMessage(result));
@@ -1224,7 +1222,7 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_TUPLES_OK)
 	{
-		elog(WARNING, "Resource manager failed to run SQL: %s failed, reason : %s",
+		elog(WARNING, "resource manager failed to run SQL: %s failed, reason : %s",
 				      sql->data,
 				      PQresultErrorMessage(result));
 		PQexec(conn, "ABORT");
@@ -1246,7 +1244,7 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 	result = PQexec(conn, "COMMIT");
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
 	{
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 			      	  "when insert row into pg_resqueue, reason : %s",
 					  "COMMIT",
 					  PQresultErrorMessage(result));
@@ -1254,7 +1252,7 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid)
 		res = LIBPQ_FAIL_EXECUTE;
 		goto cleanup;
 	}
-	elog(LOG, "Resource manager created a new resource queue, oid is: %d", *newoid);
+	elog(LOG, "resource manager created a new resource queue, oid is: %d", *newoid);
 
 cleanup:
 	if(sql != NULL)
@@ -1290,7 +1288,7 @@ int performUpdateActionForPGResqueue(List *colvalues, char *queuename)
 	conn = PQconnectdb(conninfo);
 	if ((libpqres = PQstatus(conn)) != CONNECTION_OK)
 	{
-		elog(WARNING, "Resource manager failed to connect database when update "
+		elog(WARNING, "resource manager failed to connect database when update "
 					  "row of pg_resqueue, error code: %d, reason: %s",
 			      	  libpqres,
 			      	  PQerrorMessage(conn));
@@ -1301,7 +1299,7 @@ int performUpdateActionForPGResqueue(List *colvalues, char *queuename)
 	result = PQexec(conn, "BEGIN");
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
 	{
-		elog(WARNING, "Resource manager failed to run SQL: %s when update row "
+		elog(WARNING, "resource manager failed to run SQL: %s when update row "
 					  "of pg_resqueue, reason : %s",
 					  "BEGIN",
 					  PQresultErrorMessage(result));
@@ -1316,7 +1314,7 @@ int performUpdateActionForPGResqueue(List *colvalues, char *queuename)
 	sql = createPQExpBuffer();
 	if ( sql == NULL )
 	{
-		elog(WARNING, "Resource manager failed to allocate buffer for building "
+		elog(WARNING, "resource manager failed to allocate buffer for building "
 					  "sql statement.");
 		goto cleanup;
 	}
@@ -1341,7 +1339,7 @@ int performUpdateActionForPGResqueue(List *colvalues, char *queuename)
 	}
 	appendPQExpBuffer(sql, " WHERE rsqname='%s'", queuename);
 
-	elog(LOG, "Resource manager updates resource queue: %s",sql->data);
+	elog(LOG, "resource manager updates resource queue: %s",sql->data);
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
 	{
@@ -1357,7 +1355,7 @@ int performUpdateActionForPGResqueue(List *colvalues, char *queuename)
 	result = PQexec(conn, "COMMIT");
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
 	{
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 				  	  "when update row of pg_resqueue, reason : %s",
 					  "COMMIT",
 					  PQresultErrorMessage(result));
@@ -1365,7 +1363,7 @@ int performUpdateActionForPGResqueue(List *colvalues, char *queuename)
 		res = LIBPQ_FAIL_EXECUTE;
 		goto cleanup;
 	}
-	elog(LOG, "Resource queue %s is updated", queuename);
+	elog(LOG, "Resource queue \'%s\' is updated", queuename);
 
 cleanup:
 	if(sql != NULL)
@@ -1396,7 +1394,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 			"dbname=template1 port=%d connect_timeout=%d", master_addr_port, LIBPQ_CONNECT_TIMEOUT);
 	conn = PQconnectdb(conninfo);
 	if ((libpqres = PQstatus(conn)) != CONNECTION_OK) {
-		elog(WARNING, "Resource manager failed to connect database when delete a row from pg_resqueue,"
+		elog(WARNING, "resource manager failed to connect database when delete a row from pg_resqueue,"
 		      	  	  "error code: %d, reason: %s",
 		      	  	  libpqres,
 		      	  	  PQerrorMessage(conn));
@@ -1407,7 +1405,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 
 	result = PQexec(conn, "BEGIN");
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK) {
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 				  	  "when delete a row from pg_resqueue, reason : %s",
 	      	  	  	  "BEGIN",
 	      	  	  	  PQresultErrorMessage(result));
@@ -1422,14 +1420,14 @@ int performDeleteActionForPGResqueue(char *queuename)
 	sql = createPQExpBuffer();
 	if ( sql == NULL )
 	{
-		elog(WARNING, "Resource manager failed to allocate buffer for building "
+		elog(WARNING, "resource manager failed to allocate buffer for building "
 					  "sql statement.");
 		goto cleanup;
 	}
 	appendPQExpBuffer(sql, "SELECT oid FROM pg_resqueue WHERE rsqname = '%s'", queuename);
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_TUPLES_OK) {
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 			  	  	  "when delete a row from pg_resqueue, reason : %s",
 					  sql->data,
 					  PQresultErrorMessage(result));
@@ -1438,7 +1436,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 	}
 	queueid = (uint32) atoi(PQgetvalue(result, 0, 0));
 	if(queueid == InvalidOid) {
-		elog(WARNING, "Resource manager gets an invalid oid when delete a row from pg_resqueue");
+		elog(WARNING, "resource manager gets an invalid oid when delete a row from pg_resqueue");
 		res = PGRES_FATAL_ERROR;
 		goto cleanup;
 	}
@@ -1449,10 +1447,10 @@ int performDeleteActionForPGResqueue(char *queuename)
 	PQclear(result);
 	resetPQExpBuffer(sql);
 	appendPQExpBuffer(sql, "DELETE FROM pg_resqueue WHERE rsqname = '%s'", queuename);
-	elog(LOG, "Resource manager drops a resource queue: %s",sql->data);
+	elog(LOG, "resource manager drops a resource queue: %s",sql->data);
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK) {
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 		  	  	  	  "when delete a row from pg_resqueue, reason : %s",
 					  sql->data,
 					  PQresultErrorMessage(result));
@@ -1470,7 +1468,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 					  queueid, ResQueueRelationId);
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 		  	  	  	  "when delete a row from pg_resqueue, reason : %s",
 					  sql->data,
 					  PQresultErrorMessage(result));
@@ -1483,7 +1481,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 				      ResQueueRelationId, queueid);
 	result = PQexec(conn, sql->data);
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK)
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 		  	  	  	  "when delete a row from pg_resqueue, reason : %s",
 					  sql->data,
 					  PQresultErrorMessage(result));
@@ -1491,7 +1489,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 	PQclear(result);
 	result = PQexec(conn, "COMMIT");
 	if (!result || PQresultStatus(result) != PGRES_COMMAND_OK) {
-		elog(WARNING, "Resource manager failed to run SQL: %s "
+		elog(WARNING, "resource manager failed to run SQL: %s "
 		  	  	  	  "when delete a row from pg_resqueue, reason : %s",
 					  "COMMIT",
 					  PQresultErrorMessage(result));
@@ -1500,7 +1498,7 @@ int performDeleteActionForPGResqueue(char *queuename)
 		goto cleanup;
 	}
 
-	elog(LOG, "Resource queue %s is dropped", queuename);
+	elog(LOG, "resource queue \'%s\' is dropped", queuename);
 
 cleanup:
 	if(sql != NULL)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c b/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
index 73d4c0b..057fdf8 100644
--- a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
+++ b/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
@@ -139,7 +139,7 @@ int ResBrokerMain(void)
 	/* Load parameters */
 	int res = loadParameters();
 	if ( res != FUNC_RETURN_OK ) {
-		elog(WARNING, "Resource broker loads invalid yarn parameters");
+		elog(WARNING, "resource broker loads invalid yarn parameters");
 	}
 
 	/* Set signal behavior */
@@ -191,7 +191,7 @@ int ResBrokerMainInternal(void)
 		 * run anymore. The process goes to the exit phase directly.
 		 */
 		if ( getppid() != ResBrokerParentPID ) {
-			elog(WARNING, "Parent process of YARN mode resource broker quit. "
+			elog(WARNING, "parent process of YARN mode resource broker quit. "
 					  	  "Resource broker process will actively close.");
 			ResBrokerKeepRun = false;
 			continue;
@@ -200,7 +200,7 @@ int ResBrokerMainInternal(void)
 		/* refresh kerberos ticket */
 		if (enable_secure_filesystem && !login())
 		{
-			elog(WARNING, "Resource broker failed to refresh kerberos ticket.");
+			elog(WARNING, "resource broker failed to refresh kerberos ticket.");
 		}
 
 		/*
@@ -349,7 +349,8 @@ char * ExtractPrincipalFromTicketCache(const char* cache)
 
 	if (cache) {
 		if (0 != setenv("KRB5CCNAME", cache, 1)) {
-			elog(WARNING, "Cannot set env parameter \"KRB5CCNAME\" when extract principal from cache:%s", cache);
+			elog(WARNING, "could not set env parameter \"KRB5CCNAME\" when extract "
+					      "principal from cache:%s", cache);
 			return NULL;
 		}
 	}
@@ -378,7 +379,7 @@ char * ExtractPrincipalFromTicketCache(const char* cache)
 		if (cxt) {
 			errorMsg = krb5_get_error_message(cxt, ec);
 		} else {
-			errorMsg = "Cannot initialize kerberos context";
+			errorMsg = "could not initialize kerberos context";
 		}
 	}
 
@@ -399,7 +400,7 @@ char * ExtractPrincipalFromTicketCache(const char* cache)
 	}
 
 	if (errorMsg != NULL) {
-		elog(WARNING, "Fail to extract principal from cache, because : %s", errorMsg);
+		elog(WARNING, "failed to extract principal from cache, because : %s", errorMsg);
 		return NULL;
 	}
 
@@ -424,7 +425,7 @@ int  loadParameters(void)
 	if ( rm_grm_yarn_rm_addr == NULL ||
 		 (pcolon = strchr(rm_grm_yarn_rm_addr, ':')) ==NULL ) {
 		res = RESBROK_WRONG_GLOB_MGR_ADDRESS;
-		elog(LOG, "The format of property %s must be <address>:<port>.",
+		elog(LOG, "the format of property %s must be <address>:<port>.",
 				  HAWQDRM_CONFFILE_YARN_SERVERADDR);
 		goto exit;
 	}
@@ -439,7 +440,7 @@ int  loadParameters(void)
 	res = SimpleStringToInt32(&YARNPort, &testport);
 	if ( res != FUNC_RETURN_OK ) {
 		res = RESBROK_WRONG_GLOB_MGR_ADDRESS;
-		elog(LOG, "The port number in property %s can not be parsed.",
+		elog(LOG, "the port number in property %s cannot be parsed.",
 				  HAWQDRM_CONFFILE_YARN_SERVERADDR);
 		goto exit;
 	}
@@ -448,7 +449,7 @@ int  loadParameters(void)
 	if ( rm_grm_yarn_sched_addr == NULL ||
 		 (pcolon = strchr(rm_grm_yarn_sched_addr, ':')) ==NULL ) {
 		res = RESBROK_WRONG_GLOB_MGR_ADDRESS;
-		elog(LOG, "The format of property %s must be <address>:<port>.",
+		elog(LOG, "the format of property %s must be <address>:<port>.",
 				  HAWQDRM_CONFFILE_YARN_SCHEDULERADDR);
 		goto exit;
 	}
@@ -462,7 +463,7 @@ int  loadParameters(void)
 	res = SimpleStringToInt32(&YARNSchedulerPort, &testschedport);
 	if ( res != FUNC_RETURN_OK ) {
 		res = RESBROK_WRONG_GLOB_MGR_ADDRESS;
-		elog(LOG, "The port number in property %s can not be parsed.",
+		elog(LOG, "the port number in property %s cannot be parsed.",
 				  HAWQDRM_CONFFILE_YARN_SCHEDULERADDR);
 		goto exit;
 	}
@@ -470,7 +471,7 @@ int  loadParameters(void)
 	/* Get YARN queue name. */
 	if ( rm_grm_yarn_queue == NULL || rm_grm_yarn_queue[0] == '\0' ) {
 		res = RESBROK_WRONG_GLOB_MGR_QUEUE;
-		elog(LOG, "Can not find property %s.", HAWQDRM_CONFFILE_YARN_QUEUE);
+		elog(LOG, "cannot find property %s.", HAWQDRM_CONFFILE_YARN_QUEUE);
 		goto exit;
 	}
 
@@ -479,7 +480,7 @@ int  loadParameters(void)
 	/* Get YARN HAWQ application name string. */
 	if ( rm_grm_yarn_app_name == NULL || rm_grm_yarn_app_name[0] == '\0' ) {
 		res = RESBROK_WRONG_GLOB_MGR_APPNAME;
-		elog(LOG, "Can not find property %s.", HAWQDRM_CONFFILE_YARN_APP_NAME);
+		elog(LOG, "cannot find property %s.", HAWQDRM_CONFFILE_YARN_APP_NAME);
 		goto exit;
 	}
 
@@ -490,7 +491,7 @@ int  loadParameters(void)
 	{
 		if (!login())
 		{
-			elog(WARNING, "Resource broker failed to refresh kerberos ticket.");
+			elog(WARNING, "resource broker failed to refresh kerberos ticket.");
 		}
 		YARNUser = ExtractPrincipalFromTicketCache(krb5_ccname);
 		YARNUserShouldFree = true;
@@ -582,7 +583,7 @@ int handleRM2RB_GetClusterReport(void)
 		return sendRBGetClusterReportErrorData(RESBROK_ERROR_GRM);
 	}
 
-	elog(LOG, "Get YARN resource queue %s report: "
+	elog(LOG, "get YARN resource queue %s report: "
 			  "Capacity %lf, Current Capacity %lf, Maximum Capacity %lf.",
 			  resqueuename.Buffer,
 			  cap,
@@ -793,7 +794,7 @@ int handleRM2RB_AllocateResource(void)
 		return RESBROK_PIPE_ERROR;
 	}
 
-    elog(DEBUG3, "Resource manager acquires (%d MB, %d CORE) x %d containers "
+    elog(DEBUG3, "resource manager acquires (%d MB, %d CORE) x %d containers "
     			 "from YARN.",
                  request.MemoryMB,
 				 request.Core,

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/resourcemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcemanager.c b/src/backend/resourcemanager/resourcemanager.c
index 96cf9ff..10ba70b 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -203,19 +203,19 @@ int ResManagerMain(int argc, char *argv[])
 
     res = createDRMInstance();
 	if ( res != FUNC_RETURN_OK ) {
-		elog(FATAL, "HAWQ RM Can not create resource manager global instance.");
+		elog(FATAL, "HAWQ RM cannot create resource manager global instance.");
 	}
 	elog(DEBUG5, "HAWQ RM :: created dynamic resource manager instance.");
 
     res = createDRMMemoryContext();
     if ( res != FUNC_RETURN_OK ) {
-    	elog(FATAL, "HAWQ RM Can not create resource manager global instance.");
+    	elog(FATAL, "HAWQ RM cannot create resource manager global instance.");
     }
 	elog(DEBUG5, "HAWQ RM :: created resource manager memory context.");
 
 	res = initializeDRMInstance(PCONTEXT);
 	if ( res != FUNC_RETURN_OK ) {
-	    	elog(FATAL, "HAWQ RM Can not initialize global instance.");
+	    	elog(FATAL, "HAWQ RM cannot initialize global instance.");
 	}
 
 	elog(DEBUG5, "HAWQ RM :: initialized resource manager instance.");
@@ -227,7 +227,7 @@ int ResManagerMain(int argc, char *argv[])
 	/* Command line parser. */
     res = parseCommandLine(argc, argv);
     if ( res != FUNC_RETURN_OK ) {
-    	elog(FATAL, "Wrong resource manager command line arguments.");
+    	elog(FATAL, "invalid resource manager command line arguments.");
     }
 
 	elog(DEBUG5, "HAWQ RM ::passed command line arguments.");
@@ -235,7 +235,7 @@ int ResManagerMain(int argc, char *argv[])
 	/* Recognize all loaded configure properties. */
 	res = loadDynamicResourceManagerConfigure();
 	if ( res != FUNC_RETURN_OK ) {
-		elog(FATAL, "Fail to load valid properties from configure files.");
+		elog(FATAL, "failed to load valid properties from configure files.");
 	}
 
 	elog(DEBUG5, "HAWQ RM :: passed loading configuration.");
@@ -327,7 +327,7 @@ int ResManagerMain(int argc, char *argv[])
 		RB_prepareImplementation(DRMGlobalInstance->ImpType);
 		res = RB_start(true);
 		if ( res != FUNC_RETURN_OK ) {
-			elog(FATAL, "Fail to create resource broker service.");
+			elog(FATAL, "failed to create resource broker service.");
 		}
 		res = ResManagerMainServer2ndPhase();
 		elog(LOG, "Master RM exits.\n");
@@ -463,7 +463,7 @@ int ResManagerMainServer2ndPhase(void)
 	/* New socket facility poll based server.*/
 	res = initializeSocketServer();
 	if ( res != FUNC_RETURN_OK ) {
-		elog(FATAL, "Fail to initialize socket server.");
+		elog(FATAL, "failed to initialize socket server.");
 	}
 
 	/*
@@ -493,7 +493,7 @@ int ResManagerMainServer2ndPhase(void)
 	/* Load queue and user definition as no DDL now. */
 	res = loadAllQueueAndUser();
 	if ( res != FUNC_RETURN_OK ) {
-		elog(FATAL, "Fail to load queue and user definition.");
+		elog(FATAL, "failed to load queue and user definition.");
 	}
 
 	elog(DEBUG5, "HAWQ RM :: passed loading queue and user definition.");
@@ -732,7 +732,7 @@ int parseCommandLine(int argc, char **argv)
 			res = getStringValue(argc, argv, i+1, &value);
 			if ( res != FUNC_RETURN_OK ) {
 				elog( WARNING,
-					  "Wrong command line argument %s behind %s.",
+					  "invalid command line argument %s behind %s.",
 					  value.Str,
 					  HAWQDRM_COMMANDLINE_ROLE);
 				goto exit;
@@ -747,7 +747,7 @@ int parseCommandLine(int argc, char **argv)
 				DRMGlobalInstance->Role = START_RM_ROLE_SEGMENT;
 			}
 			else {
-				elog(WARNING, "Wrong argument value '%s' for %s",
+				elog(WARNING, "invalid argument value '%s' for %s",
 							  value.Str, HAWQDRM_COMMANDLINE_ROLE);
 				res = MAIN_WRONG_COMMANDLINE;
 			}
@@ -853,7 +853,7 @@ int initializeDRMInstance(MCTYPE context)
 	initSimpleString(&(DRMGlobalInstance->SocketLocalHostName), 	   context);
 	res = getLocalHostName(&(DRMGlobalInstance->SocketLocalHostName));
 	if ( res != FUNC_RETURN_OK ) {
-		elog(WARNING, "Fail to get local host name.");
+		elog(WARNING, "failed to get local host name.");
 	}
 
 	/* Set resource manager server startup time to 0, i.e. not started yet. */
@@ -871,7 +871,7 @@ int initializeDRMInstanceForQD(void)
 			         DRMGlobalInstance->Context);
 	res = getLocalHostName(&(DRMGlobalInstance->SocketLocalHostName));
 	if ( res != FUNC_RETURN_OK ) {
-		elog(WARNING, "Fail to get local host name.");
+		elog(WARNING, "failed to get local host name.");
 	}
 	return res;
 }
@@ -891,7 +891,7 @@ void initializeDRMInstanceForQE(void)
     /* create dynamic resource manager instance to contain config data. */
     res = createDRMInstance();
     if ( res != FUNC_RETURN_OK ) {
-    	elog(ERROR, "Fail to initialize data structure for communicating with "
+    	elog(ERROR, "failed to initialize data structure for communicating with "
                 	"resource manager.");
     }
 
@@ -911,7 +911,7 @@ void initializeDRMInstanceForQE(void)
 			         DRMGlobalInstance->Context);
 	res = getLocalHostName(&(DRMGlobalInstance->SocketLocalHostName));
 	if ( res != FUNC_RETURN_OK ) {
-		elog(WARNING, "Fail to get local host name.");
+		elog(WARNING, "failed to get local host name.");
 	}
 
 	/****** Resource enforcement GUCs begins ******/
@@ -1016,7 +1016,7 @@ int  loadDynamicResourceManagerConfigure(void)
 	}
 	else
 	{
-		elog(WARNING, "Wrong global resource manager type set in %s.",
+		elog(WARNING, "invalid global resource manager type set in %s.",
 				  	  HAWQDRM_CONFFILE_SERVER_TYPE);
 		return MAIN_CONF_UNSET_ROLE;
 	}
@@ -1026,7 +1026,7 @@ int  loadDynamicResourceManagerConfigure(void)
 	SimpString segmem;
 	if ( rm_seg_memory_use[0] == '\0' )
 	{
-		elog(WARNING, "%s is not set", HAWQDRM_CONFFILE_LIMIT_MEMORY_USE);
+		elog(WARNING, "uninitialized parameter %s", HAWQDRM_CONFFILE_LIMIT_MEMORY_USE);
 		return MAIN_CONF_UNSET_SEGMENT_MEMORY_USE;
 	}
 
@@ -1035,7 +1035,7 @@ int  loadDynamicResourceManagerConfigure(void)
 										  &(DRMGlobalInstance->SegmentMemoryMB));
 	if ( res != FUNC_RETURN_OK)
 	{
-		elog(WARNING, "Can not understand the value '%s' of property %s.",
+		elog(WARNING, "invalid value '%s' for property %s.",
 				  	  rm_seg_memory_use,
 					  HAWQDRM_CONFFILE_LIMIT_MEMORY_USE);
 		return MAIN_CONF_UNSET_SEGMENT_MEMORY_USE;
@@ -1127,7 +1127,7 @@ exit:
 
 	if ( res != FUNC_RETURN_OK )
 	{
-		elog( LOG, "Fail to load queue and user definition.");
+		elog( LOG, "failed to load queue and user definition.");
 	}
 	return res;
 }
@@ -1825,7 +1825,7 @@ int addResourceQueueAndUserFromProperties(List *queueprops, List *userprops)
 		if ( res != FUNC_RETURN_OK )
 		{
 			rm_pfree(PCONTEXT, newqueue);
-			elog(WARNING, "Resource manager can not create resource queue with its "
+			elog(WARNING, "Resource manager cannot create resource queue with its "
 						  "attributes because %s",
 						  errorbuf);
 			continue;
@@ -1935,19 +1935,19 @@ int addResourceQueueAndUserFromProperties(List *queueprops, List *userprops)
 														 sizeof(errorbuf));
 		if ( res != FUNC_RETURN_OK )
 		{
-			elog(RMLOG, "res=%d error=%s, after check and complete queue %s.",
+			elog(RMLOG, "res=%d error=%s, after check and complete queue \'%s\'.",
 						res,
 						errorbuf,
 						partqueue->Name);
 
 			rm_pfree(PCONTEXT, partqueue);
-			elog(WARNING, "Resource manager can not complete resource queue's "
+			elog(WARNING, "Resource manager cannot complete resource queue's "
 						  "attributes because %s",
 						  errorbuf);
 			continue;
 		}
 
-		elog(RMLOG, "Checked and completed queue %s.", partqueue->Name);
+		elog(RMLOG, "Checked and completed queue \'%s\'.", partqueue->Name);
 
 		DynResourceQueueTrack newtrack = NULL;
 		res = createQueueAndTrack(partqueue, &newtrack, errorbuf, sizeof(errorbuf));
@@ -1960,14 +1960,14 @@ int addResourceQueueAndUserFromProperties(List *queueprops, List *userprops)
 				rm_pfree(PCONTEXT, newtrack);
 			}
 
-			elog( WARNING, "Resource manager can not create resource queue %s "
+			elog( WARNING, "Resource manager cannot create resource queue \'%s\' "
 						   "because %s",
 						   partqueue->Name,
 						   errorbuf);
 			continue;
 		}
 
-		elog(RMLOG, "Created queue %s.", partqueue->Name);
+		elog(RMLOG, "Created queue \'%s\'.", partqueue->Name);
 
 		char buffer[1024];
 		generateQueueReport(partqueue->OID, buffer, sizeof(buffer));
@@ -1992,7 +1992,7 @@ int addResourceQueueAndUserFromProperties(List *queueprops, List *userprops)
 		res = parseUserAttributes(attrs,newuser, errorbuf, sizeof(errorbuf));
 		if ( res != FUNC_RETURN_OK )
 		{
-			elog(WARNING, "Can not create user with its attributes because %s",
+			elog(WARNING, "cannot create user with its attributes because %s",
 						  errorbuf);
 			rm_pfree(PCONTEXT, newuser);
 			continue;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/resourcemanager_RMSEG.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcemanager_RMSEG.c b/src/backend/resourcemanager/resourcemanager_RMSEG.c
index d95aad4..f3042eb 100644
--- a/src/backend/resourcemanager/resourcemanager_RMSEG.c
+++ b/src/backend/resourcemanager/resourcemanager_RMSEG.c
@@ -101,7 +101,7 @@ int  initializeSocketServer_RMSEG(void)
 	 * tasks. */
 	if ( netres != STATUS_OK ) {
 		res = REQUESTHANDLER_FAIL_START_SOCKET_SERVER;
-		elog( LOG,  "Can not create socket server. HostName=%s, Port=%d",
+		elog( LOG,  "cannot create socket server. HostName=%s, Port=%d",
 				    allip,
 					rm_segment_port);
 		return res;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index ed91d8e..755a4ab 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -1454,7 +1454,7 @@ int updateHAWQSegWithGRMSegStat( SegStat segstat)
 	/* Update only the grm capacity. */
     if ( res != FUNC_RETURN_OK )
     {
-    	elog(LOG, "Resource manager can not find resource broker reported host %s "
+    	elog(LOG, "Resource manager cannot find resource broker reported host %s "
     			  "in the registered segment list. Skip it.",
 				  hostname);
     	return res;
@@ -1927,7 +1927,7 @@ int  addGRMContainerToToBeAccepted(GRMContainer ctn)
 	uint32_t hostnamelen = strlen(ctn->HostName);
 
 	/*
-	 * If the host does not exist, this container can not be added. Check the
+	 * If the host does not exist, this container cannot be added. Check the
 	 * host name directly, and try the host address again.
 	 */
 	if ( ctn->Resource == NULL )
@@ -1937,7 +1937,7 @@ int  addGRMContainerToToBeAccepted(GRMContainer ctn)
 		if ( res != FUNC_RETURN_OK )
 		{
 			addGRMContainerToKicked(ctn);
-			elog(LOG, "Resource manager can not find registered host %s. "
+			elog(LOG, "Resource manager cannot find registered host %s. "
 					  "To return this host's resource container at once.",
 					  ctn->HostName);
 			return res;
@@ -2655,7 +2655,7 @@ int allocateResourceFromResourcePoolIOBytes2(int32_t 	 nodecount,
 				/* Host should not break vseg num limit. */
 				if ( !fixnodecount && curhost->VSegmentCount >= vseglimitpseg )
 				{
-					elog(RMLOG, "Segment %s can not container more vsegs for "
+					elog(RMLOG, "Segment %s cannot container more vsegs for "
 								"current statement, allocated %d vsegs.",
 								GET_SEGRESOURCE_HOSTNAME(curhost->Resource),
 								curhost->VSegmentCount);
@@ -2677,7 +2677,7 @@ int allocateResourceFromResourcePoolIOBytes2(int32_t 	 nodecount,
 			if ( currresinfo->SliceWorkload + slicesize > rm_nslice_perseg_limit )
 			{
 				elog(LOG, "Segment %s contains %d slices working now, "
-						  "it can not afford %d more slices.",
+						  "it cannot afford %d more slices.",
 						  GET_SEGRESOURCE_HOSTNAME(currresinfo),
 						  currresinfo->SliceWorkload,
 						  slicesize);
@@ -3140,7 +3140,7 @@ int getSegIDByHostNameInternal(HASHTABLE   hashtable,
 												 &gottenaddr);
 	if ( res != FUNC_RETURN_OK )
 	{
-		elog(WARNING, "Resource manager can not resolve host name %s", hostname);
+		elog(WARNING, "Resource manager cannot resolve host name %s", hostname);
 		goto exit;
 	}
 
@@ -4304,7 +4304,7 @@ void checkSlavesFile(void)
 		if ( gphome == NULL )
 		{
 			elog(WARNING, "The environment variable GPHOME is not set. "
-						  "Resource manager can not find file slaves.");
+						  "Resource manager cannot find file slaves.");
 			return;
 		}
 
@@ -4320,7 +4320,7 @@ void checkSlavesFile(void)
 	FILE *fp = fopen(filename, "r");
 	if ( fp == NULL )
 	{
-		elog(WARNING, "Fail to open slaves file %s. errno %d", filename, errno);
+		elog(WARNING, "Failed to open slaves file %s. errno %d", filename, errno);
 		return;
 	}
 	int fd = fileno(fp);
@@ -4329,7 +4329,7 @@ void checkSlavesFile(void)
 	if ( fres != 0 )
 	{
 		fclose(fp);
-		elog(WARNING, "Fail to get slaves file stat %s. errno %d", filename, errno);
+		elog(WARNING, "Failed to get slaves file stat %s. errno %d", filename, errno);
 		return;
 	}
 	int64_t filechangetime = filestat.st_mtime;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/10c5bb8a/src/backend/resourcemanager/resqueuecommand.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resqueuecommand.c b/src/backend/resourcemanager/resqueuecommand.c
index cf24224..3c5e0e0 100644
--- a/src/backend/resourcemanager/resqueuecommand.c
+++ b/src/backend/resourcemanager/resqueuecommand.c
@@ -92,7 +92,7 @@ void createResourceQueue(CreateQueueStmt *stmt)
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_DUPLICATE_OBJECT),
-				 errmsg("resource queue %s already exists",
+				 errmsg("resource queue \'%s\' already exists",
 						stmt->queue)));
 	}
 
@@ -176,7 +176,7 @@ void dropResourceQueue(DropQueueStmt *stmt)
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-				 errmsg("cannot drop system resource queue %s",
+				 errmsg("cannot drop system resource queue \'%s\'",
 						stmt->queue)));
 	}
 
@@ -195,7 +195,7 @@ void dropResourceQueue(DropQueueStmt *stmt)
 	if (!HeapTupleIsValid(tuple))
 		ereport(ERROR,
 				(errcode(ERRCODE_UNDEFINED_OBJECT),
-				 errmsg("resource queue %s does not exist",
+				 errmsg("resource queue \'%s\' does not exist",
 						stmt->queue)));
 
 	/* Remember the Oid */
@@ -211,7 +211,7 @@ void dropResourceQueue(DropQueueStmt *stmt)
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST),
-				 errmsg("resource queue %s is used by at least one role",
+				 errmsg("resource queue \'%s\' is used by at least one role",
 						stmt->queue)));
 	}
 
@@ -303,7 +303,7 @@ void alterResourceQueue(AlterQueueStmt *stmt)
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-				 errmsg("cannot alter system resource queue %s",
+				 errmsg("cannot alter system resource queue \'%s\'",
 						stmt->queue)));
 	}
 
@@ -333,7 +333,7 @@ void alterResourceQueue(AlterQueueStmt *stmt)
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_DUPLICATE_OBJECT),
-				 errmsg("resource queue %s does not exist",
+				 errmsg("resource queue \'%s\' does not exist",
 						stmt->queue)));
 	}
 


Mime
View raw message