[Hawkular-commits] [hawkular/hawkular-metrics] 8d0f7c: [HWKMETRICS-756] schema installer (#915)

John Sanda jsanda at redhat.com
Wed Mar 14 11:49:07 EDT 2018


  Branch: refs/heads/master
  Home:   https://github.com/hawkular/hawkular-metrics
  Commit: 8d0f7c5df174634a2dfeb04582c7d97d71d5d048
      https://github.com/hawkular/hawkular-metrics/commit/8d0f7c5df174634a2dfeb04582c7d97d71d5d048
  Author: John Sanda <jsanda at redhat.com>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M api/metrics-api-jaxrs/pom.xml
    R api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/DistributedLock.java
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/MetricsServiceLifecycle.java
    A api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/util/SchemaVersionCheckException.java
    A api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/util/SchemaVersionChecker.java
    R api/metrics-api-jaxrs/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
    M api/metrics-api-jaxrs/src/main/webapp/WEB-INF/web.xml
    M api/metrics-api-util/src/main/java/org/hawkular/metrics/api/jaxrs/config/ConfigurationKey.java
    M clients/dropwizard/hawkular-dropwizard-reporter/pom.xml
    M clients/ptranslator/pom.xml
    M core/metrics-core-service/pom.xml
    M core/metrics-core-service/src/main/java/org/hawkular/metrics/core/jobs/JobsService.java
    M core/metrics-core-service/src/main/java/org/hawkular/metrics/core/jobs/JobsServiceImpl.java
    M core/metrics-core-service/src/test/java/org/hawkular/metrics/core/jobs/CompressDataJobITest.java
    M core/metrics-core-service/src/test/java/org/hawkular/metrics/core/jobs/DeleteExpiredMetricsJobITest.java
    M core/metrics-core-service/src/test/java/org/hawkular/metrics/core/jobs/DeleteTenantITest.java
    M core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/BaseITest.java
    A core/schema-installer/README.adoc
    A core/schema-installer/mylogback.xml
    A core/schema-installer/pom.xml
    A core/schema-installer/src/main/java/org/hawkular/metrics/schema/Installer.java
    A core/schema-installer/src/main/resources/logback.xml
    M core/schema/pom.xml
    M core/schema/src/main/java/org/hawkular/metrics/schema/SchemaService.java
    A core/schema/src/main/java/org/hawkular/metrics/schema/VersionUpdateException.java
    A core/schema/src/main/java/org/hawkular/metrics/schema/VersionUtil.java
    M core/schema/src/main/resources/org/hawkular/schema/cassalog.groovy
    M dist/containers/hawkular-metrics-openshift/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
    M integration-tests/rest-tests-jaxrs/pom.xml
    M job-scheduler/pom.xml
    A job-scheduler/src/main/java/org/hawkular/metrics/scheduler/api/JobsManager.java
    M pom.xml

  Log Message:
  -----------
  [HWKMETRICS-756] schema installer (#915)

* [HWKMETRICS-756] initial commit for schema installer

The schema-installer module produces an executable, fat jar. The
installer is a wrapper around SchemaService which in turn runs Cassalog.
The installer does not assume that Cassandra is already running, but it
does assume that Cassandra will be running eventually. As such, if
connecting to C* fails, the installer will wait for 5 seconds and try
again. It will continue to do so until it establishes a connection.

Logback is used for logging. A logback.xml is embedded in the executable
jar. Logging will be sent to stdout by default at INFO level. The
logging configuration can be overriden by setting the
logback.configurationFile system property.

* [HWKMETRICS-756] move schema updates to installer

The schema installer first runs SchemaService to apply schema updates. I
also put the code for creating background jobs into the installer as
well. There are some potential race conditions with creating those jobs,
which is why an infinispan cache was used for coordination. By moving
the job creation to the installer, there is no more concern about
multiple instances of the job creation code running concurrently.

* [HWKMETRICS-756] check schema version at start up

The installer sets a system configuration property for the version that
consists of the version string and git sha. During server start up we
poll the sys_config table until we find the expected version string.

* [HWKMETRICS-756] update integration tests to run new schema installer

* [HWKMETRICS-756] fix test regressions

* [HWKMETRICS-756] changes based on PR review

* [HWKMETRICS-756] add installer readme and wait for all C* to be up

* [HWKMETRICS-756] update poms to use new jar file name




More information about the hawkular-commits mailing list