|
@@ -29,8 +29,7 @@
|
|
|
#include "package.h"
|
|
|
#include "eclwatch_errorlist.hpp"
|
|
|
#include "exception_util.hpp"
|
|
|
-
|
|
|
-#define SDS_LOCK_TIMEOUT (5*60*1000) // 5mins, 30s a bit short
|
|
|
+#include "TpWrapper.hpp"
|
|
|
|
|
|
void CWsPackageProcessEx::init(IPropertyTree *cfg, const char *process, const char *service)
|
|
|
{
|
|
@@ -102,8 +101,6 @@ IPropertyTree *getPkgSetRegistry(const char *process, bool readonly)
|
|
|
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
const unsigned roxieQueryRoxieTimeOut = 60000;
|
|
|
|
|
|
-#define SDS_LOCK_TIMEOUT (5*60*1000) // 5mins, 30s a bit short
|
|
|
-
|
|
|
bool isFileKnownOnCluster(const char *logicalname, IConstWUClusterInfo *clusterInfo, IUserDescriptor* userdesc)
|
|
|
{
|
|
|
Owned<IDistributedFile> dst = queryDistributedFileDirectory().lookup(logicalname, userdesc, true, false, false, nullptr, defaultPrivilegedUser);
|
|
@@ -119,7 +116,7 @@ bool isFileKnownOnCluster(const char *logicalname, IConstWUClusterInfo *clusterI
|
|
|
|
|
|
bool isFileKnownOnCluster(const char *logicalname, const char *target, IUserDescriptor* userdesc)
|
|
|
{
|
|
|
- Owned<IConstWUClusterInfo> clusterInfo = getTargetClusterInfo(target);
|
|
|
+ Owned<IConstWUClusterInfo> clusterInfo = getWUClusterInfoByName(target);
|
|
|
if (!clusterInfo)
|
|
|
throw MakeStringException(PKG_TARGET_NOT_DEFINED, "Could not find information about target cluster %s ", target);
|
|
|
|
|
@@ -160,7 +157,7 @@ void cloneFileInfoToDali(unsigned updateFlags, StringArray ¬Found, IPropertyT
|
|
|
|
|
|
void cloneFileInfoToDali(unsigned updateFlags, StringArray ¬Found, IPropertyTree *packageMap, const char *lookupDaliIp, const char *dstCluster, const char *srcCluster, const char *prefix, IUserDescriptor* userdesc, bool allowForeignFiles)
|
|
|
{
|
|
|
- Owned<IConstWUClusterInfo> clusterInfo = getTargetClusterInfo(dstCluster);
|
|
|
+ Owned<IConstWUClusterInfo> clusterInfo = getWUClusterInfoByName(dstCluster);
|
|
|
if (!clusterInfo)
|
|
|
throw MakeStringException(PKG_TARGET_NOT_DEFINED, "Could not find information about target cluster %s ", dstCluster);
|
|
|
|
|
@@ -274,7 +271,7 @@ public:
|
|
|
}
|
|
|
IConstWUClusterInfo *ensureClusterInfo()
|
|
|
{
|
|
|
- clusterInfo.setown(getTargetClusterInfo(target));
|
|
|
+ clusterInfo.setown(getWUClusterInfoByName(target));
|
|
|
if (!clusterInfo)
|
|
|
throw MakeStringException(PKG_TARGET_NOT_DEFINED, "Could not find information about target cluster %s ", target.str());
|
|
|
return clusterInfo;
|
|
@@ -370,7 +367,7 @@ public:
|
|
|
else
|
|
|
{
|
|
|
CConstWUClusterInfoArray clusters;
|
|
|
- getEnvironmentClusterInfo(clusters);
|
|
|
+ getWUClusterInfo(clusters);
|
|
|
ForEachItemIn(i, clusters)
|
|
|
{
|
|
|
IConstWUClusterInfo &cluster = clusters.item(i);
|
|
@@ -1129,7 +1126,7 @@ bool CWsPackageProcessEx::onValidatePackage(IEspContext &context, IEspValidatePa
|
|
|
IArrayOf<IEspValidateResult> results;
|
|
|
if (!streq(target, "*"))
|
|
|
{
|
|
|
- Owned<IConstWUClusterInfo> clusterInfo = getTargetClusterInfo(target);
|
|
|
+ Owned<IConstWUClusterInfo> clusterInfo = getWUClusterInfoByName(target);
|
|
|
if (!clusterInfo)
|
|
|
throw makeStringException(PKG_TARGET_NOT_DEFINED, "Target cluster not found");
|
|
|
validatePackage(context, req, packageMapTree, clusterInfo, queriesToVerify, queriesToIgnore,
|
|
@@ -1138,7 +1135,7 @@ bool CWsPackageProcessEx::onValidatePackage(IEspContext &context, IEspValidatePa
|
|
|
else
|
|
|
{
|
|
|
CConstWUClusterInfoArray clusters;
|
|
|
- getEnvironmentClusterInfo(clusters);
|
|
|
+ getWUClusterInfo(clusters);
|
|
|
ForEachItemIn(i, clusters)
|
|
|
{
|
|
|
IConstWUClusterInfo &cluster = clusters.item(i);
|
|
@@ -1253,13 +1250,9 @@ bool CWsPackageProcessEx::onGetPackageMapSelectOptions(IEspContext &context, IEs
|
|
|
bool includeProcesses = req.getIncludeProcesses();
|
|
|
if (includeTargets || includeProcesses)
|
|
|
{
|
|
|
- Owned<IEnvironmentFactory> factory = getEnvironmentFactory(true);
|
|
|
- Owned<IConstEnvironment> env = factory->openEnvironment();
|
|
|
- Owned<IPropertyTree> root = &env->getPTree();
|
|
|
-
|
|
|
IArrayOf<IConstTargetData> targets;
|
|
|
CConstWUClusterInfoArray clusters;
|
|
|
- getEnvironmentClusterInfo(root, clusters);
|
|
|
+ getWUClusterInfo(clusters);
|
|
|
ForEachItemIn(c, clusters)
|
|
|
{
|
|
|
SCMStringBuffer str;
|
|
@@ -1348,7 +1341,7 @@ bool CWsPackageProcessEx::onGetQueryFileMapping(IEspContext &context, IEspGetQue
|
|
|
if (!target || !*target)
|
|
|
throw MakeStringException(PKG_TARGET_NOT_DEFINED, "Target cluster required");
|
|
|
|
|
|
- Owned<IConstWUClusterInfo> clusterInfo = getTargetClusterInfo(target);
|
|
|
+ Owned<IConstWUClusterInfo> clusterInfo = getWUClusterInfoByName(target);
|
|
|
if (!clusterInfo)
|
|
|
throw MakeStringException(PKG_TARGET_NOT_DEFINED, "Unable to find target cluster");
|
|
|
if (clusterInfo->getPlatform()!=RoxieCluster)
|