|
@@ -33,11 +33,6 @@
|
|
|
|
|
|
#define DALI_FILE_LOOKUP_TIMEOUT (1000*15*1) // 15 seconds
|
|
|
|
|
|
-const unsigned ROXIECONNECTIONTIMEOUT = 1000; //1 second
|
|
|
-const unsigned ROXIECONTROLQUERYTIMEOUT = 3000; //3 second
|
|
|
-const unsigned ROXIECONTROLQUERIESTIMEOUT = 30000; //30 second
|
|
|
-const unsigned ROXIELOCKCONNECTIONTIMEOUT = 60000; //60 second
|
|
|
-
|
|
|
//The CQuerySetQueryActionTypes[] has to match with the ESPenum QuerySetQueryActionTypes in the ecm file.
|
|
|
static unsigned NumOfQuerySetQueryActionTypes = 7;
|
|
|
static const char *QuerySetQueryActionTypes[] = { "Suspend", "Unsuspend", "ToggleSuspend", "Activate",
|
|
@@ -516,7 +511,7 @@ bool reloadCluster(MapStringToMyClass<ISmartSocketFactory> &roxieConnMap, const
|
|
|
#ifndef _CONTAINERIZED
|
|
|
Owned<IPropertyTree> result = sendRoxieControlAllNodes(addrs.item(0), "<control:reload/>", false, wait);
|
|
|
#else
|
|
|
- Owned<IPropertyTree> result = sendRoxieControlAllNodes(conn->nextEndpoint(), "<control:reload/>", false, wait);
|
|
|
+ Owned<IPropertyTree> result = sendRoxieControlAllNodes(conn, "<control:reload/>", false, wait, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
const char *status = result->queryProp("Endpoint[1]/Status");
|
|
|
if (!status || !strieq(status, "ok"))
|
|
@@ -836,7 +831,7 @@ bool CWsWorkunitsEx::isQuerySuspended(const char* query, const char* target, uns
|
|
|
#ifndef _CONTAINERIZED
|
|
|
Owned<IPropertyTree> result = sendRoxieControlAllNodes(addrs.item(0), control.str(), false, wait);
|
|
|
#else
|
|
|
- Owned<IPropertyTree> result = sendRoxieControlAllNodes(conn->nextEndpoint(), control, false, wait);
|
|
|
+ Owned<IPropertyTree> result = sendRoxieControlAllNodes(conn, control, false, wait, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
if (!result)
|
|
|
return false;
|
|
@@ -1282,13 +1277,16 @@ IPropertyTree *getQueriesOnCluster(const char *target, const char *queryset, Str
|
|
|
}
|
|
|
#ifndef _CONTAINERIZED
|
|
|
Owned<ISocket> sock = ISocket::connect_timeout(eps.item(0), ROXIECONNECTIONTIMEOUT);
|
|
|
-#else
|
|
|
- Owned<ISocket> sock = ISocket::connect_timeout(conn->nextEndpoint(), ROXIECONNECTIONTIMEOUT);
|
|
|
-#endif
|
|
|
if (checkAllNodes)
|
|
|
return sendRoxieControlAllNodes(sock, control, false, ROXIECONTROLQUERIESTIMEOUT);
|
|
|
else
|
|
|
return sendRoxieControlQuery(sock, control, ROXIECONTROLQUERIESTIMEOUT);
|
|
|
+#else
|
|
|
+ if (checkAllNodes)
|
|
|
+ return sendRoxieControlAllNodes(conn, control, false, ROXIECONTROLQUERIESTIMEOUT, ROXIECONNECTIONTIMEOUT);
|
|
|
+ else
|
|
|
+ return sendRoxieControlQuery(conn, control, ROXIECONTROLQUERIESTIMEOUT, ROXIECONNECTIONTIMEOUT);
|
|
|
+#endif
|
|
|
}
|
|
|
catch(IException* e)
|
|
|
{
|
|
@@ -1462,10 +1460,10 @@ unsigned CWsWorkunitsEx::getGraphIdsByQueryId(const char *target, const char *qu
|
|
|
VStringBuffer xpath("<control:querystats><Query id='%s'/></control:querystats>", queryId);
|
|
|
#ifndef _CONTAINERIZED
|
|
|
Owned<ISocket> sock = ISocket::connect_timeout(eps.item(0), ROXIECONNECTIONTIMEOUT);
|
|
|
+ Owned<IPropertyTree> querystats = sendRoxieControlQuery(sock, xpath.str(), ROXIECONTROLQUERYTIMEOUT);
|
|
|
#else
|
|
|
- Owned<ISocket> sock = ISocket::connect_timeout(conn->nextEndpoint(), ROXIECONNECTIONTIMEOUT);
|
|
|
+ Owned<IPropertyTree> querystats = sendRoxieControlQuery(conn, xpath.str(), ROXIECONTROLQUERYTIMEOUT, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
- Owned<IPropertyTree> querystats = sendRoxieControlQuery(sock, xpath.str(), ROXIECONTROLQUERYTIMEOUT);
|
|
|
if (!querystats)
|
|
|
return 0;
|
|
|
|
|
@@ -3422,7 +3420,7 @@ void CWsWorkunitsEx::getGraphsByQueryId(const char *target, const char *queryId,
|
|
|
|
|
|
PROGLOG("getGraphsByQueryId: target %s, query %s", target, queryId);
|
|
|
VStringBuffer control("<control:querystats><Query id='%s'/></control:querystats>", queryId);
|
|
|
- Owned<IPropertyTree> querystats = sendRoxieControlAllNodes(conn->nextEndpoint(), control.str(), false, ROXIELOCKCONNECTIONTIMEOUT);
|
|
|
+ Owned<IPropertyTree> querystats = sendRoxieControlAllNodes(conn, control.str(), false, ROXIELOCKCONNECTIONTIMEOUT, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
if (!querystats)
|
|
|
return;
|
|
@@ -3543,14 +3541,14 @@ IPropertyTree* CWsWorkunitsEx::sendControlQuery(IEspContext& context, const char
|
|
|
throw MakeStringException(ECLWATCH_INVALID_CLUSTER_NAME, "CWsWorkunitsEx::sendControlQuery: Server not found for %s", target);
|
|
|
|
|
|
Owned<ISocket> sock = ISocket::connect_timeout(eps.item(0), timeout);
|
|
|
+ return sendRoxieControlQuery(sock, query, timeout);
|
|
|
#else
|
|
|
ISmartSocketFactory *conn = roxieConnMap.getValue(target);
|
|
|
if (!conn)
|
|
|
throw makeStringExceptionV(ECLWATCH_CANNOT_GET_ENV_INFO, "roxie target cluster not mapped: %s", target);
|
|
|
|
|
|
- Owned<ISocket> sock = ISocket::connect_timeout(conn->nextEndpoint(), timeout);
|
|
|
+ return sendRoxieControlQuery(conn, query, timeout, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
- return sendRoxieControlQuery(sock, query, timeout);
|
|
|
}
|
|
|
|
|
|
bool CWsWorkunitsEx::onWUUpdateQueryEntry(IEspContext& context, IEspWUUpdateQueryEntryRequest& req, IEspWUUpdateQueryEntryResponse& resp)
|
|
@@ -3618,7 +3616,7 @@ bool CWsWorkunitsEx::onWUGetNumFileToCopy(IEspContext& context, IEspWUGetNumFile
|
|
|
PROGLOG("WUGetNumFileToCopy: Process Server not found for %s", clusterName.get());
|
|
|
return nullptr;
|
|
|
}
|
|
|
- Owned<IPropertyTree> result = sendRoxieControlAllNodes(conn->nextEndpoint(), "<control:numfilestoprocess/>", false, ROXIELOCKCONNECTIONTIMEOUT);
|
|
|
+ Owned<IPropertyTree> result = sendRoxieControlAllNodes(conn, "<control:numfilestoprocess/>", false, ROXIELOCKCONNECTIONTIMEOUT, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
if (!result)
|
|
|
{
|
|
@@ -3763,7 +3761,7 @@ bool CWsWorkunitsEx::onWUQueryGetSummaryStats(IEspContext& context, IEspWUQueryG
|
|
|
#ifndef _CONTAINERIZED
|
|
|
Owned<IPropertyTree> queryAggregates = sendRoxieControlAllNodes(eps.item(0), control.str(), false, ROXIELOCKCONNECTIONTIMEOUT);
|
|
|
#else
|
|
|
- Owned<IPropertyTree> queryAggregates = sendRoxieControlAllNodes(conn->nextEndpoint(), control, false, ROXIELOCKCONNECTIONTIMEOUT);
|
|
|
+ Owned<IPropertyTree> queryAggregates = sendRoxieControlAllNodes(conn, control, false, ROXIELOCKCONNECTIONTIMEOUT, ROXIECONNECTIONTIMEOUT);
|
|
|
#endif
|
|
|
if (!queryAggregates)
|
|
|
{
|