You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2019/08/25 15:31:54 UTC

[lucene-solr] 03/09: SOLR-13452: Improve max jvm default calculation.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch jira/SOLR-13452_gradle_5
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 112ec90d6815014ece960f7ac0d017eb3e15599e
Author: markrmiller <ma...@apache.org>
AuthorDate: Sun Aug 25 09:43:37 2019 -0500

    SOLR-13452: Improve max jvm default calculation.
---
 buildSrc/common/configure-test.gradle |  2 +-
 buildSrc/test-build-wdocker/start.sh  | 16 +++++++++++++++-
 lucene/luke/build.gradle              | 30 ++++++++++++++++++++++++++++++
 lucene/monitor/build.gradle           | 26 ++++++++++++++++++++++++++
 versions.lock                         |  1 -
 5 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/buildSrc/common/configure-test.gradle b/buildSrc/common/configure-test.gradle
index e1a2eb0..0691838 100644
--- a/buildSrc/common/configure-test.gradle
+++ b/buildSrc/common/configure-test.gradle
@@ -131,7 +131,7 @@ test {
     def testsJvms = project.ext.properties.tests_jvms
     maxParallelForks = Integer.parseInt(testsJvms)
   } else {
-    maxParallelForks = Runtime.runtime.availableProcessors() / 2
+    maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
   }
   
   def testsFailFast = project.ext.properties.tests_failfast
diff --git a/buildSrc/test-build-wdocker/start.sh b/buildSrc/test-build-wdocker/start.sh
index 3503b96..5a74e89 100644
--- a/buildSrc/test-build-wdocker/start.sh
+++ b/buildSrc/test-build-wdocker/start.sh
@@ -58,4 +58,18 @@ if [ ! "${skip_build_image}" = "true" ]; then
 fi
 
 
-docker run -itd --user ${UID} --name=${CONTAINER_NAME} -v "${script_dir}/../..":/home/lucene/project:cached -h ${CONTAINER_NAME} ${CONTAINER_NAME} || { exit 1; }
+echo "Starting the container ..."
+
+docker run -itd --user ${UID} --name=${CONTAINER_NAME} -v "${script_dir}/../..":/home/lucene/project:cached -v ~/.gradle/caches/modules-2:/home/lucene/gradle/caches/modules-2  -h ${CONTAINER_NAME} ${CONTAINER_NAME} || { exit 1; }
+
+
+exec() {
+  echo "exec: $1"
+  docker exec --user ${UID} $2 -t ${CONTAINER_NAME} bash -c "$1"
+  echo "done"
+}
+
+cmd="cp -r /home/lucene/gradle /home/lucene/.gradle"
+exec "${cmd}" "${exec_args}" || { exit 1; }
+
+
diff --git a/lucene/luke/build.gradle b/lucene/luke/build.gradle
new file mode 100644
index 0000000..2605a12
--- /dev/null
+++ b/lucene/luke/build.gradle
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'java-library'
+apply plugin: 'maven-publish'
+apply plugin: org.apache.lucene.gradle.PartOfDist
+
+dependencies {
+  implementation project(':lucene:lucene-core')
+  implementation project(':lucene:lucene-codecs')
+  implementation project(':lucene:lucene-backward-codecs')
+  implementation project(':lucene:lucene-analyzers-common')
+  implementation project(':lucene:lucene-queries')
+  implementation project(':lucene:lucene-queryparser')
+  implementation project(':lucene:lucene-misc')
+}
diff --git a/lucene/monitor/build.gradle b/lucene/monitor/build.gradle
new file mode 100644
index 0000000..e3d13aa
--- /dev/null
+++ b/lucene/monitor/build.gradle
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'java-library'
+apply plugin: 'maven-publish'
+apply plugin: org.apache.lucene.gradle.PartOfDist
+
+dependencies {
+  implementation project(':lucene:lucene-core')
+  implementation project(':lucene:lucene-queryparser')
+  implementation project(':lucene:lucene-memory')
+}
diff --git a/versions.lock b/versions.lock
index 57de072..30e0286 100644
--- a/versions.lock
+++ b/versions.lock
@@ -267,7 +267,6 @@ org.xerial.snappy:snappy-java:1.0.5 (1 constraints: 4e09a79c)
 org.yaml:snakeyaml:1.23 (1 constraints: 6e17f627)
 ua.net.nlp:morfologik-ukrainian-search:3.9.0 (1 constraints: 0e051536)
 xerces:xercesImpl:2.9.1 (2 constraints: f613d869)
-xml-apis:xml-apis:1.3.04 (1 constraints: b008af8c)
 
 [Test dependencies]
 aopalliance:aopalliance:1.0 (1 constraints: 170a83ac)