-
Notifications
You must be signed in to change notification settings - Fork 13
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
Issue 46: Watchdog service for Pravega Sensor Collector #47
Conversation
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
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.
Over all looks good.
I have some minor comments.
pravega-sensor-collector/src/main/java/io/pravega/sensor/collector/metrics/Metric.java
Show resolved
Hide resolved
pravega-sensor-collector/src/main/java/io/pravega/sensor/collector/metrics/Metric.java
Show resolved
Hide resolved
pravega-sensor-collector/src/main/java/io/pravega/sensor/collector/metrics/Metric.java
Show resolved
Hide resolved
} | ||
|
||
|
||
class ExceptionMeter implements Metric<String> { |
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.
same here
pravega-sensor-collector/src/main/java/io/pravega/sensor/collector/metrics/Metric.java
Outdated
Show resolved
Hide resolved
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.
Please add copyright header to all files
pravega-sensor-collector/src/main/java/io/pravega/sensor/collector/metrics/PravegaClient.java
Outdated
Show resolved
Hide resolved
windows-service/PscWatchdogApp.xml
Outdated
<env name="PSC_SERVICE_NAME" value="PravegaSensorCollector" /> | ||
|
||
<onfailure action="restart"/> | ||
</service> |
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.
Please add newline 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.
LGTM
pravega-sensor-collector/src/main/java/io/pravega/sensor/collector/file/FileIngestService.java
Show resolved
Hide resolved
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
Fixing FileIngestServiceUnitTest
Fixing unable to load KeyCLoak creds
Signed-off-by: Abhin Balur <[email protected]>
* json string. | ||
*/ | ||
public static String getMetricsAsJson() throws JsonProcessingException { | ||
ObjectMapper mapper = new ObjectMapper(); |
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.
Can you please make this variable static, so that it will not created for each json convertion
Signed-off-by: Abhin Balur <[email protected]>
Signed-off-by: Abhin Balur <[email protected]>
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.
LGTM
Change log description
Introduces a simple watchdog functionality for Pravega Sensor Collector.
Purpose of the change
Fixes #46
What the code does
Watchdog service looks for liveness of Pravega Sensor Collector and attempts to keep it up and running if not live.
The definition(can be extended with time) of liveness is watchdog looking for regular/live updates on a configured file made by PSC. If and when not live, Watchdog restarts PSC service as a corrective measure. There could be other corrective measures added in future.
How to verify it
Documentation to be updated.