You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/07/23 16:59:40 UTC
[GitHub] [accumulo] ctubbsii edited a comment on issue #1286: Bulk importing
empty directory resulted in error
ctubbsii edited a comment on issue #1286: Bulk importing empty directory resulted in error
URL: https://github.com/apache/accumulo/issues/1286#issuecomment-514295812
> I am leaning twoards succeeding on an empty directory because it makes it easier for user to write idempotent code.
It also makes it easier for the user to unintentionally write code like:
```java
String dir;
while (dirs.hasMoreDirs()) {
dirs.nextDir(); // forgot to assign to `dir`
bulkImport(dir); // no indication whatsoever that there's a problem
}
```
At least a `WARN` would be nice, but an explicit parameter to succeed or fail on empty directories would probably be better if you wanted to support idempotency.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services