From 0ace2a89e5b306d134c48af912d8802fcf1d8796 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Fri, 22 Sep 2023 10:32:09 +0100 Subject: [PATCH] getUrlStr(StringBuffer -> getEndpointHostText --- common/environment/dalienv.cpp | 2 +- common/pkgfiles/referencedfilelist.cpp | 6 ++-- common/remote/rmtspawn.cpp | 6 ++-- .../roxiecommlib/roxiecommunicationclient.cpp | 2 +- common/thorhelper/persistent.cpp | 8 ++--- common/thorhelper/thorsoapcall.cpp | 12 +++---- common/workunit/workunit.cpp | 8 ++--- common/workunit/wujobq.cpp | 2 +- dali/base/daclient.cpp | 2 +- dali/base/dacoven.cpp | 10 +++--- dali/base/dadfs.cpp | 22 ++++++------ dali/base/dafdesc.cpp | 8 ++--- dali/base/dasds.cpp | 12 +++---- dali/base/dasess.cpp | 14 ++++---- dali/base/dasubs.cpp | 6 ++-- dali/base/dautils.cpp | 14 ++++---- dali/base/dautils.hpp | 2 +- dali/daliadmin/daadmin.cpp | 8 ++--- dali/daliadmin/daliadmin.cpp | 2 +- dali/dalidiag/dalidiag.cpp | 8 ++--- dali/datest/datest.cpp | 12 +++---- dali/daunittest/dautdfs.cpp | 8 ++--- dali/dfu/dfurun.cpp | 8 ++--- dali/dfu/dfurunkdp.cpp | 4 +-- dali/dfu/dfuutil.cpp | 22 ++++++------ dali/dfu/dfuwu.cpp | 8 ++--- dali/dfuXRefLib/XRefFilesNode.cpp | 4 +-- dali/dfuXRefLib/dfurdir.cpp | 2 +- dali/dfuXRefLib/dfuxreflib.cpp | 10 +++--- dali/dfuplus/dfuplus.cpp | 6 ++-- dali/ft/daftformat.cpp | 2 +- dali/ft/filecopy.cpp | 2 +- dali/sasha/saserver.cpp | 2 +- dali/sasha/saverify.cpp | 8 ++--- dali/sasha/saxref.cpp | 6 ++-- ecl/eclagent/eclagent.cpp | 2 +- esp/bindings/http/client/httpclient.cpp | 6 ++-- esp/clients/roxiecontrol.cpp | 2 +- esp/clients/wsdfuaccess/wsdfuaccess.cpp | 2 +- esp/services/ws_dfu/ws_dfuService.cpp | 6 ++-- esp/services/ws_fs/ws_fsService.cpp | 4 +-- .../ws_workunits/ws_workunitsQuerySets.cpp | 2 +- .../ws_workunits/ws_workunitsService.cpp | 6 ++-- esp/test/httptest/httptest.cpp | 4 +-- esp/tools/soapplus/http.cpp | 2 +- esp/tools/soapplus/httpproxy.cpp | 2 +- fs/dafilesrv/dafilesrv.cpp | 4 +-- fs/dafsclient/rmtclient.cpp | 8 ++--- fs/dafsclient/rmtfile.cpp | 4 +-- fs/dafscontrol/dafscontrol.cpp | 16 ++++----- fs/dafsserver/dafsserver.cpp | 8 ++--- fs/dafsstream/dafsstream.cpp | 8 ++--- plugins/fileservices/fileservices.cpp | 2 +- roxie/ccd/ccddali.cpp | 2 +- roxie/ccd/ccdlistener.cpp | 12 +++---- roxie/ccd/ccdqueue.cpp | 2 +- roxie/roxiepipe/roxiepipe.cpp | 6 ++-- roxie/udplib/udpaeron.cpp | 2 +- roxie/udplib/udpsha.cpp | 8 ++--- roxie/udplib/udptopo.cpp | 2 +- system/hrpc/hrpcmp.cpp | 2 +- system/hrpc/hrpcutil.cpp | 2 +- system/jlib/jfile.cpp | 2 +- system/jlib/jlog.cpp | 8 ++--- system/jlib/jsmartsock.cpp | 4 +-- system/jlib/jsocket.cpp | 10 +++--- system/jlib/jsocket.hpp | 2 +- system/mp/mpbase.cpp | 2 +- system/mp/mpbuff.hpp | 2 +- system/mp/mpcomm.cpp | 34 +++++++++---------- system/mp/mplog.cpp | 2 +- system/mp/test/mptest.cpp | 6 ++-- testing/unittests/dalitests.cpp | 2 +- .../hashdistrib/thhashdistribslave.cpp | 2 +- thorlcr/activities/result/thresult.cpp | 2 +- thorlcr/graph/thgraphmaster.cpp | 6 ++-- thorlcr/graph/thgraphslave.cpp | 2 +- thorlcr/master/mawatchdog.cpp | 8 ++--- thorlcr/master/thgraphmanager.cpp | 10 +++--- thorlcr/master/thmastermain.cpp | 18 +++++----- thorlcr/msort/tsortm.cpp | 8 ++--- thorlcr/msort/tsortmp.cpp | 4 +-- thorlcr/msort/tsorts1.cpp | 8 ++--- thorlcr/slave/thslavemain.cpp | 6 ++-- thorlcr/thorcodectx/thcodectx.cpp | 2 +- thorlcr/thorutil/thormisc.cpp | 4 +-- 86 files changed, 269 insertions(+), 269 deletions(-) diff --git a/common/environment/dalienv.cpp b/common/environment/dalienv.cpp index d94bf325afc..4d17343e1b5 100644 --- a/common/environment/dalienv.cpp +++ b/common/environment/dalienv.cpp @@ -264,7 +264,7 @@ bool getRemoteRunInfo(const char * keyName, const char * exeName, const char * v // use dafilesrv to work out OS StringBuffer dalis; if (remotedali) - remotedali->endpoint().getUrlStr(dalis); + remotedali->endpoint().getEndpointHostText(dalis); // first get machine by IP StringBuffer ips; ip.getHostText(ips); diff --git a/common/pkgfiles/referencedfilelist.cpp b/common/pkgfiles/referencedfilelist.cpp index 552d00b6ef8..6a2d4b035fc 100644 --- a/common/pkgfiles/referencedfilelist.cpp +++ b/common/pkgfiles/referencedfilelist.cpp @@ -423,7 +423,7 @@ IPropertyTree *ReferencedFile::getSpecifiedOrRemoteFileTree(IUserDescriptor *use if (!fileTree) return NULL; StringAttrBuilder daliipText(daliip); - remote->endpoint().getUrlStr(daliipText); + remote->endpoint().getEndpointHostText(daliipText); filePrefix.set(remotePrefix); return fileTree.getClear(); } @@ -471,7 +471,7 @@ void ReferencedFile::resolveRemote(IUserDescriptor *user, INode *remote, const c flags |= RefFileNotFound; StringBuffer dest; - DBGLOG("Remote ReferencedFile not found %s [dali=%s, remote=%s, prefix=%s]", logicalName.str(), daliip.get(), remote ? remote->endpoint().getUrlStr(dest).str() : nullptr, remotePrefix); + DBGLOG("Remote ReferencedFile not found %s [dali=%s, remote=%s, prefix=%s]", logicalName.str(), daliip.get(), remote ? remote->endpoint().getEndpointHostText(dest).str() : nullptr, remotePrefix); } void ReferencedFile::resolve(const StringArray &locations, const char *srcCluster, IUserDescriptor *user, INode *remote, const char *remotePrefix, bool checkLocalFirst, StringArray *subfiles, bool _trackSubFiles, bool resolveForeign) @@ -1025,7 +1025,7 @@ void ReferencedFileList::cloneRelationships() return; StringBuffer addr; - remote->endpoint().getUrlStr(addr); + remote->endpoint().getEndpointHostText(addr); IDistributedFileDirectory &dir = queryDistributedFileDirectory(); ReferencedFileIterator files(this); ForEach(files) diff --git a/common/remote/rmtspawn.cpp b/common/remote/rmtspawn.cpp index b0cb6b01ec1..64f213b1fcb 100644 --- a/common/remote/rmtspawn.cpp +++ b/common/remote/rmtspawn.cpp @@ -111,7 +111,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint unsigned port = SLAVE_CONNECT_PORT + ((unsigned)kind * NUM_SLAVE_CONNECT_PORT) + getRandom() % NUM_SLAVE_CONNECT_PORT; StringBuffer args; - myEP.getUrlStr(args); + myEP.getEndpointHostText(args); args.append(' ').append(replyTag).append(' ').append((unsigned)kind).append(" ").append(port); if (extra) args.append(' ').append(extra); @@ -177,7 +177,7 @@ ISocket *spawnRemoteChild(SpawnKind kind, const char * exe, const SocketEndpoint try { StringBuffer tmp; - connectEP.getUrlStr(tmp); + connectEP.getEndpointHostText(tmp); LOG(MCdetailDebugInfo, unknownJob, "Try to connect to slave %s",tmp.str()); Owned socket = ISocket::connect_wait(connectEP,MASTER_CONNECT_SLAVE_TIMEOUT); if (socket) @@ -288,7 +288,7 @@ bool CRemoteParentInfo::processCommandLine(int argc, const char * * argv, String void CRemoteParentInfo::log() { StringBuffer temp; - LOG(MCdebugProgress, unknownJob, "Starting remote slave. Master=%s reply=%d port=%d", parent.getUrlStr(temp).str(), replyTag, port); + LOG(MCdebugProgress, unknownJob, "Starting remote slave. Master=%s reply=%d port=%d", parent.getEndpointHostText(temp).str(), replyTag, port); } bool CRemoteParentInfo::sendReply(unsigned version) diff --git a/common/roxiecommlib/roxiecommunicationclient.cpp b/common/roxiecommlib/roxiecommunicationclient.cpp index 5806ef03f05..37cefbafc38 100644 --- a/common/roxiecommlib/roxiecommunicationclient.cpp +++ b/common/roxiecommlib/roxiecommunicationclient.cpp @@ -232,7 +232,7 @@ class CRoxieCommunicationClient: implements IRoxieCommunicationClient, public CI if (remoteIP) buf.append(remoteIP); else - ep.getUrlStr(buf); + ep.getEndpointHostText(buf); throw MakeStringException(ROXIECOMM_SOCKET_ERROR, "%s", buf.str()); } diff --git a/common/thorhelper/persistent.cpp b/common/thorhelper/persistent.cpp index ff738608fcf..52133b0d2d0 100644 --- a/common/thorhelper/persistent.cpp +++ b/common/thorhelper/persistent.cpp @@ -56,7 +56,7 @@ class CPersistentInfo : implements IInterface, public CInterface { if(_ep) { - _ep->getUrlStr(epstr); + _ep->getEndpointHostText(epstr); keystr.set(epstr); addKeySuffix(proto, keystr); } @@ -121,7 +121,7 @@ class CAvailKeeper private: inline StringBuffer& calcKey(SocketEndpoint& ep, PersistentProtocol proto, StringBuffer& keystr) { - ep.getUrlStr(keystr); + ep.getEndpointHostText(keystr); return addKeySuffix(proto, keystr); } SocketSet* findSet(CPersistentInfo* info, bool create = false) @@ -214,7 +214,7 @@ class CPersistentHandler : implements IPersistentHandler, implements ISocketSele if (m_enableDoNotReuseList && ep != nullptr) { StringBuffer epstr; - ep->getUrlStr(epstr); + ep->getEndpointHostText(epstr); if(m_doNotReuseList.getValue(epstr.str()) != nullptr) { PERSILOG(PersistentLogLevel::PLogNormal, "PERSISTENT: socket %d's target endpoint %s is in DoNotReuseList, will not add it.", sock->OShandle(), epstr.str()); @@ -434,7 +434,7 @@ class CPersistentHandler : implements IPersistentHandler, implements ISocketSele if(!ep) return false; StringBuffer epstr; - ep->getUrlStr(epstr); + ep->getEndpointHostText(epstr); if(epstr.length()> 0 && m_doNotReuseList.getValue(epstr.str()) != nullptr) return true; return false; diff --git a/common/thorhelper/thorsoapcall.cpp b/common/thorhelper/thorsoapcall.cpp index 353b1ab9691..1687230fa36 100644 --- a/common/thorhelper/thorsoapcall.cpp +++ b/common/thorhelper/thorsoapcall.cpp @@ -340,7 +340,7 @@ class BlackLister : public CInterface, implements IThreadFactory if (soapTraceLevel > 3) { StringBuffer s; - logctx.CTXLOG("endpoint %s is blacklisted", ep.getUrlStr(s).str()); + logctx.CTXLOG("endpoint %s is blacklisted", ep.getEndpointHostText(s).str()); } return true; } @@ -364,7 +364,7 @@ class BlackLister : public CInterface, implements IThreadFactory if (soapTraceLevel > 0) { StringBuffer s; - logctx.CTXLOG("Blacklisting endpoint %s", p.ep.getUrlStr(s).str()); + logctx.CTXLOG("Blacklisting endpoint %s", p.ep.getEndpointHostText(s).str()); } } else @@ -372,7 +372,7 @@ class BlackLister : public CInterface, implements IThreadFactory if (soapTraceLevel > 3) { StringBuffer s; - logctx.CTXLOG("Endpoint %s is already blacklisted", p.ep.getUrlStr(s).str()); + logctx.CTXLOG("Endpoint %s is already blacklisted", p.ep.getEndpointHostText(s).str()); } } @@ -390,7 +390,7 @@ class BlackLister : public CInterface, implements IThreadFactory if ((match != NotFound) && (soapTraceLevel > 0)) { StringBuffer s; - DBGLOG("De-blacklisting endpoint %s", ep.getUrlStr(s).str()); + DBGLOG("De-blacklisting endpoint %s", ep.getEndpointHostText(s).str()); } } @@ -413,7 +413,7 @@ class BlackLister : public CInterface, implements IThreadFactory if (useBlacklister && lookup(ep, logctx)) { StringBuffer s; - ep.getUrlStr(s); + ep.getEndpointHostText(s); throw MakeStringException(JSOCKERR_connection_failed, "%s %s", blOptions->getBLerror(), s.str()); } Owned exc; @@ -470,7 +470,7 @@ class BlackLister : public CInterface, implements IThreadFactory } if (exc->errorCode()==JSOCKERR_connection_failed) { StringBuffer s; - ep.getUrlStr(s); + ep.getEndpointHostText(s); throw MakeStringException(JSOCKERR_connection_failed, "connection failed %s", s.str()); } throw exc.getClear(); diff --git a/common/workunit/workunit.cpp b/common/workunit/workunit.cpp index f26e9fcf29f..ad13fd22bda 100644 --- a/common/workunit/workunit.cpp +++ b/common/workunit/workunit.cpp @@ -14451,7 +14451,7 @@ void executeThorGraph(const char * graphName, IConstWorkUnit &workunit, const IP myep.serialize(msg); // only used for tracing if (!conversation->send(msg)) { StringBuffer s("Failed to send query to Thor on "); - thorMaster.getUrlStr(s); + thorMaster.getEndpointHostText(s); throw MakeStringExceptionDirect(-1, s.str()); // maybe retry? } unsigned __int64 blockedTime = elapsedTimer.elapsedNs(); @@ -14461,21 +14461,21 @@ void executeThorGraph(const char * graphName, IConstWorkUnit &workunit, const IP } StringBuffer eps; - PROGLOG("Thor on %s running %s", thorMaster.getUrlStr(eps).str(), jobName.str()); + PROGLOG("Thor on %s running %s", thorMaster.getEndpointHostText(eps).str(), jobName.str()); MemoryBuffer reply; try { if (!conversation->recv(reply,INFINITE)) { StringBuffer s("Failed to receive reply from thor "); - thorMaster.getUrlStr(s); + thorMaster.getEndpointHostText(s); throw MakeStringExceptionDirect(-1, s.str()); } } catch (IException *e) { StringBuffer s("Failed to receive reply from thor "); - thorMaster.getUrlStr(s); + thorMaster.getEndpointHostText(s); s.append("; (").append(e->errorCode()).append(", "); e->errorMessage(s).append(")"); e->Release(); diff --git a/common/workunit/wujobq.cpp b/common/workunit/wujobq.cpp index 22aa5b63e0c..84c866348fc 100644 --- a/common/workunit/wujobq.cpp +++ b/common/workunit/wujobq.cpp @@ -1092,7 +1092,7 @@ class CJobQueue: public CJobQueueBase, implements IJobQueue ret = qd.root->addPropTree("Client"); ret->setPropInt64("@session",sessionid); StringBuffer eps; - ret->setProp("@node",queryMyNode()->endpoint().getUrlStr(eps).str()); + ret->setProp("@node",queryMyNode()->endpoint().getEndpointHostText(eps).str()); } return ret; } diff --git a/dali/base/daclient.cpp b/dali/base/daclient.cpp index 326db598010..b8ef382995b 100644 --- a/dali/base/daclient.cpp +++ b/dali/base/daclient.cpp @@ -336,7 +336,7 @@ bool updateDaliEnv(IPropertyTree *env, bool forceGroupUpdate, const char *daliIp if (querySDS().updateEnvironment(env, forceGroupUpdate, response)) { StringBuffer tmp; - PROGLOG("Environment and node groups updated in dali at %s",daliep.getUrlStr(tmp).str()); + PROGLOG("Environment and node groups updated in dali at %s",daliep.getEndpointHostText(tmp).str()); } else ret = false; diff --git a/dali/base/dacoven.cpp b/dali/base/dacoven.cpp index 1ba5324da8c..30cd69fa001 100644 --- a/dali/base/dacoven.cpp +++ b/dali/base/dacoven.cpp @@ -163,7 +163,7 @@ static void checkDaliVersionInfo(ICommunicator *comm, CDaliVersion &serverVersio mb.append(ClientVersion); mb.append(MinServerVersion); StringBuffer daliEpStr; - comm->queryGroup().queryNode(0).endpoint().getUrlStr(daliEpStr); // NB: there's always exactly 1 node + comm->queryGroup().queryNode(0).endpoint().getEndpointHostText(daliEpStr); // NB: there's always exactly 1 node if (!comm->sendRecv(mb, RANK_RANDOM, MPTAG_DALI_COVEN_REQUEST, VERSION_REQUEST_TIMEOUT)) throw makeStringExceptionV(-1, "Failed retrieving version information from server [%s], legacy server?", daliEpStr.str()); if (!mb.length()) @@ -206,7 +206,7 @@ static CriticalSection foreignDaliVersionCacheCrit; void checkForeignDaliVersionInfo(const INode *foreignDali, CDaliVersion &serverVersion, CDaliVersion &minClientVersion) { StringBuffer foreignDaliStr; - foreignDali->endpoint().getUrlStr(foreignDaliStr); + foreignDali->endpoint().getEndpointHostText(foreignDaliStr); CriticalBlock b(foreignDaliVersionCacheCrit); std::pair result; @@ -395,7 +395,7 @@ CDaliUidAllocator &CDaliUidAllocator::find(CIArrayOf &uidallo uidallocators.append(*ret); } StringBuffer eps; - DBGLOG("Added foreign UID allocator for %s", ret->node.getUrlStr(eps).str()); + DBGLOG("Added foreign UID allocator for %s", ret->node.getEndpointHostText(eps).str()); return *ret; } @@ -498,7 +498,7 @@ class CCovenServer: public CCovenBase store->serialize(mb.clear()); if (!sendRecv(mb,r,MPTAG_DALI_COVEN_REQUEST, COVEN_SERVER_TIMEOUT)) { StringBuffer str; - throw MakeStringException(-1,"Could not connect to %s",grp->queryNode(r).endpoint().getUrlStr(str).str()); + throw MakeStringException(-1,"Could not connect to %s",grp->queryNode(r).endpoint().getEndpointHostText(str).str()); } mergeStore(store,mb,true); } @@ -508,7 +508,7 @@ class CCovenServer: public CCovenBase for (;;) { if (!recv(mb,r,MPTAG_DALI_COVEN_REQUEST,&sender,COVEN_SERVER_TIMEOUT)) { - throw MakeStringException(-1,"Could not connect to %s",grp->queryNode(r).endpoint().getUrlStr(str).str()); + throw MakeStringException(-1,"Could not connect to %s",grp->queryNode(r).endpoint().getEndpointHostText(str).str()); } if (RANK_NULL==sender) processMessage(mb); diff --git a/dali/base/dadfs.cpp b/dali/base/dadfs.cpp index 7bf0582e6c5..b10debff147 100644 --- a/dali/base/dadfs.cpp +++ b/dali/base/dadfs.cpp @@ -811,7 +811,7 @@ static void foreignDaliSendRecv(const INode *foreigndali,CMessageBuffer &mb, uns Owned comm = createCommunicator(grp,true); if (!comm->verifyConnection(0,foreigndalitimeout)) { StringBuffer tmp; - IDFS_Exception *e = new CDFS_Exception(DFSERR_ForeignDaliTimeout, foreigndali->endpoint().getUrlStr(tmp).str()); + IDFS_Exception *e = new CDFS_Exception(DFSERR_ForeignDaliTimeout, foreigndali->endpoint().getEndpointHostText(tmp).str()); throw e; } comm->sendRecv(mb,0,MPTAG_DFS_REQUEST); @@ -3394,7 +3394,7 @@ class CDistributedFile: public CDistributedFileBase const char *grp = root->queryProp("@group"); if (!grp||!*grp) { StringBuffer eps; - pt->addProp("@node",part.queryNode(0)->endpoint().getUrlStr(eps).str()); // legacy + pt->addProp("@node",part.queryNode(0)->endpoint().getEndpointHostText(eps).str()); // legacy } const char *override = part.queryOverrideName(); if (override&&*override) @@ -4319,7 +4319,7 @@ protected: friend class CDistributedFilePart; CriticalBlock block(errcrit); StringBuffer s("Failed to find file part "); s.append(partfile->queryFilename()).append(" on "); - rfn.queryEndpoint().getUrlStr(s); + rfn.queryEndpoint().getEndpointHostText(s); EXCLOG(e, s.str()); e->Release(); } @@ -8957,7 +8957,7 @@ void CDistributedFileDirectory::fixDates(IDistributedFile *file) CriticalBlock block(crit); StringBuffer s("Failed to find file part "); s.append(partfile->queryFilename()).append(" on "); - rfn.queryEndpoint().getUrlStr(s); + rfn.queryEndpoint().getEndpointHostText(s); EXCLOG(e, s.str()); e->Release(); } @@ -11334,7 +11334,7 @@ class CDaliDFSServer: public Thread, public CTransactionLogTracker, implements I if (block0.slow()) { SocketEndpoint ep = mb.getSender(); - ep.getUrlStr(block0.appendMsg(trc).append(" from ")); + ep.getEndpointHostText(block0.appendMsg(trc).append(" from ")); } } @@ -11939,10 +11939,10 @@ bool removePhysicalFiles(IGroup *grp,const char *_filemask,unsigned short port,C PROGLOG("Removed '%s'",partfile->queryFilename()); unsigned t = msTick()-start; if (t>5*1000) - DBGLOG("Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000); + DBGLOG("Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); } else - IWARNLOG("Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str()); + IWARNLOG("Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); #else if (partfile->exists()) PROGLOG("Would remove '%s'",partfile->queryFilename()); @@ -11957,7 +11957,7 @@ bool removePhysicalFiles(IGroup *grp,const char *_filemask,unsigned short port,C else { StringBuffer s("Failed to remove file part "); s.append(partfile->queryFilename()).append(" from "); - rfn.queryEndpoint().getUrlStr(s); + rfn.queryEndpoint().getEndpointHostText(s); EXCLOG(e, s.str()); e->Release(); } @@ -13651,12 +13651,12 @@ bool CDistributedFileDirectory::removePhysicalPartFiles(const char *logicalName, { unsigned start = msTick(); if (!partfile->remove()&&(copy==0)&&!islazy) // only warn about missing primary files - LOG(MCwarning, unknownJob, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str()); + LOG(MCwarning, unknownJob, "Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); else { unsigned t = msTick()-start; if (t>5*1000) - LOG(MCwarning, unknownJob, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000); + LOG(MCwarning, unknownJob, "Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); } } catch (IException *e) @@ -13668,7 +13668,7 @@ bool CDistributedFileDirectory::removePhysicalPartFiles(const char *logicalName, { StringBuffer s("Failed to remove file part "); s.append(partfile->queryFilename()).append(" from "); - rfn.queryEndpoint().getUrlStr(s); + rfn.queryEndpoint().getEndpointHostText(s); EXCLOG(e, s.str()); e->Release(); } diff --git a/dali/base/dafdesc.cpp b/dali/base/dafdesc.cpp index d624b0c3f62..9cb21476944 100644 --- a/dali/base/dafdesc.cpp +++ b/dali/base/dafdesc.cpp @@ -869,7 +869,7 @@ protected: friend class CFileDescriptor; SocketEndpoint ep = queryNode(0)->endpoint(); StringBuffer tmp; if (!ep.isNull()) - pt->setProp("@node",ep.getUrlStr(tmp).str()); + pt->setProp("@node",ep.getEndpointHostText(tmp).str()); if (overridename.isEmpty()&&!parent.partmask.isEmpty()) { expandMask(tmp.clear(), parent.partmask, 0, 1); pt->setProp("@name",tmp.str()); @@ -3039,7 +3039,7 @@ void removePartFiles(IFileDescriptor *desc,IMultiException *mexcept) // PROGLOG("Removed '%s'",partfile->queryFilename()); unsigned t = msTick()-start; if (t>60*1000) - OWARNLOG("Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getUrlStr(eps).str(), t/1000); + OWARNLOG("Removing %s from %s took %ds", partfile->queryFilename(), rfn.queryEndpoint().getEndpointHostText(eps).str(), t/1000); } // else // OWARNLOG("Failed to remove file part %s from %s", partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str()); @@ -3051,7 +3051,7 @@ void removePartFiles(IFileDescriptor *desc,IMultiException *mexcept) else { StringBuffer s("Failed to remove file part "); s.append(partfile->queryFilename()).append(" from "); - rfn.queryEndpoint().getUrlStr(s); + rfn.queryEndpoint().getEndpointHostText(s); EXCLOG(e, s.str()); e->Release(); } @@ -3323,7 +3323,7 @@ void extractFilePartInfo(IPropertyTree &info, IFileDescriptor &file) IPropertyTree *copyTree = partTree->addPropTree("Copy", createPTree()); copyTree->setProp("@filePath", rfn.getLocalPath(path.clear())); - copyTree->setProp("@host", rfn.queryEndpoint().getUrlStr(host.clear())); + copyTree->setProp("@host", rfn.queryEndpoint().getEndpointHostText(host.clear())); } } } diff --git a/dali/base/dasds.cpp b/dali/base/dasds.cpp index 87213719dad..6a3055903fb 100644 --- a/dali/base/dasds.cpp +++ b/dali/base/dasds.cpp @@ -3459,7 +3459,7 @@ class CLock : implements IInterface, public CInterface else { StringBuffer nodeStr; - node->endpoint().getUrlStr(nodeStr); + node->endpoint().getEndpointHostText(nodeStr); PROGLOG("Validating connection to %s", nodeStr.str()); if (!queryWorldCommunicator().verifyConnection(node, LOCKSESSCHECK)) { @@ -4056,7 +4056,7 @@ int CSDSTransactionServer::run() StringBuffer s; mb.append(e->errorMessage(s).str()); StringBuffer clientUrl("EXCEPTION in reply to client "); - mb.getSender().getUrlStr(clientUrl); + mb.getSender().getEndpointHostText(clientUrl); EXCLOG(e, clientUrl.str(), MSGCLS_warning); e->Release(); } @@ -4081,7 +4081,7 @@ int CSDSTransactionServer::run() catch (IException *e) { StringBuffer s("Failure receiving message from client "); - mb.getSender().getUrlStr(s); + mb.getSender().getEndpointHostText(s); IWARNLOG(e, s.str()); e->Release(); } @@ -4784,7 +4784,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb) mb.append(e->errorCode()); mb.append(e->errorMessage(s.clear())); StringBuffer clientUrl("EXCEPTION in reply to client "); - mb.getSender().getUrlStr(clientUrl); + mb.getSender().getEndpointHostText(clientUrl); EXCLOG(e, clientUrl.str(), MSGCLS_warning); e->Release(); } @@ -4797,7 +4797,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb) mb.append(e->errorCode()); mb.append(e->errorMessage(s).str()); StringBuffer clientUrl("EXCEPTION in reply to client "); - mb.getSender().getUrlStr(clientUrl); + mb.getSender().getEndpointHostText(clientUrl); LOG(MCoperatorError, unknownJob, e); } try { @@ -4818,7 +4818,7 @@ void CSDSTransactionServer::processMessage(CMessageBuffer &mb) StringBuffer s; mb.append(e->errorMessage(s).str()); StringBuffer clientUrl("EXCEPTION in reply to client "); - mb.getSender().getUrlStr(clientUrl); + mb.getSender().getEndpointHostText(clientUrl); EXCLOG(e, clientUrl.str(), MSGCLS_warning); e->Release(); try diff --git a/dali/base/dasess.cpp b/dali/base/dasess.cpp index 471e2b0ec9e..ba4a1e58b57 100644 --- a/dali/base/dasess.cpp +++ b/dali/base/dasess.cpp @@ -320,7 +320,7 @@ class CProcessSessionState: public CSessionState StringBuffer &getDetails(StringBuffer &buf) { StringBuffer ep; - return buf.appendf("%16" I64F "X: %s, role=%s",CSessionState::id,node->endpoint().getUrlStr(ep).str(),queryRoleName(role)); + return buf.appendf("%16" I64F "X: %s, role=%s",CSessionState::id,node->endpoint().getEndpointHostText(ep).str(),queryRoleName(role)); } void addSessionIds(CProcessSessionState &other, bool prevOnly) { @@ -1101,7 +1101,7 @@ class CClientSessionManager: public CSessionManagerBase, implements IConnectionM Owned node = createINode(ep); if (queryCoven().inCoven(node)) { StringBuffer str; - PROGLOG("Coven Session Stopping (%s)",ep.getUrlStr(str).str()); + PROGLOG("Coven Session Stopping (%s)",ep.getEndpointHostText(str).str()); if (queryCoven().size()==1) notifyServerStopped(true); } @@ -1325,7 +1325,7 @@ class CCovenSessionManager: public CSessionManagerBase, implements ISessionManag void addProcessSession(SessionId id,INode *client,DaliClientRole role) { StringBuffer str; - PROGLOG("Session starting %" I64F "x (%s) : role=%s",id,client->endpoint().getUrlStr(str).str(),queryRoleName(role)); + PROGLOG("Session starting %" I64F "x (%s) : role=%s",id,client->endpoint().getEndpointHostText(str).str(),queryRoleName(role)); CHECKEDCRITICALBLOCK(sessmanagersect,60000); CProcessSessionState *s = new CProcessSessionState(id,client,role); while (!sessionstates.add(s)) // takes ownership @@ -1737,7 +1737,7 @@ class CCovenSessionManager: public CSessionManagerBase, implements ISessionManag void onClose(SocketEndpoint &ep) { StringBuffer clientStr; - PROGLOG("Client closed (%s)", ep.getUrlStr(clientStr).str()); + PROGLOG("Client closed (%s)", ep.getEndpointHostText(clientStr).str()); SessionId idtostop; { @@ -1787,7 +1787,7 @@ class CCovenSessionManager: public CSessionManagerBase, implements ISessionManag if (state) { const CProcessSessionState *pstate = QUERYINTERFACE(state,const CProcessSessionState); if (pstate) - return pstate->queryNode().endpoint().getUrlStr(buf); + return pstate->queryNode().endpoint().getEndpointHostText(buf); } return buf; } @@ -1957,14 +1957,14 @@ bool registerClientProcess(ICommunicator *comm, IGroup *& retcoven,unsigned time if (lastNextLog) // see below, true if has been round timeout loop. Only output confirmation, if have issued 'Failed to connect ..' messages { StringBuffer str("Connected to Dali Server "); - comm->queryGroup().queryNode(r).endpoint().getUrlStr(str); + comm->queryGroup().queryNode(r).endpoint().getEndpointHostText(str); LOG(MCoperatorProgress, "%s", str.str()); } return true; } } StringBuffer str; - OERRLOG("Waiting for Dali to be available - server: %s", comm->queryGroup().queryNode(r).endpoint().getUrlStr(str).str()); + OERRLOG("Waiting for Dali to be available - server: %s", comm->queryGroup().queryNode(r).endpoint().getEndpointHostText(str).str()); if (tm.timedout()) { PROGLOG("%s", str.append(" Timed out.").str()); diff --git a/dali/base/dasubs.cpp b/dali/base/dasubs.cpp index da474417cde..4b040530c92 100644 --- a/dali/base/dasubs.cpp +++ b/dali/base/dasubs.cpp @@ -91,7 +91,7 @@ class CSubscriptionStub: implements ISubscription, public CInterface // Kludge to avoid locking SDS on blocked client hasaborted = true; StringBuffer tmp; - throw MakeStringException(-1,"Subscription notification to %s timed out",dst->endpoint().getUrlStr(tmp).str()); + throw MakeStringException(-1,"Subscription notification to %s timed out",dst->endpoint().getEndpointHostText(tmp).str()); return; } @@ -123,7 +123,7 @@ class CSubscriptionStub: implements ISubscription, public CInterface StringBuffer &getDetails(StringBuffer &buf) { StringBuffer ep; - return buf.appendf("%16" I64F "X: %s %s",sid,dst->endpoint().getUrlStr(ep).str(),hasaborted?"aborted":""); + return buf.appendf("%16" I64F "X: %s %s",sid,dst->endpoint().getEndpointHostText(ep).str(),hasaborted?"aborted":""); } }; @@ -275,7 +275,7 @@ class CDaliPublisherServer: public IDaliServer, public Thread, public CDaliPubli serializeException(exception, mb); while (!coven.reply(mb,60000)) { StringBuffer eps; - DBGLOG("MSR_ADD_SUBSCRIPTION_PRIMARY reply timed out to %s try %d",mb.getSender().getUrlStr(eps).str(),retry+1); + DBGLOG("MSR_ADD_SUBSCRIPTION_PRIMARY reply timed out to %s try %d",mb.getSender().getEndpointHostText(eps).str(),retry+1); if (retry++==3) return; } diff --git a/dali/base/dautils.cpp b/dali/base/dautils.cpp index f0997cce8fc..fc9882c67a3 100644 --- a/dali/base/dautils.cpp +++ b/dali/base/dautils.cpp @@ -300,12 +300,12 @@ class CMultiDLFN if (sub.isForeign()) { tmp.append(FOREIGN_SCOPE "::"); - foreignEp.getUrlStr(tmp).append("::"); + foreignEp.getEndpointHostText(tmp).append("::"); } else if (sub.isRemote()) { tmp.append(REMOTE_SCOPE "::"); - foreignEp.getUrlStr(tmp).append("::"); + foreignEp.getEndpointHostText(tmp).append("::"); } tmp.append(name); lfnExpanded.append(tmp.str()); @@ -744,7 +744,7 @@ void CDfsLogicalFileName::normalizeName(const char *name, StringAttr &res, bool normalizeNodeName(s1, ns1-s1, foreignep, strict); if (!foreignep.isNull()) { - foreignep.getUrlStr(str.append("::")); + foreignep.getEndpointHostText(str.append("::")); s = ns1; localpos = str.length()+2; } @@ -830,7 +830,7 @@ bool CDfsLogicalFileName::normalizeExternal(const char * name, StringAttr &res, if (ep.isNull()) return false; - ep.getUrlStr(str.append("::")); + ep.getEndpointHostText(str.append("::")); if (ns1[2] == '>') { str.append("::"); @@ -984,7 +984,7 @@ void CDfsLogicalFileName::setForeign(const SocketEndpoint &daliep,bool checkloca if (isExternal()||(checklocal&&isForeign())) return; StringBuffer str(FOREIGN_SCOPE "::"); - daliep.getUrlStr(str); + daliep.getEndpointHostText(str); str.append("::"); str.append(get(true)); set(str); @@ -1167,7 +1167,7 @@ void CDfsLogicalFileName::setExternal(const char *location,const char *path) void CDfsLogicalFileName::setExternal(const SocketEndpoint &dafsip,const char *path) { StringBuffer str; - dafsip.getUrlStr(str); + dafsip.getEndpointHostText(str); setExternal(str.str(),path); } @@ -1198,7 +1198,7 @@ void CDfsLogicalFileName::setQuery(const char *location,const char *query) void CDfsLogicalFileName::setQuery(const SocketEndpoint &rfsep,const char *query) { StringBuffer str; - rfsep.getUrlStr(str); + rfsep.getEndpointHostText(str); setQuery(str.str(),query); } diff --git a/dali/base/dautils.hpp b/dali/base/dautils.hpp index 8f9aae1ba75..10c145de248 100644 --- a/dali/base/dautils.hpp +++ b/dali/base/dautils.hpp @@ -210,7 +210,7 @@ struct da_decl TransactionLog owner.startTransaction(cmd); owner.getCmdText(cmd, msg); msg.append(", endpoint="); - ep.getUrlStr(msg); + ep.getEndpointHostText(msg); startCycles = get_cycles_now(); } else diff --git a/dali/daliadmin/daadmin.cpp b/dali/daliadmin/daadmin.cpp index b3d43b90f31..5a9b65c2aa0 100644 --- a/dali/daliadmin/daadmin.cpp +++ b/dali/daliadmin/daadmin.cpp @@ -628,7 +628,7 @@ static void writeGroup(IGroup *group, const char *name, const char *outputFilena StringBuffer eps; for (unsigned i=0;iordinality();i++) { - group->queryNode(i).endpoint().getUrlStr(eps.clear()); + group->queryNode(i).endpoint().getEndpointHostText(eps.clear()); if (io) { eps.newline(); @@ -1065,7 +1065,7 @@ int dfsverify(const char *name,CDateTime *cutoff, IUserDescriptor *user) item.crc = partfile->getCRC(); partfile->getTime(NULL,&item.dt,NULL); if ((item.crc==0)&&!partfile->exists()) { - UERRLOG("VERIFY: does not exist part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str()); + UERRLOG("VERIFY: does not exist part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); ok = false; } } @@ -1076,7 +1076,7 @@ int dfsverify(const char *name,CDateTime *cutoff, IUserDescriptor *user) catch (IException *e) { StringBuffer s; - s.appendf("VERIFY: part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str()); + s.appendf("VERIFY: part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); EXCLOG(e, s.str()); e->Release(); ok = false; @@ -2192,7 +2192,7 @@ void daliping(const char *dalis,unsigned connecttime,unsigned n) StringBuffer qname("TESTINGQ_"); SocketEndpoint ep; ep.setLocalHost(0); - ep.getUrlStr(qname); + ep.getEndpointHostText(qname); Owned qconn; qconn.setown(createNamedQueueConnection(0)); Owned channel; diff --git a/dali/daliadmin/daliadmin.cpp b/dali/daliadmin/daliadmin.cpp index d70ceb728ed..474580c01d4 100644 --- a/dali/daliadmin/daliadmin.cpp +++ b/dali/daliadmin/daliadmin.cpp @@ -159,7 +159,7 @@ int main(int argc, const char* argv[]) (memcmp(param,"timeout=",8)==0)) props->loadProp(param); else if ((i==1)&&(isdigit(*param)||(*param=='.'))&&ep.set(((*param=='.')&¶m[1])?(param+1):param,DALI_SERVER_PORT)) - props->setProp("server",ep.getUrlStr(tmps.clear()).str()); + props->setProp("server",ep.getEndpointHostText(tmps.clear()).str()); else { if ((strieq(param,"help")) || (strieq(param,"-help")) || (strieq(param,"--help"))) { usage(argv[0]); diff --git a/dali/dalidiag/dalidiag.cpp b/dali/dalidiag/dalidiag.cpp index 9fc16b59607..33b74be6af7 100644 --- a/dali/dalidiag/dalidiag.cpp +++ b/dali/dalidiag/dalidiag.cpp @@ -119,7 +119,7 @@ void timeQorSDS(bool timeq) if (timeq) { StringBuffer qname("TESTINGQ_"); - ep.getUrlStr(qname); + ep.getEndpointHostText(qname); qconn.setown(createNamedQueueConnection(0)); channel.setown(qconn->open(qname.str())); while (channel->probe()) { @@ -132,7 +132,7 @@ void timeQorSDS(bool timeq) } else { subname.append("TESTSDS_"); - ep.getUrlStr(subname); + ep.getEndpointHostText(subname); StringBuffer fullname("TESTING/"); fullname.append(subname); sdssubid = querySDS().subscribe(fullname.str(), testsdssub); @@ -379,9 +379,9 @@ void backupList(const char *cluster) rank_t r; StringBuffer str; for (r=0;rqueryNode(r).endpoint().getUrlStr(str.clear()); + group->queryNode(r).endpoint().getEndpointHostText(str.clear()); str.append(' '); - group->queryNode((r+1)%n).endpoint().getUrlStr(str); + group->queryNode((r+1)%n).endpoint().getEndpointHostText(str); printf("%s\n",str.str()); } } diff --git a/dali/datest/datest.cpp b/dali/datest/datest.cpp index 40a739caca3..c0c7ecaf50d 100644 --- a/dali/datest/datest.cpp +++ b/dali/datest/datest.cpp @@ -382,7 +382,7 @@ void testCDfsLogicalFileName() lfn=cdlfn.get(); assertex(strcmp(lfn,"file::10.150.10.75::c$::test::file.xyz")==0); lfn=cdlfn.get(true); assertex(strcmp(lfn,"file::10.150.10.75::c$::test::file.xyz")==0); verifyex(cdlfn.getEp(ep)); - ep.getUrlStr(eps.clear()); assertex(strcmp(eps.str(),"10.150.10.75")==0); + ep.getEndpointHostText(eps.clear()); assertex(strcmp(eps.str(),"10.150.10.75")==0); verifyex(cdlfn.getExternalPath(path.clear(),path,true)); assertex(strcmp(path.str(),"c:\\test\\file.xyz")==0); verifyex(cdlfn.getExternalPath(dir.clear(),path.clear(),true)); assertex(strcmp(path.str(),"file.xyz")==0); verifyex(cdlfn.getExternalPath(path.clear(),path,false)); assertex(strcmp(path.str(),"/c$/test/file.xyz")==0); @@ -393,7 +393,7 @@ void testCDfsLogicalFileName() assertex(cdlfn.isExternal()); lfn=cdlfn.get(); assertex(strcmp(lfn,"file::10.150.10.75:7100::c$::test::file.xyz")==0); verifyex(cdlfn.getEp(ep)); - ep.getUrlStr(eps.clear()); assertex(strcmp(eps.str(),"10.150.10.75:7100")==0); + ep.getEndpointHostText(eps.clear()); assertex(strcmp(eps.str(),"10.150.10.75:7100")==0); verifyex(cdlfn.getExternalPath(path.clear(),path,true)); assertex(strcmp(path.str(),"c:\\test\\file.xyz")==0); verifyex(cdlfn.getExternalPath(dir.clear(),path.clear(),true)); assertex(strcmp(path.str(),"file.xyz")==0); verifyex(cdlfn.getExternalPath(path.clear(),path,false)); assertex(strcmp(path.str(),"/c$/test/file.xyz")==0); @@ -403,7 +403,7 @@ void testCDfsLogicalFileName() assertex(cdlfn.isForeign()); assertex(!cdlfn.isExternal()); verifyex(cdlfn.getEp(ep)); - ep.getUrlStr(eps.clear()); assertex(strcmp(eps.str(),"10.150.10.75")==0); + ep.getEndpointHostText(eps.clear()); assertex(strcmp(eps.str(),"10.150.10.75")==0); lfn=cdlfn.get(); assertex(strcmp(lfn,"foreign::10.150.10.75::test::file.xyz")==0); lfn=cdlfn.get(true); assertex(strcmp(lfn,"test::file.xyz")==0); cdlfn.getScopes(scopes.clear()); assertex(strcmp(scopes.str(),"foreign::10.150.10.75::test")==0); @@ -1021,7 +1021,7 @@ void QTest(bool testput) #if 1 StringBuffer eps; if (i%100==99) { - PROGLOG("Got %s - %d from %s",str.get(),n,node->endpoint().getUrlStr(eps).str()); + PROGLOG("Got %s - %d from %s",str.get(),n,node->endpoint().getEndpointHostText(eps).str()); PROGLOG("time taken = %d",msTick()-t1); t1 = msTick(); } @@ -3292,13 +3292,13 @@ void testMultiConnect() void connected(unsigned idx,const SocketEndpoint &ep,ISocket *socket) { StringBuffer epstr; - ep.getUrlStr(epstr); + ep.getEndpointHostText(epstr); printf("%s suceeded\n",epstr.str()); } void failed(unsigned idx,const SocketEndpoint &ep,int err) { StringBuffer epstr; - ep.getUrlStr(epstr); + ep.getEndpointHostText(epstr); printf("%s failed (%d)\n",epstr.str(),err); } } notify; diff --git a/dali/daunittest/dautdfs.cpp b/dali/daunittest/dautdfs.cpp index cfecb5f218f..87cd2c3fc63 100644 --- a/dali/daunittest/dautdfs.cpp +++ b/dali/daunittest/dautdfs.cpp @@ -279,9 +279,9 @@ class TTestDFS : public CPPUNIT_NS::TestFixture CPPUNIT_ASSERT(stricmp(s.str(),t.str())==0); StringBuffer eps; if (isrep) - rep.getUrlStr(eps); + rep.getEndpointHostText(eps); else - ep.getUrlStr(eps); + ep.getEndpointHostText(eps); t.insert(0,eps.str()); t.insert(0,"//"); t.appendf("/testfile3._%d_of_8",pi+1); @@ -340,9 +340,9 @@ class TTestDFS : public CPPUNIT_NS::TestFixture CPPUNIT_ASSERT(stricmp(s.str(),t.str())==0); StringBuffer eps; if (isrep) - rep.getUrlStr(eps); + rep.getEndpointHostText(eps); else - ep.getUrlStr(eps); + ep.getEndpointHostText(eps); t.insert(0,eps.str()); t.insert(0,"//"); t.appendf("/testfile4._%d_of_8",pi+1); diff --git a/dali/dfu/dfurun.cpp b/dali/dfu/dfurun.cpp index 1f2a779ba7a..46828fdb4c8 100644 --- a/dali/dfu/dfurun.cpp +++ b/dali/dfu/dfurun.cpp @@ -91,7 +91,7 @@ class CDFUengine: public CInterface, implements IDFUengine ep.setLocalHost(0); StringBuffer aln; aln.append(",FileAccess,DfuPlus,").append(func).append(','); - ep.getUrlStr(aln); + ep.getEndpointHostText(aln); aln.append(','); if (userdesc) userdesc->getUserName(aln); @@ -1020,7 +1020,7 @@ class CDFUengine: public CInterface, implements IDFUengine if (wuid.isEmpty()) return false; StringBuffer eps; - PROGLOG("%s: Copy %s from %s to %s",wuid.get(),srclfn,srcdali?srcdali->endpoint().getUrlStr(eps).str():"(local)",dstlfn); + PROGLOG("%s: Copy %s from %s to %s",wuid.get(),srclfn,srcdali?srcdali->endpoint().getEndpointHostText(eps).str():"(local)",dstlfn); DFUstate state = runWU(wuid); StringBuffer tmp; PROGLOG("%s: Done: %s",wuid.get(),encodeDFUstate(state,tmp).str()); @@ -1049,7 +1049,7 @@ class CDFUengine: public CInterface, implements IDFUengine Owned ftree = queryDistributedFileDirectory().getFileTree(srclfn,ctx.srcuser,srcdali, FOREIGN_DALI_TIMEOUT, GetFileTreeOpts::appendForeign); if (!ftree.get()) { StringBuffer s; - throw MakeStringException(-1,"Source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } // now we can create name StringBuffer newroxieprefix; @@ -1124,7 +1124,7 @@ class CDFUengine: public CInterface, implements IDFUengine } else { StringBuffer s; - throw MakeStringException(-1,"Source file %s in Dali %s is not a file or superfile",srclfn,srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Source file %s in Dali %s is not a file or superfile",srclfn,srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } if ((ctx.level==1)&&ctx.feedback) ctx.feedback->displaySummary("0",0); diff --git a/dali/dfu/dfurunkdp.cpp b/dali/dfu/dfurunkdp.cpp index 9574310c6ef..73a7699e0c0 100644 --- a/dali/dfu/dfurunkdp.cpp +++ b/dali/dfu/dfurunkdp.cpp @@ -214,7 +214,7 @@ static void runKDPNodes(const char *title,CIArrayOf &nodes) if (msTick()-start>15*60*1000) { StringBuffer err; err.append(title).append(" failed to start on node "); - it.queryEP().getUrlStr(err); + it.queryEP().getEndpointHostText(err); throw MakeStringException(-1, "%s", err.str()); } Sleep(5000); // no point in rushing when some left @@ -235,7 +235,7 @@ static void runKDPNodes(const char *title,CIArrayOf &nodes) if (msTick()-start>6*60*60*1000) { StringBuffer err; err.append(title).append(" failed to finish on node "); - it.queryEP().getUrlStr(err); + it.queryEP().getEndpointHostText(err); throw MakeStringException(-1, "%s", err.str()); } Sleep(5000); // no point in rushing when some left diff --git a/dali/dfu/dfuutil.cpp b/dali/dfu/dfuutil.cpp index b3cc06aca16..85bfc3964c1 100644 --- a/dali/dfu/dfuutil.cpp +++ b/dali/dfu/dfuutil.cpp @@ -414,7 +414,7 @@ class CFileCloner else { StringBuffer s; - attrs.setProp("@cloneFrom", srcdali->endpoint().getUrlStr(s).str()); + attrs.setProp("@cloneFrom", srcdali->endpoint().getEndpointHostText(s).str()); attrs.setProp("@cloneFromDir", srcfdesc->queryDefaultDir()); if (srcCluster && *srcCluster) //where to copy from has been explicity set to a remote location, don't copy from local sources attrs.setProp("@cloneFromPeerCluster", "-"); @@ -642,7 +642,7 @@ class CFileCloner Owned ftree = fdir->getFileTree(slfn.get(),foreignuserdesc,srcdali, FOREIGN_DALI_TIMEOUT, GetFileTreeOpts::appendForeign); if (!ftree.get()) { StringBuffer s; - throw MakeStringException(-1,"Source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } const char *dstlfn = slfn.get(); @@ -713,7 +713,7 @@ class CFileCloner } else { StringBuffer s; - throw MakeStringException(-1,"Source file %s in Dali %s is not a file or superfile",filename,srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Source file %s in Dali %s is not a file or superfile",filename,srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } level--; } @@ -734,18 +734,18 @@ class CFileCloner Owned ftree = fdir->getFileTree(slfn.get(), foreignuserdesc, srcdali, FOREIGN_DALI_TIMEOUT, GetFileTreeOpts::appendForeign); if (!ftree.get()) { StringBuffer s; - throw MakeStringException(-1,"Source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } IPropertyTree *attsrc = ftree->queryPropTree("Attr"); if (!attsrc) { StringBuffer s; - throw MakeStringException(-1,"Attributes for source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Attributes for source file %s could not be found in Dali %s",slfn.get(),srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } CDfsLogicalFileName dlfn; dlfn.set(destfilename); if (strcmp(ftree->queryName(),queryDfsXmlBranchName(DXB_File))!=0) { StringBuffer s; - throw MakeStringException(-1,"Source file %s in Dali %s is not a simple file",filename,srcdali?srcdali->endpoint().getUrlStr(s).str():"(local)"); + throw MakeStringException(-1,"Source file %s in Dali %s is not a simple file",filename,srcdali?srcdali->endpoint().getEndpointHostText(s).str():"(local)"); } if (!srcdali.get()||queryCoven().inCoven(srcdali)) { // if dali is local and filenames same @@ -787,7 +787,7 @@ class CFileCloner { if (!daliNode) return "(local)"; - return daliNode->endpoint().getUrlStr(s).str(); + return daliNode->endpoint().getEndpointHostText(s).str(); } inline bool checkHasCluster(IDistributedFile *dfile) { @@ -833,7 +833,7 @@ class CFileCloner else { StringBuffer s; - if (checkValueChanged(dfile->queryAttributes().queryProp("@cloneFrom"), srcdali->endpoint().getUrlStr(s).str())) + if (checkValueChanged(dfile->queryAttributes().queryProp("@cloneFrom"), srcdali->endpoint().getEndpointHostText(s).str())) return true; if (checkValueChanged(dfile->queryAttributes().queryProp("@cloneFromDir"), srcfdesc->queryDefaultDir())) return true; @@ -1133,7 +1133,7 @@ class CDFUhelper: implements IDFUhelper, public CInterface Owned fdesc = queryDistributedFileDirectory().getFileDescriptor(srclfn, AccessMode::tbdRead, srcuser, node); if (!fdesc) { StringBuffer s; - throw MakeStringException(-1,"Source file %s could not be found in Dali %s",srclfn,daliep.getUrlStr(s).str()); + throw MakeStringException(-1,"Source file %s could not be found in Dali %s",srclfn,daliep.getEndpointHostText(s).str()); } Owned file = queryDistributedFileDirectory().createNew(fdesc); if (file) @@ -1169,7 +1169,7 @@ class CDFUhelper: implements IDFUhelper, public CInterface if (!ftree.get()) { StringBuffer s; - throw MakeStringException(-1,"Source file %s could not be found in Dali %s",srclfn,daliep.getUrlStr(s).str()); + throw MakeStringException(-1,"Source file %s could not be found in Dali %s",srclfn,daliep.getEndpointHostText(s).str()); } // first see if target exists (and remove if does and overwrite specified) Owned dfile = queryDistributedFileDirectory().lookup(lfn,user,AccessMode::tbdWrite,false,false,nullptr,defaultPrivilegedUser); @@ -1222,7 +1222,7 @@ class CDFUhelper: implements IDFUhelper, public CInterface else { StringBuffer s; - throw MakeStringException(-1,"Source file %s in Dali %s is not a file or superfile",srclfn,daliep.getUrlStr(s).str()); + throw MakeStringException(-1,"Source file %s in Dali %s is not a file or superfile",srclfn,daliep.getEndpointHostText(s).str()); } } diff --git a/dali/dfu/dfuwu.cpp b/dali/dfu/dfuwu.cpp index fcd3403e6a6..0adb78d182b 100644 --- a/dali/dfu/dfuwu.cpp +++ b/dali/dfu/dfuwu.cpp @@ -885,7 +885,7 @@ class CDFUmonitor: public CLinkedDFUWUchild, implements IDFUmonitor queryRoot()->removeProp("@handler"); else { StringBuffer s; - queryRoot()->setProp("@handler",ep.getUrlStr(s).str()); + queryRoot()->setProp("@handler",ep.getEndpointHostText(s).str()); } } @@ -1491,7 +1491,7 @@ class CDFUfileSpec: public CLinkedDFUWUchild, implements IDFUfileSpec IPropertyTree * part = queryRoot()->setPropTree("Part",createPTree("Part")); part->setPropInt("@num",1); StringBuffer url; - rmfn.queryEndpoint().getUrlStr(url); + rmfn.queryEndpoint().getEndpointHostText(url); part->setProp("@node",url.str()); } @@ -1590,7 +1590,7 @@ class CDFUfileSpec: public CLinkedDFUWUchild, implements IDFUfileSpec // only used for source of copy IPropertyTree *t = queryUpdateProperties(); StringBuffer s; - t->setProp("@foreignDali",ep.getUrlStr(s).str()); + t->setProp("@foreignDali",ep.getEndpointHostText(s).str()); } bool getForeignDali(SocketEndpoint &ep) const @@ -3523,7 +3523,7 @@ IDfuFileCopier *createRemoteFileCopier(const char *qname,const char *clustername // should be no need for overwrite const char *wuid = wu->queryId(); StringBuffer eps; - PROGLOG("%s: Copy %s from %s to %s",wuid,srclfn,srcdali.getUrlStr(eps).str(),lfn); + PROGLOG("%s: Copy %s from %s to %s",wuid,srclfn,srcdali.getEndpointHostText(eps).str(),lfn); wuids.append(wuid); submitDFUWorkUnit(wu.getClear()); return true; diff --git a/dali/dfuXRefLib/XRefFilesNode.cpp b/dali/dfuXRefLib/XRefFilesNode.cpp index b5881acb93e..6eee332ceca 100644 --- a/dali/dfuXRefLib/XRefFilesNode.cpp +++ b/dali/dfuXRefLib/XRefFilesNode.cpp @@ -130,8 +130,8 @@ static bool checkPartsInCluster(const char *title,const char *clustername, IProp if (group->rank(ep)==RANK_NULL) { StringBuffer eps; - OERRLOG("%s %s Part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getUrlStr(eps).str(),clustername); - errstr.appendf("ERROR: %s %s part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getUrlStr(eps).str(),clustername); + OERRLOG("%s %s Part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getEndpointHostText(eps).str(),clustername); + errstr.appendf("ERROR: %s %s part %d on %s is not in cluster %s",title,rep?"Replicate":"Primary",pn,ep.getEndpointHostText(eps).str(),clustername); return false; } if (exists) diff --git a/dali/dfuXRefLib/dfurdir.cpp b/dali/dfuXRefLib/dfurdir.cpp index 65b652dc6ee..9521be61edf 100644 --- a/dali/dfuXRefLib/dfurdir.cpp +++ b/dali/dfuXRefLib/dfurdir.cpp @@ -215,7 +215,7 @@ IPropertyTree *getDirectory(const char * directory, INode * node, unsigned short s.append(directory); if (node) { s.append(" on "); - node->endpoint().getUrlStr(s); + node->endpoint().getEndpointHostText(s); } if (port) s.append(" port ").append(port); diff --git a/dali/dfuXRefLib/dfuxreflib.cpp b/dali/dfuXRefLib/dfuxreflib.cpp index 9f4c34d599b..886e2aeea98 100644 --- a/dali/dfuXRefLib/dfuxreflib.cpp +++ b/dali/dfuXRefLib/dfuxreflib.cpp @@ -1096,7 +1096,7 @@ class COrphanEntry: public CInterface out.append(", "); const SocketEndpoint &item = epa.item(sorted[i2]); StringBuffer cur; - item.getUrlStr(cur); + item.getEndpointHostText(cur); const char *s1 = prefix.str(); const char *s2 = cur.str(); if (prefix.length()&&(memcmp(s1,s2,prefix.length())==0)) @@ -1186,11 +1186,11 @@ class COrphanEntry: public CInterface ForEachItemIn(i3,parts[i]) { unsigned p = parts[i].item(i3); if (copy) { - replicateepa.item(p).getUrlStr(buf.clear()); + replicateepa.item(p).getEndpointHostText(buf.clear()); b->addProp("RNode",buf.str()); } else { - primaryepa.item(p).getUrlStr(buf.clear()); + primaryepa.item(p).getEndpointHostText(buf.clear()); b->addProp("Node",buf.str()); } } @@ -1314,7 +1314,7 @@ IPropertyTree *CLogicalNameEntry::addFileBranch(IPropertyTree *dst,unsigned flag continue; IPropertyTree *part = addBranch(out,"Part"); if (flags&CFBpartnode) { - grp->queryNode((i+rep)%grp->ordinality()).endpoint().getUrlStr(buf.clear()); // TBD check grp==cluster TBD + grp->queryNode((i+rep)%grp->ordinality()).endpoint().getEndpointHostText(buf.clear()); // TBD check grp==cluster TBD part->setProp("Node",buf.str()); } if (flags&CFBpartnum) { @@ -1861,7 +1861,7 @@ class CXRefManager: public CXRefManagerBase try { StringBuffer msg; INode &node = g->queryNode(idx); - node.endpoint().getUrlStr(msg); + node.endpoint().getEndpointHostText(msg); manager.log("Getting directories for %s",msg.str()); manager.addNodeInProgress(node); Owned results; diff --git a/dali/dfuplus/dfuplus.cpp b/dali/dfuplus/dfuplus.cpp index 8b6b2697e3c..25db8e9d7f4 100644 --- a/dali/dfuplus/dfuplus.cpp +++ b/dali/dfuplus/dfuplus.cpp @@ -152,7 +152,7 @@ bool CDfuPlusHelper::runLocalDaFileSvr(SocketEndpoint &listenep,bool requireauth addlPort.appendf(":%u", sslport); } StringBuffer eps; - progress("Started local Dali file server on %s%s\n", printep.getUrlStr(eps).str(), addlPort.str()); + progress("Started local Dali file server on %s%s\n", printep.getEndpointHostText(eps).str(), addlPort.str()); } thr->start(); @@ -663,7 +663,7 @@ int CDfuPlusHelper::spray() { SocketEndpoint localep; if (checkLocalDaFileSvr(srcip,localep)) - srcip = localep.getUrlStr(localeps).str(); + srcip = localep.getEndpointHostText(localeps).str(); } StringBuffer wuid; StringBuffer errmsg; @@ -832,7 +832,7 @@ int CDfuPlusHelper::despray() SocketEndpoint localep; StringBuffer localeps; if (isEmptyString(dstplane) && checkLocalDaFileSvr(dstip,localep)) - dstip = localep.getUrlStr(localeps).str(); + dstip = localep.getEndpointHostText(localeps).str(); Owned result = sprayclient->Despray(req); const char* wuid = result->getWuid(); if(isEmptyString(wuid)) diff --git a/dali/ft/daftformat.cpp b/dali/ft/daftformat.cpp index 475b44114dd..02040383302 100644 --- a/dali/ft/daftformat.cpp +++ b/dali/ft/daftformat.cpp @@ -1889,7 +1889,7 @@ void CRemotePartitioner::callRemote() { LogMsgJobInfo job(unknownJob); StringBuffer url, tmp; - ep.getUrlStr(url); + ep.getEndpointHostText(url); MemoryBuffer msg; msg.setEndian(__BIG_ENDIAN); diff --git a/dali/ft/filecopy.cpp b/dali/ft/filecopy.cpp index 375eb1a6f2f..ed0f7d2cfc4 100644 --- a/dali/ft/filecopy.cpp +++ b/dali/ft/filecopy.cpp @@ -203,7 +203,7 @@ FileTransferThread::FileTransferThread(FileSprayer & _sprayer, byte _action, con if (isContainerized()) url.set(sprayer.sprayServiceHost); else - ep.getUrlStr(url); + ep.getEndpointHostText(url); // progressInfo = _progressInfo; sem = NULL; ok = false; diff --git a/dali/sasha/saserver.cpp b/dali/sasha/saserver.cpp index 6ede9f3556a..6d802e4fdef 100644 --- a/dali/sasha/saserver.cpp +++ b/dali/sasha/saserver.cpp @@ -443,7 +443,7 @@ int main(int argc, const char* argv[]) #endif StringBuffer eps; - PROGLOG("SASERVER starting on %s",queryMyNode()->endpoint().getUrlStr(eps).str()); + PROGLOG("SASERVER starting on %s",queryMyNode()->endpoint().getEndpointHostText(eps).str()); ForEachItemIn(i1,servers) { diff --git a/dali/sasha/saverify.cpp b/dali/sasha/saverify.cpp index b230969135b..283b3ef83a0 100644 --- a/dali/sasha/saverify.cpp +++ b/dali/sasha/saverify.cpp @@ -329,7 +329,7 @@ class CFileCrcList catch (IException *e) { StringBuffer s; - s.appendf("VERIFY: part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str()); + s.appendf("VERIFY: part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getEndpointHostText(eps).str()); EXCLOG(e, s.str()); e->Release(); ok = false; @@ -540,7 +540,7 @@ class CSashaDaFSMonitorServer: public ISashaServer, public Thread if (rver==0) { StringBuffer epstr; SocketEndpoint ep = eps.item(i); - ep.getUrlStr(epstr); + ep.getEndpointHostText(epstr); CriticalBlock block(sect); if (failurelimit) { LOG(MCoperatorError, unknownJob,"DAFSMON: dafilesrv on %s cannot be contacted",epstr.str()); @@ -554,7 +554,7 @@ class CSashaDaFSMonitorServer: public ISashaServer, public Thread CriticalBlock block(sect); StringBuffer epstr; SocketEndpoint ep = eps.item(i); - ep.getUrlStr(epstr); + ep.getEndpointHostText(epstr); StringBuffer s; s.appendf("DAFSMON: dafilesrv %s",epstr.str()); LOG(MCoperatorError, unknownJob, e, s.str()); @@ -599,7 +599,7 @@ class CSashaDaFSMonitorServer: public ISashaServer, public Thread if (!ep.isNull()) { if (trc.length()) trc.append(", "); - ep.getUrlStr(trc); + ep.getEndpointHostText(trc); if (ep.port==0) ep.port = getDaliServixPort(); eps.append(ep); diff --git a/dali/sasha/saxref.cpp b/dali/sasha/saxref.cpp index 53b1e5b4fad..a7ef0ce6685 100644 --- a/dali/sasha/saxref.cpp +++ b/dali/sasha/saxref.cpp @@ -970,7 +970,7 @@ class CNewXRefManager: public CNewXRefManagerBase StringBuffer path(rootdir); SocketEndpoint ep = parent.rawgrp->queryNode(i).endpoint(); StringBuffer tmp; - parent.log("Scanning %s directory %s",ep.getUrlStr(tmp).str(),path.str()); + parent.log("Scanning %s directory %s",ep.getEndpointHostText(tmp).str(),path.str()); if (!parent.scanDirectory(i,ep,path,0,NULL,NULL)) { ok = false; return; @@ -978,7 +978,7 @@ class CNewXRefManager: public CNewXRefManagerBase i = (i+r)%n; setReplicateFilename(path,1); ep = parent.rawgrp->queryNode(i).endpoint(); - parent.log("Scanning %s directory %s",ep.getUrlStr(tmp.clear()).str(),path.str()); + parent.log("Scanning %s directory %s",ep.getEndpointHostText(tmp.clear()).str(),path.str()); if (!parent.scanDirectory(i,ep,path,1,NULL,NULL)) { ok = false; } @@ -1179,7 +1179,7 @@ class CNewXRefManager: public CNewXRefManagerBase pb->setPropInt("Num",i); pb = branch->addPropTree("Part",pb); } - pb->setProp(rep?"RNode":"Node",ep.getUrlStr(tmp.clear()).str()); + pb->setProp(rep?"RNode":"Node",ep.getEndpointHostText(tmp.clear()).str()); } diff --git a/ecl/eclagent/eclagent.cpp b/ecl/eclagent/eclagent.cpp index ee5ba717a77..1ca18ca42c4 100644 --- a/ecl/eclagent/eclagent.cpp +++ b/ecl/eclagent/eclagent.cpp @@ -3341,7 +3341,7 @@ char * EclAgent::getDaliServers() first = false; else dali.append(','); - coven->query().endpoint().getUrlStr(dali); + coven->query().endpoint().getEndpointHostText(dali); } return dali.detach(); } diff --git a/esp/bindings/http/client/httpclient.cpp b/esp/bindings/http/client/httpclient.cpp index 4a78a7c03ce..6f9968ea850 100644 --- a/esp/bindings/http/client/httpclient.cpp +++ b/esp/bindings/http/client/httpclient.cpp @@ -329,7 +329,7 @@ int CHttpClient::connect(StringBuffer& errmsg, bool forceNewConnection) catch(IException *e) { StringBuffer url; - UERRLOG("Error connecting to %s", ep.getUrlStr(url).str()); + UERRLOG("Error connecting to %s", ep.getEndpointHostText(url).str()); DBGLOG(e); e->Release(); m_socket = nullptr; @@ -338,7 +338,7 @@ int CHttpClient::connect(StringBuffer& errmsg, bool forceNewConnection) catch(...) { StringBuffer url; - UERRLOG("Unknown exception connecting to %s", ep.getUrlStr(url).str()); + UERRLOG("Unknown exception connecting to %s", ep.getEndpointHostText(url).str()); m_socket = nullptr; return -1; } @@ -346,7 +346,7 @@ int CHttpClient::connect(StringBuffer& errmsg, bool forceNewConnection) if(m_socket == nullptr) { StringBuffer urlstr; - DBGLOG(">>Can't connect to %s", ep.getUrlStr(urlstr).str()); + DBGLOG(">>Can't connect to %s", ep.getEndpointHostText(urlstr).str()); return -1; } diff --git a/esp/clients/roxiecontrol.cpp b/esp/clients/roxiecontrol.cpp index ab984873e09..6f772f431b7 100644 --- a/esp/clients/roxiecontrol.cpp +++ b/esp/clients/roxiecontrol.cpp @@ -142,7 +142,7 @@ static ISocket *createRoxieControlSocket(ISmartSocketFactory *conn, unsigned wai { StringBuffer err; err.append("Failure to establish secure connection to "); - ep.getUrlStr(err); + ep.getEndpointHostText(err); err.append(": returned ").append(status); throw makeStringException(SECURE_CONNECTION_FAILURE, err.str()); } diff --git a/esp/clients/wsdfuaccess/wsdfuaccess.cpp b/esp/clients/wsdfuaccess/wsdfuaccess.cpp index 8a585bc7a75..e33da8f8ec1 100644 --- a/esp/clients/wsdfuaccess/wsdfuaccess.cpp +++ b/esp/clients/wsdfuaccess/wsdfuaccess.cpp @@ -639,7 +639,7 @@ class DFUAccessTests : public CppUnit::TestFixture basePath.append("//"); SocketEndpoint ep(serverPort); - ep.getUrlStr(basePath); + ep.getEndpointHostText(basePath); char cpath[_MAX_DIR]; if (!GetCurrentDirectory(_MAX_DIR, cpath)) diff --git a/esp/services/ws_dfu/ws_dfuService.cpp b/esp/services/ws_dfu/ws_dfuService.cpp index 4dcfd29b947..48b1f645677 100644 --- a/esp/services/ws_dfu/ws_dfuService.cpp +++ b/esp/services/ws_dfu/ws_dfuService.cpp @@ -2090,7 +2090,7 @@ void CWsDfuEx::getFilePartsOnClusters(IEspContext &context, const char *clusterR for (unsigned i=0; iendpoint().getUrlStr(url); + part.queryNode(i)->endpoint().getEndpointHostText(url); Owned FilePart = createDFUPart(); FilePart->setId(partIndex+1); @@ -2538,7 +2538,7 @@ void CWsDfuEx::doGetFileDetails(IEspContext &context, IUserDescriptor *udesc, co Owned FilePart = createDFUPart(); StringBuffer url; - part->queryNode(i)->endpoint().getUrlStr(url); + part->queryNode(i)->endpoint().getEndpointHostText(url); FilePart->setId(part->getPartIndex()+1); FilePart->setCopy(i+1); @@ -5970,7 +5970,7 @@ void CWsDfuEx::getFilePartsInfo(IEspContext &context, const char *dafilesrvHost, * In bare metal the host names from the group will be used. */ if (!dafilesrvHost) - part.queryNode(i)->endpoint().getUrlStr(host.clear()); + part.queryNode(i)->endpoint().getEndpointHostText(host.clear()); unsigned *locationIndex = partLocationMap.getValue(host.str()); if (locationIndex) fileCopy->setLocationIndex(*locationIndex); diff --git a/esp/services/ws_fs/ws_fsService.cpp b/esp/services/ws_fs/ws_fsService.cpp index 002712847f1..c46857a3f77 100644 --- a/esp/services/ws_fs/ws_fsService.cpp +++ b/esp/services/ws_fs/ws_fsService.cpp @@ -804,7 +804,7 @@ bool CFileSprayEx::GetArchivedDFUWorkunits(IEspContext &context, IEspGetDFUWorku StringBuffer url; throw MakeStringException(ECLWATCH_CANNOT_CONNECT_ARCHIVE_SERVER, "Sasha (%s) took too long to respond from: Get archived workUnits.", - ep.getUrlStr(url).str()); + ep.getEndpointHostText(url).str()); } IArrayOf results; @@ -1293,7 +1293,7 @@ void CFileSprayEx::getInfoFromSasha(IEspContext &context, const char *sashaServe StringBuffer url; throw MakeStringException(ECLWATCH_CANNOT_CONNECT_ARCHIVE_SERVER, "Sasha (%s) took too long to respond from: Get information for %s.", - ep.getUrlStr(url).str(), wuid); + ep.getEndpointHostText(url).str(), wuid); } if (cmd->numIds()==0) { diff --git a/esp/services/ws_workunits/ws_workunitsQuerySets.cpp b/esp/services/ws_workunits/ws_workunitsQuerySets.cpp index a0e63f4be54..6dd70d3700c 100644 --- a/esp/services/ws_workunits/ws_workunitsQuerySets.cpp +++ b/esp/services/ws_workunits/ws_workunitsQuerySets.cpp @@ -126,7 +126,7 @@ void fetchRemoteWorkunit(IClientWsWorkunits *_ws, IEspContext *ctx, const char * SocketEndpoint ep; checkUseEspOrDaliIP(ep, resp->getDaliServer(), netAddress); if (!ep.isNull()) - ep.getUrlStr(daliServer); + ep.getEndpointHostText(daliServer); } void fetchRemoteWorkunitAndQueryDetails(IClientWsWorkunits *_ws, IEspContext *ctx, const char *netAddress, const char *queryset, const char *query, const char *wuid, StringBuffer &name, StringBuffer &xml, StringBuffer &dllname, MemoryBuffer &dll, StringBuffer &daliServer, Owned &respQueryInfo, bool useSSL) diff --git a/esp/services/ws_workunits/ws_workunitsService.cpp b/esp/services/ws_workunits/ws_workunitsService.cpp index 5388cc57cb9..6af6c3d23fd 100644 --- a/esp/services/ws_workunits/ws_workunitsService.cpp +++ b/esp/services/ws_workunits/ws_workunitsService.cpp @@ -128,7 +128,7 @@ IPropertyTree *getArchivedWorkUnitProperties(const char *wuid, bool dfuWU) if (!cmd->send(node, 1*60*1000)) throw MakeStringException(ECLWATCH_CANNOT_CONNECT_ARCHIVE_SERVER, "Sasha (%s) took too long to respond from: Get workUnit properties for %s.", - ep.getUrlStr(tmp).str(), wuid); + ep.getEndpointHostText(tmp).str(), wuid); if ((cmd->numIds() < 1) || (cmd->numResults() < 1)) return nullptr; @@ -1478,7 +1478,7 @@ bool getWsWuInfoFromSasha(IEspContext &context, SocketEndpoint &ep, const char* StringBuffer url; throw MakeStringException(ECLWATCH_CANNOT_CONNECT_ARCHIVE_SERVER, "Sasha (%s) took too long to respond from: Get information for %s.", - ep.getUrlStr(url).str(), wuid); + ep.getEndpointHostText(url).str(), wuid); } if (cmd->numIds()==0) @@ -2482,7 +2482,7 @@ class CArchivedWUsReader : public CInterface, implements IArchivedWUsReader StringBuffer url; throw MakeStringException(ECLWATCH_CANNOT_CONNECT_ARCHIVE_SERVER, "Sasha (%s) took too long to respond from: Get archived workUnits.", - ep.getUrlStr(url).str()); + ep.getEndpointHostText(url).str()); } numberOfWUsReturned = cmd->numIds(); diff --git a/esp/test/httptest/httptest.cpp b/esp/test/httptest/httptest.cpp index 343489b87d5..0888478912e 100644 --- a/esp/test/httptest/httptest.cpp +++ b/esp/test/httptest/httptest.cpp @@ -539,7 +539,7 @@ int HttpClient::sendRequest(int times, HttpStat& stat, StringBuffer& req) if(socket.get() == NULL) { StringBuffer urlstr; - OERRLOG("Can't connect to %s", ep.getUrlStr(urlstr).str()); + OERRLOG("Can't connect to %s", ep.getEndpointHostText(urlstr).str()); continue; } @@ -857,7 +857,7 @@ int COneServerHttpProxyThread::start() if(socket2.get() == NULL) { StringBuffer urlstr; - OERRLOG("Can't connect to %s", ep.getUrlStr(urlstr).str()); + OERRLOG("Can't connect to %s", ep.getEndpointHostText(urlstr).str()); return -1; } diff --git a/esp/tools/soapplus/http.cpp b/esp/tools/soapplus/http.cpp index b6280f51bdd..fd288668ef4 100644 --- a/esp/tools/soapplus/http.cpp +++ b/esp/tools/soapplus/http.cpp @@ -1789,7 +1789,7 @@ int HttpClient::sendRequest(StringBuffer& req, IFileIO* request_output, IFileIO* if(socket.get() == NULL) { StringBuffer urlstr; - OERRLOG("Can't connect to %s", ep.getUrlStr(urlstr).str()); + OERRLOG("Can't connect to %s", ep.getEndpointHostText(urlstr).str()); return -1; } diff --git a/esp/tools/soapplus/httpproxy.cpp b/esp/tools/soapplus/httpproxy.cpp index 67bb20323c7..b07874d8c7f 100644 --- a/esp/tools/soapplus/httpproxy.cpp +++ b/esp/tools/soapplus/httpproxy.cpp @@ -212,7 +212,7 @@ int COneServerHttpProxyThread::start() if(socket2.get() == NULL) { StringBuffer urlstr; - OERRLOG("Can't connect to %s", ep.getUrlStr(urlstr).str()); + OERRLOG("Can't connect to %s", ep.getEndpointHostText(urlstr).str()); return -1; } diff --git a/fs/dafilesrv/dafilesrv.cpp b/fs/dafilesrv/dafilesrv.cpp index efbf863e5a6..cc3bba26b99 100644 --- a/fs/dafilesrv/dafilesrv.cpp +++ b/fs/dafilesrv/dafilesrv.cpp @@ -849,7 +849,7 @@ int main(int argc, const char* argv[]) if (listenep.isNull()) eps.append(listenep.port); else - listenep.getUrlStr(eps); + listenep.getEndpointHostText(eps); if (connectMethod != SSLOnly) PROGLOG("Opening Dali File Server on %s", eps.str()); if (connectMethod == SSLOnly || connectMethod == SSLFirst || connectMethod == UnsecureFirst) @@ -860,7 +860,7 @@ int main(int argc, const char* argv[]) if (sslep.isNull()) eps.append(sslep.port); else - sslep.getUrlStr(eps); + sslep.getEndpointHostText(eps); PROGLOG("Opening Dali File Server on SECURE %s", eps.str()); } diff --git a/fs/dafsclient/rmtclient.cpp b/fs/dafsclient/rmtclient.cpp index 1a0b2123c55..c57dbc9a79d 100644 --- a/fs/dafsclient/rmtclient.cpp +++ b/fs/dafsclient/rmtclient.cpp @@ -683,7 +683,7 @@ void CRemoteBase::connectSocket(SocketEndpoint &ep, unsigned connectTimeoutMs, u if (msTick()-lastfailtimeRelease(); StringBuffer msg("Failed to connect (setting host down) to dafilesrv/daliservix on "); - ep.getUrlStr(msg); + ep.getEndpointHostText(msg); throw createDafsException(DAFSERR_connection_failed,msg.str()); } throw; @@ -923,7 +923,7 @@ void CRemoteBase::sendRemoteCommand(MemoryBuffer & src, MemoryBuffer & reply, bo StringBuffer msg; if (filename.get()) msg.append(filename); - ep.getUrlStr(msg.append('[')).append("] "); + ep.getEndpointHostText(msg.append('[')).append("] "); size32_t pos = reply.getPos(); if (pos bool reopen() { StringBuffer s; - PROGLOG("Attempting reopen of %s on %s",parent->queryLocalName(),parent->queryEp().getUrlStr(s).str()); + PROGLOG("Attempting reopen of %s on %s",parent->queryLocalName(),parent->queryEp().getEndpointHostText(s).str()); if (open(mode,compatmode,extraFlags)) return true; return false; @@ -1401,7 +1401,7 @@ class CRemoteFileIO : public CInterfaceOf if (errCode) { StringBuffer msg; - parent->ep.getUrlStr(msg.append('[')).append("] "); + parent->ep.getEndpointHostText(msg.append('[')).append("] "); if (replyBuffer.getPos()getPeerEndpoint(eps); - eps.getUrlStr(peerURL); + eps.getEndpointHostText(peerURL); PROGLOG("Server accepting from %s", peerURL.str()); #endif /* NB: if it hits the thread pool limit, it will start throttling (introducing delays), @@ -5676,7 +5676,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface { #ifdef _DEBUG sockSSL->getPeerEndpoint(eps); - eps.getUrlStr(peerURL.clear()); + eps.getEndpointHostText(peerURL.clear()); PROGLOG("Server accepting SECURE from %s", peerURL.str()); #endif runClient(sockSSL.getClear(), false); @@ -5686,7 +5686,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface { #ifdef _DEBUG acceptedRSSock->getPeerEndpoint(eps); - eps.getUrlStr(peerURL.clear()); + eps.getEndpointHostText(peerURL.clear()); PROGLOG("Server accepting row service socket from %s", peerURL.str()); #endif runClient(acceptedRSSock.getClear(), true); @@ -5987,7 +5987,7 @@ class RemoteFileSlowTest : public CppUnit::TestFixture basePath.append("//"); SocketEndpoint ep(serverPort); - ep.getUrlStr(basePath); + ep.getEndpointHostText(basePath); char cpath[_MAX_DIR]; if (!GetCurrentDirectory(_MAX_DIR, cpath)) diff --git a/fs/dafsstream/dafsstream.cpp b/fs/dafsstream/dafsstream.cpp index cefaf24b59f..f0c1ea740be 100644 --- a/fs/dafsstream/dafsstream.cpp +++ b/fs/dafsstream/dafsstream.cpp @@ -262,7 +262,7 @@ class CDFUFile : public CSimpleInterfaceOf, implements IDFUFileA for (unsigned c=0; cqueryNode(p, c)->endpoint().getUrlStr(host); + fileDesc->queryNode(p, c)->endpoint().getEndpointHostText(host); unsigned pos = p*maxCopiesPerPart+c; if (hosts.size() <= pos) hosts.resize(pos+1); // ensure big enough @@ -562,13 +562,13 @@ class CDaFileSrvClientBase : public CInterfaceOf if (0 == serverVersion) { StringBuffer str; - throwDsFsClientExceptionV(DaFsClient_ConnectionFailure, "CDaFileSrvClientBase: Failed to connect to %s", daFsConnection->queryEp().getUrlStr(str).str()); + throwDsFsClientExceptionV(DaFsClient_ConnectionFailure, "CDaFileSrvClientBase: Failed to connect to %s", daFsConnection->queryEp().getEndpointHostText(str).str()); } if (serverVersion < DAFILESRV_STREAMREAD_MINVERSION) { StringBuffer str; - throwDsFsClientExceptionV(DaFsClient_TooOld, "CDaFileSrvClientBase: server ersion(%u), too old connect to %s", serverVersion, daFsConnection->queryEp().getUrlStr(str).str()); + throwDsFsClientExceptionV(DaFsClient_TooOld, "CDaFileSrvClientBase: server ersion(%u), too old connect to %s", serverVersion, daFsConnection->queryEp().getEndpointHostText(str).str()); } } void start() @@ -1314,7 +1314,7 @@ class CDFUPartFlatWriter : public CDFUPartWriterBase e->Release(); } StringBuffer msg; - daFsConnection->queryEp().getUrlStr(msg); + daFsConnection->queryEp().getEndpointHostText(msg); WARNLOG("Stream writing not supported by dafilesrv(%s), attempting unsecured direct connection", msg.str()); RemoteFilename rfn; file->queryFileDescriptor().getFilename(part, 0, rfn); diff --git a/plugins/fileservices/fileservices.cpp b/plugins/fileservices/fileservices.cpp index 4d88cbbbf7e..c3ca949b7ae 100644 --- a/plugins/fileservices/fileservices.cpp +++ b/plugins/fileservices/fileservices.cpp @@ -2320,7 +2320,7 @@ FILESERVICES_API char * FILESERVICES_CALL fsfRemotePull_impl(ICodeContext *ctx, if (wrap) req->setWrap(true); StringBuffer sourceDali; - queryCoven().queryComm().queryGroup().queryNode(0).endpoint().getUrlStr(sourceDali); + queryCoven().queryComm().queryGroup().queryNode(0).endpoint().getEndpointHostText(sourceDali); req->setSourceDali(sourceDali); req->setOverwrite(overwrite); req->setReplicate(replicate); diff --git a/roxie/ccd/ccddali.cpp b/roxie/ccd/ccddali.cpp index 1d8d8936d3f..6465556dd74 100644 --- a/roxie/ccd/ccddali.cpp +++ b/roxie/ccd/ccddali.cpp @@ -734,7 +734,7 @@ class CRoxieDaliHelper : implements IRoxieDaliHelper, public CInterface first = false; else ret.append(','); - coven->query().endpoint().getUrlStr(ret); + coven->query().endpoint().getEndpointHostText(ret); } return ret; } diff --git a/roxie/ccd/ccdlistener.cpp b/roxie/ccd/ccdlistener.cpp index 54e7f9af90f..f575adf82c9 100644 --- a/roxie/ccd/ccdlistener.cpp +++ b/roxie/ccd/ccdlistener.cpp @@ -128,7 +128,7 @@ class CascadeManager : public CInterface if (traceLevel) { StringBuffer epStr; - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); DBGLOG("connectChild connecting to %s", epStr.str()); } Owned sock = ISocket::connect_timeout(ep, 2000); @@ -147,7 +147,7 @@ class CascadeManager : public CInterface { StringBuffer err; err.append("Roxie CascadeManager failed to establish secure connection to "); - ep.getUrlStr(err); + ep.getEndpointHostText(err); err.append(": returned ").append(status); throw makeStringException(ROXIE_TLS_ERROR, err.str()); } @@ -158,7 +158,7 @@ class CascadeManager : public CInterface if (traceLevel) { StringBuffer epStr; - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); DBGLOG("connectChild connected to %s", epStr.str()); } } @@ -168,7 +168,7 @@ class CascadeManager : public CInterface connectChild((idx+1) * 2 - 1); connectChild((idx+1) * 2); errors.append("").append(E->errorCode()).append(""); E->errorMessage(errors).append(""); logctx.CTXLOG("Connection failed - %s", errors.str()); @@ -491,7 +491,7 @@ class CascadeManager : public CInterface { StringBuffer myReply; myReply.append("\n"); unsigned savedLength = myReply.length(); try @@ -1875,7 +1875,7 @@ class RoxieProtocolMsgSink : implements IHpccNativeProtocolMsgSink, public CInte else if (strieq(name, "control:queryaclinfo")) { reply.append("\n"); queryAccessInfo(reply); diff --git a/roxie/ccd/ccdqueue.cpp b/roxie/ccd/ccdqueue.cpp index 1f6fa4ac8f4..97945643159 100644 --- a/roxie/ccd/ccdqueue.cpp +++ b/roxie/ccd/ccdqueue.cpp @@ -269,7 +269,7 @@ void joinMulticastChannel(unsigned channel) getChannelIp(multicastIp, channel); SocketEndpoint ep(ccdMulticastPort, multicastIp); StringBuffer epStr; - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); if (!multicastSocket->join_multicast_group(ep)) throw MakeStringException(ROXIE_MULTICAST_ERROR, "Failed to join multicast channel %d (%s)", channel, epStr.str()); if (traceLevel) diff --git a/roxie/roxiepipe/roxiepipe.cpp b/roxie/roxiepipe/roxiepipe.cpp index 632edde60b9..1349d9710c1 100644 --- a/roxie/roxiepipe/roxiepipe.cpp +++ b/roxie/roxiepipe/roxiepipe.cpp @@ -279,7 +279,7 @@ class RoxieThread : public Thread int code = ep->getPropInt("./Code", 0); SocketEndpoint peerEp; StringBuffer peerStr; - OERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str()); + OERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getEndpointHostText(peerStr).str()); OERRLOG("Roxie exception: %s", body.str()); throw new ReceivedRoxieException(code, body.str()); } @@ -305,7 +305,7 @@ class RoxieThread : public Thread delete x; SocketEndpoint peerEp; StringBuffer peerStr; - OERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str()); + OERRLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getEndpointHostText(peerStr).str()); OERRLOG("Roxie exception: %s", xml.str()); int code = 0; try @@ -354,7 +354,7 @@ class RoxieThread : public Thread SocketEndpoint peerEp; StringBuffer peerStr; - PROGLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getUrlStr(peerStr).str()); + PROGLOG("Connected to %s", roxieSock->querySocket()->getPeerEndpoint(peerEp).getEndpointHostText(peerStr).str()); sendQuery(); diff --git a/roxie/udplib/udpaeron.cpp b/roxie/udplib/udpaeron.cpp index 4bf9a414262..b86c773dce7 100644 --- a/roxie/udplib/udpaeron.cpp +++ b/roxie/udplib/udpaeron.cpp @@ -285,7 +285,7 @@ class CRoxieAeronReceiveManager : public CInterfaceOf std::shared_ptr addSubscription(const SocketEndpoint &myEndpoint, int queue) { StringBuffer channel("aeron:udp?endpoint="); - myEndpoint.getUrlStr(channel); + myEndpoint.getEndpointHostText(channel); std::int64_t id = aeron->addSubscription(channel.str(), queue); std::shared_ptr subscription = aeron->findSubscription(id); while (!subscription) diff --git a/roxie/udplib/udpsha.cpp b/roxie/udplib/udpsha.cpp index 45d5ac6cb54..f3fb8546d56 100644 --- a/roxie/udplib/udpsha.cpp +++ b/roxie/udplib/udpsha.cpp @@ -905,7 +905,7 @@ unsigned CSimulatedQueueWriteSocket::writeDelayed(unsigned now) free((void *) packets.front()); if (jitteredBuff) free((void *) jitteredBuff); - DBGLOG("Write to disconnected socket %s", destEp.getUrlStr(s).str()); + DBGLOG("Write to disconnected socket %s", destEp.getEndpointHostText(s).str()); } dueTimes.pop(); packets.pop(); @@ -932,7 +932,7 @@ size32_t CSimulatedQueueWriteSocket::write(void const* buf, size32_t size) else { StringBuffer s; - DBGLOG("Write to disconnected socket %s", destEp.getUrlStr(s).str()); + DBGLOG("Write to disconnected socket %s", destEp.getEndpointHostText(s).str()); } } return size; @@ -944,7 +944,7 @@ CriticalSection CSimulatedQueueReadSocket::allReadersCrit; CSimulatedQueueReadSocket::CSimulatedQueueReadSocket(const SocketEndpoint &_me) : me(_me) { StringBuffer s; - DBGLOG("Creating fake socket %s", me.getUrlStr(s).str()); + DBGLOG("Creating fake socket %s", me.getEndpointHostText(s).str()); CriticalBlock b(allReadersCrit); allReaders[me] = this; } @@ -952,7 +952,7 @@ CSimulatedQueueReadSocket::CSimulatedQueueReadSocket(const SocketEndpoint &_me) CSimulatedQueueReadSocket::~CSimulatedQueueReadSocket() { StringBuffer s; - DBGLOG("Closing fake socket %s", me.getUrlStr(s).str()); + DBGLOG("Closing fake socket %s", me.getEndpointHostText(s).str()); CriticalBlock b(allReadersCrit); allReaders.erase(me); } diff --git a/roxie/udplib/udptopo.cpp b/roxie/udplib/udptopo.cpp index 494b7d05381..27fcefedc44 100644 --- a/roxie/udplib/udptopo.cpp +++ b/roxie/udplib/udptopo.cpp @@ -229,7 +229,7 @@ CTopologyServer::CTopologyServer(const char *topologyInfo, const ITopologyServer if (!isActive(instance) || (isActive(oldInstance) && oldInstance != instance)) { StringBuffer s; - DBGLOG("Deleting pending data for server %s which has terminated or restarted", ep.getUrlStr(s).str()); + DBGLOG("Deleting pending data for server %s which has terminated or restarted", ep.getEndpointHostText(s).str()); ROQ->abortPendingData(ep); } if (isActive(instance)) diff --git a/system/hrpc/hrpcmp.cpp b/system/hrpc/hrpcmp.cpp index 5ad7693a994..a70193b394c 100644 --- a/system/hrpc/hrpcmp.cpp +++ b/system/hrpc/hrpcmp.cpp @@ -481,7 +481,7 @@ class HRPCmptransport: implements IHRPCtransport, public CInterface return false; } StringBuffer str; - ep.getUrlStr(str).appendf("{%d}",(int)tag); // we'll use proper tag name when available + ep.getEndpointHostText(str).appendf("{%d}",(int)tag); // we'll use proper tag name when available size32_t l = str.length(); if (l>=namemax) l = namemax-1; diff --git a/system/hrpc/hrpcutil.cpp b/system/hrpc/hrpcutil.cpp index 278c33d4eef..fc9d4e9609e 100644 --- a/system/hrpc/hrpcutil.cpp +++ b/system/hrpc/hrpcutil.cpp @@ -140,7 +140,7 @@ bool FastMultipleConnect(unsigned n,HRPCmodule **modules,bool *done,int timeout) } else { StringBuffer epstr; - eps.item(i).getUrlStr(epstr); + eps.item(i).getEndpointHostText(epstr); //ERRLOG("Failed to connect to %s",epstr.str()); ret = false; } diff --git a/system/jlib/jfile.cpp b/system/jlib/jfile.cpp index f8784e59688..c2da6dbb38b 100644 --- a/system/jlib/jfile.cpp +++ b/system/jlib/jfile.cpp @@ -4794,7 +4794,7 @@ StringBuffer & RemoteFilename::getRemotePath(StringBuffer & out) const char c=getPathSeparator(); out.append(c).append(c); - ep.getUrlStr(out); + ep.getEndpointHostText(out); const char *fn; StringBuffer loc; if (sharehead.length()) diff --git a/system/jlib/jlog.cpp b/system/jlib/jlog.cpp index 756d6a3c46d..6d813f878e5 100644 --- a/system/jlib/jlog.cpp +++ b/system/jlib/jlog.cpp @@ -413,7 +413,7 @@ StringBuffer & LogMsg::toStringPlain(StringBuffer & out, unsigned fields) const } if(fields & MSGFIELD_node) { - sysInfo.queryNode()->getUrlStr(out); + sysInfo.queryNode()->getEndpointHostText(out); out.append(" "); } if(fields & MSGFIELD_job) @@ -494,7 +494,7 @@ StringBuffer & LogMsg::toStringXML(StringBuffer & out, unsigned fields) const if(fields & MSGFIELD_node) { out.append("Node=\""); - sysInfo.queryNode()->getUrlStr(out); + sysInfo.queryNode()->getEndpointHostText(out); out.append("\" "); } #ifdef LOG_MSG_NEWLINE @@ -572,7 +572,7 @@ StringBuffer & LogMsg::toStringJSON(StringBuffer & out, unsigned fields) const if(fields & MSGFIELD_node) { out.append(", \"NODE\": \""); - sysInfo.queryNode()->getUrlStr(out); + sysInfo.queryNode()->getEndpointHostText(out); out.append("\""); } if(fields & MSGFIELD_job) @@ -643,7 +643,7 @@ StringBuffer & LogMsg::toStringTable(StringBuffer & out, unsigned fields) const if(fields & MSGFIELD_node) { size32_t len = out.length(); - sysInfo.queryNode()->getUrlStr(out); + sysInfo.queryNode()->getEndpointHostText(out); out.appendN(20 + len - out.length(), ' '); } if(fields & MSGFIELD_job) diff --git a/system/jlib/jsmartsock.cpp b/system/jlib/jsmartsock.cpp index 2c38088d2ea..9aee75ad527 100644 --- a/system/jlib/jsmartsock.cpp +++ b/system/jlib/jsmartsock.cpp @@ -353,7 +353,7 @@ ISocket *CSmartSocketFactory::connect_sock(unsigned timeoutms, SmartSocketEndpoi catch (IException *e) { StringBuffer s("CSmartSocketFactory::connect_sock "); - ep.getUrlStr(s); + ep.getEndpointHostText(s); EXCLOG(e,s.str()); ss->status=false; if (sock) @@ -477,7 +477,7 @@ StringBuffer & CSmartSocketFactory::getUrlStr(StringBuffer &url, bool useHostNam { sep->checkHost(dnsInterval); SocketEndpoint ep = sep->ep; - ep.getUrlStr(url); + ep.getEndpointHostText(url); } } return url; diff --git a/system/jlib/jsocket.cpp b/system/jlib/jsocket.cpp index 2dd7713d541..a8a2274cfb2 100644 --- a/system/jlib/jsocket.cpp +++ b/system/jlib/jsocket.cpp @@ -3857,7 +3857,7 @@ void SocketEndpoint::getEndpointHostText(char * str, size32_t len) const if (len==0) return; StringBuffer _str; - getUrlStr(_str); + getEndpointHostText(_str); size32_t l = _str.length()+1; if (l>len) { @@ -3868,7 +3868,7 @@ void SocketEndpoint::getEndpointHostText(char * str, size32_t len) const } // NB: this and getHostText returns stored hostname if available -StringBuffer &SocketEndpoint::getUrlStr(StringBuffer &str) const +StringBuffer &SocketEndpoint::getEndpointHostText(StringBuffer &str) const { getHostText(str); if (port) @@ -3896,7 +3896,7 @@ StringBuffer &conditionalGetHostUrlStr(StringBuffer &str, const SocketEndpoint & if (isContainerized()) return ep.getEndpointText(str); else - return ep.getUrlStr(str); + return ep.getEndpointHostText(str); } @@ -6364,7 +6364,7 @@ void multiConnect(const SocketEndpointArray &eps, IPointerArrayOf &rets void failed(unsigned idx,const SocketEndpoint &ep,int err) { StringBuffer s; - PROGLOG("multiConnect failed to %s with %d",ep.getUrlStr(s).str(),err); + PROGLOG("multiConnect failed to %s with %d",ep.getEndpointHostText(s).str(),err); } } notify(retsockets,sect); multiConnect(eps,notify,timeout); @@ -6393,7 +6393,7 @@ StringBuffer &SocketEndpointArray::getText(StringBuffer &text) const if (!count) return text; if (count==1) - return item(0).getUrlStr(text); + return item(0).getEndpointHostText(text); byte lastip[4]; const SocketEndpoint &first = item(0); bool lastis4 = first.getNetAddress(sizeof(lastip),&lastip)==sizeof(lastip); diff --git a/system/jlib/jsocket.hpp b/system/jlib/jsocket.hpp index aebc223e547..86b6f195880 100644 --- a/system/jlib/jsocket.hpp +++ b/system/jlib/jsocket.hpp @@ -165,7 +165,7 @@ class jlib_decl SocketEndpoint : extends IpAddress inline bool equals(const SocketEndpoint &ep) const { return ((port==ep.port)&&ipequals(ep)); } StringBuffer &getEndpointText(StringBuffer &str) const; void getEndpointHostText(char * str, size32_t len) const; // in form ip4:port or [ip6]:port - StringBuffer &getUrlStr(StringBuffer &str) const; // in form ip4:port or [ip6]:port + StringBuffer &getEndpointHostText(StringBuffer &str) const; // in form ip4:port or [ip6]:port inline SocketEndpoint & operator = ( const SocketEndpoint &other ) { diff --git a/system/mp/mpbase.cpp b/system/mp/mpbase.cpp index 086995fc54a..c5d34f76867 100644 --- a/system/mp/mpbase.cpp +++ b/system/mp/mpbase.cpp @@ -542,7 +542,7 @@ protected: friend class CNodeIterator; if (!count) return text; if (count==1) - return nodes[0]->endpoint().getUrlStr(text); + return nodes[0]->endpoint().getEndpointHostText(text); // following is rather slow maybe could do with more direct method with pointers TBD SocketEndpointArray epa; for(unsigned i=0;iget(s); - return s.getUrlStr(val); + return s.getEndpointHostText(val); } }; @@ -231,12 +231,12 @@ class DECL_EXCEPTION CMPException: public IMP_Exception, public CInterface StringBuffer tmp; switch (error) { case MPERR_ok: str.append("OK"); break; - case MPERR_connection_failed: str.appendf("MP connect failed (%s)",endpoint.getUrlStr(tmp).str()); break; + case MPERR_connection_failed: str.appendf("MP connect failed (%s)",endpoint.getEndpointHostText(tmp).str()); break; case MPERR_process_not_in_group: str.appendf("Current process not in Communicator group"); break; - case MPERR_protocol_version_mismatch: str.appendf("Protocol version mismatch (%s)",endpoint.getUrlStr(tmp).str()); break; + case MPERR_protocol_version_mismatch: str.appendf("Protocol version mismatch (%s)",endpoint.getEndpointHostText(tmp).str()); break; // process crashes (segv, etc.) often cause this exception which is logged and can be misleading // change it from "MP link closed" to something more helpful - case MPERR_link_closed: str.appendf("Unexpected process termination (ep:%s)",endpoint.getUrlStr(tmp).str()); break; + case MPERR_link_closed: str.appendf("Unexpected process termination (ep:%s)",endpoint.getEndpointHostText(tmp).str()); break; } return str; } @@ -766,7 +766,7 @@ void traceSlowReadTms(const char *msg, ISocket *sock, void *dst, size32_t minSiz { SocketEndpoint ep; sock->getPeerEndpoint(ep); - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); } WARNLOG("%s %s, stalled for %d ms so far", msg, epStr.str(), elapsedMs); } @@ -779,7 +779,7 @@ void traceSlowReadTms(const char *msg, ISocket *sock, void *dst, size32_t minSiz { SocketEndpoint ep; sock->getPeerEndpoint(ep); - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); } WARNLOG("%s %s, took: %d ms", msg, epStr.str(), readTmsTimer.elapsedMs()); } @@ -1038,7 +1038,7 @@ protected: friend class CMPPacketReader; { SocketEndpoint ep; newsock->getPeerEndpoint(ep); - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); } WARNLOG("MP: connect to: %s, stalled for %d ms so far", epStr.str(), msTick()-startMs); e->Release(); @@ -1074,7 +1074,7 @@ protected: friend class CMPPacketReader; { SocketEndpoint ep; newsock->getPeerEndpoint(ep); - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); } StringBuffer allowExcStr; exitException.setown(makeStringExceptionV(-99, "Error '%s' reading Allowlist exception from: %s", e->errorMessage(allowExcStr).str(), epStr.str())); @@ -1093,7 +1093,7 @@ protected: friend class CMPPacketReader; { SocketEndpoint ep; newsock->getPeerEndpoint(ep); - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); } WARNLOG("MP: connect to: %s, took: %d ms", epStr.str(), elapsedMs); } @@ -1282,7 +1282,7 @@ protected: friend class CMPPacketReader; return true; } StringBuffer ep; - remoteep.getUrlStr(ep); + remoteep.getEndpointHostText(ep); for (;;) { CTimeMon pingtm(1000*60); if (sendPing(pingtm)) @@ -1375,7 +1375,7 @@ protected: friend class CMPPacketReader; StringBuffer & queryEpStr(StringBuffer &s) { - return remoteep.getUrlStr(s); + return remoteep.getEndpointHostText(s); } bool isClosed() @@ -1466,7 +1466,7 @@ class MultiPacketHandler // TAG_SYS_MULTI if ((ms-lastErrMs) > 1000) // avoid logging too much { StringBuffer errorMsg("sender="); - msg.getSender().getUrlStr(errorMsg).newline(); + msg.getSender().getEndpointHostText(errorMsg).newline(); errorMsg.append("This header: "); mhdr.getDetails(errorMsg).newline(); if (otherMhdr) @@ -1847,8 +1847,8 @@ bool CMPChannel::attachSocket(ISocket *newsock,const SocketEndpoint &_remoteep,c StringBuffer ep1; StringBuffer ep2; - _localep.getUrlStr(ep1); - _remoteep.getUrlStr(ep2); + _localep.getEndpointHostText(ep1); + _remoteep.getEndpointHostText(ep2); LOG(MCdebugInfo, unknownJob, "MP: Possible clash between %s->%s %d(%d)",ep1.str(),ep2.str(),(int)ismaster,(int)master); try { @@ -2263,7 +2263,7 @@ int CMPConnectThread::run() { // not sure how to get here as this is not one of the possible outcomes of above: rd == 0 or rd == sizeof(id) or an exception StringBuffer errMsg("MP Connect Thread: invalid number of connection bytes serialized from "); - peerEp.getUrlStr(errMsg); + peerEp.getEndpointHostText(errMsg); FLLOG(MCoperatorWarning, unknownJob, "%s", errMsg.str()); sock->close(); continue; @@ -2320,14 +2320,14 @@ int CMPConnectThread::run() { // JCSMORE, I think _remoteep really must/should match a IP of this local host errMsg.append("MP Connect Thread: invalid remote and/or host ep serialized from "); - peerEp.getUrlStr(errMsg); + peerEp.getEndpointHostText(errMsg); FLLOG(MCoperatorWarning, unknownJob, "%s", errMsg.str()); } else if (parent->mpTraceLevel >= MPVerboseMsgThreshold) { // all zeros msg received errMsg.append("MP Connect Thread: connect with empty msg received, assumed port monitor check from "); - peerEp.getUrlStr(errMsg); + peerEp.getEndpointHostText(errMsg); PROGLOG("%s", errMsg.str()); } sock->close(); diff --git a/system/mp/mplog.cpp b/system/mp/mplog.cpp index c9d90ccc59b..efb0e3765e5 100644 --- a/system/mp/mplog.cpp +++ b/system/mp/mplog.cpp @@ -368,7 +368,7 @@ void LinkToParentLogMsgHandler::addToPTree(IPropertyTree * tree) const IPropertyTree * handlerTree = createPTree(ipt_caseInsensitive); handlerTree->setProp("@type", "linktoparent"); StringBuffer buff; - parentNode->endpoint().getUrlStr(buff); + parentNode->endpoint().getEndpointHostText(buff); handlerTree->setProp("@url", buff.str()); tree->addPropTree("handler", handlerTree); } diff --git a/system/mp/test/mptest.cpp b/system/mp/test/mptest.cpp index c3ed6b45ad7..f9dcece1760 100644 --- a/system/mp/test/mptest.cpp +++ b/system/mp/test/mptest.cpp @@ -309,7 +309,7 @@ void Test6(IGroup *group,ICommunicator *comm) StringAttr str; mb.read(str); StringBuffer url; - PROGLOG("(6) Received '%s' from %s",str.get(),mb.getSender().getUrlStr(url).str()); + PROGLOG("(6) Received '%s' from %s",str.get(),mb.getSender().getEndpointHostText(url).str()); } else if (group->rank()==0) { @@ -452,7 +452,7 @@ void MultiTest(ICommunicator *_comm) break; PROGLOG("MPTEST: MultiTest server Received from %u, len = %u",rr, mb.length()); StringBuffer str; - comm->queryGroup().queryNode(rr).endpoint().getUrlStr(str); + comm->queryGroup().queryNode(rr).endpoint().getEndpointHostText(str); // PROGLOG("MPTEST: MultiTest server Received from %s",str.str()); buff->deserialize(mb); @@ -1721,7 +1721,7 @@ int main(int argc, char* argv[]) for (rank_t k=0;kqueryNode(copy); if (node) - checker->add(copy,"queryNode",node->endpoint().getUrlStr(tmp.clear()).str()); + checker->add(copy,"queryNode",node->endpoint().getEndpointHostText(tmp.clear()).str()); else checker->error("missing node"); checker->add(copy,"getFilename",part->getFilename(rfn,copy).getRemotePath(tmp.clear()).str()); diff --git a/thorlcr/activities/hashdistrib/thhashdistribslave.cpp b/thorlcr/activities/hashdistrib/thhashdistribslave.cpp index 567a270b6db..5abef028f6f 100644 --- a/thorlcr/activities/hashdistrib/thhashdistribslave.cpp +++ b/thorlcr/activities/hashdistrib/thhashdistribslave.cpp @@ -1247,7 +1247,7 @@ class CDistributorBase : implements IHashDistributor, implements IExceptionHandl catch (IException *e) { StringBuffer senderStr; - activity->queryContainer().queryJob().queryJobGroup().queryNode(n+1).endpoint().getUrlStr(senderStr); + activity->queryContainer().queryJob().queryJobGroup().queryNode(n+1).endpoint().getEndpointHostText(senderStr); IException *e2 = MakeActivityException(activity, e, "Received from node: %s", senderStr.str()); e->Release(); throw e2; diff --git a/thorlcr/activities/result/thresult.cpp b/thorlcr/activities/result/thresult.cpp index 83d1c5fd60f..6322880343f 100644 --- a/thorlcr/activities/result/thresult.cpp +++ b/thorlcr/activities/result/thresult.cpp @@ -57,7 +57,7 @@ class CResultActivityMaster : public CMasterActivity CMessageBuffer mb; if (abortSoon || !receiveMsg(mb, RANK_ALL, replyTag, NULL)) break; StringBuffer str; - mb.getSender().getUrlStr(str); + mb.getSender().getEndpointHostText(str); size32_t sz; mb.read(sz); if (sz) diff --git a/thorlcr/graph/thgraphmaster.cpp b/thorlcr/graph/thgraphmaster.cpp index fe7ed508848..696472f604f 100644 --- a/thorlcr/graph/thgraphmaster.cpp +++ b/thorlcr/graph/thgraphmaster.cpp @@ -290,7 +290,7 @@ void CSlaveMessageHandler::threadmain() Owned e = deserializeThorException(msg); e->setSlave(slave); StringBuffer tmpStr("Slave "); - job.queryJobGroup().queryNode(slave).endpoint().getUrlStr(tmpStr); + job.queryJobGroup().queryNode(slave).endpoint().getEndpointHostText(tmpStr); GraphPrintLog(graph, e, "%s", tmpStr.append(": slave initialization error").str()); throw e.getClear(); } @@ -2530,7 +2530,7 @@ void CMasterGraph::sendActivityInitData() if (!queryJobChannel().queryJobComm().send(msg, w+1, mpTag, LONGTIMEOUT)) { StringBuffer epStr; - throw MakeStringException(0, "Timeout sending to slave %s", job.querySlaveGroup().queryNode(w).endpoint().getUrlStr(epStr).str()); + throw MakeStringException(0, "Timeout sending to slave %s", job.querySlaveGroup().queryNode(w).endpoint().getEndpointHostText(epStr).str()); } ++sentTo; } @@ -2557,7 +2557,7 @@ void CMasterGraph::sendActivityInitData() if (!e.get()) { StringBuffer tmpStr("Slave "); - queryJob().queryJobGroup().queryNode(sender).endpoint().getUrlStr(tmpStr); + queryJob().queryJobGroup().queryNode(sender).endpoint().getEndpointHostText(tmpStr); GraphPrintLog(se, "%s", tmpStr.append(": slave initialization error").str()); e.setown(se.getClear()); } diff --git a/thorlcr/graph/thgraphslave.cpp b/thorlcr/graph/thgraphslave.cpp index cf6aa750fa5..afcc66595aa 100644 --- a/thorlcr/graph/thgraphslave.cpp +++ b/thorlcr/graph/thgraphslave.cpp @@ -1795,7 +1795,7 @@ void CJobSlave::startJob() SocketEndpoint ep; ep.setLocalHost(0); StringBuffer s; - throw MakeThorException(TE_NotEnoughFreeSpace, "Node %s has %u MB(s) of available disk space, specified minimum for this job: %u MB(s)", ep.getUrlStr(s).str(), (unsigned) freeSpace / 0x100000, minFreeSpace); + throw MakeThorException(TE_NotEnoughFreeSpace, "Node %s has %u MB(s) of available disk space, specified minimum for this job: %u MB(s)", ep.getEndpointHostText(s).str(), (unsigned) freeSpace / 0x100000, minFreeSpace); } } queryThor().queryKeyedJoinService().setCurrentJob(*this); diff --git a/thorlcr/master/mawatchdog.cpp b/thorlcr/master/mawatchdog.cpp index 61697380b4b..5b756d168f2 100644 --- a/thorlcr/master/mawatchdog.cpp +++ b/thorlcr/master/mawatchdog.cpp @@ -54,7 +54,7 @@ class CMachineStatus { markdead = false; StringBuffer epstr; - ep.getUrlStr(epstr); + ep.getEndpointHostText(epstr); LOG(MCdebugProgress, thorJob, "Watchdog : Marking Machine as Up! [%s]", epstr.str()); } } @@ -149,7 +149,7 @@ void CMasterWatchdogBase::checkMachineStatus() if (!mstate->alive) { StringBuffer epstr; - mstate->ep.getUrlStr(epstr); + mstate->ep.getEndpointHostText(epstr); if (mstate->markdead) abortThor(MakeThorOperatorException(TE_AbortException, "Watchdog has lost contact with Thor slave: %s (Process terminated or node down?)", epstr.str()), TEC_Watchdog); else @@ -224,7 +224,7 @@ void CMasterWatchdogBase::threadmain() else { StringBuffer epstr; - hb.sender.getUrlStr(epstr); + hb.sender.getEndpointHostText(epstr); LOG(MCdebugProgress, thorJob, "Watchdog : Unknown Machine! [%s]", epstr.str()); //TBD } } @@ -251,7 +251,7 @@ void CMasterWatchdogBase::threadmain() { const SocketEndpoint &ep = e->queryEndpoint(); StringBuffer epStr; - ep.getUrlStr(epStr); + ep.getEndpointHostText(epStr); abortThor(MakeThorOperatorException(TE_AbortException, "Watchdog has lost connectivity with Thor slave: %s (Process terminated or node down?)", epStr.str()), TEC_Watchdog); } } diff --git a/thorlcr/master/thgraphmanager.cpp b/thorlcr/master/thgraphmanager.cpp index 3f528c10974..29d31081e68 100644 --- a/thorlcr/master/thgraphmanager.cpp +++ b/thorlcr/master/thgraphmanager.cpp @@ -587,7 +587,7 @@ void CJobManager::run() conversation.clear(); SocketEndpoint masterEp(getMasterPortBase()); StringBuffer url; - PROGLOG("ThorLCR(%s) available, waiting on queue %s",masterEp.getUrlStr(url).str(),queueName.get()); + PROGLOG("ThorLCR(%s) available, waiting on queue %s",masterEp.getEndpointHostText(url).str(),queueName.get()); struct CLock { @@ -787,7 +787,7 @@ bool CJobManager::doit(IConstWorkUnit *workunit, const char *graphName, const So StringAttr wuid(workunit->queryWuid()); StringAttr user(workunit->queryUser()); - LOG(MCdebugInfo, thorJob, "Processing wuid=%s, graph=%s from agent: %s", wuid.str(), graphName, agentep.getUrlStr(s).str()); + LOG(MCdebugInfo, thorJob, "Processing wuid=%s, graph=%s from agent: %s", wuid.str(), graphName, agentep.getEndpointHostText(s).str()); LOG(MCauditInfo,",Progress,Thor,Start,%s,%s,%s,%s,%s,%s", queryServerStatus().queryProperties()->queryProp("@thorname"), wuid.str(), @@ -882,7 +882,7 @@ void CJobManager::reply(IConstWorkUnit *workunit, const char *wuid, IException * else s.append("Posting OK"); s.append(" to agent "); - agentep.getUrlStr(s); + agentep.getEndpointHostText(s); s.append(" for workunit(").append(wuid).append(")"); PROGLOG("%s", s.str()); MemoryBuffer replyMb; @@ -924,7 +924,7 @@ void CJobManager::reply(IConstWorkUnit *workunit, const char *wuid, IException * replyMb.append((unsigned)DAMP_THOR_REPLY_GOOD); if (!conversation->send(replyMb)) { s.clear(); - IERRLOG("Failed to reply to agent %s",agentep.getUrlStr(s).str()); + IERRLOG("Failed to reply to agent %s",agentep.getEndpointHostText(s).str()); } conversation.clear(); handlingConversation = false; @@ -1359,7 +1359,7 @@ void thorMain(ILogMsgHandler *logHandler, const char *wuid, const char *graphNam thorQueue->connect(false); } - queryMyNode()->endpoint().getUrlStr(instance); + queryMyNode()->endpoint().getEndpointHostText(instance); StringBuffer currentGraphName(graphName); StringBuffer currentWuid(wuid); diff --git a/thorlcr/master/thmastermain.cpp b/thorlcr/master/thmastermain.cpp index 2347f46e76f..3dcafa6a2ba 100644 --- a/thorlcr/master/thmastermain.cpp +++ b/thorlcr/master/thmastermain.cpp @@ -181,7 +181,7 @@ class CRegistryServer : public CSimpleInterface rank_t sender = queryNodeGroup().rank(senderNode); SocketEndpoint ep = senderNode->endpoint(); StringBuffer url; - ep.getUrlStr(url); + ep.getEndpointHostText(url); if (RANK_NULL == sender) { PROGLOG("Node %s trying to deregister is not part of this cluster", url.str()); @@ -235,7 +235,7 @@ class CRegistryServer : public CSimpleInterface { const SocketEndpoint &ep = queryNodeGroup().queryNode(slave+1).endpoint(); StringBuffer url; - ep.getUrlStr(url); + ep.getEndpointHostText(url); if (!status->test(slave)) { PROGLOG("Slave %d (%s) trying to unregister, but not currently registered", slave+1, url.str()); @@ -252,7 +252,7 @@ class CRegistryServer : public CSimpleInterface { SocketEndpoint ep = queryNodeGroup().queryNode(slave+1).endpoint(); StringBuffer url; - ep.getUrlStr(url); + ep.getEndpointHostText(url); if (status->test(slave)) { PROGLOG("Slave %d (%s) already registered, rejecting", slave+1, url.str()); @@ -285,7 +285,7 @@ class CRegistryServer : public CSimpleInterface if (NotFound != connectedSlaves.find(sender)) { StringBuffer epStr; - PROGLOG("Same slave registered twice!! : %s", sender->endpoint().getUrlStr(epStr).str()); + PROGLOG("Same slave registered twice!! : %s", sender->endpoint().getEndpointHostText(epStr).str()); return false; } @@ -316,7 +316,7 @@ class CRegistryServer : public CSimpleInterface connectedSlaves.replace(sender.getLink(), pos); } StringBuffer epStr; - PROGLOG("Slave %u connected from %s", slaveNum, sender->endpoint().getUrlStr(epStr).str()); + PROGLOG("Slave %u connected from %s", slaveNum, sender->endpoint().getEndpointHostText(epStr).str()); --remaining; } assertex(slaves == connectedSlaves.ordinality()); @@ -396,12 +396,12 @@ class CRegistryServer : public CSimpleInterface break; s = ns+1; StringBuffer str; - PROGLOG("Slave %d (%s)", s, queryNodeGroup().queryNode(s).endpoint().getUrlStr(str.clear()).str()); + PROGLOG("Slave %d (%s)", s, queryNodeGroup().queryNode(s).endpoint().getEndpointHostText(str.clear()).str()); } throw MakeThorException(TE_AbortException, "Slaves failed to respond to cluster initialization"); } StringBuffer str; - PROGLOG("Registration confirmation from %s", queryNodeGroup().queryNode(sender).endpoint().getUrlStr(str).str()); + PROGLOG("Registration confirmation from %s", queryNodeGroup().queryNode(sender).endpoint().getEndpointHostText(str).str()); if (msg.length()) { Owned e = deserializeException(msg); @@ -984,7 +984,7 @@ int main( int argc, const char *argv[] ) thorJob.setJobID(thorJobId); setDefaultJobId(thorJobId); StringBuffer thorEpStr; - LOG(MCdebugProgress, thorJob, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getUrlStr(thorEpStr).str()); + LOG(MCdebugProgress, thorJob, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getEndpointHostText(thorEpStr).str()); LOG(MCdebugProgress, thorJob, "Thor name = %s, queue = %s, nodeGroup = %s",thorname,queueName.str(),nodeGroup.str()); unsigned numWorkersPerPod = 1; @@ -1033,7 +1033,7 @@ int main( int argc, const char *argv[] ) else { StringBuffer thorEpStr; - LOG(MCdebugProgress, thorJob, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getUrlStr(thorEpStr).str()); + LOG(MCdebugProgress, thorJob, "ThorMaster version %d.%d, Started on %s", THOR_VERSION_MAJOR,THOR_VERSION_MINOR,thorEp.getEndpointHostText(thorEpStr).str()); LOG(MCdebugProgress, thorJob, "Thor name = %s, queue = %s, nodeGroup = %s",thorname,queueName.str(),nodeGroup.str()); unsigned localThorPortInc = globals->getPropInt("@localThorPortInc", DEFAULT_SLAVEPORTINC); unsigned slaveBasePort = globals->getPropInt("@slaveport", DEFAULT_THORSLAVEPORT); diff --git a/thorlcr/msort/tsortm.cpp b/thorlcr/msort/tsortm.cpp index 893d3945573..4c346539ece 100644 --- a/thorlcr/msort/tsortm.cpp +++ b/thorlcr/msort/tsortm.cpp @@ -268,7 +268,7 @@ class CSortMaster : public IThorSorterMaster, public CSimpleInterface CSortNode &slave = slaves.item(i); if (!slave.doConnect(i,slaves.ordinality())) { char url[100]; - slave.endpoint.getUrlStr(url,sizeof(url)); + slave.endpoint.getEndpointHostText(url,sizeof(url)); throw MakeActivityException(owner.activity,TE_CannotConnectToSlave,"CSortMaster::ConnectSlaves: Could not connect to %s",url); } } @@ -1235,7 +1235,7 @@ class CSortMaster : public IThorSorterMaster, public CSimpleInterface if (slave.scale!=mostspilt+1) { char url[100]; - slave.endpoint.getUrlStr(url,sizeof(url)); + slave.endpoint.getEndpointHostText(url,sizeof(url)); ActPrintLog(activity, "Gather - node %s spilled %d times to disk",url,slave.scale-1); } } @@ -1305,7 +1305,7 @@ class CSortMaster : public IThorSorterMaster, public CSimpleInterface { CSortNode &slave = slaves.item(i); char url[100]; - slave.endpoint.getUrlStr(url,sizeof(url)); + slave.endpoint.getEndpointHostText(url,sizeof(url)); ActPrintLog(activity, thorDetailedLogLevel, "Split point %d: %" RCPF "d rows on %s", i, tot[i], url); } } @@ -1331,7 +1331,7 @@ class CSortMaster : public IThorSorterMaster, public CSimpleInterface { CSortNode &slave = slaves.item(i); char url[100]; - slave.endpoint.getUrlStr(url,sizeof(url)); + slave.endpoint.getEndpointHostText(url,sizeof(url)); if (splitMapUpper) slave.MultiMergeBetween(total, numnodes*numnodes,splitMap,splitMapUpper,numnodes,endpoints.get()); else diff --git a/thorlcr/msort/tsortmp.cpp b/thorlcr/msort/tsortmp.cpp index 3280be77703..957ec55b238 100644 --- a/thorlcr/msort/tsortmp.cpp +++ b/thorlcr/msort/tsortmp.cpp @@ -301,7 +301,7 @@ bool SortSlaveMP::marshall(ISortSlaveMP &slave, ICommunicator* comm, mptag_t tag mbout.append(okout); #ifdef FULLTRACE StringBuffer tmp1; - LOG(MCthorDetailedDebugInfo, thorJob, ">SortSlaveMP::marshall(%d) got %d from %s tag %d replytag %d",(int)fn, mb.length(), mb.getSender().getUrlStr(tmp1).str(),tag,mb.getReplyTag()); + LOG(MCthorDetailedDebugInfo, thorJob, ">SortSlaveMP::marshall(%d) got %d from %s tag %d replytag %d",(int)fn, mb.length(), mb.getSender().getEndpointHostText(tmp1).str(),tag,mb.getReplyTag()); #endif bool replydone = false; Owned err; @@ -531,7 +531,7 @@ bool SortSlaveMP::marshall(ISortSlaveMP &slave, ICommunicator* comm, mptag_t tag if (!replydone) { #ifdef FULLTRACE StringBuffer tmp1; - LOG(MCthorDetailedDebugInfo, thorJob, "reply(mbout); } diff --git a/thorlcr/msort/tsorts1.cpp b/thorlcr/msort/tsorts1.cpp index 3e3ed4a3479..e62a41aa049 100644 --- a/thorlcr/msort/tsorts1.cpp +++ b/thorlcr/msort/tsorts1.cpp @@ -59,7 +59,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream { endpoint = targetep; char url[100]; - targetep.getUrlStr(url,sizeof(url)); + targetep.getEndpointHostText(url,sizeof(url)); LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: Stream(%u) %s, pos=%" RCPF "d len=%" RCPF "u",streamno,url,startrec,numrecs); SocketEndpoint mergeep = targetep; mergeep.port+=SOCKETSERVERINC; @@ -92,7 +92,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream { if (stream) { char url[100]; - endpoint.getUrlStr(url,sizeof(url)); + endpoint.getEndpointHostText(url,sizeof(url)); DBGLOG("SORT Merge READ: EOS via destructor for %s",url); stream->stop(); } @@ -107,7 +107,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream return row.getClear(); #ifdef _FULL_TRACE char url[100]; - endpoint.getUrlStr(url,sizeof(url)); + endpoint.getEndpointHostText(url,sizeof(url)); LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: EOS for %s",url); #endif eos(); @@ -120,7 +120,7 @@ class CMergeReadStream : public CSimpleInterface, public IRowStream if (stream) { #ifdef _FULL_TRACE char url[100]; - endpoint.getUrlStr(url,sizeof(url)); + endpoint.getEndpointHostText(url,sizeof(url)); LOG(MCthorDetailedDebugInfo, thorJob, "SORT Merge READ: stop for %s",url); #endif stream->stop(); diff --git a/thorlcr/slave/thslavemain.cpp b/thorlcr/slave/thslavemain.cpp index 2d055c94719..dccf3e0d100 100644 --- a/thorlcr/slave/thslavemain.cpp +++ b/thorlcr/slave/thslavemain.cpp @@ -84,7 +84,7 @@ static void replyError(unsigned errorCode, const char *errorMsg) { SocketEndpoint myEp = queryMyNode()->endpoint(); StringBuffer str("Node '"); - myEp.getUrlStr(str); + myEp.getEndpointHostText(str); str.append("' exception: ").append(errorMsg); Owned e = MakeStringException(errorCode, "%s", str.str()); CMessageBuffer msg; @@ -98,7 +98,7 @@ static bool RegisterSelf(SocketEndpoint &masterEp) { StringBuffer slfStr; StringBuffer masterStr; - LOG(MCdebugProgress, thorJob, "registering %s - master %s",slfEp.getUrlStr(slfStr).str(),masterEp.getUrlStr(masterStr).str()); + LOG(MCdebugProgress, thorJob, "registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); try { SocketEndpoint ep = masterEp; @@ -233,7 +233,7 @@ bool UnregisterSelf(IException *e) return false; StringBuffer slfStr; - slfEp.getUrlStr(slfStr); + slfEp.getEndpointHostText(slfStr); LOG(MCdebugProgress, thorJob, "Unregistering slave : %s", slfStr.str()); try { diff --git a/thorlcr/thorcodectx/thcodectx.cpp b/thorlcr/thorcodectx/thcodectx.cpp index 4d0fa79951b..797e1e0767a 100644 --- a/thorlcr/thorcodectx/thcodectx.cpp +++ b/thorlcr/thorcodectx/thcodectx.cpp @@ -84,7 +84,7 @@ char *CThorCodeContextBase::getDaliServers() first = false; else dali.append(','); - coven->query().endpoint().getUrlStr(dali); + coven->query().endpoint().getEndpointHostText(dali); } return dali.detach(); } diff --git a/thorlcr/thorutil/thormisc.cpp b/thorlcr/thorutil/thormisc.cpp index df7463f4ec7..f2c6c2a2343 100644 --- a/thorlcr/thorutil/thormisc.cpp +++ b/thorlcr/thorutil/thormisc.cpp @@ -347,13 +347,13 @@ class DECL_EXCEPTION CThorException : public CSimpleInterface, implements IThorE { unsigned node = (unsigned)-slave; str.appendf("NODE #%d [", node); - queryNodeGroup().queryNode(node).endpoint().getUrlStr(str); + queryNodeGroup().queryNode(node).endpoint().getEndpointHostText(str); str.append("]: "); } else { str.appendf("SLAVE #%d [", slave); - queryClusterGroup().queryNode(slave).endpoint().getUrlStr(str); + queryClusterGroup().queryNode(slave).endpoint().getEndpointHostText(str); str.append("]: "); } }