plugins.asciidoc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. [[breaking_50_plugins]]
  2. === Plugin changes
  3. The command `bin/plugin` has been renamed to `bin/elasticsearch-plugin`. The
  4. structure of the plugin ZIP archive has changed. All the plugin files must be
  5. contained in a top-level directory called `elasticsearch`. If you use the
  6. gradle build, this structure is automatically generated.
  7. ==== Plugins isolation
  8. `isolated` option has been removed. Each plugin will have its own classloader.
  9. ==== Site plugins removed
  10. Site plugins have been removed. Site plugins should be reimplemented as Kibana
  11. plugins.
  12. ==== Multicast plugin removed
  13. Multicast has been removed. Use unicast discovery, or one of the cloud
  14. discovery plugins.
  15. ==== Plugins with custom query implementations
  16. Plugins implementing custom queries need to implement the `fromXContent(QueryParseContext)` method in their
  17. `QueryParser` subclass rather than `parse`. This method will take care of parsing the query from `XContent` format
  18. into an intermediate query representation that can be streamed between the nodes in binary format, effectively the
  19. query object used in the java api. Also, the query parser needs to implement the `getBuilderPrototype` method that
  20. returns a prototype of the `NamedWriteable` query, which allows to deserialize an incoming query by calling
  21. `readFrom(StreamInput)` against it, which will create a new object, see usages of `Writeable`. The `QueryParser`
  22. also needs to declare the generic type of the query that it supports and it's able to parse.
  23. The query object can then transform itself into a lucene query through the new `toQuery(QueryShardContext)` method,
  24. which returns a lucene query to be executed on the data node.
  25. Similarly, plugins implementing custom score functions need to implement the `fromXContent(QueryParseContext)`
  26. method in their `ScoreFunctionParser` subclass rather than `parse`. This method will take care of parsing
  27. the function from `XContent` format into an intermediate function representation that can be streamed between
  28. the nodes in binary format, effectively the function object used in the java api. Also, the query parser needs
  29. to implement the `getBuilderPrototype` method that returns a prototype of the `NamedWriteable` function, which
  30. allows to deserialize an incoming function by calling `readFrom(StreamInput)` against it, which will create a
  31. new object, see usages of `Writeable`. The `ScoreFunctionParser` also needs to declare the generic type of the
  32. function that it supports and it's able to parse. The function object can then transform itself into a lucene
  33. function through the new `toFunction(QueryShardContext)` method, which returns a lucene function to be executed
  34. on the data node.
  35. ==== Cloud AWS plugin changes
  36. Cloud AWS plugin has been split in two plugins:
  37. * {plugins}/discovery-ec2.html[Discovery EC2 plugin]
  38. * {plugins}/repository-s3.html[Repository S3 plugin]
  39. Proxy settings for both plugins have been renamed:
  40. * from `cloud.aws.proxy_host` to `cloud.aws.proxy.host`
  41. * from `cloud.aws.ec2.proxy_host` to `cloud.aws.ec2.proxy.host`
  42. * from `cloud.aws.s3.proxy_host` to `cloud.aws.s3.proxy.host`
  43. * from `cloud.aws.proxy_port` to `cloud.aws.proxy.port`
  44. * from `cloud.aws.ec2.proxy_port` to `cloud.aws.ec2.proxy.port`
  45. * from `cloud.aws.s3.proxy_port` to `cloud.aws.s3.proxy.port`
  46. ==== Cloud Azure plugin changes
  47. Cloud Azure plugin has been split in three plugins:
  48. * {plugins}/discovery-azure.html[Discovery Azure plugin]
  49. * {plugins}/repository-azure.html[Repository Azure plugin]
  50. * {plugins}/store-smb.html[Store SMB plugin]
  51. If you were using the `cloud-azure` plugin for snapshot and restore, you had in `elasticsearch.yml`:
  52. [source,yaml]
  53. -----
  54. cloud:
  55. azure:
  56. storage:
  57. account: your_azure_storage_account
  58. key: your_azure_storage_key
  59. -----
  60. You need to give a unique id to the storage details now as you can define multiple storage accounts:
  61. [source,yaml]
  62. -----
  63. cloud:
  64. azure:
  65. storage:
  66. my_account:
  67. account: your_azure_storage_account
  68. key: your_azure_storage_key
  69. -----
  70. ==== Cloud GCE plugin changes
  71. Cloud GCE plugin has been renamed to {plugins}/discovery-gce.html[Discovery GCE plugin].
  72. ==== Mapper Attachments plugin deprecated
  73. Mapper attachments has been deprecated. Users should use now the {plugins}/ingest-attachment.html[`ingest-attachment`]
  74. plugin.
  75. ==== Passing of Java System Properties
  76. Previously, Java system properties could be passed to the plugin
  77. command by passing `-D` style arguments directly to the plugin script.
  78. This is no longer permitted and such system properties must be passed
  79. via ES_JAVA_OPTS.