Repository: ambari Updated Branches: refs/heads/branch-2.4 8f9fbe8ef -> 4fd42bafa
AMBARI-17521. If Solr is configured to use implicit routing, then replicationFactor is ignored (Bosco Durai via oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fd42baf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fd42baf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fd42baf Branch: refs/heads/branch-2.4 Commit: 4fd42bafad6f6cb3c1daf3209c35b16b36b64a53 Parents: 8f9fbe8 Author: oleewere <[email protected]> Authored: Fri Jul 1 15:35:13 2016 +0200 Committer: oleewere <[email protected]> Committed: Fri Jul 1 15:51:45 2016 +0200 ---------------------------------------------------------------------- .../src/main/resources/logfeeder.properties | 2 +- .../ambari-logsearch-logfeeder/src/main/scripts/run.sh | 2 +- .../java/org/apache/ambari/logsearch/dao/SolrDaoBase.java | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fd42baf/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/logfeeder.properties ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/logfeeder.properties b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/logfeeder.properties index 982a72d..74ea0ef 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/logfeeder.properties +++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/logfeeder.properties @@ -17,7 +17,7 @@ logfeeder.checkpoint.folder= logfeeder.metrics.collector.hosts= #filter config -logfeeder.log.filter.enable=true +logfeeder.log.filter.enable=false logfeeder.solr.config.interval=5 logfeeder.solr.zk_connect_string= logfeeder.solr.url= http://git-wip-us.apache.org/repos/asf/ambari/blob/4fd42baf/ambari-logsearch/ambari-logsearch-logfeeder/src/main/scripts/run.sh ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/scripts/run.sh b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/scripts/run.sh index b84bfc2..dba85fa 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/scripts/run.sh +++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/scripts/run.sh @@ -64,7 +64,7 @@ LOGFEEDER_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$LOGFEEDER #JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=2098" -if [ $LOGFEEDER_SSL = "true" ]; then +if [ "$LOGFEEDER_SSL" = "true" ]; then LOGFEEDER_JAVA_OPTS="$LOGFEEDER_JAVA_OPTS -Djavax.net.ssl.keyStore=$LOGFEEDER_KEYSTORE_LOCATION -Djavax.net.ssl.keyStoreType=$LOGFEEDER_KEYSTORE_TYPE -Djavax.net.ssl.keyStorePassword=$LOGFEEDER_KEYSTORE_PASSWORD -Djavax.net.ssl.trustStore=$LOGFEEDER_TRUSTSTORE_LOCATION -Djavax.net.ssl.trustStoreType=$LOGFEEDER_TRUSTSTORE_TYPE -Djavax.net.ssl.trustStorePassword=$LOGFEEDER_TRUSTSTORE_PASSWORD" fi http://git-wip-us.apache.org/repos/asf/ambari/blob/4fd42baf/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java index c13105a..3a1a1ca 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java @@ -248,7 +248,7 @@ public abstract class SolrDaoBase { numberOfShards, replicationFactor, allCollectionList); } else { result = setupCollectionsWithImplicitRouting(splitMode, - configName, numberOfShards, allCollectionList); + configName, numberOfShards, replicationFactor, allCollectionList); } } catch (Exception ex) { logger.error("Error creating collection. collectionName=" @@ -279,16 +279,16 @@ public abstract class SolrDaoBase { } public boolean setupCollectionsWithImplicitRouting(String splitMode, - String configName, int numberOfShards, + String configName, int numberOfShards, int replicationFactor, List<String> allCollectionList) throws Exception { logger.info("setupCollectionsWithImplicitRouting(). collectionName=" + collectionName + ", numberOfShards=" + numberOfShards); return createCollectionWithImplicitRoute(collectionName, configName, - numberOfShards, allCollectionList); + numberOfShards, replicationFactor, allCollectionList); } public boolean createCollectionWithImplicitRoute(String colName, - String configName, int numberOfShards, + String configName, int numberOfShards, int replicationFactor, List<String> allCollectionList) throws SolrServerException, IOException { @@ -310,7 +310,6 @@ public abstract class SolrDaoBase { if (!allCollectionList.contains(colName)) { logger.info("Creating collection " + colName + ", shardsList=" + shardsList + ", solrDetail=" + solrDetail); - int replicationFactor = 1; CollectionAdminRequest.Create collectionCreateRequest = new CollectionAdminRequest.Create(); collectionCreateRequest.setCollectionName(colName); collectionCreateRequest.setRouterName("implicit");
