|
@@ -2014,26 +2014,28 @@ void WsWuInfo::getWorkunitThorLog(const char* fileName, MemoryBuffer& buf, const
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void WsWuInfo::getWorkunitThorSlaveLog(const char *groupName, const char *ipAddress, const char* logDate,
|
|
|
+void WsWuInfo::getWorkunitThorSlaveLog(const char *instanceName, const char *ipAddress, const char* logDate,
|
|
|
const char* logDir, int slaveNum, MemoryBuffer& buf, const char* outFile, bool forDownload)
|
|
|
{
|
|
|
if (isEmpty(logDir))
|
|
|
- throw MakeStringException(ECLWATCH_INVALID_INPUT,"ThorSlave log path not specified.");
|
|
|
+ throw MakeStringException(ECLWATCH_INVALID_INPUT,"ThorSlave log path not specified.");
|
|
|
if (isEmpty(logDate))
|
|
|
throw MakeStringException(ECLWATCH_INVALID_INPUT,"ThorSlave log date not specified.");
|
|
|
|
|
|
StringBuffer slaveIPAddress, logName;
|
|
|
if (slaveNum > 0)
|
|
|
{
|
|
|
- if (isEmpty(groupName))
|
|
|
- throw MakeStringException(ECLWATCH_INVALID_INPUT,"Thor group not specified.");
|
|
|
+ if (isEmpty(instanceName))
|
|
|
+ throw MakeStringException(ECLWATCH_INVALID_INPUT,"Thor instance not specified.");
|
|
|
|
|
|
- Owned<IGroup> nodeGroup = queryNamedGroupStore().lookup(groupName);
|
|
|
+ StringBuffer groupName;
|
|
|
+ getClusterThorGroupName(groupName, instanceName);
|
|
|
+ if (groupName.isEmpty())
|
|
|
+ throw MakeStringException(ECLWATCH_INVALID_INPUT, "Failed to get Thor Group Name for %s", instanceName);
|
|
|
+
|
|
|
+ Owned<IGroup> nodeGroup = queryNamedGroupStore().lookup(groupName.str());
|
|
|
if (!nodeGroup || (nodeGroup->ordinality() == 0))
|
|
|
- {
|
|
|
- WARNLOG("Node group %s not found", groupName);
|
|
|
- return;
|
|
|
- }
|
|
|
+ throw MakeStringException(ECLWATCH_INVALID_INPUT, "Node group %s not found", groupName.str());
|
|
|
|
|
|
nodeGroup->queryNode(slaveNum-1).endpoint().getIpText(slaveIPAddress);
|
|
|
if (slaveIPAddress.length() < 1)
|