keith-turner commented on code in PR #4208:
URL: https://github.com/apache/accumulo/pull/4208#discussion_r1476159178
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableImport/PopulateMetadataTable.java:
##########
@@ -155,11 +166,7 @@ public Repo<Manager> call(long tid, Manager manager)
throws Exception {
if (m == null || !currentRow.equals(metadataRow)) {
if (m != null) {
- if (!sawTabletAvailability) {
- // add a default tablet availability
- TabletColumnFamily.AVAILABILITY_COLUMN.put(m,
-
TabletAvailabilityUtil.toValue(TabletAvailability.ONDEMAND));
- }
+ AVAILABILITY_COLUMN.put(m,
TabletAvailabilityUtil.toValue(initialAvailability));
Review Comment:
>Thats originally why I had null as the default for the tablet availability
so that if an override is not provided, we would be able to tell and try to use
what is present in the exported table instead. Now that null has been removed,
I'm not too sure how we can use what is set in the export if a tablet
availability override is not provided.
I we decide we want a certain behavior and null is needed in the
implementation to support that behavior then using null seems fine with me.
Sometime optional can be used, but its not always the right choice sometimes
trying to use optional becomes extremely cumbersome.
Could try to get the expected behavior written up in the javadoc for the
new method and then do what is needed to implement what is documented.
--
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]