diff options
author | Vitalii Diravka <vitalii.diravka@gmail.com> | 2018-07-03 20:23:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-03 20:23:03 +0300 |
commit | 0ae7035de390c699f574d1ec25d45cd8b20a8b94 (patch) | |
tree | 3012eafa62d188030069d235649bce2c7282c674 /distribution | |
parent | 069c3049f1a500e5ae0b47caeebc5856ab182b73 (diff) |
DRILL-6494: Drill Plugins Handler
- Storage Plugins Handler service is used op the Drill start-up stage and it updates storage plugins configs from
storage-plugins-override.conf file. If plugins configs are present in the persistence store - they are updated,
otherwise bootstrap plugins are updated and the result configs are loaded to persistence store. If the enabled
status is absent in the storage-plugins-override.conf file, the last plugin config enabled status persists.
- 'drill.exec.storage.action_on_plugins_override_file' Boot option is added. This is the action, which should be
performed on the storage-plugins-override.conf file after successful updating storage plugins configs.
Possible values are: "none" (default), "rename" and "remove".
- The "NULL" issue with updating Hive plugin config by REST is solved. But clients are still being instantiated for disabled
plugins - DRILL-6412.
- "org.honton.chas.hocon:jackson-dataformat-hocon" library is added for the proper deserializing HOCON conf file
- additional refactoring: "com.typesafe:config" and "org.apache.commons:commons-lang3" are placed into DependencyManagement
block with proper versions; correct properties for metrics in "drill-override-example.conf" are specified
closes #1345
Diffstat (limited to 'distribution')
-rw-r--r-- | distribution/src/assemble/bin.xml | 7 | ||||
-rw-r--r-- | distribution/src/resources/drill-override-example.conf | 26 | ||||
-rw-r--r-- | distribution/src/resources/storage-plugins-override-example.conf | 65 |
3 files changed, 85 insertions, 13 deletions
diff --git a/distribution/src/assemble/bin.xml b/distribution/src/assemble/bin.xml index e044801f9..712f3ec59 100644 --- a/distribution/src/assemble/bin.xml +++ b/distribution/src/assemble/bin.xml @@ -420,6 +420,11 @@ <source>src/resources/drill-on-yarn-example.conf</source> <outputDirectory>conf</outputDirectory> <fileMode>0640</fileMode> - </file> + </file> + <file> + <source>src/resources/storage-plugins-override-example.conf</source> + <outputDirectory>conf</outputDirectory> + <fileMode>0640</fileMode> + </file> </files> </assembly> diff --git a/distribution/src/resources/drill-override-example.conf b/distribution/src/resources/drill-override-example.conf index fa2e39555..296cd8b60 100644 --- a/distribution/src/resources/drill-override-example.conf +++ b/distribution/src/resources/drill-override-example.conf @@ -58,17 +58,10 @@ drill.exec: { batch.size: 4000 }, partition.column.label: "dir" - } - }, - metrics : { - context: "drillbit", - jmx: { - enabled : true }, - log: { - enabled : false, - interval : 60 - } + # The action on the storage-plugins-override.conf after it's use. + # Possible values are "none" (default), "rename", "remove" + action_on_plugins_override_file: "none" }, zk: { connect: "localhost:2181", @@ -252,6 +245,15 @@ drill.exec: { #ssl provider. May be "JDK" or "OPENSSL". Default is "JDK" provider: "JDK" } -} - +}, +drill.metrics : { + context: "drillbit", + jmx: { + enabled : true + }, + log: { + enabled : false, + interval : 60 + } +} diff --git a/distribution/src/resources/storage-plugins-override-example.conf b/distribution/src/resources/storage-plugins-override-example.conf new file mode 100644 index 000000000..360ba2c0a --- /dev/null +++ b/distribution/src/resources/storage-plugins-override-example.conf @@ -0,0 +1,65 @@ +# 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. + +# This file involves storage plugins configs, which can be updated on the Drill start-up. +# This file is in HOCON format, see https://github.com/typesafehub/config/blob/master/HOCON.md for more information. + + "storage":{ + cp: { + type: "file", + connection: "classpath:///", + formats: { + "csv" : { + type: "text", + extensions: [ "csv" ], + delimiter: "," + } + } + } + } + "storage":{ + dfs: { + type: "file", + connection: "hdfs:///", + workspaces: { + "root": { + "location": "/", + "writable": false, + "defaultInputFormat": null, + "allowAccessOutsideWorkspace": false + } + }, + formats: { + "parquet": { + "type": "parquet" + } + }, + enabled: false + } + } + "storage":{ + mongo : { + type:"mongo", + connection:"mongodb://test_host:27017/", + enabled: true + } + } + "storage": { + openTSDB: { + type: "openTSDB", + connection: "http://localhost:8888", + enabled: true + } + } |