You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@griffin.apache.org by GitBox <gi...@apache.org> on 2020/06/03 10:48:56 UTC

[GitHub] [griffin] aborgatin commented on a change in pull request #573: Elastic Search index for each application instance

aborgatin commented on a change in pull request #573:
URL: https://github.com/apache/griffin/pull/573#discussion_r434474942



##########
File path: service/src/main/java/org/apache/griffin/core/metric/MetricStoreImpl.java
##########
@@ -56,7 +56,8 @@ Licensed to the Apache Software Foundation (ASF) under one
 @Component
 public class MetricStoreImpl implements MetricStore {
 
-    private static final String INDEX = "griffin";
+    @Value("${index}")

Review comment:
       1. The property name "elasticsearch.index" fits better in my opinion.
   2. Could you please add default value for property?
   `@Value("${elasticsearch.index:griffin}")`

##########
File path: service/src/main/resources/application.properties
##########
@@ -62,6 +62,7 @@ fs.defaultFS=
 elasticsearch.host=localhost
 elasticsearch.port=9200
 elasticsearch.scheme=http
+index=griffin

Review comment:
       The property name "elasticsearch.index" fits better in my opinion.

##########
File path: service/src/main/java/org/apache/griffin/core/metric/MetricStoreImpl.java
##########
@@ -56,7 +56,8 @@ Licensed to the Apache Software Foundation (ASF) under one
 @Component
 public class MetricStoreImpl implements MetricStore {
 
-    private static final String INDEX = "griffin";
+    @Value("${index}")
+    private String INDEX;

Review comment:
       Java naming convention for fields and variables is [lowercase](https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html)
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org