-
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-30285 Default cloud logical files to compressed #17770
HPCC-30285 Default cloud logical files to compressed #17770
Conversation
https://track.hpccsystems.com/browse/HPCC-30285 |
@ghalliday - please review. As part of this, I added a new exception and restructured the exception headers (and numbers for Thor exception codes). |
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.
@jakesmith looks good. Main comment/question is whether checking the consistency of the compress options is helpful.
ecl/hql/hqlgram.y
Outdated
$$.setExpr(createAttribute(__compressed__Atom)); | ||
$$.setPosition($1); | ||
| compressionOptions | ||
{ |
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.
production is better removed - i.e. remove { ... }
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.
will remove
@@ -11763,6 +11763,7 @@ static void getTokenText(StringBuffer & msg, int token) | |||
case TOK_TRUE: msg.append("TRUE"); break; | |||
case TYPE: msg.append("TYPE"); break; | |||
case TYPEOF: msg.append("TYPEOF"); break; | |||
case UNCOMPRESSED: msg.append("UNCOMPRESSED"); break; |
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 needs to be added to reservedwords.cpp
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.
will add
ecl/hthor/hthor.cpp
Outdated
clusterHandler.setown(new CHThorClusterWriteHandler(lfn, "OUTPUT", agent)); | ||
} | ||
clusterHandler->addCluster(cluster); | ||
Owned<IPropertyTree> plane = getStoragePlane(cluster); | ||
bool thisPlaneCompressed = plane ? plane->getPropBool("@compressLogicalFiles") : false; |
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.
Add a comment to indicate this is checking the consistency, rather than determining whether it should be compressed. (I wondered why it wasn't using a default.)
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.
will add comment
ecl/hthor/hthor.cpp
Outdated
if (1 == clusterIdx) | ||
outputPlaneCompressed = thisPlaneCompressed; | ||
else if (outputPlaneCompressed != thisPlaneCompressed) | ||
throw makeStringExceptionV(ENGINEERR_MIXED_COMPRESSED_WRITE, "Writing to planes with mixed compression is not supported %s", lfn); |
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.
Is this a helpful error, or should it just use the compression from the 1st plane? The option on the plane only provides the default.
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.
could do, I think this is unlikely to be hit, because we don't support multiple plane output in cloud in other places at the moment (e.g. :
HPCC-Platform/common/thorhelper/roxiehelper.cpp
Line 2467 in a93c407
throw MakeStringException(0, "Container mode does not yet support output to multiple clusters while writing file %s)", |
But, I thought it better to check and throw an early error, rather than continue, and at some later point cause confusion.
ecl/hthor/hthor.cpp
Outdated
{ | ||
StringArray clusterNames; | ||
clusterHandler->getClusters(clusterNames); | ||
planeName.set(clusterNames.item(0)); // NB: only bother with 1st, if multilple createClusterWriteHandler validates if same |
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.
typo: multiple
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.
will fix
} | ||
else | ||
getDefaultStoragePlane(planeName); | ||
bool outputCompressionDefault = agent.queryWorkUnit()->getDebugValueBool("compressAllOutputs", isContainerized()); |
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.
Is the workunit option useful? Not convinced, but may as well leave it in.
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.
it isn't useful in cloud, but it would the current way to change the default in bare-metal since you can't configure planes there.
@ghalliday - please see new commit and replies to comments. |
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 look good. I don't think throwing an error is very helpful - they can write files with a different compression by using an ecl attribute - so it isn't something that should be illegal. Maybe a warning - but then again I think it is very unlikely to be hit.
agree, not helpful/right, have removed multi-plane consistency checks and defaulted the default to 1st plane. |
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.
@jakesmith please squash
@jakesmith xmlread.ecl failing may be relevant... |
a107825
to
f4464d0
Compare
@ghalliday - it was being caused wrong #onwarning numbers in the regression tests, which was due to the movement of the thor error number range (which was previously overlapped with another range in errorlist.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.
Please squash
Configurable via plane attribute 'compressLogicalFiles' Signed-off-by: Jake Smith <[email protected]>
f4464d0
to
60885c5
Compare
@ghalliday - squashed. |
I've checked there are no problems with the compiler regression suite. |
f579ce6
into
hpcc-systems:candidate-9.4.x
Configurable via plane attribute 'compressLogicalFiles'
Type of change:
Checklist:
Smoketest:
Testing: