keith-turner commented on a change in pull request #2289:
URL: https://github.com/apache/accumulo/pull/2289#discussion_r718010438
##########
File path:
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
##########
@@ -262,7 +268,7 @@ void finishSelection(Set<StoredTabletFile> selected,
boolean allSelected) {
Preconditions.checkArgument(!selected.isEmpty());
Preconditions.checkState(selectStatus == FileSelectionStatus.SELECTING);
selectStatus = FileSelectionStatus.SELECTED;
- selectedTime = System.currentTimeMillis();
+ selectedTime = getCurentTimeMillis();
Review comment:
@ctubbsii I updated to use nanoTime in
255ba3754d4686ebc903b1ef2e135b4ef8904598. Do those changes look correct? The
unit test does not actually call the nanoTime system call so if I botched
something w/ the update this test I am adding would not catch it.
##########
File path:
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
##########
@@ -262,7 +268,7 @@ void finishSelection(Set<StoredTabletFile> selected,
boolean allSelected) {
Preconditions.checkArgument(!selected.isEmpty());
Preconditions.checkState(selectStatus == FileSelectionStatus.SELECTING);
selectStatus = FileSelectionStatus.SELECTED;
- selectedTime = System.currentTimeMillis();
+ selectedTime = getCurentTimeMillis();
Review comment:
> It looks right to me.
Thanks. The main thing I was concerned about was the conversion of the
duration from accumuo config in millis to nanos (this is done in the deriver).
I looked at that code multiple times and was 99% sure it was correct, but still
felt it would be nice to have another set of eyes on it.
##########
File path:
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
##########
@@ -262,7 +268,7 @@ void finishSelection(Set<StoredTabletFile> selected,
boolean allSelected) {
Preconditions.checkArgument(!selected.isEmpty());
Preconditions.checkState(selectStatus == FileSelectionStatus.SELECTING);
selectStatus = FileSelectionStatus.SELECTED;
- selectedTime = System.currentTimeMillis();
+ selectedTime = getCurentTimeMillis();
Review comment:
@ctubbsii I updated the code to use the Duration type. I think this is
cleaner and a bit less error prone. I also looked into using the Instant type
in the code, but its not a good fit for nanoTime.
Thinking it may be nice to add a `Duration getDuration(Property)` method to
AccumuloConfiguration, but not sure.
--
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]