From dcbf02b89a16ffcde941c3e16917d751038f277f Mon Sep 17 00:00:00 2001 From: chenyuzhi459 <553673833@qq.com> Date: Fri, 12 Jun 2020 14:11:57 +0800 Subject: [PATCH 01/17] fix query memory leak --- .gitignore | 1 + .idea/README.md | 39 - .idea/inspectionProfiles/Druid.xml | 497 ------ .../inspectionProfiles/profiles_settings.xml | 37 - .idea/mavenProjectSettings.xml | 10 - .idea/misc.xml | 90 -- .idea/scopes/JavaInspectionsScope.xml | 3 - .idea/scopes/NonGeneratedFiles.xml | 3 - .idea/scopes/UnusedInspectionsScope.xml | 6 - .idea/xml-schemas/assembly-2.0.0.xsd | 1368 ----------------- .idea/xml-schemas/svg11.dtd | 333 ---- .../SeekableStreamIndexTaskRunner.java | 12 +- .../query/ChainedExecutionQueryRunner.java | 23 +- .../druid/query/GroupByMergedQueryRunner.java | 20 +- .../epinephelinae/ConcurrentGrouper.java | 18 +- .../GroupByMergingQueryRunnerV2.java | 21 +- .../cache/BackgroundCachePopulator.java | 1 + 17 files changed, 58 insertions(+), 2424 deletions(-) delete mode 100644 .idea/README.md delete mode 100644 .idea/inspectionProfiles/Druid.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 .idea/mavenProjectSettings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/scopes/JavaInspectionsScope.xml delete mode 100644 .idea/scopes/NonGeneratedFiles.xml delete mode 100644 .idea/scopes/UnusedInspectionsScope.xml delete mode 100644 .idea/xml-schemas/assembly-2.0.0.xsd delete mode 100644 .idea/xml-schemas/svg11.dtd diff --git a/.gitignore b/.gitignore index 90cd78b57e89..3e0d49b9853b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ LICENSE.BINARY NOTICE.BINARY README.BINARY README +.idea/ diff --git a/.idea/README.md b/.idea/README.md deleted file mode 100644 index b366b5a68e66..000000000000 --- a/.idea/README.md +++ /dev/null @@ -1,39 +0,0 @@ - - -Comments to various parts of IntelliJ's settings XML files. These comments cannot currently be placed close to the -things that they are about, because IntelliJ keeps removing the comments from settings XML files: see -https://youtrack.jetbrains.com/issue/IDEA-211087. Please vote for this issue to increase the chances that it's fixed -faster. [This Druid's issue](https://github.com/apache/incubator-druid/issues/7549) records the fact that the comments -should be moved when that IntelliJ's issue is fixed. - -1) [`inspectionProfiles/Druid.xml`](inspectionProfiles/Druid.xml), `StaticPseudoFunctionalStyleMethod` is turned off -because the current rate of false-positives produced by this inspection is very high, see -https://youtrack.jetbrains.com/issue/IDEA-153047#focus=streamItem-27-3326648.0-0. - -2) [`misc.xml`](misc.xml), `ProjectResources` component: this component is needed because IntelliJ verifies XML -documents by the schema. XML documents usually reference those schemas as URLs: -``` - -``` - -But IntelliJ doesn't automatically go to the internet to download the resource. It needs to know what schema corresponds -to what URL, statically. Hence the `ProjectResources` component. \ No newline at end of file diff --git a/.idea/inspectionProfiles/Druid.xml b/.idea/inspectionProfiles/Druid.xml deleted file mode 100644 index cf4e53758479..000000000000 --- a/.idea/inspectionProfiles/Druid.xml +++ /dev/null @@ -1,497 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3660904c1029..000000000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/mavenProjectSettings.xml b/.idea/mavenProjectSettings.xml deleted file mode 100644 index 1eb1f057ae63..000000000000 --- a/.idea/mavenProjectSettings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index bf2061d7392d..000000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.idea/scopes/JavaInspectionsScope.xml b/.idea/scopes/JavaInspectionsScope.xml deleted file mode 100644 index b4dff3d5c6f8..000000000000 --- a/.idea/scopes/JavaInspectionsScope.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/scopes/NonGeneratedFiles.xml b/.idea/scopes/NonGeneratedFiles.xml deleted file mode 100644 index 5bd4a87fc464..000000000000 --- a/.idea/scopes/NonGeneratedFiles.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/scopes/UnusedInspectionsScope.xml b/.idea/scopes/UnusedInspectionsScope.xml deleted file mode 100644 index 45e735410473..000000000000 --- a/.idea/scopes/UnusedInspectionsScope.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/xml-schemas/assembly-2.0.0.xsd b/.idea/xml-schemas/assembly-2.0.0.xsd deleted file mode 100644 index db101fe96729..000000000000 --- a/.idea/xml-schemas/assembly-2.0.0.xsd +++ /dev/null @@ -1,1368 +0,0 @@ - - - - - - - - - - 1.0.0+ - - - An assembly defines a collection of files usually distributed in an - archive format such as zip, tar, or tar.gz that is generated from a - project. For example, a project could produce a ZIP assembly which - contains a project's JAR artifact in the root directory, the - runtime dependencies in a lib/ directory, and a shell script to launch - a stand-alone application. - - - - - - - 1.0.0+ - - - An assembly defines a collection of files usually distributed in an - archive format such as zip, tar, or tar.gz that is generated from a - project. For example, a project could produce a ZIP assembly which - contains a project's JAR artifact in the root directory, the - runtime dependencies in a lib/ directory, and a shell script to launch - a stand-alone application. - - - - - - - 1.0.0+ - - Sets the id of this assembly. This is a symbolic name for a - particular assembly of files from this project. Also, aside from - being used to distinctly name the assembled package by attaching - its value to the generated archive, the id is used as your - artifact's classifier when deploying. - - - - - - 1.0.0+ - - - Specifies the formats of the assembly. - - It is often better to specify the formats via the goal parameter rather - than here. For example, that allows different profiles to generate - different types of archives. - - Multiple formats can be - supplied and the Assembly Plugin will generate an archive for each - of the desired formats. When deploying your project, all file formats - specified will also be deployed. A format is specified by supplying - one of the following values in a &lt;format&gt; subelement: - <ul> - <li><b>"zip"</b> - Creates a ZIP file format</li> - <li><b>"tar"</b> - Creates a TAR format</li> - <li><b>"tar.gz"</b> or <b>"tgz"</b> - Creates a gzip'd TAR format</li> - <li><b>"tar.bz2"</b> or <b>"tbz2"</b> - Creates a bzip'd TAR format</li> - <li><b>"jar"</b> - Creates a JAR format</li> - <li><b>"dir"</b> - Creates an exploded directory format</li> - <li><b>"war"</b> - Creates a WAR format</li> - </ul> - - - - - - - - - - - - 0.0.0+ - - Includes a base directory in the final archive. For example, - if you are creating an assembly named "your-app", setting - includeBaseDirectory to true will create an archive that - includes this base directory. If this option is set to false - the archive created will unzip its content to the current - directory. - - - - - - 1.1.0+ - - Sets the base directory of the resulting assembly archive. If this is not - set and includeBaseDirectory == true, ${project.build.finalName} will be used instead. - (Since 2.2-beta-1) - - - - - - 0.0.0+ - - Includes a site directory in the final archive. The site directory - location of a project is determined by the siteDirectory parameter - of the Assembly Plugin. - - - - - - 1.1.0+ - - - Set of components which filter various container descriptors out of - the normal archive stream, so they can be aggregated then added. - - - - - - - - - - - - 1.0.0+ - - - Specifies which module files to include in the assembly. A moduleSet - is specified by providing one or more of &lt;moduleSet&gt; - subelements. - - - - - - - - - - - - 1.0.0+ - - - Specifies which groups of files to include in the assembly. A - fileSet is specified by providing one or more of &lt;fileSet&gt; - subelements. - - - - - - - - - - - - 1.0.0+ - - - Specifies which single files to include in the assembly. A file - is specified by providing one or more of &lt;file&gt; - subelements. - - - - - - - - - - - - 1.0.0+ - - - Specifies which dependencies to include in the assembly. A - dependencySet is specified by providing one or more of - &lt;dependencySet&gt; subelements. - - - - - - - - - - - - 1.0.0+ - - - Specifies which repository files to include in the assembly. A - repository is specified by providing one or more of - &lt;repository&gt; subelements. - - - - - - - - - - - - 1.0.0+ - - - Specifies the shared components xml file locations to include in the - assembly. The locations specified must be relative to the base location - of the descriptor. If the descriptor was found via a &lt;descriptorRef/&gt; - element in the - classpath, any components it specifies will also be found on the classpath. - If it is found by pathname via a &lt;descriptor/&gt; element - the value here will be interpreted - as a path relative to the project basedir. - When multiple componentDescriptors are found, their - contents are merged. Check out the <a href="component.html"> - descriptor components</a> for more information. A - componentDescriptor is specified by providing one or more of - &lt;componentDescriptor&gt; subelements. - - - - - - - - - - - - - - 1.0.0+ - - A file allows individual file inclusion with the option to change - the destination filename not supported by fileSets. - - - - - - 1.0.0+ - - Sets the absolute or relative path from the module's directory - of the file to be included in the assembly. - - - - - - 1.0.0+ - - Sets the output directory relative to the root - of the root directory of the assembly. For example, - "log" will put the specified files in the log directory. - - - - - - 1.0.0+ - - Sets the destination filename in the outputDirectory. - Default is the same name as the source's file. - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the file mode of the files included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of Read = 4, - Write = 2, and Execute = 1. For example, the value 0644 - translates to User read-write, Group and Other read-only. The default value is 0644 - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - - Sets the line-endings of the files in this file. - Valid values are: - <ul> - <li><b>"keep"</b> - Preserve all line endings</li> - <li><b>"unix"</b> - Use Unix-style line endings (i.e. "\n")</li> - <li><b>"lf"</b> - Use a single line-feed line endings (i.e. "\n")</li> - <li><b>"dos"</b> - Use DOS-/Windows-style line endings (i.e. "\r\n")</li> - <li><b>"windows"</b> - Use DOS-/Windows-style line endings (i.e. "\r\n")</li> - <li><b>"crlf"</b> - Use carriage-return, line-feed line endings (i.e. "\r\n")</li> - </ul> - - - - - - - 1.0.0+ - - Sets whether to determine if the file is filtered. - - - - - - - - 1.1.0+ - - Configures a filter for files headed into the assembly archive, to enable - aggregation of various types of descriptor fragments, such as components.xml, - web.xml, etc. - - - - - - 1.1.0+ - - The handler's plexus role-hint, for lookup from the container. - - - - - - 1.1.1+ - - Configuration options for the handler. - - - - - - - - - - - - - 1.0.0+ - - A fileSet allows the inclusion of groups of files into the assembly. - - - - - - 1.1.0+ - - Whether standard exclusion patterns, such as those matching CVS and Subversion - metadata files, should be used when calculating the files affected by this set. - For backward compatibility, the default value is true. (Since 2.2-beta-1) - - - - - - 1.0.0+ - - Sets the output directory relative to the root - of the root directory of the assembly. For example, - "log" will put the specified files in the log directory. - - - - - - 1.0.0+ - - - When &lt;include&gt; subelements are present, they define a set of - files and directory to include. If none is present, then - &lt;includes&gt; represents all valid values. - - - - - - - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define a set of - files and directory to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. - - - - - - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the file mode of the files included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of Read = 4, - Write = 2, and Execute = 1. For example, the value 0644 - translates to User read-write, Group and Other read-only. The default value is 0644. - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the directory mode of the directories - included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of - Read = 4, Write = 2, and Execute = 1. For example, the value - 0755 translates to User read-write, Group and Other read-only. The default value is 0755. - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - Sets the absolute or relative location from the module's - directory. For example, "src/main/bin" would select this - subdirectory of the project in which this dependency is defined. - - - - - - 1.0.0+ - - - Sets the line-endings of the files in this fileSet. - Valid values: - <ul> - <li><b>"keep"</b> - Preserve all line endings</li> - <li><b>"unix"</b> - Use Unix-style line endings (i.e. "\n")</li> - <li><b>"lf"</b> - Use a single line-feed line endings (i.e. "\n")</li> - <li><b>"dos"</b> - Use DOS-/Windows-style line endings (i.e. "\r\n")</li> - <li><b>"windows"</b> - Use DOS-/Windows-style line endings (i.e. "\r\n")</li> - <li><b>"crlf"</b> - Use carriage-return, line-feed line endings (i.e. "\r\n")</li> - </ul> - - - - - - - 1.1.0+ - - Whether to filter symbols in the files as they are copied, using - properties from the build configuration. (Since 2.2-beta-1) - - - - - - - - 1.0.0+ - - - A moduleSet represent one or more project &lt;module&gt; present inside - a project's pom.xml. This allows you to include sources or binaries - belonging to a project's &lt;modules&gt;. - - <br/><b>NOTE:</b> When using &lt;moduleSets&gt; from the command-line, it - is required to pass first the package phase by doing: "mvn package - assembly:assembly". This bug/issue is scheduled to be addressed by Maven 2.1. - - - - - - - 1.1.2+ - - If set to true, the plugin will include all projects in the current reactor for processing - in this ModuleSet. These will be subject to include/exclude rules. (Since 2.2) - - - - - - 1.1.0+ - - If set to false, the plugin will exclude sub-modules from processing in this ModuleSet. - Otherwise, it will process all sub-modules, each subject to include/exclude rules. (Since 2.2-beta-1) - - - - - - 1.0.0+ - - - When &lt;include&gt; subelements are present, they define a set of - project coordinates to include. If none is present, then - &lt;includes&gt; represents all valid values. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define a set of - project artifact coordinates to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - When this is present, the plugin will include the source files of - the included modules from this set in the resulting assembly. - - - - - - 1.0.0+ - - When this is present, the plugin will include the binaries of the - included modules from this set in the resulting assembly. - - - - - - - - 1.0.0+ - - Contains configuration options for including the source files of a - project module in an assembly. - - - - - - 1.1.0+ - - Whether standard exclusion patterns, such as those matching CVS and Subversion - metadata files, should be used when calculating the files affected by this set. - For backward compatibility, the default value is true. (Since 2.2-beta-1) - - - - - - 1.0.0+ - - Sets the output directory relative to the root - of the root directory of the assembly. For example, - "log" will put the specified files in the log directory. - - - - - - 1.0.0+ - - - When &lt;include&gt; subelements are present, they define a set of - files and directory to include. If none is present, then - &lt;includes&gt; represents all valid values. - - - - - - - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define a set of - files and directory to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. - - - - - - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the file mode of the files included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of Read = 4, - Write = 2, and Execute = 1. For example, the value 0644 - translates to User read-write, Group and Other read-only. The default value is 0644 - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the directory mode of the directories - included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of - Read = 4, Write = 2, and Execute = 1. For example, the value - 0755 translates to User read-write, Group and Other read-only. The default value is 0755. - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.1.0+ - - - Specifies which groups of files from each included module to include in the assembly. A - fileSet is specified by providing one or more of &lt;fileSet&gt; subelements. (Since 2.2-beta-1) - - - - - - - - - - - - 1.1.0+ - - - Specifies whether the module's finalName should be prepended to the outputDirectory - values of any fileSets applied to it. (Since 2.2-beta-1) - - - - - - - 1.1.0+ - - - Specifies whether sub-module directories below the current module should be excluded - from fileSets applied to that module. This might be useful if you only mean to copy - the sources for the exact module list matched by this ModuleSet, ignoring (or processing - separately) the modules which exist in directories below the current one. (Since 2.2-beta-1) - - - - - - - 1.1.0+ - - Sets the mapping pattern for all module base-directories included in this assembly. - NOTE: This field is only used if includeModuleDirectory == true. - Default is the module's ${artifactId} in 2.2-beta-1, and ${module.artifactId} in subsequent versions. (Since 2.2-beta-1) - - - - - - - - 1.0.0+ - - Contains configuration options for including the binary files of a - project module in an assembly. - - - - - - 1.0.0+ - - Sets the output directory relative to the root - of the root directory of the assembly. For example, - "log" will put the specified files in the log directory, - directly beneath the root of the archive. - - - - - - 1.0.0+ - - - When &lt;include&gt; subelements are present, they define a set of - artifact coordinates to include. If none is present, then - &lt;includes&gt; represents all valid values. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define a set of - dependency artifact coordinates to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the file mode of the files included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of Read = 4, - Write = 2, and Execute = 1. For example, the value 0644 - translates to User read-write, Group and Other read-only. The default value is 0644 - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the directory mode of the directories - included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of - Read = 4, Write = 2, and Execute = 1. For example, the value - 0755 translates to User read-write, Group and Other read-only. The default value is 0755. - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.1.0+ - - When specified, the attachmentClassifier will cause the assembler to look at artifacts - attached to the module instead of the main project artifact. If it can find an attached - artifact matching the specified classifier, it will use it; otherwise, it will throw an - exception. (Since 2.2-beta-1) - - - - - - 1.0.0+ - - If set to true, the plugin will include the direct and transitive dependencies of - of the project modules included here. Otherwise, it will only include the module - packages only. - - - - - - 1.1.0+ - - - Specifies which dependencies of the module to include in the assembly. A - dependencySet is specified by providing one or more of - &lt;dependencySet&gt; subelements. (Since 2.2-beta-1) - - - - - - - - - - - - 1.0.0+ - - If set to true, this property will unpack all module packages - into the specified output directory. When set to false - module packages will be included as archives (jars). - - - - - - 1.1.0+ - - Allows the specification of includes and excludes, along with filtering options, for items - unpacked from a module artifact. (Since 2.2-beta-1) - - - - - - 1.0.0+ - - Sets the mapping pattern for all NON-UNPACKED dependencies included - in this assembly. - (Since 2.2-beta-2; 2.2-beta-1 uses ${artifactId}-${version}${dashClassifier?}.${extension} as default value) - NOTE: If the dependencySet specifies unpack == true, outputFileNameMapping WILL NOT BE USED; in these cases, - use outputDirectory. - See the plugin FAQ for more details about entries usable in the outputFileNameMapping parameter. - - - - - - - - 1.1.0+ - - Specifies options for including/excluding/filtering items extracted from an archive. (Since 2.2-beta-1) - - - - - - 1.1.0+ - - - Set of file and/or directory patterns for matching items to be included from an archive as it is unpacked. - Each item is specified as &lt;include&gt;some/path&lt;/include&gt; (Since 2.2-beta-1) - - - - - - - - - - - - 1.1.0+ - - - Set of file and/or directory patterns for matching items to be excluded from an archive as it is unpacked. - Each item is specified as &lt;exclude&gt;some/path&lt;/exclude&gt; (Since 2.2-beta-1) - - - - - - - - - - - - 1.1.0+ - - Whether to filter symbols in the files as they are unpacked from the archive, using - properties from the build configuration. (Since 2.2-beta-1) - - - - - - 1.1.2+ - - - Sets the line-endings of the files. (Since 2.2) - Valid values: - <ul> - <li><b>"keep"</b> - Preserve all line endings</li> - <li><b>"unix"</b> - Use Unix-style line endings</li> - <li><b>"lf"</b> - Use a single line-feed line endings</li> - <li><b>"dos"</b> - Use DOS-style line endings</li> - <li><b>"crlf"</b> - Use Carraige-return, line-feed line endings</li> - </ul> - - - - - - - 1.1.2+ - - Whether standard exclusion patterns, such as those matching CVS and Subversion - metadata files, should be used when calculating the files affected by this set. - For backward compatibility, the default value is true. (Since 2.2) - - - - - - 1.1.3+ - - - Allows to specify the encoding to use when unpacking archives, for unarchivers - that support specifying encoding. If unspecified, archiver default will be used. - Archiver defaults generally represent sane (modern) values. - - - - - - - - - 1.0.0+ - - A dependencySet allows inclusion and exclusion of project dependencies - in the assembly. - - - - - - 1.0.0+ - - Sets the output directory relative to the root - of the root directory of the assembly. For example, - "log" will put the specified files in the log directory, - directly beneath the root of the archive. - - - - - - 1.0.0+ - - - When &lt;include&gt; subelements are present, they define a set of - artifact coordinates to include. If none is present, then - &lt;includes&gt; represents all valid values. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define a set of - dependency artifact coordinates to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the file mode of the files included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of Read = 4, - Write = 2, and Execute = 1. For example, the value 0644 - translates to User read-write, Group and Other read-only. The default value is 0644 - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the directory mode of the directories - included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of - Read = 4, Write = 2, and Execute = 1. For example, the value - 0755 translates to User read-write, Group and Other read-only. The default value is 0755. - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.1.2+ - - When specified as true, any include/exclude patterns which aren't used to filter an actual - artifact during assembly creation will cause the build to fail with an error. This is meant - to highlight obsolete inclusions or exclusions, or else signal that the assembly descriptor - is incorrectly configured. (Since 2.2) - - - - - - 1.0.0+ - - Sets the mapping pattern for all dependencies included in this - assembly. (Since 2.2-beta-2; 2.2-beta-1 uses ${artifactId}-${version}${dashClassifier?}.${extension} - as default value). - See the plugin FAQ for more details about entries usable in the outputFileNameMapping parameter. - - - - - - 1.0.0+ - - If set to true, this property will unpack all dependencies - into the specified output directory. When set to false - dependencies will be includes as archives (jars). Can only unpack - jar, zip, tar.gz, and tar.bz archives. - - - - - - 1.1.0+ - - Allows the specification of includes and excludes, along with filtering options, for items - unpacked from a dependency artifact. (Since 2.2-beta-1) - - - - - - 1.0.0+ - - Sets the dependency scope for this dependencySet. - - - - - - 1.1.0+ - - Determines whether the artifact produced during the current project's - build should be included in this dependency set. (Since 2.2-beta-1) - - - - - - 1.1.0+ - - Determines whether the attached artifacts produced during the current project's - build should be included in this dependency set. (Since 2.2-beta-1) - - - - - - 1.1.0+ - - Determines whether transitive dependencies will be included in the processing of - the current dependency set. If true, includes/excludes/useTransitiveFiltering - will apply to transitive dependency artifacts in addition to the main project - dependency artifacts. If false, useTransitiveFiltering is meaningless, and - includes/excludes only affect the immediate dependencies of the project. - By default, this value is true. (Since 2.2-beta-1) - - - - - - 1.1.0+ - - Determines whether the include/exclude patterns in this dependency set will be applied to - the transitive path of a given artifact. If true, and the current artifact is a transitive - dependency brought in by another artifact which matches an inclusion or exclusion pattern, - then the current artifact has the same inclusion/exclusion logic applied to it as well. By - default, this value is false, in order to preserve backward compatibility with version 2.1. - This means that includes/excludes only apply directly to the current artifact, and not to - the transitive set of artifacts which brought it in. (Since 2.2-beta-1) - - - - - - - - 1.0.0+ - - - Defines a Maven repository to be included in the assembly. The artifacts - available to be included in a repository are your project's dependency - artifacts. The repository created contains the needed metadata entries - and also contains both sha1 and md5 checksums. This is useful for creating - archives which will be deployed to internal repositories. - - <br/><b>NOTE:</b> Currently, only artifacts from the central repository - are allowed. - - - - - - - 1.0.0+ - - Sets the output directory relative to the root - of the root directory of the assembly. For example, - "log" will put the specified files in the log directory, - directly beneath the root of the archive. - - - - - - 1.0.0+ - - - When &lt;include&gt; subelements are present, they define a set of - artifact coordinates to include. If none is present, then - &lt;includes&gt; represents all valid values. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define a set of - dependency artifact coordinates to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. - - Artifact coordinates may be given in simple groupId:artifactId form, - or they may be fully qualified in the form groupId:artifactId:type[:classifier]:version. - Additionally, wildcards can be used, as in *:maven-* - - - - - - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the file mode of the files included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of Read = 4, - Write = 2, and Execute = 1. For example, the value 0644 - translates to User read-write, Group and Other read-only. The default value is 0644 - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - - Similar to a UNIX permission, sets the directory mode of the directories - included. - THIS IS AN OCTAL VALUE. - Format: (User)(Group)(Other) where each component is a sum of - Read = 4, Write = 2, and Execute = 1. For example, the value - 0755 translates to User read-write, Group and Other read-only. The default value is 0755. - <a href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more on unix-style permissions)</a> - - - - - - - 1.0.0+ - - If set to true, this property will trigger the creation of repository - metadata which will allow the repository to be used as a functional remote - repository. - - - - - - 1.0.0+ - - - Specifies that you want to align a group of artifacts to a specified - version. A groupVersionAlignment is specified by providing one or - more of &lt;groupVersionAlignment&gt; subelements. - - - - - - - - - - - - 1.1.0+ - - Specifies the scope for artifacts included in this repository. (Since 2.2-beta-1) - - - - - - - - 1.0.0+ - - Allows a group of artifacts to be aligned to a specified version. - - - - - - 1.0.0+ - - The groupId of the artifacts for which you want to align the - versions. - - - - - - 1.0.0+ - - The version you want to align this group to. - - - - - - 1.0.0+ - - - When &lt;exclude&gt; subelements are present, they define the - artifactIds of the artifacts to exclude. If none is present, then - &lt;excludes&gt; represents no exclusions. An exclude is specified - by providing one or more of &lt;exclude&gt; subelements. - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/xml-schemas/svg11.dtd b/.idea/xml-schemas/svg11.dtd deleted file mode 100644 index 44cbcb8fe25e..000000000000 --- a/.idea/xml-schemas/svg11.dtd +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -%svg-framework.mod;]]> - - - - - - - - - - -%svg-core-attrib.mod;]]> - - - - -%svg-container-attrib.mod;]]> - - - - -%svg-viewport-attrib.mod;]]> - - - - -%svg-paint-attrib.mod;]]> - - - - -%svg-opacity-attrib.mod;]]> - - - - -%svg-graphics-attrib.mod;]]> - - - - -%svg-docevents-attrib.mod;]]> - - - - -%svg-graphevents-attrib.mod;]]> - - - - -%svg-animevents-attrib.mod;]]> - - - - -%svg-xlink-attrib.mod;]]> - - - - -%svg-extresources-attrib.mod;]]> - - - - - - -%svg-structure.mod;]]> - - - - -%svg-conditional.mod;]]> - - - - -%svg-image.mod;]]> - - - - -%svg-style.mod;]]> - - - - -%svg-shape.mod;]]> - - - - -%svg-text.mod;]]> - - - - -%svg-marker.mod;]]> - - - - -%svg-profile.mod;]]> - - - - -%svg-gradient.mod;]]> - - - - -%svg-pattern.mod;]]> - - - - -%svg-clip.mod;]]> - - - - -%svg-mask.mod;]]> - - - - -%svg-filter.mod;]]> - - - - -%svg-cursor.mod;]]> - - - - -%svg-hyperlink.mod;]]> - - - - -%svg-view.mod;]]> - - - - -%svg-script.mod;]]> - - - - -%svg-animation.mod;]]> - - - - -%svg-font.mod;]]> - - - - -%svg-extensibility.mod;]]> - - - diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java index d8e89aa9510c..093d947f4a9d 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java @@ -861,8 +861,10 @@ public void onFailure(Throwable t) // the final publishing. caughtExceptionOuter = e; try { - Futures.allAsList(publishWaitList).cancel(true); - Futures.allAsList(handOffWaitList).cancel(true); + publishWaitList.forEach(f -> f.cancel(true)); + handOffWaitList.forEach(f -> f.cancel(true)); +// Futures.allAsList(publishWaitList).cancel(true); +// Futures.allAsList(handOffWaitList).cancel(true); if (appenderator != null) { appenderator.closeNow(); } @@ -887,8 +889,10 @@ public void onFailure(Throwable t) // (3) catch all other exceptions thrown for the whole ingestion steps including the final publishing. caughtExceptionOuter = e; try { - Futures.allAsList(publishWaitList).cancel(true); - Futures.allAsList(handOffWaitList).cancel(true); + publishWaitList.forEach(f -> f.cancel(true)); + handOffWaitList.forEach(f -> f.cancel(true)); +// Futures.allAsList(publishWaitList).cancel(true); +// Futures.allAsList(handOffWaitList).cancel(true); if (appenderator != null) { appenderator.closeNow(); } diff --git a/processing/src/main/java/org/apache/druid/query/ChainedExecutionQueryRunner.java b/processing/src/main/java/org/apache/druid/query/ChainedExecutionQueryRunner.java index cf149138ff28..49a239541f44 100644 --- a/processing/src/main/java/org/apache/druid/query/ChainedExecutionQueryRunner.java +++ b/processing/src/main/java/org/apache/druid/query/ChainedExecutionQueryRunner.java @@ -19,6 +19,7 @@ package org.apache.druid.query; +import com.google.common.base.Function; import com.google.common.base.Throwables; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; @@ -100,7 +101,7 @@ public Sequence run(final QueryPlus queryPlus, final ResponseContext respo public Iterator make() { // Make it a List<> to materialize all of the values (so that it will submit everything to the executor) - ListenableFuture>> futures = Futures.allAsList( + List>> futures = Lists.newArrayList( Iterables.transform( queryables, @@ -141,22 +142,26 @@ public Iterable call() ); } ) - ) - ); + ); - queryWatcher.registerQueryFuture(query, futures); + Function cancelFunction = (t) -> { + futures.forEach(f -> f.cancel(true)); + return null; + }; + ListenableFuture>> future = Futures.allAsList(futures); + queryWatcher.registerQueryFuture(query, future); try { return new MergeIterable<>( ordering.nullsFirst(), QueryContexts.hasTimeout(query) ? - futures.get(QueryContexts.getTimeout(query), TimeUnit.MILLISECONDS) : - futures.get() + future.get(QueryContexts.getTimeout(query), TimeUnit.MILLISECONDS) : + future.get() ).iterator(); } catch (InterruptedException e) { log.noStackTrace().warn(e, "Query interrupted, cancelling pending results, query id [%s]", query.getId()); - futures.cancel(true); + cancelFunction.apply(e); throw new QueryInterruptedException(e); } catch (CancellationException e) { @@ -164,11 +169,11 @@ public Iterable call() } catch (TimeoutException e) { log.warn("Query timeout, cancelling pending results for query id [%s]", query.getId()); - futures.cancel(true); + cancelFunction.apply(e); throw new QueryInterruptedException(e); } catch (ExecutionException e) { - Throwables.propagateIfPossible(e.getCause()); + cancelFunction.apply(e); throw new RuntimeException(e.getCause()); } } diff --git a/processing/src/main/java/org/apache/druid/query/GroupByMergedQueryRunner.java b/processing/src/main/java/org/apache/druid/query/GroupByMergedQueryRunner.java index 1653fb170637..4a89c013160b 100644 --- a/processing/src/main/java/org/apache/druid/query/GroupByMergedQueryRunner.java +++ b/processing/src/main/java/org/apache/druid/query/GroupByMergedQueryRunner.java @@ -23,6 +23,7 @@ import com.google.common.base.Predicates; import com.google.common.base.Supplier; import com.google.common.base.Throwables; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.util.concurrent.Futures; @@ -93,7 +94,7 @@ public Sequence run(final QueryPlus queryPlus, final ResponseContext respo final boolean bySegment = QueryContexts.isBySegment(query); final int priority = QueryContexts.getPriority(query); final QueryPlus threadSafeQueryPlus = queryPlus.withoutThreadUnsafeState(); - final ListenableFuture> futures = Futures.allAsList( + final List> futures = Lists.newArrayList( Iterables.transform( queryables, @@ -136,15 +137,14 @@ public Void call() ); if (isSingleThreaded) { - waitForFutureCompletion(query, future, indexAccumulatorPair.lhs); + waitForFutureCompletion(query, ImmutableList.of(future), indexAccumulatorPair.lhs); } return future; } } ) - ) - ); + ); if (!isSingleThreaded) { waitForFutureCompletion(query, futures, indexAccumulatorPair.lhs); @@ -173,11 +173,16 @@ public T apply(Row input) private void waitForFutureCompletion( GroupByQuery query, - ListenableFuture future, + List> futures, IncrementalIndex closeOnFailure ) { + Function cancelFunction = (t) -> { + futures.forEach(f -> f.cancel(true)); + return null; + }; try { + ListenableFuture> future = Futures.allAsList(futures); queryWatcher.registerQueryFuture(query, future); if (QueryContexts.hasTimeout(query)) { future.get(QueryContexts.getTimeout(query), TimeUnit.MILLISECONDS); @@ -187,7 +192,7 @@ private void waitForFutureCompletion( } catch (InterruptedException e) { log.warn(e, "Query interrupted, cancelling pending results, query id [%s]", query.getId()); - future.cancel(true); + cancelFunction.apply(e); closeOnFailure.close(); throw new QueryInterruptedException(e); } @@ -198,10 +203,11 @@ private void waitForFutureCompletion( catch (TimeoutException e) { closeOnFailure.close(); log.info("Query timeout, cancelling pending results for query id [%s]", query.getId()); - future.cancel(true); + cancelFunction.apply(e); throw new QueryInterruptedException(e); } catch (ExecutionException e) { + cancelFunction.apply(e); closeOnFailure.close(); Throwables.propagateIfPossible(e.getCause()); throw new RuntimeException(e.getCause()); diff --git a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ConcurrentGrouper.java b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ConcurrentGrouper.java index f5ff7ba627cb..86af8e89bc1b 100644 --- a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ConcurrentGrouper.java +++ b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ConcurrentGrouper.java @@ -44,6 +44,7 @@ import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.CancellationException; @@ -339,8 +340,7 @@ private boolean isParallelizable() private List>> parallelSortAndGetGroupersIterator() { // The number of groupers is same with the number of processing threads in the executor - final ListenableFuture>>> future = Futures.allAsList( - groupers.stream() + final List>>> futures = groupers.stream() .map(grouper -> executor.submit( new AbstractPrioritizedCallable>>(priority) @@ -353,21 +353,19 @@ public CloseableIterator> call() } ) ) - .collect(Collectors.toList()) + .collect(Collectors.toList() ); try { + ListenableFuture>>> future = Futures.allAsList(futures); final long timeout = queryTimeoutAt - System.currentTimeMillis(); return hasQueryTimeout ? future.get(timeout, TimeUnit.MILLISECONDS) : future.get(); } - catch (InterruptedException | TimeoutException e) { - future.cancel(true); + catch (InterruptedException | TimeoutException | CancellationException e) { + futures.forEach(f -> f.cancel(true)); throw new QueryInterruptedException(e); - } - catch (CancellationException e) { - throw new QueryInterruptedException(e); - } - catch (ExecutionException e) { + } catch (ExecutionException e) { + futures.forEach(f -> f.cancel(true)); throw new RuntimeException(e.getCause()); } } diff --git a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByMergingQueryRunnerV2.java b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByMergingQueryRunnerV2.java index 2de214c4c4eb..0686f8138ec1 100644 --- a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByMergingQueryRunnerV2.java +++ b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByMergingQueryRunnerV2.java @@ -215,8 +215,7 @@ public CloseableGrouperIterator make() ReferenceCountingResourceHolder.fromCloseable(grouper); resources.register(grouperHolder); - ListenableFuture> futures = Futures.allAsList( - Lists.newArrayList( + List> futures = Lists.newArrayList( Iterables.transform( queryables, new Function, ListenableFuture>() @@ -259,7 +258,7 @@ public AggregateResult call() if (isSingleThreaded) { waitForFutureCompletion( query, - Futures.allAsList(ImmutableList.of(future)), + ImmutableList.of(future), hasTimeout, timeoutAt - System.currentTimeMillis() ); @@ -269,8 +268,7 @@ public AggregateResult call() } } ) - ) - ); + ); if (!isSingleThreaded) { waitForFutureCompletion(query, futures, hasTimeout, timeoutAt - System.currentTimeMillis()); @@ -339,12 +337,17 @@ private List> getMergeBuffersHolder( private void waitForFutureCompletion( GroupByQuery query, - ListenableFuture> future, + List> futures, boolean hasTimeout, long timeout ) { + Function cancelFunction = (t) -> { + futures.forEach(f -> f.cancel(true)); + return null; + }; try { + ListenableFuture> future = Futures.allAsList(futures); if (queryWatcher != null) { queryWatcher.registerQueryFuture(query, future); } @@ -364,18 +367,20 @@ private void waitForFutureCompletion( } catch (InterruptedException e) { log.warn(e, "Query interrupted, cancelling pending results, query id [%s]", query.getId()); - future.cancel(true); + cancelFunction.apply(e); throw new QueryInterruptedException(e); } catch (CancellationException e) { + cancelFunction.apply(e); throw new QueryInterruptedException(e); } catch (TimeoutException e) { log.info("Query timeout, cancelling pending results for query id [%s]", query.getId()); - future.cancel(true); + cancelFunction.apply(e); throw new QueryInterruptedException(e); } catch (ExecutionException e) { + cancelFunction.apply(e); throw new RuntimeException(e); } } diff --git a/server/src/main/java/org/apache/druid/client/cache/BackgroundCachePopulator.java b/server/src/main/java/org/apache/druid/client/cache/BackgroundCachePopulator.java index 3b7f30dac676..00f61bdddb70 100644 --- a/server/src/main/java/org/apache/druid/client/cache/BackgroundCachePopulator.java +++ b/server/src/main/java/org/apache/druid/client/cache/BackgroundCachePopulator.java @@ -100,6 +100,7 @@ public void onSuccess(List results) @Override public void onFailure(Throwable t) { + cacheFutures.forEach(f -> f.cancel(true)); log.error(t, "Background caching failed"); } }, From 64698dd54627c1072651216468584d5648cd6ed4 Mon Sep 17 00:00:00 2001 From: chenyuzhi459 <553673833@qq.com> Date: Fri, 12 Jun 2020 16:04:05 +0800 Subject: [PATCH 02/17] rollup ./idea --- .idea/inspectionProfiles/Druid.xml | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.idea/inspectionProfiles/Druid.xml b/.idea/inspectionProfiles/Druid.xml index cf4e53758479..34e1c71a921e 100644 --- a/.idea/inspectionProfiles/Druid.xml +++ b/.idea/inspectionProfiles/Druid.xml @@ -21,9 +21,9 @@