Skip to content

Commit fa7b4df

Browse files
committed
Merge remote-tracking branch 'elastic/master' into retention-lease-ccr
* elastic/master: Avoid double term construction in DfsPhase (elastic#38716) Fix typo in DateRange docs (yyy → yyyy) (elastic#38883) Introduced class reuses follow parameter code between ShardFollowTasks (elastic#38910) Ensure random timestamps are within search boundary (elastic#38753) [CI] Muting method testFollowIndex in IndexFollowingIT Update Lucene snapshot repo for 7.0.0-beta1 (elastic#38946) SQL: Doc on syntax (identifiers in particular) (elastic#38662) Upgrade to Gradle 5.2.1 (elastic#38880) Tie break search shard iterator comparisons on cluster alias (elastic#38853) Also mmap cfs files for hybridfs (elastic#38940) Build: Fix issue with test status logging (elastic#38799) Adapt FullClusterRestartIT on master (elastic#38856) Fix testAutoFollowing test to use createLeaderIndex() helper method. Migrate muted auto follow rolling upgrade test and unmute this test (elastic#38900) ShardBulkAction ignore primary response on primary (elastic#38901) Recover peers from translog, ignoring soft deletes (elastic#38904) Fix NPE on Stale Index in IndicesService (elastic#38891) Smarter CCR concurrent file chunk fetching (elastic#38841) Fix intermittent failure in ApiKeyIntegTests (elastic#38627) re-enable SmokeTestWatcherWithSecurityIT (elastic#38814)
2 parents cdf9bdc + 38d2935 commit fa7b4df

File tree

71 files changed

+1551
-1386
lines changed

Some content is hidden

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

71 files changed

+1551
-1386
lines changed

buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/TestProgressLogger.groovy

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import com.carrotsearch.ant.tasks.junit4.events.aggregated.HeartBeatEvent
3232
import com.carrotsearch.ant.tasks.junit4.listeners.AggregatedEventListener
3333
import org.gradle.internal.logging.progress.ProgressLogger
3434
import org.gradle.internal.logging.progress.ProgressLoggerFactory
35+
import org.junit.runner.Description
3536

3637
import static com.carrotsearch.ant.tasks.junit4.FormattingUtils.formatDurationInSeconds
3738
import static com.carrotsearch.ant.tasks.junit4.events.aggregated.TestStatus.ERROR
@@ -113,7 +114,7 @@ class TestProgressLogger implements AggregatedEventListener {
113114

114115
@Subscribe
115116
void onSuiteStart(AggregatedSuiteStartedEvent e) throws IOException {
116-
String suiteName = simpleName(e.suiteStartedEvent.description.className)
117+
String suiteName = simpleName(e.suiteStartedEvent.description)
117118
slaveLoggers[e.slave.id].progress("J${e.slave.id}: ${suiteName} - initializing")
118119
}
119120

@@ -146,31 +147,45 @@ class TestProgressLogger implements AggregatedEventListener {
146147
throw new IllegalArgumentException("Unknown test status: [${e.status}]")
147148
}
148149
testLogger.progress("Tests: completed: ${testsCompleted}, failed: ${testsFailed}, ignored: ${testsIgnored}")
149-
String testName = simpleName(e.description.className) + '.' + e.description.methodName
150+
String testName = testName(e.description)
150151
slaveLoggers[e.slave.id].progress("J${e.slave.id}: ${testName} ${statusMessage}")
151152
}
152153

153154
@Subscribe
154155
void onTestStarted(TestStartedEvent e) throws IOException {
155-
String testName = simpleName(e.description.className) + '.' + e.description.methodName
156+
String testName = testName(e.description)
156157
slaveLoggers[e.slave.id].progress("J${e.slave.id}: ${testName} ...")
157158
}
158159

159160
@Subscribe
160161
void onHeartbeat(HeartBeatEvent e) throws IOException {
161-
String testName = simpleName(e.description.className) + '.' + e.description.methodName
162+
String testName = testName(e.description)
162163
String time = formatDurationInSeconds(e.getNoEventDuration())
163164
slaveLoggers[e.slave.id].progress("J${e.slave.id}: ${testName} stalled for ${time}")
164165
}
165166

167+
/**
168+
* Build the test name in the format of <className>.<methodName>
169+
*/
170+
private static String testName(Description description) {
171+
String className = simpleName(description)
172+
if (description == null) {
173+
return className + "." + "<unknownMethod>"
174+
}
175+
return className + "." + description.methodName
176+
}
177+
166178
/**
167179
* Extract a Class#getSimpleName style name from Class#getName style
168180
* string. We can't just use Class#getSimpleName because junit descriptions
169181
* don't always set the class field but they always set the className
170182
* field.
171183
*/
172-
private static String simpleName(String className) {
173-
return className.substring(className.lastIndexOf('.') + 1)
184+
private static String simpleName(Description description) {
185+
if (description == null) {
186+
return "<unknownClass>"
187+
}
188+
return description.className.substring(description.className.lastIndexOf('.') + 1)
174189
}
175190

176191
@Override
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.1
1+
5.2.1

docs/java-rest/high-level/getting-started.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ dependencies {
8383
The very first releases of any major version (like a beta), might have been built on top of a Lucene Snapshot version.
8484
In such a case you will be unable to resolve the Lucene dependencies of the client.
8585

86-
For example, if you want to use the `7.0.0-alpha2` version which depends on Lucene `8.0.0-snapshot-774e9aefbc`, you must
86+
For example, if you want to use the `7.0.0-beta1` version which depends on Lucene `8.0.0-snapshot-83f9835`, you must
8787
define the following repository.
8888

8989
For Maven:
@@ -93,7 +93,7 @@ For Maven:
9393
<repository>
9494
<id>elastic-lucene-snapshots</id>
9595
<name>Elastic Lucene Snapshots</name>
96-
<url>http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/774e9aefbc</url>
96+
<url>http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/83f9835</url>
9797
<releases><enabled>true</enabled></releases>
9898
<snapshots><enabled>false</enabled></snapshots>
9999
</repository>
@@ -104,7 +104,7 @@ For Gradle:
104104
["source","groovy",subs="attributes"]
105105
--------------------------------------------------
106106
maven {
107-
url 'http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/774e9aefbc'
107+
url 'http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/83f9835'
108108
}
109109
--------------------------------------------------
110110

docs/reference/aggregations/bucket/daterange-aggregation.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ POST /sales/_search?size=0
2020
"range": {
2121
"date_range": {
2222
"field": "date",
23-
"format": "MM-yyy",
23+
"format": "MM-yyyy",
2424
"ranges": [
2525
{ "to": "now-10M/M" }, <1>
2626
{ "from": "now-10M/M" } <2>

docs/reference/modules/cross-cluster-search.asciidoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ will be prefixed with their remote cluster name:
150150
"max_score": 1,
151151
"hits": [
152152
{
153-
"_index": "cluster_one:twitter",
153+
"_index": "twitter",
154154
"_type": "_doc",
155155
"_id": "0",
156-
"_score": 1,
156+
"_score": 2,
157157
"_source": {
158158
"user": "kimchy",
159159
"date": "2009-11-15T14:12:12",
@@ -162,10 +162,10 @@ will be prefixed with their remote cluster name:
162162
}
163163
},
164164
{
165-
"_index": "twitter",
165+
"_index": "cluster_one:twitter",
166166
"_type": "_doc",
167167
"_id": "0",
168-
"_score": 2,
168+
"_score": 1,
169169
"_source": {
170170
"user": "kimchy",
171171
"date": "2009-11-15T14:12:12",
@@ -243,10 +243,10 @@ GET /cluster_one:twitter,cluster_two:twitter,twitter/_search <1>
243243
"max_score": 1,
244244
"hits": [
245245
{
246-
"_index": "cluster_one:twitter",
246+
"_index": "twitter",
247247
"_type": "_doc",
248248
"_id": "0",
249-
"_score": 1,
249+
"_score": 2,
250250
"_source": {
251251
"user": "kimchy",
252252
"date": "2009-11-15T14:12:12",
@@ -255,10 +255,10 @@ GET /cluster_one:twitter,cluster_two:twitter,twitter/_search <1>
255255
}
256256
},
257257
{
258-
"_index": "twitter",
258+
"_index": "cluster_one:twitter",
259259
"_type": "_doc",
260260
"_id": "0",
261-
"_score": 2,
261+
"_score": 1,
262262
"_source": {
263263
"user": "kimchy",
264264
"date": "2009-11-15T14:12:12",

docs/reference/sql/appendix/syntax-reserved.asciidoc

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Table with reserved keywords that need to be quoted. Also provide an example to make it more obvious.
77

8-
The following table lists all of the keywords that are reserved in Presto,
8+
The following table lists all of the keywords that are reserved in {es-sql},
99
along with their status in the SQL standard. These reserved keywords must
1010
be quoted (using double quotes) in order to be used as an identifier, for example:
1111

@@ -31,43 +31,65 @@ s|SQL-92
3131
|`BETWEEN` |reserved |reserved
3232
|`BY` |reserved |reserved
3333
|`CAST` |reserved |reserved
34+
|`CATALOG` |reserved |reserved
35+
|`CONVERT` |reserved |reserved
36+
|`CURRENT_DATE` |reserved |reserved
37+
|`CURRENT_TIMESTAMP` |reserved |reserved
38+
|`DAY` |reserved |reserved
39+
|`DAYS` | |
3440
|`DESC` |reserved |reserved
3541
|`DESCRIBE` |reserved |reserved
3642
|`DISTINCT` |reserved |reserved
43+
|`ESCAPE` |reserved |reserved
3744
|`EXISTS` |reserved |reserved
3845
|`EXPLAIN` |reserved |reserved
3946
|`EXTRACT` |reserved |reserved
4047
|`FALSE` |reserved |reserved
48+
|`FIRST` |reserved |reserved
4149
|`FROM` |reserved |reserved
4250
|`FULL` |reserved |reserved
4351
|`GROUP` |reserved |reserved
4452
|`HAVING` |reserved |reserved
53+
|`HOUR` |reserved |reserved
54+
|`HOURS` | |
4555
|`IN` |reserved |reserved
4656
|`INNER` |reserved |reserved
57+
|`INTERVAL` |reserved |reserved
4758
|`IS` |reserved |reserved
4859
|`JOIN` |reserved |reserved
4960
|`LEFT` |reserved |reserved
5061
|`LIKE` |reserved |reserved
5162
|`LIMIT` |reserved |reserved
5263
|`MATCH` |reserved |reserved
64+
|`MINUTE` |reserved |reserved
65+
|`MINUTES` | |
66+
|`MONTH` |reserved |reserved
5367
|`NATURAL` |reserved |reserved
54-
|`NO` |reserved |reserved
5568
|`NOT` |reserved |reserved
5669
|`NULL` |reserved |reserved
70+
|`NULLS` | |
5771
|`ON` |reserved |reserved
5872
|`OR` |reserved |reserved
5973
|`ORDER` |reserved |reserved
6074
|`OUTER` |reserved |reserved
6175
|`RIGHT` |reserved |reserved
76+
|`RLIKE` | |
77+
|`QUERY` | |
78+
|`SECOND` |reserved |reserved
79+
|`SECONDS` | |
6280
|`SELECT` |reserved |reserved
6381
|`SESSION` | |reserved
6482
|`TABLE` |reserved |reserved
83+
|`TABLES` | |
6584
|`THEN` |reserved |reserved
6685
|`TO` |reserved |reserved
6786
|`TRUE` |reserved |reserved
87+
|`TYPE` | |
6888
|`USING` |reserved |reserved
6989
|`WHEN` |reserved |reserved
7090
|`WHERE` |reserved |reserved
7191
|`WITH` |reserved |reserved
92+
|`YEAR` |reserved |reserved
93+
|`YEARS` | |
7294

7395
|===

docs/reference/sql/index.asciidoc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,33 @@
1212
[partintro]
1313
--
1414

15-
X-Pack includes a SQL feature to execute SQL against Elasticsearch
15+
X-Pack includes a SQL feature to execute SQL queries against {es}
1616
indices and return results in tabular format.
1717

18+
The following chapters aim to cover everything from usage, to syntax and drivers.
19+
Experience users or those in a hurry might want to jump directly to
20+
the list of SQL <<sql-commands, commands>> and <<sql-functions, functions>>.
21+
1822
<<sql-overview, Overview>>::
1923
Overview of {es-sql} and its features.
2024
<<sql-getting-started, Getting Started>>::
2125
Start using SQL right away in {es}.
2226
<<sql-concepts, Concepts and Terminology>>::
2327
Language conventions across SQL and {es}.
2428
<<sql-security,Security>>::
25-
Securing {es-sql} and {es}.
29+
Secure {es-sql} and {es}.
2630
<<sql-rest,REST API>>::
27-
Accepts SQL in a JSON document, executes it, and returns the
28-
results.
31+
Execute SQL in JSON format over REST.
2932
<<sql-translate,Translate API>>::
30-
Accepts SQL in a JSON document and translates it into a native
31-
Elasticsearch query and returns that.
33+
Translate SQL in JSON format to {es} native query.
3234
<<sql-cli,CLI>>::
33-
Command-line application that connects to {es} to execute
34-
SQL and print tabular results.
35+
Command-line application for executing SQL against {es}.
3536
<<sql-jdbc,JDBC>>::
36-
A JDBC driver for {es}.
37+
JDBC driver for {es}.
3738
<<sql-odbc,ODBC>>::
38-
An ODBC driver for {es}.
39+
ODBC driver for {es}.
3940
<<sql-client-apps,Client Applications>>::
40-
Documentation for configuring various SQL/BI tools with {es-sql}.
41+
Setup various SQL/BI tools with {es-sql}.
4142
<<sql-spec,SQL Language>>::
4243
Overview of the {es-sql} language, such as supported data types, commands and
4344
syntax.

docs/reference/sql/language/index.asciidoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
[[sql-spec]]
44
== SQL Language
55

6-
This chapter describes the SQL semantics supported in X-Pack namely:
6+
This chapter describes the SQL syntax and semantics supported namely:
77

8-
<<sql-data-types>>:: Data types
8+
<<sql-lexical-structure>>:: Lexical structure
99
<<sql-commands>>:: Commands
10+
<<sql-data-types>>:: Data types
1011
<<sql-index-patterns>>:: Index patterns
1112

13+
include::syntax/lexic/index.asciidoc[]
14+
include::syntax/commands/index.asciidoc[]
1215
include::data-types.asciidoc[]
13-
include::syntax/index.asciidoc[]
1416
include::index-patterns.asciidoc[]

0 commit comments

Comments
 (0)