Marvel: Remove marvel_ prefix from Marvel document types

Closes elastic/elasticsearch#669

Original commit: elastic/x-pack-elasticsearch@2e04ce186a
This commit is contained in:
Tanguy Leroux 2015-09-18 14:55:13 +02:00
parent 006364279e
commit 34937604e1
23 changed files with 30 additions and 30 deletions

View File

@ -30,7 +30,7 @@ import java.util.List;
public class ClusterStateCollector extends AbstractCollector<ClusterStateCollector> { public class ClusterStateCollector extends AbstractCollector<ClusterStateCollector> {
public static final String NAME = "cluster-state-collector"; public static final String NAME = "cluster-state-collector";
public static final String TYPE = "marvel_cluster_state"; public static final String TYPE = "cluster_state";
private final Client client; private final Client client;

View File

@ -29,7 +29,7 @@ import java.util.List;
public class ClusterStatsCollector extends AbstractCollector<ClusterStatsCollector> { public class ClusterStatsCollector extends AbstractCollector<ClusterStatsCollector> {
public static final String NAME = "cluster-stats-collector"; public static final String NAME = "cluster-stats-collector";
public static final String TYPE = "marvel_cluster_stats"; public static final String TYPE = "cluster_stats";
private final Client client; private final Client client;

View File

@ -30,7 +30,7 @@ import java.util.List;
public class IndexRecoveryCollector extends AbstractCollector<IndexRecoveryCollector> { public class IndexRecoveryCollector extends AbstractCollector<IndexRecoveryCollector> {
public static final String NAME = "index-recovery-collector"; public static final String NAME = "index-recovery-collector";
public static final String TYPE = "marvel_index_recovery"; public static final String TYPE = "index_recovery";
private final Client client; private final Client client;

View File

@ -31,7 +31,7 @@ import java.util.List;
public class IndexStatsCollector extends AbstractCollector<IndexStatsCollector> { public class IndexStatsCollector extends AbstractCollector<IndexStatsCollector> {
public static final String NAME = "index-stats-collector"; public static final String NAME = "index-stats-collector";
public static final String TYPE = "marvel_index_stats"; public static final String TYPE = "index_stats";
private final Client client; private final Client client;

View File

@ -26,7 +26,7 @@ import java.util.Collections;
public class IndicesStatsCollector extends AbstractCollector<IndicesStatsCollector> { public class IndicesStatsCollector extends AbstractCollector<IndicesStatsCollector> {
public static final String NAME = "indices-stats-collector"; public static final String NAME = "indices-stats-collector";
public static final String TYPE = "marvel_indices_stats"; public static final String TYPE = "indices_stats";
private final Client client; private final Client client;

View File

@ -36,7 +36,7 @@ import java.util.List;
public class NodeStatsCollector extends AbstractCollector<NodeStatsCollector> { public class NodeStatsCollector extends AbstractCollector<NodeStatsCollector> {
public static final String NAME = "node-stats-collector"; public static final String NAME = "node-stats-collector";
public static final String TYPE = "marvel_node_stats"; public static final String TYPE = "node_stats";
private final NodeService nodeService; private final NodeService nodeService;
private final DiscoveryService discoveryService; private final DiscoveryService discoveryService;

View File

@ -32,7 +32,7 @@ import java.util.List;
public class ShardsCollector extends AbstractCollector<ShardsCollector> { public class ShardsCollector extends AbstractCollector<ShardsCollector> {
public static final String NAME = "shards-collector"; public static final String NAME = "shards-collector";
public static final String TYPE = "marvel_shards"; public static final String TYPE = "shards";
@Inject @Inject
public ShardsCollector(Settings settings, ClusterService clusterService, MarvelSettings marvelSettings, LicenseService licenseService) { public ShardsCollector(Settings settings, ClusterService clusterService, MarvelSettings marvelSettings, LicenseService licenseService) {

View File

@ -24,7 +24,7 @@
} }
} }
}, },
"marvel_indices_stats": { "indices_stats": {
"properties": { "properties": {
"indices_stats": { "indices_stats": {
"properties": { "properties": {
@ -58,7 +58,7 @@
} }
} }
}, },
"marvel_index_stats": { "index_stats": {
"properties": { "properties": {
"index_stats": { "index_stats": {
"properties": { "properties": {
@ -146,7 +146,7 @@
} }
} }
}, },
"marvel_cluster_stats": { "cluster_stats": {
"properties": { "properties": {
"cluster_stats": { "cluster_stats": {
"properties": { "properties": {
@ -160,7 +160,7 @@
} }
} }
}, },
"marvel_cluster_state": { "cluster_state": {
"properties": { "properties": {
"cluster_state": { "cluster_state": {
"properties": { "properties": {
@ -188,7 +188,7 @@
"cluster_info": { "cluster_info": {
"enabled": false "enabled": false
}, },
"marvel_node_stats": { "node_stats": {
"properties": { "properties": {
"node_stats": { "node_stats": {
"properties": { "properties": {
@ -227,14 +227,14 @@
} }
} }
}, },
"marvel_index_recovery": { "index_recovery": {
"properties": { "properties": {
"shards": { "shards": {
"type": "object" "type": "object"
} }
} }
}, },
"marvel_shards": { "shards": {
"properties": { "properties": {
"state_uuid": { "state_uuid": {
"type": "string", "type": "string",

View File

@ -53,7 +53,7 @@ public class ClusterStateIT extends AbstractRendererTestCase {
/** /**
* This test should fail if the mapping for the 'nodes' attribute * This test should fail if the mapping for the 'nodes' attribute
* in the 'marvel_cluster_state' document is NOT set to 'enable: false' * in the 'cluster_state' document is NOT set to 'enable: false'
* *
* See * See
*/ */

View File

@ -20,7 +20,7 @@ import org.junit.Test;
public class ClusterStateRendererTests extends ESSingleNodeTestCase { public class ClusterStateRendererTests extends ESSingleNodeTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_cluster_state.json"; private static final String SAMPLE_FILE = "/samples/cluster_state.json";
@Test @Test
public void testClusterStateRenderer() throws Exception { public void testClusterStateRenderer() throws Exception {
@ -36,7 +36,7 @@ public class ClusterStateRendererTests extends ESSingleNodeTestCase {
ClusterHealthResponse clusterHealth = client().admin().cluster().prepareHealth().get(); ClusterHealthResponse clusterHealth = client().admin().cluster().prepareHealth().get();
logger.debug("--> creating the cluster state marvel document"); logger.debug("--> creating the cluster state marvel document");
ClusterStateMarvelDoc marvelDoc = new ClusterStateMarvelDoc("test", "marvel_cluster_state", 1437580442979L, ClusterStateMarvelDoc marvelDoc = new ClusterStateMarvelDoc("test", "cluster_state", 1437580442979L,
clusterState, clusterHealth.getStatus()); clusterState, clusterHealth.getStatus());
logger.debug("--> rendering the document"); logger.debug("--> rendering the document");

View File

@ -15,7 +15,7 @@ import org.junit.Test;
public class ClusterStatsRendererTests extends ESSingleNodeTestCase { public class ClusterStatsRendererTests extends ESSingleNodeTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_cluster_stats.json"; private static final String SAMPLE_FILE = "/samples/cluster_stats.json";
@Test @Test
public void testClusterStatsRenderer() throws Exception { public void testClusterStatsRenderer() throws Exception {
@ -25,7 +25,7 @@ public class ClusterStatsRendererTests extends ESSingleNodeTestCase {
ClusterStatsResponse clusterStats = client().admin().cluster().prepareClusterStats().get(); ClusterStatsResponse clusterStats = client().admin().cluster().prepareClusterStats().get();
logger.debug("--> creating the cluster stats marvel document"); logger.debug("--> creating the cluster stats marvel document");
ClusterStatsMarvelDoc marvelDoc = new ClusterStatsMarvelDoc("test", "marvel_cluster_stats", 1437580442979L, clusterStats); ClusterStatsMarvelDoc marvelDoc = new ClusterStatsMarvelDoc("test", "cluster_stats", 1437580442979L, clusterStats);
logger.debug("--> rendering the document"); logger.debug("--> rendering the document");
Renderer renderer = new ClusterStatsRenderer(); Renderer renderer = new ClusterStatsRenderer();

View File

@ -25,7 +25,7 @@ import java.util.Map;
public class IndexRecoveryRendererTests extends ESTestCase { public class IndexRecoveryRendererTests extends ESTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_index_recovery.json"; private static final String SAMPLE_FILE = "/samples/index_recovery.json";
@Test @Test
public void testIndexRecoveryRenderer() throws Exception { public void testIndexRecoveryRenderer() throws Exception {
@ -50,7 +50,7 @@ public class IndexRecoveryRendererTests extends ESTestCase {
RecoveryResponse recoveryResponse = new RecoveryResponse(2, 2, 2, false, shardResponses, null); RecoveryResponse recoveryResponse = new RecoveryResponse(2, 2, 2, false, shardResponses, null);
IndexRecoveryMarvelDoc marvelDoc = new IndexRecoveryMarvelDoc("test", "marvel_index_recovery", 1437580442979L, recoveryResponse); IndexRecoveryMarvelDoc marvelDoc = new IndexRecoveryMarvelDoc("test", "index_recovery", 1437580442979L, recoveryResponse);
logger.debug("--> rendering the document"); logger.debug("--> rendering the document");
Renderer renderer = new IndexRecoveryRenderer(); Renderer renderer = new IndexRecoveryRenderer();

View File

@ -24,12 +24,12 @@ import org.junit.Test;
public class IndexStatsRendererTests extends ESTestCase { public class IndexStatsRendererTests extends ESTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_index_stats.json"; private static final String SAMPLE_FILE = "/samples/index_stats.json";
@Test @Test
public void testIndexStatsRenderer() throws Exception { public void testIndexStatsRenderer() throws Exception {
logger.debug("--> creating the index stats marvel document"); logger.debug("--> creating the index stats marvel document");
IndexStatsMarvelDoc marvelDoc = new IndexStatsMarvelDoc("test", "marvel_index_stats", 1437580442979L, IndexStatsMarvelDoc marvelDoc = new IndexStatsMarvelDoc("test", "index_stats", 1437580442979L,
new IndexStats("index-0", new ShardStats[0]) { new IndexStats("index-0", new ShardStats[0]) {
@Override @Override
public CommonStats getTotal() { public CommonStats getTotal() {

View File

@ -17,7 +17,7 @@ import org.junit.Test;
public class IndicesStatsRendererTests extends ESSingleNodeTestCase { public class IndicesStatsRendererTests extends ESSingleNodeTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_indices_stats.json"; private static final String SAMPLE_FILE = "/samples/indices_stats.json";
@Test @Test
public void testIndexStatsRenderer() throws Exception { public void testIndexStatsRenderer() throws Exception {
@ -27,7 +27,7 @@ public class IndicesStatsRendererTests extends ESSingleNodeTestCase {
IndicesStatsResponse indicesStats = client().admin().indices().prepareStats().get(); IndicesStatsResponse indicesStats = client().admin().indices().prepareStats().get();
logger.debug("--> creating the indices stats marvel document"); logger.debug("--> creating the indices stats marvel document");
IndicesStatsMarvelDoc marvelDoc = new IndicesStatsMarvelDoc("test", "marvel_indices_stats", 1437580442979L, indicesStats); IndicesStatsMarvelDoc marvelDoc = new IndicesStatsMarvelDoc("test", "indices_stats", 1437580442979L, indicesStats);
logger.debug("--> rendering the document"); logger.debug("--> rendering the document");
Renderer renderer = new IndicesStatsRenderer(); Renderer renderer = new IndicesStatsRenderer();

View File

@ -16,7 +16,7 @@ import org.junit.Test;
public class NodeStatsRendererTests extends ESSingleNodeTestCase { public class NodeStatsRendererTests extends ESSingleNodeTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_node_stats.json"; private static final String SAMPLE_FILE = "/samples/node_stats.json";
@Test @Test
public void testNodeStatsRenderer() throws Exception { public void testNodeStatsRenderer() throws Exception {
@ -26,7 +26,7 @@ public class NodeStatsRendererTests extends ESSingleNodeTestCase {
NodeStats nodeStats = getInstanceFromNode(NodeService.class).stats(); NodeStats nodeStats = getInstanceFromNode(NodeService.class).stats();
logger.debug("--> creating the node stats marvel document"); logger.debug("--> creating the node stats marvel document");
NodeStatsMarvelDoc marvelDoc = new NodeStatsMarvelDoc("test", "marvel_node_stats", 1437580442979L, NodeStatsMarvelDoc marvelDoc = new NodeStatsMarvelDoc("test", "node_stats", 1437580442979L,
"node-0", true, nodeStats, false, 90.0, true); "node-0", true, nodeStats, false, 90.0, true);
logger.debug("--> rendering the document"); logger.debug("--> rendering the document");

View File

@ -20,7 +20,7 @@ import java.io.IOException;
public class ShardsRendererTests extends ESSingleNodeTestCase { public class ShardsRendererTests extends ESSingleNodeTestCase {
private static final String SAMPLE_FILE = "/samples/marvel_shards.json"; private static final String SAMPLE_FILE = "/samples/shards.json";
@Test @Test
public void testShardsRenderer() throws Exception { public void testShardsRenderer() throws Exception {
@ -33,7 +33,7 @@ public class ShardsRendererTests extends ESSingleNodeTestCase {
ClusterState clusterState = getInstanceFromNode(ClusterService.class).state(); ClusterState clusterState = getInstanceFromNode(ClusterService.class).state();
logger.debug("--> creating the shard marvel document"); logger.debug("--> creating the shard marvel document");
ShardMarvelDoc marvelDoc = new ShardMarvelDoc("my-index", "marvel_shards", "my-id", ShardMarvelDoc marvelDoc = new ShardMarvelDoc("my-index", "shards", "my-id",
clusterState.metaData().clusterUUID(), 1437580442979L, clusterState.routingTable().allShards().iterator().next(), clusterState.stateUUID()); clusterState.metaData().clusterUUID(), 1437580442979L, clusterState.routingTable().allShards().iterator().next(), clusterState.stateUUID());
logger.debug("--> rendering the document"); logger.debug("--> rendering the document");
@ -49,7 +49,7 @@ public class ShardsRendererTests extends ESSingleNodeTestCase {
@Test @Test
public void testNoShard() throws IOException { public void testNoShard() throws IOException {
String result = RendererTestUtils.renderAsJSON(new ShardMarvelDoc("my-index", "marvel_shards", "my-id", "cluster-uuid", 1437580442979L, null, "my-state-uuid"), new ShardsRenderer()); String result = RendererTestUtils.renderAsJSON(new ShardMarvelDoc("my-index", "shards", "my-id", "cluster-uuid", 1437580442979L, null, "my-state-uuid"), new ShardsRenderer());
RendererTestUtils.assertJSONStructureAndValues(result, "{\"cluster_uuid\":\"my-cluster-uuid\",\"timestamp\":\"2015-07-22T15:54:02.979Z\",\"state_uuid\":\"my-state-uuid\"}"); RendererTestUtils.assertJSONStructureAndValues(result, "{\"cluster_uuid\":\"my-cluster-uuid\",\"timestamp\":\"2015-07-22T15:54:02.979Z\",\"state_uuid\":\"my-state-uuid\"}");
} }
} }