Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Commit

Permalink
add cluster name
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Feldman committed Jun 12, 2015
1 parent b92bdb0 commit 18b99b2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
Expand Up @@ -28,7 +28,6 @@
*/ */
public interface CoreIndexFig extends GuicyFig { public interface CoreIndexFig extends GuicyFig {


String MANAGEMENT_APP_NAME = "management";
String ELASTICSEARCH_MANAGEMENT_NUMBER_OF_SHARDS = "elasticsearch.management_number_shards"; String ELASTICSEARCH_MANAGEMENT_NUMBER_OF_SHARDS = "elasticsearch.management_number_shards";


String ELASTICSEARCH_MANAGEMENT_NUMBER_OF_REPLICAS = "elasticsearch.management_number_replicas"; String ELASTICSEARCH_MANAGEMENT_NUMBER_OF_REPLICAS = "elasticsearch.management_number_replicas";
Expand All @@ -41,9 +40,9 @@ public interface CoreIndexFig extends GuicyFig {
@Key( ELASTICSEARCH_MANAGEMENT_NUMBER_OF_REPLICAS ) @Key( ELASTICSEARCH_MANAGEMENT_NUMBER_OF_REPLICAS )
int getManagementNumberOfReplicas(); int getManagementNumberOfReplicas();


default String getManagementAppIndexName(){ @Default( "management" )
return MANAGEMENT_APP_NAME; @Key( "elasticsearch.managment_index" )
} String getManagementAppIndexName();


@Default( "5" ) @Default( "5" )
@Key( "elasticsearch.index_bucket_count" ) @Key( "elasticsearch.index_bucket_count" )
Expand Down
Expand Up @@ -58,7 +58,10 @@ public IndexAlias getAlias() {
public String getIndexRootName() { public String getIndexRootName() {
return indexName; return indexName;
} }

@Override
public String getIndexBucketName() {
return getIndexRootName();
}
@Override @Override
public ApplicationScope getApplicationScope() { public ApplicationScope getApplicationScope() {
return applicationScope; return applicationScope;
Expand Down
Expand Up @@ -32,7 +32,6 @@ public interface ClusterFig extends GuicyFig{


@Default( "ug" ) @Default( "ug" )
@Key( "elasticsearch.index_prefix" ) //"usergrid.cluster_name" @Key( "elasticsearch.index_prefix" ) //"usergrid.cluster_name"
String getClusterNameInternal(); String getClusterName();
default String getClusterName(){return getClusterNameInternal().toLowerCase();}


} }
Expand Up @@ -37,9 +37,7 @@ public interface IndexLocationStrategy {
String getIndexRootName(); String getIndexRootName();




default String getIndexBucketName() { String getIndexBucketName() ;
return getIndexRootName();
}


/** /**
* return unique string * return unique string
Expand Down
Expand Up @@ -51,6 +51,10 @@ private String getPrefix() {
//check for repetition //check for repetition
return keyspaceName; return keyspaceName;
} }
@Override
public String getIndexBucketName() {
return getIndexRootName();
}


/** /**
* Get the alias name * Get the alias name
Expand Down

0 comments on commit 18b99b2

Please sign in to comment.