Marvel: Remove marvel_ prefix from Marvel document types
Closes elastic/elasticsearch#669 Original commit: elastic/x-pack-elasticsearch@2e04ce186a
This commit is contained in:
parent
006364279e
commit
34937604e1
|
@ -30,7 +30,7 @@ import java.util.List;
|
|||
public class ClusterStateCollector extends AbstractCollector<ClusterStateCollector> {
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.List;
|
|||
public class ClusterStatsCollector extends AbstractCollector<ClusterStatsCollector> {
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.List;
|
|||
public class IndexRecoveryCollector extends AbstractCollector<IndexRecoveryCollector> {
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.List;
|
|||
public class IndexStatsCollector extends AbstractCollector<IndexStatsCollector> {
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
public class IndicesStatsCollector extends AbstractCollector<IndicesStatsCollector> {
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
public class NodeStatsCollector extends AbstractCollector<NodeStatsCollector> {
|
||||
|
||||
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 DiscoveryService discoveryService;
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.List;
|
|||
public class ShardsCollector extends AbstractCollector<ShardsCollector> {
|
||||
|
||||
public static final String NAME = "shards-collector";
|
||||
public static final String TYPE = "marvel_shards";
|
||||
public static final String TYPE = "shards";
|
||||
|
||||
@Inject
|
||||
public ShardsCollector(Settings settings, ClusterService clusterService, MarvelSettings marvelSettings, LicenseService licenseService) {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"marvel_indices_stats": {
|
||||
"indices_stats": {
|
||||
"properties": {
|
||||
"indices_stats": {
|
||||
"properties": {
|
||||
|
@ -58,7 +58,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"marvel_index_stats": {
|
||||
"index_stats": {
|
||||
"properties": {
|
||||
"index_stats": {
|
||||
"properties": {
|
||||
|
@ -146,7 +146,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"marvel_cluster_stats": {
|
||||
"cluster_stats": {
|
||||
"properties": {
|
||||
"cluster_stats": {
|
||||
"properties": {
|
||||
|
@ -160,7 +160,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"marvel_cluster_state": {
|
||||
"cluster_state": {
|
||||
"properties": {
|
||||
"cluster_state": {
|
||||
"properties": {
|
||||
|
@ -188,7 +188,7 @@
|
|||
"cluster_info": {
|
||||
"enabled": false
|
||||
},
|
||||
"marvel_node_stats": {
|
||||
"node_stats": {
|
||||
"properties": {
|
||||
"node_stats": {
|
||||
"properties": {
|
||||
|
@ -227,14 +227,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"marvel_index_recovery": {
|
||||
"index_recovery": {
|
||||
"properties": {
|
||||
"shards": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"marvel_shards": {
|
||||
"shards": {
|
||||
"properties": {
|
||||
"state_uuid": {
|
||||
"type": "string",
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ClusterStateIT extends AbstractRendererTestCase {
|
|||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.junit.Test;
|
|||
|
||||
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
|
||||
public void testClusterStateRenderer() throws Exception {
|
||||
|
@ -36,7 +36,7 @@ public class ClusterStateRendererTests extends ESSingleNodeTestCase {
|
|||
ClusterHealthResponse clusterHealth = client().admin().cluster().prepareHealth().get();
|
||||
|
||||
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());
|
||||
|
||||
logger.debug("--> rendering the document");
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.junit.Test;
|
|||
|
||||
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
|
||||
public void testClusterStatsRenderer() throws Exception {
|
||||
|
@ -25,7 +25,7 @@ public class ClusterStatsRendererTests extends ESSingleNodeTestCase {
|
|||
ClusterStatsResponse clusterStats = client().admin().cluster().prepareClusterStats().get();
|
||||
|
||||
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");
|
||||
Renderer renderer = new ClusterStatsRenderer();
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
|
||||
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
|
||||
public void testIndexRecoveryRenderer() throws Exception {
|
||||
|
@ -50,7 +50,7 @@ public class IndexRecoveryRendererTests extends ESTestCase {
|
|||
|
||||
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");
|
||||
Renderer renderer = new IndexRecoveryRenderer();
|
||||
|
|
|
@ -24,12 +24,12 @@ import org.junit.Test;
|
|||
|
||||
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
|
||||
public void testIndexStatsRenderer() throws Exception {
|
||||
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]) {
|
||||
@Override
|
||||
public CommonStats getTotal() {
|
||||
|
|
|
@ -17,7 +17,7 @@ import org.junit.Test;
|
|||
|
||||
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
|
||||
public void testIndexStatsRenderer() throws Exception {
|
||||
|
@ -27,7 +27,7 @@ public class IndicesStatsRendererTests extends ESSingleNodeTestCase {
|
|||
IndicesStatsResponse indicesStats = client().admin().indices().prepareStats().get();
|
||||
|
||||
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");
|
||||
Renderer renderer = new IndicesStatsRenderer();
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.junit.Test;
|
|||
|
||||
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
|
||||
public void testNodeStatsRenderer() throws Exception {
|
||||
|
@ -26,7 +26,7 @@ public class NodeStatsRendererTests extends ESSingleNodeTestCase {
|
|||
NodeStats nodeStats = getInstanceFromNode(NodeService.class).stats();
|
||||
|
||||
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);
|
||||
|
||||
logger.debug("--> rendering the document");
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.io.IOException;
|
|||
|
||||
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
|
||||
public void testShardsRenderer() throws Exception {
|
||||
|
@ -33,7 +33,7 @@ public class ShardsRendererTests extends ESSingleNodeTestCase {
|
|||
ClusterState clusterState = getInstanceFromNode(ClusterService.class).state();
|
||||
|
||||
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());
|
||||
|
||||
logger.debug("--> rendering the document");
|
||||
|
@ -49,7 +49,7 @@ public class ShardsRendererTests extends ESSingleNodeTestCase {
|
|||
|
||||
@Test
|
||||
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\"}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue