-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GOBBLIN-1983] Remove Optionals to make DagManager, EventSubmitter, and TopologyCatalog required for GaaS operation #3855
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,6 @@ | |
import java.util.UUID; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
|
||
import com.codahale.metrics.Meter; | ||
|
@@ -41,6 +39,8 @@ | |
import com.google.common.collect.Lists; | ||
import com.google.common.io.Closer; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.apache.gobblin.Constructs; | ||
import org.apache.gobblin.configuration.ConfigurationKeys; | ||
import org.apache.gobblin.configuration.State; | ||
|
@@ -247,6 +247,10 @@ public Timer apply(@Nonnull Timer input) { | |
}); | ||
} | ||
|
||
public static void updateTimer(Timer timer, final long duration, final TimeUnit unit) { | ||
updateTimer(Optional.of(timer), duration, unit); | ||
} | ||
|
||
/** | ||
* Marks a meter only if it is defined. | ||
* @param meter an Optional<{@link com.codahale.metrics.Meter}> | ||
|
@@ -255,6 +259,10 @@ public static void markMeter(Optional<Meter> meter) { | |
markMeter(meter, 1); | ||
} | ||
|
||
public static void markMeter(Meter meter) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where is this being used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my related Q is whether we still require the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are many non-gaas callers to this method with Optional parameter, which may be providing parameter that is truly optional. |
||
markMeter(Optional.of(meter), 1); | ||
} | ||
|
||
/** | ||
* Marks a meter only if it is defined. | ||
* @param meter an Optional<{@link com.codahale.metrics.Meter}> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I see:
here - https://gobblin.apache.org/docs/developer-guide/CodingStyle/
I presumed
javax
would followjava
, not pop up betweencom
andgobblin
. are you sure this is supposed to move here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not do any import changes manually, intelliJ does it, hopefully based on the provided codestyle