EdColeman commented on a change in pull request #2569:
URL: https://github.com/apache/accumulo/pull/2569#discussion_r829520866
##########
File path:
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java
##########
@@ -183,8 +183,15 @@ private void checkForMerge(final long tid, final Manager
manager) throws Excepti
VolumeManager fs = manager.getVolumeManager();
final Path bulkDir = new Path(bulkInfo.sourceDir);
- int maxTablets =
Integer.parseInt(manager.getContext().getTableConfiguration(bulkInfo.tableId)
- .get(Property.TABLE_BULK_MAX_TABLETS));
+ String value = manager.getContext().getTableConfiguration(bulkInfo.tableId)
+ .get(Property.TABLE_BULK_MAX_TABLETS);
+ if (value == null) {
+ value = Property.TABLE_BULK_MAX_TABLETS.getDefaultValue();
+ log.info("Property not found " + Property.TABLE_BULK_MAX_TABLETS + "
using default: " + value
+ + " for tableId: " + bulkInfo.tableId + " using default: " + value);
+ }
+
+ int maxTablets = Integer.parseInt(value);
Review comment:
Fixed it e9588a17cc - the issue was introduced because findbug spotted
the value could be null - so Integer.parseInt was not advised. Modified it to
throw IllegalStateException if the value could not be found instead of
continuing.
--
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]