Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into ARUHA-1954
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal-Jha authored Nov 27, 2018
2 parents 05128ea + 3f5e882 commit 1ec5696
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
5 changes: 1 addition & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ dependencies {
compile 'org.zalando.zmon:zmon-actuator:0.9.8'

// storage
compile ('org.springframework.boot:spring-boot-starter-jdbc') {
exclude module: "tomcat-jdbc"
}
compile 'com.zaxxer:HikariCP:3.2.0'
compile "org.springframework.boot:spring-boot-starter-jdbc"
compile 'org.postgresql:postgresql:42.2.5'

compile 'org.springframework.cloud:spring-cloud-starter-hystrix:1.4.5.RELEASE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public Optional<ValidationError> accepts(final JSONObject event) {
}

private Optional<ValidationError> checkDateTime(final String occurredAt) {
return validator.validate(occurredAt).map(ValidationError::new);
return validator.validate(occurredAt)
.map(e-> new ValidationError("#/metadata/occurred_at:" + e));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Optional<String> validate(final String dateTime) {
}

} catch (final DateTimeParseException e) {
return error;
return Optional.of(error.get() + " " + e.getMessage());
}
}
}
17 changes: 12 additions & 5 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ spring:
url: jdbc:postgresql://localhost:5432/local_nakadi_db
username: nakadi
password: nakadi
type: com.zaxxer.hikari.HikariDataSource
hikari:
connectionTimeout: 2000
minimumIdle: 1
maximumPoolSize: 2
driverClassName: org.postgresql.Driver
tomcat:
initial-size: 2
max-active: 2
min-idle: 1
max-idle: 1
test-on-borrow: true
validation-query: SELECT 1
test-while-idle: true
time-between-eviction-runs-millis: 5000
min-evictable-idle-time-millis: 60000
connection-properties: socketTimeout=2;connectTimeout=2;loginTimeout=2

hystrix.command.default.execution.isolation.strategy: SEMAPHORE
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 15000
Expand Down

0 comments on commit 1ec5696

Please sign in to comment.