Skip to content

Commit

Permalink
Merge pull request #241 from tsegismont/remove_default_tenant
Browse files Browse the repository at this point in the history
Remove default tenant id
  • Loading branch information
jsanda committed Jun 5, 2015
2 parents 4f125f3 + ffddef3 commit 4fadd57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

import static org.hawkular.metrics.api.jaxrs.filter.TenantFilter.TENANT_HEADER_NAME;
import static org.hawkular.metrics.core.api.MetricsService.DEFAULT_TENANT_ID;

import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -98,8 +97,7 @@ public void updateCounter(
@Suspended final AsyncResponse asyncResponse,
@PathParam("group") String group, @PathParam("counter") String counter
) {
ListenableFuture<Void> future = metricsService
.updateCounter(new Counter(DEFAULT_TENANT_ID, group, counter, 1L));
ListenableFuture<Void> future = metricsService.updateCounter(new Counter(tenantId, group, counter, 1L));
Futures.addCallback(future, new NoDataCallback<>(asyncResponse));
}

Expand All @@ -110,8 +108,7 @@ public void updateCounter(
@Suspended final AsyncResponse asyncResponse,
@PathParam("group") String group, @PathParam("counter") String counter, @PathParam("value") Long value
) {
ListenableFuture<Void> future = metricsService.updateCounter(new Counter(DEFAULT_TENANT_ID, group, counter,
value));
ListenableFuture<Void> future = metricsService.updateCounter(new Counter(tenantId, group, counter, value));
Futures.addCallback(future, new NoDataCallback<>(asyncResponse));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@
*/
public interface MetricsService {

public enum State {
enum State {
STARTING, STARTED, STOPPING, STOPPED, FAILED
}


// For now we will use a default or fake tenant id until we get APIs in place for
// creating tenants.
String DEFAULT_TENANT_ID = "test";

/**
* Startup with a given cassandra session
* @param session
Expand Down

0 comments on commit 4fadd57

Please sign in to comment.