rdblue commented on a change in pull request #688: [ISSUE #672] Add
SupportsNamespaces for 'HadoopCatalog' and 'HiveCatalog'
URL: https://github.com/apache/incubator-iceberg/pull/688#discussion_r360475578
##########
File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java
##########
@@ -98,14 +109,13 @@ protected String name() {
Preconditions.checkArgument(namespace.levels().length >= 1,
"Missing database in table identifier: %s", namespace);
- Joiner slash = Joiner.on("/");
- Path nsPath = new Path(slash.join(warehouseLocation,
slash.join(namespace.levels())));
+ Path nsPath = new Path(SLASH.join(warehouseLocation,
SLASH.join(namespace.levels())));
FileSystem fs = Util.getFs(nsPath, conf);
Set<TableIdentifier> tblIdents = Sets.newHashSet();
try {
if (!fs.exists(nsPath) || !fs.isDirectory(nsPath)) {
- throw new NotFoundException("Unknown namespace " + namespace);
+ throw new NoSuchNamespaceException("namespace does not exist: " +
namespace.toString());
Review comment:
Error messages should use sentence case. Please capitalize `Namespace` here.
Also, omit `toString` when it is automatically called, as with string
concatenation.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]