Skip to content

Commit

Permalink
Merge pull request #235 from jsanda/HWKMETRICS-112
Browse files Browse the repository at this point in the history
[HWKMETRICS-112] move classes up one level
  • Loading branch information
tsegismont committed Jun 1, 2015
2 parents 1165191 + 7990d6b commit eb6e3fd
Show file tree
Hide file tree
Showing 26 changed files with 39 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import org.hawkular.metrics.api.jaxrs.config.ConfigurationProperty;
import org.hawkular.metrics.api.jaxrs.util.Eager;
import org.hawkular.metrics.core.api.MetricsService;
import org.hawkular.metrics.core.impl.cassandra.CassandraSession;
import org.hawkular.metrics.core.impl.cassandra.MetricsServiceCassandra;
import org.hawkular.metrics.core.impl.CassandraSession;
import org.hawkular.metrics.core.impl.MetricsServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -69,7 +69,7 @@ public class MetricsServiceProducer {
@PostConstruct
void init() {
LOG.info("Initializing metrics service");
metricsService = new MetricsServiceCassandra();
metricsService = new MetricsServiceImpl();
Map<String, String> options = new HashMap<>();
options.put("cqlport", cqlPort);
options.put("nodes", nodes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static org.hawkular.metrics.core.api.AvailabilityType.DOWN;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;
Expand Down Expand Up @@ -44,7 +44,7 @@
*/
public class CassandraSession {

private static final Logger logger = LoggerFactory.getLogger(MetricsServiceCassandra.class);
private static final Logger logger = LoggerFactory.getLogger(MetricsServiceImpl.class);

private static final String CASSANDRA_STORAGE_SERVICE = "org.apache.cassandra.db:type=StorageService";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.Collection;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static java.util.stream.Collectors.toMap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static java.util.stream.Collectors.toList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import org.hawkular.metrics.core.api.Gauge;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.List;
import java.util.ListIterator;
Expand All @@ -29,7 +29,7 @@
import org.hawkular.metrics.core.api.GaugeData;

/**
* A {@link org.hawkular.metrics.core.impl.cassandra.BucketedOutputMapper} for {@link org.hawkular.metrics.core.api
* A {@link BucketedOutputMapper} for {@link org.hawkular.metrics.core.api
* .Gauge}.
*
* @author Thomas Segismont
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static java.util.stream.Collectors.toList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static org.joda.time.Hours.hours;

Expand Down Expand Up @@ -79,8 +79,8 @@
/**
* @author John Sanda
*/
public class MetricsServiceCassandra implements MetricsService {
private static final Logger logger = LoggerFactory.getLogger(MetricsServiceCassandra.class);
public class MetricsServiceImpl implements MetricsService {
private static final Logger logger = LoggerFactory.getLogger(MetricsServiceImpl.class);

public static final String REQUEST_LIMIT = "hawkular.metrics.request.limit";

Expand Down Expand Up @@ -146,7 +146,7 @@ public int hashCode() {
*/
private final Map<DataRetentionKey, Integer> dataRetentions = new ConcurrentHashMap<>();

public MetricsServiceCassandra() {
public MetricsServiceImpl() {
this.state = State.STARTING;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

/**
* @author John Sanda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

/**
* @author John Sanda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.HashMap;
import java.util.LinkedHashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.HashMap;
import java.util.LinkedHashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import rx.Subscriber;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import org.hamcrest.Description;
import org.hamcrest.Factory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static org.hawkular.metrics.core.api.AvailabilityType.DOWN;
import static org.hawkular.metrics.core.api.AvailabilityType.UP;
import static org.hawkular.metrics.core.impl.cassandra.AvailabilityBucketDataPointMatcher
import static org.hawkular.metrics.core.impl.AvailabilityBucketDataPointMatcher
.matchesAvailabilityBucketDataPoint;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static java.util.Arrays.asList;
import static org.hawkular.metrics.core.impl.cassandra.MetricsServiceCassandra.DEFAULT_TTL;
import static org.hawkular.metrics.core.impl.MetricsServiceImpl.DEFAULT_TTL;
import static org.joda.time.DateTime.now;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import java.util.Collection;
import java.util.List;
Expand All @@ -23,7 +23,6 @@

import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.ResultSetFuture;

import org.hawkular.metrics.core.api.Availability;
import org.hawkular.metrics.core.api.AvailabilityData;
import org.hawkular.metrics.core.api.Counter;
Expand All @@ -36,7 +35,6 @@
import org.hawkular.metrics.core.api.MetricType;
import org.hawkular.metrics.core.api.Retention;
import org.hawkular.metrics.core.api.Tenant;

import rx.Observable;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static org.joda.time.DateTime.now;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.core.impl.cassandra;
package org.hawkular.metrics.core.impl;

import static java.util.Arrays.asList;
import static java.util.Collections.emptyMap;
Expand All @@ -25,7 +25,7 @@
import static org.hawkular.metrics.core.api.Metric.DPART;
import static org.hawkular.metrics.core.api.MetricType.AVAILABILITY;
import static org.hawkular.metrics.core.api.MetricType.GAUGE;
import static org.hawkular.metrics.core.impl.cassandra.MetricsServiceCassandra.DEFAULT_TTL;
import static org.hawkular.metrics.core.impl.MetricsServiceImpl.DEFAULT_TTL;
import static org.joda.time.DateTime.now;
import static org.joda.time.Days.days;
import static org.joda.time.Hours.hours;
Expand Down Expand Up @@ -77,9 +77,9 @@
/**
* @author John Sanda
*/
public class MetricsServiceCassandraITest extends MetricsITest {
public class MetricsServiceITest extends MetricsITest {

private MetricsServiceCassandra metricsService;
private MetricsServiceImpl metricsService;

private DataAccess dataAccess;

Expand All @@ -90,7 +90,7 @@ public class MetricsServiceCassandraITest extends MetricsITest {
@BeforeClass
public void initClass() {
initSession();
metricsService = new MetricsServiceCassandra();
metricsService = new MetricsServiceImpl();
metricsService.startUp(session);
dataAccess = metricsService.getDataAccess();

Expand Down

0 comments on commit eb6e3fd

Please sign in to comment.