-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-27843 CLI support for specifying remote storage instead of DALI #17813
HPCC-27843 CLI support for specifying remote storage instead of DALI #17813
Conversation
https://track.hpccsystems.com/browse/HPCC-28373 |
40b0eb1
to
d048f94
Compare
@ghalliday @jakesmith this change is intended only to replace usage of remote DALI with DFS (via a remote storage definition). It's not a reinvention of how data gets onto roxie on the cloud. That is something we may want to discuss at the offsite. Also note, this is step 1, getting the file meta-data or DFU workunits in place. Roxie actually copying from remote needs testing once this is in place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afishbeck looks good. A couple of items of debug tracing left in. Jake needs to check the logic, I was mainly looking for flaws in the code.
if (tree) | ||
{ | ||
processRemoteFileTree(tree, srcCluster, subfiles); | ||
DBGLOG("RemoteDALI xml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it should be removed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, removed.
if (tree) | ||
{ | ||
remoteStorage.set(remoteStorageName); | ||
DBGLOG("RemoteStorage xml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, should be deleted?
else | ||
resolveLocal(locations, srcCluster, user, subfiles); | ||
} | ||
|
||
void ReferencedFile::resolve(const char *dstCluster, const char *srcCluster, IUserDescriptor *user, INode *remote, const char *remotePrefix, bool checkLocalFirst, StringArray *subfiles, bool _trackSubFiles, bool resolveForeign) | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should now be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afishbeck - looks sensible overall, some minor comments/questions.
StringAttrBuilder logicalNameText(logicalName), daliipText(daliip); | ||
logicalNameText.set(skipForeign(lfn, &daliipText)).toLowerCase(); | ||
StringAttrBuilder logicalNameText(logicalName), daliipText(daliip), remoteStorageText(remoteStorage); | ||
logicalNameText.set(skipForeignOrRemote(lfn, &daliipText, &remoteStorageText)).toLowerCase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not for now, but it feels like checkForeign/skipNextLfnScope/skipForeignOrRemote should be either using similar functionality already in CDfsLogicalFileName, or for these logical file helpers to be commoned up and moved there.
|
||
virtual bool needsCopying(bool cloneForeign) const override; | ||
|
||
virtual const char *getLogicalName() const {return logicalName.str();} | ||
virtual unsigned getFlags() const {return flags;} | ||
virtual const SocketEndpoint &getForeignIP(SocketEndpoint &ep) const | ||
{ | ||
if ((flags & RefFileForeign) && daliip.length()) | ||
if ((flags & RefFileLFNForeign) && daliip.length()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe not new, code implies RefFileLFNForeign flag can be set and daliip empty, is that possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right it doesn't look possible. I would like to clean this up, but since it's existing (overly defensive code) I would prefer to do it separately from adding this new feature.
dali/dfu/dfuutil.cpp
Outdated
if (tree) | ||
ftree.setown(tree->getPropTree("File")); | ||
if (!ftree.get()) | ||
throw MakeStringException(-1,"Source file %s could not be found in Remote Storage", remoteLFN.str()); //remote scope already included in remoteLFN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use makeStringExceptionV
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now we have a exceptionHandler mechansim (and it's always been a good idea, we're just lazy ;)) - it would be good to add meaningful error codes (based on ranges in errrorlist.h)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. It might make sense to do all of dfuutil.cpp at once.
I've created a jira: https://track.hpccsystems.com/browse/HPCC-30410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afishbeck - looks good, a couple of trivial comments + 1 question - but could be merged now after squashing afaics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes following my comments look good
@afishbeck the build failure looks like it may be related. |
@jakesmith @ghalliday I did some trivial fixes based on Jake's comments and added the expert config section to ESP. I'll squash after tomorrow mornings meeting with Gavin. |
9d186a8
to
3d32a50
Compare
@afishbeck - looks good to squash, passes tests bar the docker 'no space left on device' issue. |
Signed-off-by: Anthony Fishbeck <[email protected]>
3d32a50
to
8071bf5
Compare
b73ac78
into
hpcc-systems:candidate-9.4.x
Type of change:
Checklist:
Smoketest:
Testing: