Skip to content

Commit 594e9ab

Browse files
committed
Merge branch 'master' into translog-trimming
* master: (41 commits) Remove awaits fix from evil JNA native tests Correct handling of default and array settings Build: Switch jna dependency to an elastic version (#24081) fix CategoryContextMappingTests compilation bugs testConcurrentGetAndSetOnPrimary - fix a race condition between indexing and updating value map Allow different data types for category in Context suggester (#23491) Restrict build info loading to ES jar, not any jar (#24049) Remove more hidden file leniency from plugins Register error listener in evil logger tests Detect using logging before configuration [DOCS] Added note about Elastic Cloud to improve 'elastic aws' SERP results. Add version constant for 5.5 (#24075) Add unit tests for NestedAggregator (#24054) Add more debugging information to rethrottles Tests: Use random analyzer only on string fields in Match/MultiMatchBuilderTests Cleanup outdated comments for fixing up pom dependencies (#24056) S3 Repository: Eagerly load static settings (#23910) Reject duplicate settings on the command line Wildcard cluster names for cross cluster search (#23985) Update scripts/security docs for sandboxed world (#23977) ...
2 parents e73ea2a + 52c9159 commit 594e9ab

File tree

209 files changed

+3689
-4739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+3689
-4739
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ For Eclipse, go to `Preferences->Java->Installed JREs` and add `-ea` to
117117
Please follow these formatting guidelines:
118118

119119
* Java indent is 4 spaces
120-
* Line width is 100 characters
120+
* Line width is 140 characters
121121
* The rest is left to Java coding standards
122122
* Disable “auto-format on save” to prevent unnecessary format changes. This makes reviews much harder as it generates unnecessary formatting changes. If your IDE supports formatting only modified chunks that is fine to do.
123123
* Wildcard imports (`import foo.bar.baz.*`) are forbidden and will cause the build to fail. Please attempt to tame your IDE so it doesn't make them and please send a PR against this document with instructions for your IDE if it doesn't contain them.

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,9 @@ class BuildPlugin implements Plugin<Project> {
311311
/**
312312
* Returns a closure which can be used with a MavenPom for fixing problems with gradle generated poms.
313313
*
314-
* <ul>
315-
* <li>Remove transitive dependencies. We currently exclude all artifacts explicitly instead of using wildcards
316-
* as Ivy incorrectly translates POMs with * excludes to Ivy XML with * excludes which results in the main artifact
317-
* being excluded as well (see https://issues.apache.org/jira/browse/IVY-1531). Note that Gradle 2.14+ automatically
318-
* translates non-transitive dependencies to * excludes. We should revisit this when upgrading Gradle.</li>
319-
* <li>Set compile time deps back to compile from runtime (known issue with maven-publish plugin)</li>
320-
* </ul>
314+
* The current fixup is to set compile time deps back to compile from runtime (known issue with maven-publish plugin).
321315
*/
322316
private static Closure fixupDependencies(Project project) {
323-
// TODO: revisit this when upgrading to Gradle 2.14+, see Javadoc comment above
324317
return { XmlProvider xml ->
325318
// first find if we have dependencies at all, and grab the node
326319
NodeList depsNodes = xml.asNode().get('dependencies')

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public class PluginBuildPlugin extends BuildPlugin {
9696
provided "com.vividsolutions:jts:${project.versions.jts}"
9797
provided "org.apache.logging.log4j:log4j-api:${project.versions.log4j}"
9898
provided "org.apache.logging.log4j:log4j-core:${project.versions.log4j}"
99-
provided "net.java.dev.jna:jna:${project.versions.jna}"
99+
provided "org.elasticsearch:jna:${project.versions.jna}"
100100
}
101101
}
102102

buildSrc/src/main/resources/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
suppress the check there but enforce it everywhere else. This prevents the list from getting longer even if it is
2323
unfair. -->
2424
<module name="LineLength">
25-
<property name="max" value="100"/>
25+
<property name="max" value="140"/>
2626
</module>
2727

2828
<module name="AvoidStarImport" />

buildSrc/src/main/resources/eclipse.settings/org.eclipse.jdt.core.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ eclipse.preferences.version=1
1616
# org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
1717

1818
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
19-
org.eclipse.jdt.core.formatter.lineSplit=100
19+
org.eclipse.jdt.core.formatter.lineSplit=140
2020
org.eclipse.jdt.core.formatter.tabulation.char=space
2121
org.eclipse.jdt.core.formatter.tabulation.size=4

core/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ dependencies {
8686
// to bridge dependencies that are still on Log4j 1 to Log4j 2
8787
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}", optional
8888

89-
compile "net.java.dev.jna:jna:${versions.jna}"
89+
// repackaged jna with native bits linked against all elastic supported platforms
90+
compile "org.elasticsearch:jna:${versions.jna}"
9091

9192
if (isEclipse == false || project.path == ":core-tests") {
9293
testCompile("org.elasticsearch.test:framework:${version}") {

core/licenses/jna-4.4.0.jar.sha1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cb208278274bf12ebdb56c61bd7407e6f774d65a
1+
6edc9b4514969d768039acf43f04210b15658cd7

core/src/main/java/org/elasticsearch/Build.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ public class Build {
4343
final String date;
4444
final boolean isSnapshot;
4545

46+
final String esPrefix = "elasticsearch-" + Version.CURRENT;
4647
final URL url = getElasticsearchCodebase();
47-
if (url.toString().endsWith(".jar")) {
48+
final String urlStr = url.toString();
49+
if (urlStr.startsWith("file:/") && (urlStr.endsWith(esPrefix + ".jar") || urlStr.endsWith(esPrefix + "-SNAPSHOT.jar"))) {
4850
try (JarInputStream jar = new JarInputStream(FileSystemUtils.openFileURLStream(url))) {
4951
Manifest manifest = jar.getManifest();
5052
shortHash = manifest.getMainAttributes().getValue("Change");
@@ -54,7 +56,7 @@ public class Build {
5456
throw new RuntimeException(e);
5557
}
5658
} else {
57-
// not running from a jar (unit tests, IDE)
59+
// not running from the official elasticsearch jar file (unit tests, IDE, uber client jar, shadiness)
5860
shortHash = "Unknown";
5961
date = "Unknown";
6062
isSnapshot = true;

core/src/main/java/org/elasticsearch/Version.java

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -35,48 +35,6 @@ public class Version implements Comparable<Version> {
3535
* values below 25 are for alpha builder (since 5.0), and above 25 and below 50 are beta builds, and below 99 are RC builds, with 99
3636
* indicating a release the (internal) format of the id is there so we can easily do after/before checks on the id
3737
*/
38-
public static final int V_2_0_0_ID = 2000099;
39-
public static final Version V_2_0_0 = new Version(V_2_0_0_ID, org.apache.lucene.util.Version.LUCENE_5_2_1);
40-
public static final int V_2_0_1_ID = 2000199;
41-
public static final Version V_2_0_1 = new Version(V_2_0_1_ID, org.apache.lucene.util.Version.LUCENE_5_2_1);
42-
public static final int V_2_0_2_ID = 2000299;
43-
public static final Version V_2_0_2 = new Version(V_2_0_2_ID, org.apache.lucene.util.Version.LUCENE_5_2_1);
44-
public static final int V_2_1_0_ID = 2010099;
45-
public static final Version V_2_1_0 = new Version(V_2_1_0_ID, org.apache.lucene.util.Version.LUCENE_5_3_1);
46-
public static final int V_2_1_1_ID = 2010199;
47-
public static final Version V_2_1_1 = new Version(V_2_1_1_ID, org.apache.lucene.util.Version.LUCENE_5_3_1);
48-
public static final int V_2_1_2_ID = 2010299;
49-
public static final Version V_2_1_2 = new Version(V_2_1_2_ID, org.apache.lucene.util.Version.LUCENE_5_3_1);
50-
public static final int V_2_2_0_ID = 2020099;
51-
public static final Version V_2_2_0 = new Version(V_2_2_0_ID, org.apache.lucene.util.Version.LUCENE_5_4_1);
52-
public static final int V_2_2_1_ID = 2020199;
53-
public static final Version V_2_2_1 = new Version(V_2_2_1_ID, org.apache.lucene.util.Version.LUCENE_5_4_1);
54-
public static final int V_2_2_2_ID = 2020299;
55-
public static final Version V_2_2_2 = new Version(V_2_2_2_ID, org.apache.lucene.util.Version.LUCENE_5_4_1);
56-
public static final int V_2_3_0_ID = 2030099;
57-
public static final Version V_2_3_0 = new Version(V_2_3_0_ID, org.apache.lucene.util.Version.LUCENE_5_5_0);
58-
public static final int V_2_3_1_ID = 2030199;
59-
public static final Version V_2_3_1 = new Version(V_2_3_1_ID, org.apache.lucene.util.Version.LUCENE_5_5_0);
60-
public static final int V_2_3_2_ID = 2030299;
61-
public static final Version V_2_3_2 = new Version(V_2_3_2_ID, org.apache.lucene.util.Version.LUCENE_5_5_0);
62-
public static final int V_2_3_3_ID = 2030399;
63-
public static final Version V_2_3_3 = new Version(V_2_3_3_ID, org.apache.lucene.util.Version.LUCENE_5_5_0);
64-
public static final int V_2_3_4_ID = 2030499;
65-
public static final Version V_2_3_4 = new Version(V_2_3_4_ID, org.apache.lucene.util.Version.LUCENE_5_5_0);
66-
public static final int V_2_3_5_ID = 2030599;
67-
public static final Version V_2_3_5 = new Version(V_2_3_5_ID, org.apache.lucene.util.Version.LUCENE_5_5_0);
68-
public static final int V_2_4_0_ID = 2040099;
69-
public static final Version V_2_4_0 = new Version(V_2_4_0_ID, org.apache.lucene.util.Version.LUCENE_5_5_2);
70-
public static final int V_2_4_1_ID = 2040199;
71-
public static final Version V_2_4_1 = new Version(V_2_4_1_ID, org.apache.lucene.util.Version.LUCENE_5_5_2);
72-
public static final int V_2_4_2_ID = 2040299;
73-
public static final Version V_2_4_2 = new Version(V_2_4_2_ID, org.apache.lucene.util.Version.LUCENE_5_5_2);
74-
public static final int V_2_4_3_ID = 2040399;
75-
public static final Version V_2_4_3 = new Version(V_2_4_3_ID, org.apache.lucene.util.Version.LUCENE_5_5_2);
76-
public static final int V_2_4_4_ID = 2040499;
77-
public static final Version V_2_4_4 = new Version(V_2_4_4_ID, org.apache.lucene.util.Version.LUCENE_5_5_2);
78-
public static final int V_2_4_5_ID = 2040599;
79-
public static final Version V_2_4_5 = new Version(V_2_4_5_ID, org.apache.lucene.util.Version.LUCENE_5_5_2);
8038
public static final int V_5_0_0_alpha1_ID = 5000001;
8139
public static final Version V_5_0_0_alpha1 = new Version(V_5_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_0_0);
8240
public static final int V_5_0_0_alpha2_ID = 5000002;
@@ -120,6 +78,8 @@ public class Version implements Comparable<Version> {
12078
public static final Version V_5_3_1_UNRELEASED = new Version(V_5_3_1_ID_UNRELEASED, org.apache.lucene.util.Version.LUCENE_6_4_2);
12179
public static final int V_5_4_0_ID_UNRELEASED = 5040099;
12280
public static final Version V_5_4_0_UNRELEASED = new Version(V_5_4_0_ID_UNRELEASED, org.apache.lucene.util.Version.LUCENE_6_5_0);
81+
public static final int V_5_5_0_ID_UNRELEASED = 5050099;
82+
public static final Version V_5_5_0_UNRELEASED = new Version(V_5_5_0_ID_UNRELEASED, org.apache.lucene.util.Version.LUCENE_6_5_0);
12383
public static final int V_6_0_0_alpha1_ID_UNRELEASED = 6000001;
12484
public static final Version V_6_0_0_alpha1_UNRELEASED =
12585
new Version(V_6_0_0_alpha1_ID_UNRELEASED, org.apache.lucene.util.Version.LUCENE_6_5_0);
@@ -140,6 +100,8 @@ public static Version fromId(int id) {
140100
switch (id) {
141101
case V_6_0_0_alpha1_ID_UNRELEASED:
142102
return V_6_0_0_alpha1_UNRELEASED;
103+
case V_5_5_0_ID_UNRELEASED:
104+
return V_5_5_0_UNRELEASED;
143105
case V_5_4_0_ID_UNRELEASED:
144106
return V_5_4_0_UNRELEASED;
145107
case V_5_3_1_ID_UNRELEASED:
@@ -182,48 +144,6 @@ public static Version fromId(int id) {
182144
return V_5_0_0_alpha2;
183145
case V_5_0_0_alpha1_ID:
184146
return V_5_0_0_alpha1;
185-
case V_2_4_5_ID:
186-
return V_2_4_5;
187-
case V_2_4_4_ID:
188-
return V_2_4_4;
189-
case V_2_4_3_ID:
190-
return V_2_4_3;
191-
case V_2_4_2_ID:
192-
return V_2_4_2;
193-
case V_2_4_1_ID:
194-
return V_2_4_1;
195-
case V_2_4_0_ID:
196-
return V_2_4_0;
197-
case V_2_3_5_ID:
198-
return V_2_3_5;
199-
case V_2_3_4_ID:
200-
return V_2_3_4;
201-
case V_2_3_3_ID:
202-
return V_2_3_3;
203-
case V_2_3_2_ID:
204-
return V_2_3_2;
205-
case V_2_3_1_ID:
206-
return V_2_3_1;
207-
case V_2_3_0_ID:
208-
return V_2_3_0;
209-
case V_2_2_2_ID:
210-
return V_2_2_2;
211-
case V_2_2_1_ID:
212-
return V_2_2_1;
213-
case V_2_2_0_ID:
214-
return V_2_2_0;
215-
case V_2_1_2_ID:
216-
return V_2_1_2;
217-
case V_2_1_1_ID:
218-
return V_2_1_1;
219-
case V_2_1_0_ID:
220-
return V_2_1_0;
221-
case V_2_0_2_ID:
222-
return V_2_0_2;
223-
case V_2_0_1_ID:
224-
return V_2_0_1;
225-
case V_2_0_0_ID:
226-
return V_2_0_0;
227147
default:
228148
return new Version(id, org.apache.lucene.util.Version.LATEST);
229149
}

core/src/main/java/org/elasticsearch/action/ActionModule.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
import org.elasticsearch.action.admin.cluster.node.tasks.get.TransportGetTaskAction;
3838
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksAction;
3939
import org.elasticsearch.action.admin.cluster.node.tasks.list.TransportListTasksAction;
40+
import org.elasticsearch.action.admin.cluster.remote.RemoteInfoAction;
41+
import org.elasticsearch.action.admin.cluster.remote.TransportRemoteInfoAction;
4042
import org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryAction;
4143
import org.elasticsearch.action.admin.cluster.repositories.delete.TransportDeleteRepositoryAction;
4244
import org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesAction;
@@ -235,6 +237,7 @@
235237
import org.elasticsearch.rest.action.admin.cluster.RestPendingClusterTasksAction;
236238
import org.elasticsearch.rest.action.admin.cluster.RestPutRepositoryAction;
237239
import org.elasticsearch.rest.action.admin.cluster.RestPutStoredScriptAction;
240+
import org.elasticsearch.rest.action.admin.cluster.RestRemoteClusterInfoAction;
238241
import org.elasticsearch.rest.action.admin.cluster.RestRestoreSnapshotAction;
239242
import org.elasticsearch.rest.action.admin.cluster.RestSnapshotsStatusAction;
240243
import org.elasticsearch.rest.action.admin.cluster.RestVerifyRepositoryAction;
@@ -400,6 +403,7 @@ public <Request extends ActionRequest, Response extends ActionResponse> void reg
400403

401404
actions.register(MainAction.INSTANCE, TransportMainAction.class);
402405
actions.register(NodesInfoAction.INSTANCE, TransportNodesInfoAction.class);
406+
actions.register(RemoteInfoAction.INSTANCE, TransportRemoteInfoAction.class);
403407
actions.register(NodesStatsAction.INSTANCE, TransportNodesStatsAction.class);
404408
actions.register(NodesHotThreadsAction.INSTANCE, TransportNodesHotThreadsAction.class);
405409
actions.register(ListTasksAction.INSTANCE, TransportListTasksAction.class);
@@ -509,6 +513,7 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
509513
};
510514
registerHandler.accept(new RestMainAction(settings, restController));
511515
registerHandler.accept(new RestNodesInfoAction(settings, restController, settingsFilter));
516+
registerHandler.accept(new RestRemoteClusterInfoAction(settings, restController));
512517
registerHandler.accept(new RestNodesStatsAction(settings, restController));
513518
registerHandler.accept(new RestNodesHotThreadsAction(settings, restController));
514519
registerHandler.accept(new RestClusterAllocationExplainAction(settings, restController));

0 commit comments

Comments
 (0)