-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Hadoop: Log where the missing metadata file is located #11643
Conversation
.isInstanceOf(ValidationException.class) | ||
.hasMessage( | ||
"Metadata file for version 3 is missing under " | ||
+ (new Path(tableLocation, "metadata"))); |
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.
isn't this already defined with the metadataDir
variable?
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.
metadataDir
is of type File
, whose toString
result is different from that of Path
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.
what about metadataDir.toPath().toString()
?
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.
toPath
doesn't change the output.
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.
I'm not sure what exactly you mean by output
here. I'm guessing you don't have a file URI and are therefore missing the file:
prefix. In that case you could still replace this with metadataDir.toURI()
.
I'm ok either way, but I'd at least remove the outer () to have new Path(tableLocation, "metadata")
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.
Updated. metadataDir.toURI()
will have a trailing /
@nastra any more comments? |
eb017a4
to
047fc2b
Compare
Currently, in
HadoopTableOperations
when the metadata file is missing, we can't know where it's located. This PR adds metadata location to the exception message. Besides, a UT is added for metedata file missing.cc @pvary