You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/07/04 08:13:59 UTC

camel git commit: CAMEL-10117: Camel-Elasticsearch: Default pathHome option should work on all the platforms

Repository: camel
Updated Branches:
  refs/heads/master fa3f36c9d -> a4bf413a0


CAMEL-10117: Camel-Elasticsearch: Default pathHome option should work on all the platforms


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a4bf413a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a4bf413a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a4bf413a

Branch: refs/heads/master
Commit: a4bf413a00aca67240d5b3697c08cc67c71ecae1
Parents: fa3f36c
Author: Andrea Cosentino <an...@gmail.com>
Authored: Mon Jul 4 09:36:00 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Mon Jul 4 09:36:00 2016 +0200

----------------------------------------------------------------------
 .../camel-elasticsearch/src/main/docs/elasticsearch.adoc      | 4 +++-
 .../component/elasticsearch/ElasticsearchConfiguration.java   | 7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a4bf413a/components/camel-elasticsearch/src/main/docs/elasticsearch.adoc
----------------------------------------------------------------------
diff --git a/components/camel-elasticsearch/src/main/docs/elasticsearch.adoc b/components/camel-elasticsearch/src/main/docs/elasticsearch.adoc
index 8462bea..31c3681 100644
--- a/components/camel-elasticsearch/src/main/docs/elasticsearch.adoc
+++ b/components/camel-elasticsearch/src/main/docs/elasticsearch.adoc
@@ -61,6 +61,7 @@ The Elasticsearch component supports 1 options which are listed below.
 
 
 
+
 // endpoint options: START
 The Elasticsearch component supports 13 endpoint options which are listed below:
 
@@ -76,7 +77,7 @@ The Elasticsearch component supports 13 endpoint options which are listed below:
 | indexType | producer |  | String | The type of the index to act against
 | ip | producer |  | String | The TransportClient remote host ip to use
 | operation | producer |  | String | What operation to perform
-| pathHome | producer | /usr/share/elasticsearch | String | The path.home property of ElasticSearch configuration. You need to provide a valid path otherwise the default /usr/share/elasticsearch will be used.
+| pathHome | producer | ${user.home}/.elasticsearch | String | The path.home property of ElasticSearch configuration. You need to provide a valid path otherwise the default $user.home/.elasticsearch will be used.
 | port | producer | 9300 | int | The TransportClient remote port to use (defaults to 9300)
 | transportAddresses | producer |  | String | Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for transportAddresses to be considered instead.
 | exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
@@ -86,6 +87,7 @@ The Elasticsearch component supports 13 endpoint options which are listed below:
 // endpoint options: END
 
 
+
 [[ElasticSearch-MessageOperations]]
 Message Operations
 ^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/camel/blob/a4bf413a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
index c3bd9e5..891baa3 100644
--- a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
+++ b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.elasticsearch;
 
+import java.io.File;
 import java.util.List;
 
 import org.apache.camel.spi.Metadata;
@@ -51,8 +52,8 @@ public class ElasticsearchConfiguration {
     private int port = ElasticsearchConstants.DEFAULT_PORT;
     @UriParam(defaultValue = "true")
     private Boolean clientTransportSniff = true;
-    @UriParam(defaultValue = "/usr/share/elasticsearch")
-    private String pathHome = "/usr/share/elasticsearch";
+    @UriParam(defaultValue = "${user.home}/.elasticsearch")
+    private String pathHome = System.getProperty("user.home") + File.separator + ".elasticsearch";
 
     /**
      * Name of cluster or use local for local mode
@@ -182,7 +183,7 @@ public class ElasticsearchConfiguration {
     }
 
     /**
-     * The path.home property of ElasticSearch configuration. You need to provide a valid path, otherwise the default, /usr/share/elasticsearch, will be used.
+     * The path.home property of ElasticSearch configuration. You need to provide a valid path, otherwise the default, ${user.home}/.elasticsearch, will be used.
      */
     public String getPathHome() {
         return pathHome;