ArbaazKhan1 commented on code in PR #5197:
URL: https://github.com/apache/accumulo/pull/5197#discussion_r2070754974
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/LoadMappingIterator.java:
##########
@@ -72,12 +76,30 @@ public boolean hasNext() {
@Override
public Map.Entry<KeyExtent,Bulk.Files> next() {
- Bulk.Mapping bm = gson.fromJson(reader, Bulk.Mapping.class);
- if (renameMap != null) {
- return new AbstractMap.SimpleEntry<>(bm.getKeyExtent(tableId),
- bm.getFiles().mapNames(renameMap));
- } else {
- return new AbstractMap.SimpleEntry<>(bm.getKeyExtent(tableId),
bm.getFiles());
+ try {
+ Bulk.Mapping bm = gson.fromJson(reader, Bulk.Mapping.class);
+ if (bm == null) {
+ throw new NoSuchElementException("No more elements in input");
+ }
Review Comment:
I got rid of this check. When I was testing for when bm would be null it
kept getting caught by the ParesJsonException and returning the
IllegalStateException. So I don't know if this is necessary since I don't its
ever reaching here.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]