diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index a01b89afa..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.jekyll-cache/ -_site/ -Gemfile.lock -.jekyll-metadata - diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 381249a04..000000000 --- a/docs/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "https://rubygems.org" - -# git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -gem 'asciidoctor' -gem 'jekyll', group: :jekyll_plugins -gem 'wdm', '~> 0.1.1' if Gem.win_platform? -group :jekyll_plugins do - gem 'jekyll-asciidoc' -end -#gem 'pygments.rb', '~> 1.2.1' -gem 'thread_safe', '~> 0.3.6' -gem 'slim', '~> 4.0.1' -gem 'tilt', '~> 2.0.9' - -# Ruby 3.0.0 requires dependency which doesn't contains in the bundle -gem "webrick", "~> 1.7" diff --git a/docs/README.adoc b/docs/README.adoc deleted file mode 100644 index a3ce94800..000000000 --- a/docs/README.adoc +++ /dev/null @@ -1,252 +0,0 @@ -// 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. -= Apache Ignite Extensions Documentation -:toc: -:toc-title: - -== Overview -The Apache Ignite Extensions documentation is maintained in the repository with the code base, in the "/docs" subdirectory. The directory contains the source files, HTML templates and css styles. - - -The Apache Ignite documentation is written in link:https://asciidoctor.org/docs/what-is-asciidoc/[asciidoc]. -The Asciidoc files are compiled into HTML pages and published to https://ignite.apache.org/docs. - - -.Content of the “docs” directory -[cols="1,4",opts="stretch"] -|=== -| pass:[_]docs | The directory with .adoc files and code-snippets. -| pass:[_]config.yml | Jekyll configuration file. -|=== - - -== Building the Docs Locally - -To build the docs locally, you can install `jekyll` and other dependencies on your machine, or you can use Jekyll docker image. - -=== Install Jekyll and Asciidoctor - -. Install Jekyll by following this instruction: https://jekyllrb.com/docs/installation/[window=_blank] -. In the “/docs” directory, run the following command: -+ -[source, shell] ----- -$ bundle ----- -+ -This should install all dependencies, including `asciidoctor`. -. Start jekyll: -+ -[source, shell] ----- -$ bundle exec jekyll s ----- -The command compiles the Asciidoc files into HTML pages and starts a local webserver. - -Open `http://localhost:4000/docs[window=_blank]` in your browser. - -=== Run with Docker - -The following command starts jekyll in a container and downloads all dependencies. Run the command in the “/docs” directory. - -[source, shell] ----- -$ docker run -v "$PWD:/srv/jekyll" -p 4000:4000 jekyll/jekyll:latest jekyll s ----- - -Open `http://localhost:4000/docs[window=_blank]` in your browser. - -=== Troubleshooting - -Below are some issues you might hit during an installation of the Jekyll environment or while building the tutorials. -Let us know if you come across a new and found a workaround. - -==== MacOS: Issues with FFI library during Jekyll installation - -You should see an error trace similar to this: https://github.com/ffi/ffi/issues/653 - -Attempt to fix the problem by following this sequence of commands (typically it's the last command only): - -[source, text] ----- -brew reinstall libffi -export LDFLAGS="-L/usr/local/opt/libffi/lib" -export CPPFLAGS="-I/usr/local/opt/libffi/include" -export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" -gem install --user-install bundler jekyll ----- - -==== MacOS: jekyll-asciidoc gem is not installed by default - -Try to follow this procedure to fix the issue. - -* Comment out the `rm -rf $tmp_dir` at the very end of the `build.sh` script, so that the temp folder is not deleted after the execution. -* Run `build.sh` (fails with `Could not find gem 'jekyll-asciidoc'...` error). -* Go to `tmp/web_site` folder. -* Run `bundle install`. -* Revert the `build.sh` script and run it again. - -==== MacOS: can't build project due to inability to load openssl - -You should see an error like this: - -`LoadError: dlopen(/Users/dmagda/.rbenv/versions/2.6.2/lib/ruby/2.6.0/x86_64-darwin18/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib - Referenced from: /Users/dmagda/.rbenv/versions/2.6.2/lib/ruby/2.6.0/x86_64-darwin18/digest/sha1.bundle` - -Try to upgrade Ruby, rbenv to the latest version (2.7.1) and then reinstall Jekyll. Use the official instructions: -https://jekyllrb.com/docs/installation/ - -== How to Contribute - -If you want to contribute to the documentation, add or modify the relevant page in the `docs/_docs` directory. -This directory contains all .adoc files (which are then rendered into HTML pages and published on the web-site). - -Because we use asciidoc for documentation, consider the following points: - -* Get familiar with the asciidoc format: https://asciidoctor.org/docs/user-manual/. You don’t have to read the entire manual. Search through it when you want to learn how to create a numbered list, or insert an image, or use italics. -* Please read the link:https://asciidoctor.org/docs/asciidoc-recommended-practices:[AsciiDoc Recommended Practices] and try to adhere to those when editing the .adoc source files. - - -The following sections explain specific asciidoc syntax that we use. - -=== Table of content - -The table of content is defined in the `_data/toc.yaml` file. -If you want to add a new page, make sure to update the TOC. - -=== Changing an URL of an existing page - -If you rename an already published page or change the page's path in the `/_data/toc.yaml` file, -you must configure a proper redirect from the old to the new URL in the following files of the Ignite website: -https://github.com/apache/ignite-website/blob/master/.htaccess - -Reach out to documentation maintainers if you need any help with this. - -=== Links to other sections in the docs -All .adoc files are located in the "docs/_docs" directory. -Any link to the files within the directory must be relative to that directory. -Remove the file extension (.adoc). - -For example: -[source, adoc] ----- -link:persistence/native-persistence[Native Persistence] ----- - -This is a link to the Native Persistence page. - -=== Links to external resources - -When referencing an external resource, make the link to open in a new window by adding the `window=_blank` attribute: - -[source, adoc] ----- -link:https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SunJSSE_Protocols[Supported protocols,window=_blank] ----- - - -=== Tabs - -We use custom syntax to insert tabs. Tabs are used to provide code samples for different programming languages. - -Tabs are defined by the `tabs` block: -``` -[tabs] --- -individual tabs are defined here --- -``` - -Each tab is defined by the 'tab' directive: - -``` -tab:tab_name[] -``` - -where `tab_name` is the title of the tab. - -The content of the tab is everything that is given between the tab title, and the next tab or the end of the block. - -```asciidoc -[tabs] --- -tab:XML[] - -The content of the XML tab goes here - -tab:Java[] - -The content of the Java tab is here - -tab:C#/.NET[] - -tab:C++[unsupported] - --- -``` - -=== Callouts - -Use the syntax below if you need to bring reader's attention to some details: - -[NOTE] -==== -[discrete] -=== Callout Title -Callout Text -==== - -Change the callout type to `CAUTION` if you want to put out a warning: - -[CAUTION] -==== -[discrete] -=== Callout Title -Callout Text -==== - -=== Code Snippets - -Code snippets must be taken from a compilable source code file (e.g. java, cs, js, etc). -We use the `include` feature of asciidoc. -Source code files are located in the `docs/_docs/code-snippets/{language}` folders. - - -To add a code snippet to a page, follow these steps: - -* Create a file in the code snippets directory, e.g. _docs/code-snippets/java/org/apache/ignite/snippets/JavaThinClient.java - -* Enclose the piece of code you want to include within named tags (see https://asciidoctor.org/docs/user-manual/#by-tagged-regions). Give the tag a self-evident name. -For example: -+ -``` -[source, java] ----- -// tag::clientConnection[] -ClientConfiguration cfg = new ClientConfiguration().setAddresses("127.0.0.1:10800"); -try (IgniteClient client = Ignition.startClient(cfg)) { - ClientCache cache = client.cache("myCache"); - // get data from the cache -} -// end::clientConnection[] ----- -``` - -* Include the tag in the adoc file: -+ -[source, adoc,subs="macros"] ----- -\include::{javaCodeDir}/JavaThinClient.java[tag=clientConnection,indent=0] ----- diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..6895436d2 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,4 @@ +Apache Ignite Extensions Documentation +------------------------ + +Apache Ignite extensions documentation is available in the main [Apache Ignite repository](https://github.com/apache/ignite). \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 369545275..000000000 --- a/docs/_config.yml +++ /dev/null @@ -1,41 +0,0 @@ -# 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. -exclude: [guidelines.md, "Gemfile", "Gemfile.lock", README.adoc, "_docs/code-snippets", "_docs/includes", '*.sh'] -attrs: &asciidoc_attributes - version: 1.0 - base_url: /docs - stylesdir: /docs/assets/css - imagesdir: /docs - source-highlighter: rouge - table-stripes: even -collections: - docs: - permalink: /docs/:path:output_ext - output: true -defaults: - - - scope: - path: '' - values: - layout: 'doc' - - - scope: - path: '_docs' - values: - toc: ignite -asciidoctor: - base_dir: _docs/ - attributes: *asciidoc_attributes - diff --git a/docs/_data/toc.yaml b/docs/_data/toc.yaml deleted file mode 100644 index 2ddc5fa6b..000000000 --- a/docs/_data/toc.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# 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. -- title: Amazon S3 IP Finder - url: aws/aws -- title: Apache Camel Streamer - url: camel/camel-streamer -- title: Apache Flink Streamer - url: flink/flink-streamer -- title: Apache Flume Sink - url: flume/flume-sink -- title: Apache Ignite Azure Module - url: azure/azure -- title: Apache Ignite GCE Module - url: gce/gce -- title: Apache Ignite Pub/Sub Module - url: pub-sub/pub-sub -- title: Apache Ignite and Spring Boot - url: spring/spring-boot -- title: Apache Ignite and Spring Data - url: spring/spring-data -- title: Apache Ignite and Spring Cache - url: spring/spring-caching -- title: Apache Ignite and Spring Session - url: spring/spring-sessions -- title: Apache Ignite and Spring Transactions - url: spring/spring-tx -- title: Apache Kafka Streamer - url: kafka/kafka-streamer -- title: Apache Storm Streamer - url: storm/storm-streamer -- title: Change Data Capture Extension - url: cdc/change-data-capture-extensions -- title: JMS Streamer - url: jms/jms-streamer -- title: MQTT Streamer - url: mqtt/mqtt-streamer -- title: Performance Statistics Extension - url: perf-statistics/performance-statistics -- title: RocketMQ Streamer - url: rocketmq/rocketmq-streamer -- title: Topology Validator - url: topology-validator/topology-validator -- title: Twitter Streamer - url: twitter/twitter-streamer -- title: ZeroMQ Streamer - url: zeromq/zeromq-streamer -- title: ZooKeeper IP Finder - url: zookeeper/zookeeper-ip \ No newline at end of file diff --git a/docs/_docs/aws/aws.adoc b/docs/_docs/aws/aws.adoc deleted file mode 100644 index e6c9482cc..000000000 --- a/docs/_docs/aws/aws.adoc +++ /dev/null @@ -1,113 +0,0 @@ -= Amazon S3 IP Finder - -Amazon S3-based discovery allows Ignite nodes to register their IP addresses on start-up in an Amazon S3 store. -This way other nodes can try to connect to any of the IP addresses stored in S3 and initiate automatic node discovery. -To use S3 based automatic node discovery, you need to configure the `TcpDiscoveryS3IpFinder` type of `ipFinder`. - -Here is an example of how to configure Amazon S3 based IP finder: - - -[tabs] --- -tab:XML[] -[source,xml] ----- - - - - - - - - - - - - - - - - - - - ----- - -tab:Java[] -[source,java] ----- -TcpDiscoverySpi spi = new TcpDiscoverySpi(); - -BasicAWSCredentials creds = new BasicAWSCredentials("yourAccessKey", "yourSecreteKey"); - -TcpDiscoveryS3IpFinder ipFinder = new TcpDiscoveryS3IpFinder(); -ipFinder.setAwsCredentials(creds); -ipFinder.setBucketName("yourBucketName"); - -spi.setIpFinder(ipFinder); - -IgniteConfiguration cfg = new IgniteConfiguration(); - -// Override default discovery SPI. -cfg.setDiscoverySpi(spi); - -// Start a node. -Ignition.start(cfg); ----- - -tab:C#/.NET[unsupported] -tab:C++[unsupported] --- - -You can also use *Instance Profile* for AWS credentials provider. - -[tabs] --- -tab:XML[] -[source,xml] ----- - - - - - - - - - - - - - - - - - - ----- - -tab:Java[] -[source,java] ----- -TcpDiscoverySpi spi = new TcpDiscoverySpi(); - -AWSCredentialsProvider instanceProfileCreds = new InstanceProfileCredentialsProvider(false); - -TcpDiscoveryS3IpFinder ipFinder = new TcpDiscoveryS3IpFinder(); -ipFinder.setAwsCredentialsProvider(instanceProfileCreds); -ipFinder.setBucketName("yourBucketName"); - -spi.setIpFinder(ipFinder); - -IgniteConfiguration cfg = new IgniteConfiguration(); - -// Override default discovery SPI. -cfg.setDiscoverySpi(spi); - -// Start a node. -Ignition.start(cfg); ----- -tab:C#/.NET[unsupported] -tab:C++[unsupported] --- - diff --git a/docs/_docs/azure/azure.adoc b/docs/_docs/azure/azure.adoc deleted file mode 100644 index a2281263d..000000000 --- a/docs/_docs/azure/azure.adoc +++ /dev/null @@ -1,45 +0,0 @@ -= Apache Ignite Azure Module - - -Apache Ignite Azure module provides Azure Blob Storage based implementation of IP finder for TCP discovery. - -Depending on how you use Ignite, you can an extension using one of the following methods: - -- If you use the binary distribution, move the `libs/{module-dir}` to the `libs` directory of the Ignite distribution before starting the node. -- Add libraries from `libs/{module-dir}` to the classpath of your application. -- Add a module as a Maven dependency to your project. - - -== Building Azure Module And Running Tests - -To build and run Azure extension use the command below with the right credentials to the Azure service: - ----- -mvn clean package -pl modules/azure-ext -Dtest.azure.account.name=uname -Dtest.azure.account.key=key --Dtest.azure.endpoint=http://127.0.0.1:10000/devstoreaccount ----- - -== Importing Azure Module In Maven Project - -If you are using Maven to manage dependencies of your project, you can add Azure module -dependency like this (replace '${ignite.version}' with actual Ignite version you are -interested in): - ----- - - ... - - ... - - org.apache.ignite - ignite-azure-ext - ${ignite-azure-ext.version} - - ... - - ... - ----- \ No newline at end of file diff --git a/docs/_docs/camel/camel-streamer.adoc b/docs/_docs/camel/camel-streamer.adoc deleted file mode 100644 index 0e5a1f531..000000000 --- a/docs/_docs/camel/camel-streamer.adoc +++ /dev/null @@ -1,153 +0,0 @@ -// 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. -= Apache Camel Streamer - -== Overview - -This documentation page focuses on the Apache Camel, which can also be thought of as a universal streamer because it -allows you to consume from any technology or protocol supported by Camel into an Ignite Cache. - -image::images/camel-streamer.png[Camel Streamer] - -With this streamer, you can ingest entries straight into an Ignite cache based on: - -* Calls received on a Web Service (SOAP or REST), by extracting the body or headers. -* Listening on a TCP or UDP channel for messages. -* The content of files received via FTP or written to the local filesystem. -* Email messages received via POP3 or IMAP. -* A MongoDB tailable cursor. -* An AWS SQS queue. -* And many others. - -This streamer supports two modes of ingestion: **direct ingestion** and **mediated ingestion**. - -[NOTE] -==== -[discrete] -=== The Ignite Camel Component -There is also the https://camel.apache.org/components/latest/ignite-summary.html[camel-ignite, window=_blank] component, if what you are looking is -to interact with Ignite Caches, Compute, Events, Messaging, etc. from within a Camel route. -==== - -== Maven Dependency - -To make use of the `ignite-camel-ext` streamer, you need to add the following dependency: - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - org.apache.ignite - ignite-camel-ext - ${ignite-camel-ext.version} - ----- --- - -It will also pull in `camel-core` as a transitive dependency. - -== Direct Ingestion - -Direct Ingestion allows you to consume from any Camel endpoint straight into Ignite, with the help of a -Tuple Extractor. We call this **direct ingestion**. - -Here is a code sample: -[tabs] --- -tab:Java[] -[source,java] ----- -// Start Apache Ignite. -Ignite ignite = Ignition.start(); - -// Create an streamer pipe which ingests into the 'mycache' cache. -IgniteDataStreamer pipe = ignite.dataStreamer("mycache"); - -// Create a Camel streamer and connect it. -CamelStreamer streamer = new CamelStreamer<>(); -streamer.setIgnite(ignite); -streamer.setStreamer(pipe); - -// This endpoint starts a Jetty server and consumes from all network interfaces on port 8080 and context path /ignite. -streamer.setEndpointUri("jetty:http://0.0.0.0:8080/ignite?httpMethodRestrict=POST"); - -// This is the tuple extractor. We'll assume each message contains only one tuple. -// If your message contains multiple tuples, use a StreamMultipleTupleExtractor. -// The Tuple Extractor receives the Camel Exchange and returns a Map.Entry with the key and value. -streamer.setSingleTupleExtractor(new StreamSingleTupleExtractor() { - @Override public Map.Entry extract(Exchange exchange) { - String stationId = exchange.getIn().getHeader("X-StationId", String.class); - String temperature = exchange.getIn().getBody(String.class); - return new GridMapEntry<>(stationId, temperature); - } -}); - -// Start the streamer. -streamer.start(); ----- --- - -== Mediated Ingestion - -For more sophisticated scenarios, you can also create a Camel route that performs complex processing on incoming messages, e.g. transformations, validations, splitting, aggregating, idempotency, resequencing, enrichment, etc. and **ingest only the result into the Ignite cache**. - -We call this **mediated ingestion**. - -[tabs] --- -tab:Java[] -[source,java] ----- -// Create a CamelContext with a custom route that will: -// (1) consume from our Jetty endpoint. -// (2) transform incoming JSON into a Java object with Jackson. -// (3) uses JSR 303 Bean Validation to validate the object. -// (4) dispatches to the direct:ignite.ingest endpoint, where the streamer is consuming from. -CamelContext context = new DefaultCamelContext(); -context.addRoutes(new RouteBuilder() { - @Override - public void configure() throws Exception { - from("jetty:http://0.0.0.0:8080/ignite?httpMethodRestrict=POST") - .unmarshal().json(JsonLibrary.Jackson) - .to("bean-validator:validate") - .to("direct:ignite.ingest"); - } -}); - -// Remember our Streamer is now consuming from the Direct endpoint above. -streamer.setEndpointUri("direct:ignite.ingest"); ----- --- - -== Setting a Response - -By default, the response sent back to the caller (if it is a synchronous endpoint) is simply an echo of the original request. -If you want to customize​ the response, set a Camel `Processor` as a `responseProcessor`: - -[tabs] --- -tab:Java[] -[source,java] ----- -streamer.setResponseProcessor(new Processor() { - @Override public void process(Exchange exchange) throws Exception { - exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 200); - exchange.getOut().setBody("OK"); - } -}); ----- --- diff --git a/docs/_docs/cdc/change-data-capture-extensions.adoc b/docs/_docs/cdc/change-data-capture-extensions.adoc deleted file mode 100644 index 9f6a1a700..000000000 --- a/docs/_docs/cdc/change-data-capture-extensions.adoc +++ /dev/null @@ -1,192 +0,0 @@ -// 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. -= Change Data Capture Extension - -WARNING: CDC is an experimental feature. API or design architecture might be changed. - -== Overview - -link:https://github.com/apache/ignite-extensions/tree/master/modules/cdc-ext[Change Data Capture Extension] module provides two ways to set up cross cluster replication based on CDC. - -. link:https://github.com/apache/ignite-extensions/blob/master/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java[Ignite2IgniteCdcStreamer] - streams changes to destination cluster using client node. -. link:https://github.com/apache/ignite-extensions/blob/master/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/IgniteToKafkaCdcStreamer.java[Ignite2KafkaCdcStreamer] combined with link:https://github.com/apache/ignite-extensions/blob/master/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteCdcStreamer.java[KafkaToIgniteCdcStreamer] streams changes to destination cluster using link:https://kafka.apache.org[Apache Kafka] as a transport. - -NOTE: For each cache replicated between clusters link:https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionConflictResolver.java[CacheVersionConflictResolver] should be defined. - - -== Ignite to Ignite CDC streamer -This streamer starts client node which connects to destination cluster. -After connection is established, all changes captured by CDC will be replicated to destination cluster. - -NOTE: Instances of `ignite-cdc.sh` with configured streamer should be started on each server node of source cluster to capture all changes. - -image:images/CDC-design.svg[] - -== Configuration - -[cols="20%,45%,35%",opts="header"] -|=== -|Name |Description | Default value -| `caches` | Set of cache names to replicate. | null -| `destinationIgniteConfiguration` | Ignite configuration of client nodes that will connect to destination cluster to replicate changes. | null -| `onlyPrimary` | Flag to handle changes only on primary node. | `false` -| `maxBatchSize` | Maximum number of events to be sent to destination cluster in a single batch. | 1024 -|=== - -== Metrics - -|=== -|Name |Description -| `EventsCount` | Count of messages applied to destination cluster. -| `LastEventTime` | Timestamp of last applied event. -|=== - -== CDC replication using Kafka - -This way to replicate changes between clusters requires setting up two applications: - -. `ignite-cdc.sh` with `org.apache.ignite.cdc.kafka.IgniteToKafkaCdcStreamer` that will capture changes from source cluster and write it to Kafka topic. -. `kafka-to-ignite.sh` that will read changes from Kafka topic and then write them to destination cluster. - -NOTE: Instances of `ignite-cdc.sh` with configured streamer should be started on each server node of source cluster to capture all changes. - -=== IgniteToKafkaCdcStreamer Configuration - -[cols="20%,45%,35%",opts="header"] -|=== -|Name |Description | Default value -| `caches` | Set of cache names to replicate. | null -| `kafkaProperties` | Kafka producer properties. | null -| `topic` | Name of the Kafka topic. | null -| `kafkaParts` | Number of Kafka topic partitions. | null -| `onlyPrimary` | Flag to handle changes only on primary node. | `false` -| `maxBatchSize` | Maximum size of concurrently produced Kafka records. When streamer reaches this number, it waits for Kafka acknowledgements, and then commits CDC offset. | `1024` -| `kafkaRequestTimeout` | Kafka request timeout in milliseconds. | `3000` -|=== - -=== IgniteToKafkaCdcStreamer Metrics - -|=== -|Name |Description -| `EventsCount` | Count of messages applied to destination cluster. -| `LastEventTime` | Timestamp of last applied event. -| `BytesSent` | Number of bytes send to Kafka. -|=== - -=== `kafka-to-ignite.sh` application - -This application should be started near the destination cluster. -`kafka-to-ignite.sh` will read CDC events from Kafka topic and then apply them to destination cluster. - -IMPORTANT: `kafka-to-ignite.sh` implements the fail-fast approach. It just fails in case of any error. The restart procedure should be configured with the OS tools. - -Count of instances of the application does not corellate to the count of destination server nodes. -It should be just enough to process source cluster load. -Each instance of application will process configured subset of topic partitions to spread the load. -`KafkaConsumer` for each partition will be created to ensure fair reads. - -==== Installation - -. Build `cdc-ext` module with maven: -+ -```console - $~/src/ignite-extensions/> mvn clean package -DskipTests - $~/src/ignite-extensions/> ls modules/cdc-ext/target | grep zip -ignite-cdc-ext.zip -``` - -. Unpack `ignite-cdc-ext.zip` archive to `$IGNITE_HOME` folder. - -Now, you have additional binary `$IGNITE_HOME/bin/kafka-to-ignite.sh` and `$IGNITE_HOME/libs/ignite-cdc-ext` module. - -NOTE: Please, enable `ignite-cdc-ext` to be able to run `kafka-to-ignite.sh`. - -==== Configuration - -Application configuration should be done using POJO classes or Spring xml file like regular Ignite node configuration. -Kafka to ignite configuration file should contain the following beans that will be loaded during startup: - -. `IgniteConfiguration` bean: Configuration of the client node that will connect to the destination cluster. -. `java.util.Properties` bean with the name `kafkaProperties`: Single Kafka consumer configuration. -. `org.apache.ignite.cdc.kafka.KafkaToIgniteCdcStreamerConfiguration` bean: Options specific to `kafka-to-ignite.sh` application. - -[cols="20%,45%,35%",opts="header"] -|=== -|Name |Description | Default value -| `caches` | Set of cache names to replicate. | null -| `topic` | Name of the Kafka topic. | null -| `kafkaPartsFrom` | Lower Kafka partitions number (inclusive). | -1 -| `kafkaPartsTo` | Lower Kafka partitions number (exclusive). | -1 -| `kafkaRequestTimeout` | Kafka request timeout in milliseconds. | `3000` -| `maxBatchSize` | Maximum number of events to be sent to destination cluster in a single batch. | 1024 -| `threadCount` | Count of threads to proceed consumers. Each thread poll records from dedicated partitions in round-robin manner. | 16 -|=== - -==== Logging - -`kakfa-to-ignite.sh` uses the same logging configuration as the Ignite node does. The only difference is that the log is written in the "kafka-ignite-streamer.log" file. - -== CacheVersionConflictResolver implementation - -It expected that CDC streamers will be configured with the `onlyPrimary=false` in most real-world deployments to ensure fault-tolerance. -That means streamer will send the same change several times equal to `CacheConfiguration#backups` + 1. -At the same time concurrent updates of the same key can be done in replicated clusters. -`CacheVersionConflictResolver` used by Ignite node to selects or merge new (from update request) and existing (stored in the cluster) entry versions. -Selected entry version will be actually stored in the cluster. - -NOTE: Default implementation only select correct entry and never merge. - -link:https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionConflictResolver.java[CacheVersionConflictResolver] should be defined for each cache replicated between clusters. - -Default link:https://github.com/apache/ignite-extensions/blob/master/modules/cdc-ext/src/main/java/org/apache/ignite/cdc/conflictresolve/CacheVersionConflictResolverImpl.java[implementation] is available in cdc-ext. - -=== Configuration - -[cols="20%,45%,35%",opts="header"] -|=== -|Name |Description | Default value -| `clusterId` | Local cluster id. Can be any value from 1 to 31. | null -| `caches` | Set of cache names to handle with this plugin instance. | null -| `conflictResolveField` | Value field to resolve conflict with. Optional. Field values must implement `java.lang.Comparable`. | null -|=== - -=== Conflict resolve algorithm - -Replicated changes contain some additional data. Specifically, entry version from source cluster supplied with the changed data. -Default conflict resolve algorithm based on entry version and `conflictResolveField`. -Conflict resolution field should contain user provided monotonically increasing value such as query id or timestamp. - -. Changes from the "local" cluster always win. -. If both old and new entry from the same cluster version comparison used to determine order. -. If `conflictResolveField` if provided then field values comparison used to determine order. -. Conflict resolution failed. Update will be ignored. - -=== Configuration example -Configuration is done via Ignite node plugin: - -```xml - - - - - - - - - - - - -``` \ No newline at end of file diff --git a/docs/_docs/flink/flink-streamer.adoc b/docs/_docs/flink/flink-streamer.adoc deleted file mode 100644 index 92ab39816..000000000 --- a/docs/_docs/flink/flink-streamer.adoc +++ /dev/null @@ -1,78 +0,0 @@ -// 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. -= Apache Flink Streamer - -Apache Ignite Flink Sink module is a streaming connector to inject Flink data into Ignite cache. The sink emits its input -data to Ignite cache. When creating a sink, an Ignite cache name and Ignite grid configuration file have to be provided. - -Starting data transfer to Ignite cache can be done with the following steps. - -. Import Ignite Flink Sink Module in Maven Project -If you are using Maven to manage dependencies of your project, you can add Flink module -dependency like this (replace `${ignite-flink-ext.version}` with actual Ignite Flink Extension version you are -interested in): -+ -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - ... - - ... - - org.apache.ignite - ignite-flink-ext - ${ignite-flink-ext.version} - - ... - - ... - ----- --- -. Create an Ignite configuration file and make sure it is accessible from the sink. -. Make sure your data input to the sink is specified and start the sink. -+ -[tabs] --- -tab:Java[] -[source,java] ----- -IgniteSink igniteSink = new IgniteSink("myCache", "ignite.xml"); - -igniteSink.setAllowOverwrite(true); -igniteSink.setAutoFlushFrequency(10); -igniteSink.start(); - -DataStream stream = ...; - -// Sink data into the grid. -stream.addSink(igniteSink); -try { - env.execute(); -} catch (Exception e){ - // Exception handling. -} -finally { - igniteSink.stop(); ----- --- - -Refer to the Javadocs of the `ignite-flink` module for more info on the available options. diff --git a/docs/_docs/flume/flume-sink.adoc b/docs/_docs/flume/flume-sink.adoc deleted file mode 100644 index 6428f80ee..000000000 --- a/docs/_docs/flume/flume-sink.adoc +++ /dev/null @@ -1,79 +0,0 @@ -// 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. -= Apache Flume Sink - -== Overview - -Apache Flume is a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large -amounts of log data. - -`IgniteSink` is a Flume sink that extracts events from an associated Flume channel and injects into an Ignite cache. - -`IgniteSink` and its dependencies have to be included in the agent's classpath, as described in the following subsection, -before starting the Flume agent. - -== Setting Up - -. Create a transformer by implementing `EventTransformer` interface. -. Create `ignite` directory inside `plugins.d` directory which is located in `$\{FLUME_HOME}`. If the `plugins.d` directory -is not there, create it. -. Build it and copy to `$\{FLUME_HOME}/plugins.d/ignite-sink/lib`. -. Copy other Ignite-related jar files from Apache Ignite distribution to `$\{FLUME_HOME}/plugins.d/ignite-sink/libext` to -have them as shown below. -+ ----- -plugins.d/ -`-- ignite - |-- lib - | `-- ignite-flume-transformer-x.x.x.jar <-- your jar - `-- libext - |-- cache-api-1.0.0.jar - |-- ignite-core-x.x.x.jar - |-- ignite-flume-ext.x.x.x.jar <-- IgniteSink - |-- ignite-spring-x.x.x.jar - |-- spring-aop-4.1.0.RELEASE.jar - |-- spring-beans-4.1.0.RELEASE.jar - |-- spring-context-4.1.0.RELEASE.jar - |-- spring-core-4.1.0.RELEASE.jar - `-- spring-expression-4.1.0.RELEASE.jar ----- - -. In Flume configuration file, specify Ignite configuration XML file's location with cache properties -(see `flume/src/test/resources/example-ignite.xml` for a basic example) with the cache name specified for cache creation. -Also specify the cache name (same as in Ignite configuration file), your `EventTransformer`'s implementation class, and, -optionally, batch size. All properties are shown in the table below (required properties are in bold). -+ -[cols="20%,45%,35%",opts="header"] -|=== -|Property Name |Description | Default Value -|channel| | - -|type| The component type name. Needs to be `org.apache.ignite.stream.flume.IgniteSink` | - -|igniteCfg| Ignite configuration XML file | - -|cacheName| Cache name. Same as in igniteCfg | - -|eventTransformer| Your implementation of `org.apache.ignite.stream.flume.EventTransformer` | - -|batchSize| Number of events to be written per transaction| 100 -|=== - -The sink configuration part of agent named `a1` can look like this: - ----- -a1.sinks.k1.type = org.apache.ignite.stream.flume.IgniteSink -a1.sinks.k1.igniteCfg = /some-path/ignite.xml -a1.sinks.k1.cacheName = testCache -a1.sinks.k1.eventTransformer = my.company.MyEventTransformer -a1.sinks.k1.batchSize = 100 ----- - -After specifying your source and channel (see Flume's docs), you are ready to run a Flume agent. diff --git a/docs/_docs/gce/gce.adoc b/docs/_docs/gce/gce.adoc deleted file mode 100644 index f4c02eb22..000000000 --- a/docs/_docs/gce/gce.adoc +++ /dev/null @@ -1,43 +0,0 @@ -= Apache Ignite GCE Module - -Apache Ignite GCE module provides Google Cloud Storage based implementations of IP finder for TCP discovery. - -Depending on how you use Ignite, you can an extension using one of the following methods: - -- If you use the binary distribution, move the `libs/{module-dir}` to the `libs` directory of the Ignite distribution before starting the node. -- Add libraries from `libs/{module-dir}` to the classpath of your application. -- Add a module as a Maven dependency to your project. - - -== Building GCE Module And Running Tests - -To build and run GCE extension use the command below with the right credentials to the GCE service: - ----- -mvn clean package -pl modules/gce-ext -Dtest.gce.account.id=id -Dtest.gce.p12.path=path -Dtest.gce.project.name=name ----- - -== Importing GCE Module In Maven Project - -If you are using Maven to manage dependencies of your project, you can add GCE module -dependency like this (replace '${ignite.version}' with actual Ignite version you are -interested in): - ----- - - ... - - ... - - org.apache.ignite - ignite-gce-ext - ${ignite-gce-ext.version} - - ... - - ... - ----- \ No newline at end of file diff --git a/docs/_docs/images/CDC-design.svg b/docs/_docs/images/CDC-design.svg deleted file mode 100644 index d314d42b9..000000000 --- a/docs/_docs/images/CDC-design.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
ignite.sh
ignite.sh
WAL
WAL
ignite-cdc.sh
ignite-cdc.sh
Sever node host
Sever node host
DC-1 Changes
DC-1 Changes
DC-1 Changes
DC-1 Changes
WAL archive
WAL archive
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/_docs/images/camel-streamer.png b/docs/_docs/images/camel-streamer.png deleted file mode 100644 index cff36dc5b..000000000 Binary files a/docs/_docs/images/camel-streamer.png and /dev/null differ diff --git a/docs/_docs/images/hibernate-l2-cache.png b/docs/_docs/images/hibernate-l2-cache.png deleted file mode 100644 index 42f83c54e..000000000 Binary files a/docs/_docs/images/hibernate-l2-cache.png and /dev/null differ diff --git a/docs/_docs/images/hibernate.svg b/docs/_docs/images/hibernate.svg deleted file mode 100644 index 38e4f313e..000000000 --- a/docs/_docs/images/hibernate.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/_docs/images/kafka.svg b/docs/_docs/images/kafka.svg deleted file mode 100644 index db145e2c6..000000000 --- a/docs/_docs/images/kafka.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/_docs/images/more.svg b/docs/_docs/images/more.svg deleted file mode 100644 index 42a3af10d..000000000 --- a/docs/_docs/images/more.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/docs/_docs/images/oracle.svg b/docs/_docs/images/oracle.svg deleted file mode 100644 index 484c750d2..000000000 --- a/docs/_docs/images/oracle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/_docs/images/osgi.svg b/docs/_docs/images/osgi.svg deleted file mode 100644 index dae8409d1..000000000 --- a/docs/_docs/images/osgi.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/docs/_docs/images/spark.svg b/docs/_docs/images/spark.svg deleted file mode 100644 index c0cb1b8e0..000000000 --- a/docs/_docs/images/spark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/_docs/images/spring.svg b/docs/_docs/images/spring.svg deleted file mode 100644 index 0e5f74ebe..000000000 --- a/docs/_docs/images/spring.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/_docs/jms/jms-streamer.adoc b/docs/_docs/jms/jms-streamer.adoc deleted file mode 100644 index b3f9be986..000000000 --- a/docs/_docs/jms/jms-streamer.adoc +++ /dev/null @@ -1,123 +0,0 @@ -// 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. -= JMS Streamer - -== Overview - -Ignite offers a JMS Data Streamer to consume messages from JMS brokers, convert them into cache tuples and insert them in Ignite. - -This data streamer supports the following features: - -* Consumes from queues or topics. -* Supports durable subscriptions from topics. -* Concurrent consumers are supported via the `threads` parameter. - ** When consuming from queues, this component will start as many `Session` objects with separate `MessageListener` instances each, therefore achieving _natural_ concurrency. - ** When consuming from topics, obviously we cannot start multiple threads as that would lead us to consume duplicate messages. Therefore, we achieve concurrency in a _virtualized_ manner through an internal thread pool. -* Transacted sessions are supported through the `transacted` parameter. -* Batched consumption is possible via the `batched` parameter, which groups message reception within the scope of a local JMS transaction (XA not used supported). Depending on the broker, this technique can provide a higher throughput as it decreases the amount of message acknowledgment​ round trips that are necessary, albeit at the expense possible duplicate messages (especially if an incident occurs in the middle of a transaction). - ** Batches are committed when the `batchClosureMillis` time has elapsed, or when a Session has received at least `batchClosureSize` messages. - ** Time-based closure fires with the specified frequency and applies to all ``Session``s in parallel. - ** Size-based closure applies to each individual `Session` (as transactions are `Session-bound` in JMS), so it will fire when that `Session` has processed that many messages. - ** Both options are compatible with each other. You can disable either, but not both if batching is enabled. -* Supports specifying the destination with implementation-specific `Destination` objects or with names. - -We have tested our implementation against http://activemq.apache.org[Apache ActiveMQ, window=_blank], but any JMS broker -is supported as long as it client library implements the http://download.oracle.com/otndocs/jcp/7195-jms-1.1-fr-spec-oth-JSpec/[JMS 1.1 specification, window=_blank]. - -== Instantiating JMS Streamer - -When you instantiate the JMS Streamer, you will need to concretize​ the following generic types: - -* `T extends Message` \=> the type of JMS `Message` this streamer will receive. If it can receive multiple, use the generic `Message` type. -* `K` \=> the type of the cache key. -* `V` \=> the type of the cache value. - -To configure the JMS streamer, you will need to provide the following compulsory properties: - -* `connectionFactory` \=> an instance of your `ConnectionFactory` duly configured as required by the broker. It can be a pooled `ConnectionFactory`. -* `destination` or (`destinationName` and `destinationType`) \=> a `Destination` object (normally a broker-specific implementation of the JMS `Queue` or `Topic` interfaces), or the combination of a destination name (queue or topic name) and the type as a `Class` reference to either `Queue` or `Topic`. In the latter case, the streamer will use either `Session.createQueue(String)` or `Session.createTopic(String)` to get a hold of the destination. -* `transformer` \=> an implementation of `MessageTransformer` that digests a JMS message of type `T` and produces a `Map` of cache entries to add. It can also return `null` or an empty `Map` to ignore the incoming message. - -== Example - -The example in this section populates a cache with `String` keys and `String` values, consuming `TextMessages` with this format: - ----- -raulk,Raul Kripalani -dsetrakyan,Dmitriy Setrakyan -sv,Sergi Vladykin -gm,Gianfranco Murador ----- - -Here is the code: - -[tabs] --- -tab:Java[] -[source,java] ----- -// create a data streamer -IgniteDataStreamer dataStreamer = ignite.dataStreamer("mycache")); -dataStreamer.allowOverwrite(true); - -// create a JMS streamer and plug the data streamer into it -JmsStreamer jmsStreamer = new JmsStreamer<>(); -jmsStreamer.setIgnite(ignite); -jmsStreamer.setStreamer(dataStreamer); -jmsStreamer.setConnectionFactory(connectionFactory); -jmsStreamer.setDestination(destination); -jmsStreamer.setTransacted(true); -jmsStreamer.setTransformer(new MessageTransformer() { - @Override - public Map apply(TextMessage message) { - final Map answer = new HashMap<>(); - String text; - try { - text = message.getText(); - } - catch (JMSException e) { - LOG.warn("Could not parse message.", e); - return Collections.emptyMap(); - } - for (String s : text.split("\n")) { - String[] tokens = s.split(","); - answer.put(tokens[0], tokens[1]); - } - return answer; - } -}); - -jmsStreamer.start(); - -// on application shutdown -jmsStreamer.stop(); -dataStreamer.close(); ----- --- - -To use this component, you have to import the following module through your build system (Maven, Ivy, Gradle, sbt, etc.): - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - org.apache.ignite - ignite-jms11-ext - ${ignite-jms11-ext.version} - ----- --- diff --git a/docs/_docs/kafka/kafka-streamer.adoc b/docs/_docs/kafka/kafka-streamer.adoc deleted file mode 100644 index aedb89692..000000000 --- a/docs/_docs/kafka/kafka-streamer.adoc +++ /dev/null @@ -1,221 +0,0 @@ -// 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. -= Apache Kafka Streamer - -== Overview - -Apache Ignite Kafka Streamer module provides streaming from Kafka to Ignite cache. -Either of the following two methods can be used to achieve such streaming: - -* using Kafka Connect functionality with Ignite sink -* importing the Kafka Streamer module in your Maven project and instantiating KafkaStreamer for data streaming - -== Streaming Data via Kafka Connect - -`IgniteSinkConnector` will help you export data from Kafka to Ignite cache by polling data from Kafka topics and writing -it to your specified cache. The connector can be found in the `ignite-kafka` module. It and its dependencies -have to be on the classpath of a Kafka running instance, as described in the following subsection. _For more information -on Kafka Connect, see http://kafka.apache.org/documentation.html#connect[Kafka Documentation, window=_blank]._ - -=== Setting up and Running - -. Add the `IGNITE_HOME/libs/ignite-kafka` module to the application classpath. - -. Prepare worker configurations, e.g., -+ -[tabs] --- -tab:Configuration[] -[source,yaml] ----- -bootstrap.servers=localhost:9092 - -key.converter=org.apache.kafka.connect.storage.StringConverter -value.converter=org.apache.kafka.connect.storage.StringConverter -key.converter.schemas.enable=false -value.converter.schemas.enable=false - -internal.key.converter=org.apache.kafka.connect.storage.StringConverter -internal.value.converter=org.apache.kafka.connect.storage.StringConverter -internal.key.converter.schemas.enable=false -internal.value.converter.schemas.enable=false - -offset.storage.file.filename=/tmp/connect.offsets -offset.flush.interval.ms=10000 ----- --- - -. Prepare connector configurations, e.g., -+ -[tabs] --- -tab:Configuration[] -[source,yaml] ----- -# connector -name=my-ignite-connector -connector.class=org.apache.ignite.stream.kafka.connect.IgniteSinkConnector -tasks.max=2 -topics=someTopic1,someTopic2 - -# cache -cacheName=myCache -cacheAllowOverwrite=true -igniteCfg=/some-path/ignite.xml -singleTupleExtractorCls=my.company.MyExtractor ----- --- -+ -* where `cacheName` is the name of the cache you specify in `/some-path/ignite.xml` and the data from `someTopic1,someTopic2` -will be pulled and stored. -* `cacheAllowOverwrite` can be set to `true` if you want to enable overwriting existing values in the cache. -* If you need to parse the incoming data and decide on your new key and value, you can implement it as `StreamSingleTupleExtractor` and specify as `singleTupleExtractorCls`. -* You can also set `cachePerNodeDataSize` and `cachePerNodeParOps` to adjust per-node buffer and the maximum number of parallel stream operations for a single node. - -. Start connector, for instance, in a standalone mode as follows, -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -bin/connect-standalone.sh myconfig/connect-standalone.properties myconfig/ignite-connector.properties ----- --- - -=== Checking the Flow - -To perform a very basic functionality check, you can do the following, - -. Start Zookeeper -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -bin/zookeeper-server-start.sh config/zookeeper.properties ----- --- -. Start Kafka server -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -bin/kafka-server-start.sh config/server.properties ----- --- -. Provide some data input to the Kafka server -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test --property parse.key=true --property key.separator=,k1,v1 ----- --- -. Start the connector -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -bin/connect-standalone.sh myconfig/connect-standalone.properties myconfig/ignite-connector.properties ----- --- -. Check the value is in the cache. For example, via REST API, -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -http://node1:8080/ignite?cmd=size&cacheName=cache1 ----- --- - -== Streaming data with Ignite Kafka Streamer Module - -If you are using Maven to manage dependencies of your project, first of all you will have to add Kafka Streamer module -dependency like this (replace `${ignite-kafka-ext.version}` with actual Ignite Kafka Extension version you are interested in): - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - ... - - ... - - org.apache.ignite - ignite-kafka-ext - ${ignite-kafka-ext.version} - - ... - - ... - ----- --- - -Having a cache with `String` keys and `String` values, the streamer can be started as follows -[tabs] --- -tab:Java[] -[source,java] ----- -KafkaStreamer kafkaStreamer = new KafkaStreamer<>(); - -IgniteDataStreamer stmr = ignite.dataStreamer("myCache")); - -// allow overwriting cache data -stmr.allowOverwrite(true); - -kafkaStreamer.setIgnite(ignite); -kafkaStreamer.setStreamer(stmr); - -// set the topic -kafkaStreamer.setTopic(someKafkaTopic); - -// set the number of threads to process Kafka streams -kafkaStreamer.setThreads(4); - -// set Kafka consumer configurations -kafkaStreamer.setConsumerConfig(kafkaConsumerConfig); - -// set extractor -kafkaStreamer.setSingleTupleExtractor(strExtractor); - -kafkaStreamer.start(); - -... - -// stop on shutdown -kafkaStreamer.stop(); - -strm.close(); ----- --- - -For the detailed information on Kafka consumer properties, refer to http://kafka.apache.org/documentation.html diff --git a/docs/_docs/mqtt/mqtt-streamer.adoc b/docs/_docs/mqtt/mqtt-streamer.adoc deleted file mode 100644 index 1339c97fc..000000000 --- a/docs/_docs/mqtt/mqtt-streamer.adoc +++ /dev/null @@ -1,76 +0,0 @@ -// 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. -= MQTT Streamer - -== Overview - -This streamer consumes from an MQTT topic and feeds key-value pairs into an `IgniteDataStreamer` instance, using -https://eclipse.org/paho/[Eclipse Paho, window=_blank] as an MQTT client. - -You need to provide a stream tuple extractor (either a single-entry or multiple-entries extractor) to process the incoming -message and extract the tuple to insert. - -This streamer supports: - -* Subscribing to a single topic or multiple topics at once. -* Specifying the subscriber's QoS for a single topic or for multiple topics. -* Setting https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttConnectOptions.html[MqttConnectOptions, window=_blank] -to enable features like _last will testament_, _persistent sessions_, etc. -* Specifying the client ID. A random one will be generated and maintained throughout reconnections if the user does not provide one. -* (Re-)Connection retries powered by the https://github.com/rholder/guava-retrying[guava-retrying library, window=_blank]. -_Retry wait_ and _retry stop_ policies can be configured. -* Blocking the start() method until the client is connected for the first time. - -== Example - -Here's a trivial code sample showing how to use this streamer: - -[tabs] --- -tab:Java[] -[source,java] ----- -// Start Ignite. -Ignite ignite = Ignition.start(); - -// Get a data streamer reference. -IgniteDataStreamer dataStreamer = grid().dataStreamer("mycache"); - -// Create an MQTT data streamer -MqttStreamer streamer = new MqttStreamer<>(); -streamer.setIgnite(ignite); -streamer.setStreamer(dataStreamer); -streamer.setBrokerUrl(brokerUrl); -streamer.setBlockUntilConnected(true); - -// Set a single tuple extractor to extract items in the format 'key,value' where key => Int, and value => String -// (using Guava here). -streamer.setSingleTupleExtractor(new StreamSingleTupleExtractor() { - @Override public Map.Entry extract(MqttMessage msg) { - List s = Splitter.on(",").splitToList(new String(msg.getPayload())); - - return new GridMapEntry<>(Integer.parseInt(s.get(0)), s.get(1)); - } -}); - -// Consume from multiple topics at once. -streamer.setTopics(Arrays.asList("def", "ghi", "jkl", "mno")); - -// Start the MQTT Streamer. -streamer.start(); ----- --- - -Refer to the Javadocs of the `ignite-mqtt-ext` module for more info on the available options. diff --git a/docs/_docs/perf-statistics/performance-statistics.adoc b/docs/_docs/perf-statistics/performance-statistics.adoc deleted file mode 100644 index 6c82b3821..000000000 --- a/docs/_docs/perf-statistics/performance-statistics.adoc +++ /dev/null @@ -1,86 +0,0 @@ -// 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. -= Performance Statistics Extension - -== Overview - -Ignite provides link:monitoring-metrics/performance-statistics[a built-in tool for cluster profiling.] - -The extension provides utilities to link:#building-the-report[create the report] and -link:#print-statistics[print statistics] from the collected files. - -== Building the Report - -Ignite provides a tool to generate the report from the performance statistics files. - -Follow these steps to build the performance report: - -1. Stop collecting statistics and place files from all nodes under an empty directory. For example: -+ ----- - /path_to_files/ - ├── node-162c7147-fef8-4ea2-bd25-8653c41fc7fa.prf - ├── node-7b8a7c5c-f3b7-46c3-90da-e66103c00001.prf - └── node-faedc6c9-3542-4610-ae10-4ff7e0600000.prf ----- -+ -2. Run the script from the release package of the tool: -+ -[source,shell] ----- -performance-statistics-tool/build-report.sh path_to_files ----- -+ -The performance report is created in the new directory under the performance statistics files: -`path_to_files/report_yyyy-MM-dd_HH-mm-ss/`. -Open `report_yyyy-MM-dd_HH-mm-ss/index.html` in the browser to see the report. -+ -For more details run the help command: -+ -[source,shell] ----- -performance-statistics-tool/build-report.sh --help ----- - -== Print Statistics - -Ignite provides a tool to print statistics to a console or to a file in JSON format. - -Run the script from the release package of the tool to print statistics: - -[source,shell] ----- -performance-statistics-tool/print-statistics.sh path_to_files ----- - -Note that `path_to_files` is a path to the performance statistics file or files directory. - -The script provides the ability to filter operations by operation's type, time, or cache. For more details run the -help command: - -[source,shell] ----- -performance-statistics-tool/print-statistics.sh --help ----- - -See the output example below: - ----- - {"op":"CACHE_GET","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheId":-1809642915,"startTime":1616837094237,"duration":64992213} - {"op":"CACHE_PUT","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheId":-1809642915,"startTime":1616837094237,"duration":879869} - {"op":"CACHE_GET_AND_PUT","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheId":1328364293,"startTime":1616837094248,"duration":17186240} - {"op":"TX_COMMIT","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheIds":[-1809642915],"startTime":1616837094172,"duration":184887787} - {"op":"QUERY","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","type":"SQL_FIELDS","text":"create table Person (id int, val varchar, primary key (id))","id":0,"startTime":1616837094143,"duration":258741595,"success":true} ----- \ No newline at end of file diff --git a/docs/_docs/pub-sub/pub-sub.adoc b/docs/_docs/pub-sub/pub-sub.adoc deleted file mode 100644 index 91ba14772..000000000 --- a/docs/_docs/pub-sub/pub-sub.adoc +++ /dev/null @@ -1,32 +0,0 @@ -= Apache Ignite Pub/Sub Module - -Pub/Sub module is a streaming connector to inject Pub/Sub data into Ignite cache. - -Starting data transfer to Ignite can be done with the following steps. - -1. Import Ignite Pub/Sub Module in Maven Project -+ -If you are using Maven to manage dependencies of your project, you can add Pub/Sub module dependency like this (replace '${ignite.version}' with actual Ignite version you are interested in): -+ ----- - - ... - - ... - - org.apache.ignite - ignite-pub-sub-ext - ${ignite-pub-sub-ext.version} - - ... - - ... - ----- -+ -2. Create an Ignite configuration file (see example-ignite.xml) and make sure it is accessible from the sink. -+ -3. Make sure your data input to the sink is specified. For example `input.addSink(igniteSinkObject)` \ No newline at end of file diff --git a/docs/_docs/rocketmq/rocketmq-streamer.adoc b/docs/_docs/rocketmq/rocketmq-streamer.adoc deleted file mode 100644 index a302ca722..000000000 --- a/docs/_docs/rocketmq/rocketmq-streamer.adoc +++ /dev/null @@ -1,85 +0,0 @@ -// 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. -= RocketMQ Streamer - -This streamer module provides streaming from https://github.com/apache/incubator-rocketmq[Apache RocketMQ, window=_blank] -to Ignite. - -To use Ignite RocketMQ Streamer module - -. Import it to your Maven project. If you are using Maven to manage dependencies of your project, you can add an Ignite -RocketMQ module dependency like this (replace `${ignite-rocketmq-ext.version}` with actual Ignite RocketMQ Extension version you are interested in): -+ -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - ... - - ... - - org.apache.ignite - ignite-rocketmq-ext - ${ignite-rocketmq-ext.version} - - ... - - ... - ----- --- - -. Implement either `StreamSingleTupleExtractor` or `StreamMultipleTupleExtractor` for the streamer (shown -as `MyTupleExtractor` in the code sample below). For a simple implementation, refer to `RocketMQStreamerTest.java`. - -. Initialize and start the streamer -+ -[tabs] --- -tab:Java[] -[source,java] ----- -IgniteDataStreamer dataStreamer = ignite.dataStreamer(MY_CACHE)); - -dataStreamer.allowOverwrite(true); -dataStreamer.autoFlushFrequency(10); - -streamer = new RocketMQStreamer<>(); - -//configure. -streamer.setIgnite(ignite); -streamer.setStreamer(dataStreamer); -streamer.setNameSrvAddr(NAMESERVER_IP_PORT); -streamer.setConsumerGrp(CONSUMER_GRP); -streamer.setTopic(TOPIC_NAME); -streamer.setMultipleTupleExtractor(new MyTupleExtractor()); - -streamer.start(); - -... - -// stop on shutdown -streamer.stop(); - -dataStreamer.close(); ----- --- - -Refer to the Javadocs for more info on the available options. diff --git a/docs/_docs/spark/spark.adoc b/docs/_docs/spark/spark.adoc deleted file mode 100644 index 3c4196ea3..000000000 --- a/docs/_docs/spark/spark.adoc +++ /dev/null @@ -1,127 +0,0 @@ -// 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. -= Using Spark with Apache Ignite - -This module provides an implementation of Spark RDD abstraction, providing access to Ignite caches from your Spark project. - -== Using Spark Integration - -. Import the extension to your Maven project. If you are using Maven to manage dependencies of your project, you can add an Ignite -Spark module dependency in the following way (replace `${ignite-spark-ext.version}` with actual Ignite Spark Extension version you are interested in): -+ -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - ... - - ... - - org.apache.ignite - ignite-spark-ext - ${ignite-spark-ext.version} - - ... - - ... - ----- --- - -. Make sure that all required libraries are present in the classpath -if you run the application by using the spark-submit command, or add them to your POM file: - -NOTE: We support any minor version of Scala 2.12, Spark 3.2 and all versions of Apache Ignite. - -tab:pom.xml[] -[source,xml] ----- - ... - - ... - - org.scala-lang - scala-library - {scala-version} - - - org.scala-lang - scala-reflect - {scala-version} - - - - org.apache.ignite - ignite-core - {ignite-version} - - - - org.apache.ignite - ignite-indexing - {ignite-version} - - - - org.apache.ignite - ignite-spring - {ignite-version} - - - - org.apache.spark - spark-core_2.12 - {spark-version} - - - - org.apache.spark - spark-catalyst_2.12 - {spark-version} - - - - org.apache.spark - spark-sql_2.12 - {spark-version} - - - - org.apache.spark - spark-network-common_2.12 - {spark-version} - - - - org.apache.spark - spark-network-shuffle_2.12 - {spark-version} - - - - org.apache.spark - spark-tags_2.12 - {spark-version} - - ... - - ... - ----- diff --git a/docs/_docs/spring/spring-boot.adoc b/docs/_docs/spring/spring-boot.adoc deleted file mode 100644 index b5022eb0a..000000000 --- a/docs/_docs/spring/spring-boot.adoc +++ /dev/null @@ -1,210 +0,0 @@ -// 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. -= Apache Ignite With Spring Boot - -== Overview - -https://spring.io/projects/spring-boot[Spring Boot, window="_blank"] is a widely used Java framework that makes it easy -to create stand-alone Spring-based applications. - -Apache Ignite provides two extensions that automate Ignite configuration withing the Spring Boot environment: - -* `ignite-spring-boot-autoconfigure-ext` - autoconfigures ignite server and client nodes within Spring Boot. -* `ignite-spring-boot-thin-client-autoconfigure-ext` - autoconfigures link:thin-clients/java-thin-client[Ignite Thin Client] with Spring Boot. - -== Autoconfiguration of Apache Ignite Servers and Clients - -You need to use `ignite-spring-boot-autoconfigure-ext` extension to autoconfigure Ignite servers or clients (aka. thick clients) with Spring Boot. - -The extension can be added with Maven as follows: - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-boot-autoconfigure-ext - 1.0.0 - ----- --- - -Once added, Spring will create an Ignite instance on start-up automatically. - -=== Set Ignite Up Via Spring Boot Configuration - -You can use a regular Spring Boot configuration to set Ignite-specific settings. Use `ignite` as a prefix: - -[tabs] --- -tab:application.yml[] -[source,yaml] ----- -ignite: - igniteInstanceName: properties-instance-name - communicationSpi: - localPort: 5555 - dataStorageConfiguration: - defaultDataRegionConfiguration: - initialSize: 10485760 #10MB - dataRegionConfigurations: - - name: my-dataregion - initialSize: 104857600 #100MB - cacheConfiguration: - - name: accounts - queryEntities: - - tableName: ACCOUNTS - keyFieldName: ID - keyType: java.lang.Long - valueType: java.lang.Object - fields: - ID: java.lang.Long - amount: java.lang.Double - updateDate: java.util.Date - - name: my-cache2 ----- --- - -=== Set Ignite Up Programmatically - -There are two ways to configure Ignite programmatically. - -**1. Create IgniteConfiguration Bean** - -Just create a method that returns `IgniteConfiguration` bean that will be used to initialize an Ignite node with the settings you set: - -[tabs] --- -tab:Java[] -[source,java] ----- -@Bean - public IgniteConfiguration igniteConfiguration() { - // If you provide a whole ClientConfiguration bean then configuration properties will not be used. - IgniteConfiguration cfg = new IgniteConfiguration(); - cfg.setIgniteInstanceName("my-ignite"); - return cfg; - } ----- --- - -**2. Customize IgniteConfiguration Created With Spring Boot Configuration** - -If you want to customize `IgniteConfiguration` that was initially created with Spring Boot configuration file, then -provide an implementation of `IgniteConfigurer` interface for your application context. - -First, `IgniteConfiguration` will be loaded from the Spring Boot configuration and then that instance will be passed to the configurer for extra settings. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Bean - public IgniteConfigurer nodeConfigurer() { - return cfg -> { - //Setting some property. - //Other will come from `application.yml` - cfg.setIgniteInstanceName("my-ignite"); - }; - } ----- --- - -== Autoconfiguration of Apache Ignite Thin Client - -You need to use `ignite-spring-boot-thin-client-autoconfigure-ext` extension to autoconfigure Ignite Thin Client with Spring Boot. - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-boot-thin-client-autoconfigure-ext - 1.0.0 - ----- --- - -Once added, Spring will create an instance of Ignite Thin client connection on start-up automatically. - -=== Set Thin Client Up Via Spring Boot Configuration - -You can use a regular Spring Boot configuration to configure `IgniteClient` object. Use `ignite-client` for Ignite-specific settings: - -[tabs] --- -tab:application.yml[] -[source,yaml] ----- -ignite-client: - addresses: 127.0.0.1:10800 # this is mandatory property! - timeout: 10000 - tcpNoDelay: false ----- --- - -=== Set Thin Client Up Programmatically - -You can use two ways to configure `IgniteClient` object programmatically. - -**1. Create ClientConfiguration bean** - -Just create a method that returns `ClientConfiguration` bean. `IgniteClient` object will use that bean upon startup: - -[tabs] --- -tab:Java[] -[source,java] ----- -@Bean - public ClientConfiguration clientConfiguration() { - // If you provide a whole ClientConfiguration bean then configuration properties will not be used. - ClientConfiguration cfg = new ClientConfiguration(); - cfg.setAddresses("127.0.0.1:10800"); - return cfg; - } ----- --- - -**2. Customize ClientConfiguration Created With Spring Boot Configuration** - -If you want to customize `ClientConfiguration` bean created from the Spring Boot configuration file, then provide an -implementation of `IgniteClientConfigurer` interface in your application context. - -First, `ClientConfiguration` will be loaded from the Spring Boot configuration and then an instance will be passed to the configurer. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Bean - IgniteClientConfigurer configurer() { - //Setting some property. - //Other will come from `application.yml` - return cfg -> cfg.setSendBufferSize(64*1024); - } ----- --- - -== Examples - -Refer to several available https://github.com/apache/ignite-extensions/tree/master/modules/spring-boot-autoconfigure-ext/examples/main[examples, windows="_blank"] -for more details. diff --git a/docs/_docs/spring/spring-caching.adoc b/docs/_docs/spring/spring-caching.adoc deleted file mode 100644 index 343c07e78..000000000 --- a/docs/_docs/spring/spring-caching.adoc +++ /dev/null @@ -1,595 +0,0 @@ -// 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. -= Using Spring Cache With Apache Ignite - -== Overview - -http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html[Spring Cache, window=_blank] -abstraction provides an annotation-based way to enable caching for Java methods so that the result of a method execution -is stored in an external cache storage. Later, if the same method is called with the same set of parameter values, the result -will be retrieved from the cache instead of actually executing the method. - -Apache Ignite provides the `ignite-spring-cache-ext` extension that allows to use Apache Ignite Cache as an external -storage for the Spring Cache abstraction. The mentioned above integration is achieved by providing implementations of the -`CacheManager` Spring interface. There are two such implementations: `SpringCacheManager` and -`IgniteClientSpringCacheManager`, which use either Apache Ignite node or Apache Ignite thin client to connect to the -Apache Ignite cluster and perform data caching. - -== Maven Configuration - -If you use Maven to manage dependencies in your project, you can add Apache Ignite Spring Cache extension -dependencies to the application's `pom.xml` file like this: - -[tabs] --- -tab: For all Apache Ignite versions since 2.12.0[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-cache-ext - ${ignite-spring-cache-ext.version} - - - - org.apache.ignite - ignite-core - ${ignite.version} - - - - org.apache.ignite - ignite-spring - ${ignite.version} - - - org.springframework - spring-context - - - - - - org.springframework - spring-context - ${spring.version} - ----- -tab:For Apache Ignite 2.11.0[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-cache-ext - ${ignite-spring-cache-ext.version} - - - - org.apache.ignite - ignite-core - ${ignite.version} - - - - org.apache.ignite - ignite-spring - ${ignite.version} - - - org.springframework - spring-context - - - org.springframework - spring-core - - - org.springframework - spring-aop - - - org.springframework - spring-expressions - - - org.springframework - spring-beans - - - org.springframework - spring-jdbc - - - org.springframework - spring-tx - - - - - - org.springframework - spring-context - ${spring.version} - ----- --- - -Replace `${ignite-spring-cache-ext.version}`, `${spring.version}`, and -`${ignite.version}` with an actual version of Apache Ignite Spring Cache extension, Spring, and -Apache Ignite dependency you need, respectively. - -The table below shows available versions of the Apache Ignite Spring Cache extension and compatible versions -of the Apache Ignite and Spring. - -[cols="4,5,5", opts="header"] -|=== -|Apache Ignite Spring Cache extension version | Apache Ignite versions | Spring versions -| 1.0.0 | All versions since 2.11.0 | All versions since 4.3.0 -|=== - -== Apache Ignite Node Cache Manager Configuration - -=== Cluster Connection Configuration - -To plug in an Ignite cache into your Spring-based application that uses Ignite node to connect to Apache Ignite cluster -you need to perform just two simple steps: - -* Start an Ignite node with proper configuration in embedded mode (i.e., in the same JVM where the application is running). -It can already have predefined caches, but it's not required - caches will be created automatically on first access if required. -* Configure `SpringCacheManager` as the cache manager in the Spring application context. - -The embedded node can be started by `SpringCacheManager` itself. In this case you will need to provide a path to either -the Ignite configuration XML file or `IgniteConfiguration` instance via `configurationPath` or `configuration` -properties respectively (see examples below). Note that setting both is illegal and results in `IllegalArgumentException`. - -[discrete] -=== Specifying Apache Ignite Node Configuration - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public SpringCacheManager cacheManager() { - SpringCacheManager mgr = new SpringCacheManager(); - - mgr.setConfiguration(new IgniteConfiguration() - .setIgniteInstanceName("")); - // Other required configuration parameters. - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - ... - - - - - - - ----- --- - -[discrete] -=== Specifying Path to Apache Ignite XML Node Configuration File - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public SpringCacheManager cacheManager() { - SpringCacheManager mgr = new SpringCacheManager(); - - mgr.setConfigurationPath(" - - - - - - - - ----- --- - -[discrete] -=== Specifying Name of the Manually Started Apache Ignite Node Instance - -It's possible that you already have an Ignite node running when the cache manager is initialized (e.g., it was started using -`ServletContextListenerStartup`). In this case you should simply provide the grid name via `igniteInstanceName` property. -Note that if you don't set the grid name as well, the cache manager will try to use the default Ignite instance -(the one with the `null` name). Here is an example: - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public SpringCacheManager cacheManager() { - SpringCacheManager mgr = new SpringCacheManager(); - - mgr.setIgniteInstanceName(""); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - - ----- --- - -[NOTE] -==== -[discrete] -Keep in mind that the node started inside your application is an entry point to the whole topology it connects to. -You can start as many remote standalone nodes as you need and all these nodes will participate in caching the data. -==== - -=== Dynamic Caches - -While you can have all required caches predefined in Ignite configuration, it's not required. If Spring wants to use a -cache that doesn't exist, the `SpringCacheManager` will automatically create it. - -If otherwise not specified, a new cache will be created with default configuration. To customize it, you can provide a configuration -template via `dynamicCacheConfiguration` property. For example, if you want to use `REPLICATED` caches instead of -`PARTITIONED`, you should configure `SpringCacheManager` like this: - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public SpringCacheManager cacheManager() { - SpringCacheManager mgr = new SpringCacheManager(); - ... - - mgr.setDynamicCacheConfiguration(new CacheConfiguration<>("") - .setCacheMode(CacheMode.REPLICATED)); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - ... - - - - - - - - ----- --- - -You can also utilize near caches on client side. To achieve this, simply provide near cache configuration via the -`dynamicNearCacheConfiguration` property. By default, near cache is not created. Here is an example: - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public SpringCacheManager cacheManager() { - SpringCacheManager mgr = new SpringCacheManager(); - ... - - mgr.setDynamicNearCacheConfiguration(new NearCacheConfiguration<>().setNearStartSize(1000)); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - ... - - - - - - - ----- --- - -== Apache Ignite Thin Client Cache Manager Configuration -This chapter shows how to set up `IgniteClientSpringCacheManager` that relies on Ignite thin client to connect -to the Ignite cluster and perform caching. - -[IMPORTANT] -==== -[discrete] -`IgniteClientSpringCacheManager` does not support Spring Cache synchronous mode -(https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/cache/annotation/Cacheable.html#sync--[Cacheable#sync, window=_blank]). -If this feature is crucial to your application, choose the -link:extensions-and-integrations/spring/spring-caching#apache-ignite-node-cache-manager-configuration[SpringCacheManager] -that uses an Ignite node to connect to Ignite cluster. -==== - -=== Cluster Connection Configuration -Cluster connection configuration defines Apache Ignite thin client used by `IgniteClientSpringCacheManager` to access -the cluster. -There are several approaches to do this: - -[NOTE] -==== -It is incorrect to mix multiple approaches - this results in the `IllegalArgumentException` exception during the manager startup. -==== - -[discrete] -=== Specifying Instance of the Apache Ignite Thin Client - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public IgniteClient igniteClient() { - return Ignition.startClient(new ClientConfiguration().setAddresses("127.0.0.1:10800")); - } - - @Bean - public IgniteClientSpringCacheManager cacheManager(IgniteClient cli) { - return new IgniteClientSpringCacheManager().setClientInstance(cli); - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - 127.0.0.1:10800 - - - - - - - - - - - - - - ----- --- - -[discrete] -=== Specifying Apache Ignite Thin Client Configuration - -In this case, Apache Ignite thin client instance is started automatically by the `IgniteClientSpringCacheManager` based -on the provided configuration. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableCaching -public class SpringApplicationConfiguration { - @Bean - public IgniteClientSpringCacheManager cacheManager() { - return new IgniteClientSpringCacheManager() - .setClientConfiguration(new ClientConfiguration() - .setAddresses("127.0.0.1:10800")); - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - 127.0.0.1:10800 - - - - - - - - - ----- --- - -=== Dynamic Caches - -Dynamic Caches configuration for `IgniteClientSpringCacheManager` is performed the same way as for -link:extensions-and-integrations/spring/spring-caching#dynamic-caches[SpringCacheManager] -that uses Apache Ignite node instance to access the cluster. - -== Example - -Once you have added `SpringCacheManager` to your Spring application context, you can enable caching for any Java method by simply attaching an annotation to it. - -Usually, you would use caching for heavy operations, like database access. For example, let's assume you have a DAO class with -`averageSalary(...)` method that calculates the average salary of all employees in an organization. You can use `@Cacheable` -annotation to enable caching for this method: - -[tabs] --- -tab:Java[] -[source,java] ----- -private JdbcTemplate jdbc; - -@Cacheable("averageSalary") -public long averageSalary(int organizationId) { - String sql = - "SELECT AVG(e.salary) " + - "FROM Employee e " + - "WHERE e.organizationId = ?"; - - return jdbc.queryForObject(sql, Long.class, organizationId); -} ----- --- - -When this method is called for the first time, `SpringCacheManager` will automatically create a `averageSalary` cache. -It will also lookup the pre-calculated average value in this cache and return it right away if it's there. If the average -for this organization is not calculated yet, the method will be called and the result will be stored in cache. So next -time you request the average salary for this organization, you will not need to query the database. - -If the salary of one of the employees is changed, you may want to remove the average value for the organization this -employee belongs to, because otherwise the `averageSalary(...)` method will return obsolete cached result. This can be -achieved by attaching `@CacheEvict` annotation to a method that updates employee's salary: - -[tabs] --- -tab:Java[] -[source,java] ----- -private JdbcTemplate jdbc; - -@CacheEvict(value = "averageSalary", key = "#e.organizationId") -public void updateSalary(Employee e) { - String sql = - "UPDATE Employee " + - "SET salary = ? " + - "WHERE id = ?"; - - jdbc.update(sql, e.getSalary(), e.getId()); -} ----- --- - -After this method is called, average value for the provided employee's organization will be evicted from the `averageSalary` cache. -This will force `averageSalary(...)` to recalculate the value next time it's called. - -[NOTE] -==== -[discrete] -Note that this method receives employee as a parameter, while average values are saved in cache by `organizationID`. -To explicitly specify what is used as a cache key, we used key parameter of the annotation and Spring Expression Language. - -The `#e.organizationId` expression means that we need to extract the value of `organizationId` property from `e` variable. -Essentially, `getOrganizationId()` method will be called on provided employee object and the returned value will be used as the cache key. -==== diff --git a/docs/_docs/spring/spring-data.adoc b/docs/_docs/spring/spring-data.adoc deleted file mode 100644 index 5d93fc69b..000000000 --- a/docs/_docs/spring/spring-data.adoc +++ /dev/null @@ -1,296 +0,0 @@ -// 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. -= Apache Ignite With Spring Data - -== Overview - -Spring Data Framework provides a unified and widely used API that allows abstracting an underlying data storage from the -application layer. Spring Data helps you avoid locking to a specific database vendor, making it easy to switch from one -database to another with minimal efforts. Apache Ignite integrates with Spring Data by implementing Spring Data `CrudRepository` interface. - -== Maven Configuration - -The easiest way to start working with Apache Ignite's Spring Data repository is by adding the following Maven dependencies -to the application's `pom.xml` file: - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-data-ext - ${ignite-spring-data-ext.version} - - - - org.apache.ignite - ignite-core - ${ignite.version} - - - - org.apache.ignite - ignite-indexing - ${ignite.version} - - - - org.apache.ignite - ignite-spring - ${ignite.version} - - - - org.springframework.data - spring-data-commons - ${spring.data.version} - - - - org.springframework - spring-tx - ${spring.version} - ----- --- - -Replace `${ignite-spring-data-ext.version}`, `${spring.data.version}`, and -`${ignite.version}` with an actual version of Apache Ignite Spring Data extension, Spring Data, and Apache Ignite -dependencies you are interested in, respectively. - -The table below shows available versions of the Apache Ignite Spring Data extension and corresponding versions of the -Apache Ignite each one is compatible with. - -[cols="4,5", opts="header"] -|=== -|Apache Ignite Spring Data extension version | Compatible Apache Ignite versions -| 1.0.0 | All versions since 2.8.0 -| 2.0.0 | All versions since 2.8.0 -|=== - -== Apache Ignite Repository - -Apache Ignite introduces a special `IgniteRepository` interface that extends default `CrudRepository`. This interface -should be extended by all custom Spring Data repositories that wish to store and query data located in an Apache Ignite cluster. - -For instance, let's create the first custom repository named `PersonRepository`: - -[tabs] --- -tab:Java[] -[source,java] ----- -@RepositoryConfig(cacheName = "PersonCache") -public interface PersonRepository extends IgniteRepository { - /** - * Gets all the persons with the given name. - * @param name Person name. - * @return A list of Persons with the given first name. - */ - public List findByFirstName(String name); - - /** - * Returns top Person with the specified surname. - * @param name Person surname. - * @return Person that satisfy the query. - */ - public Cache.Entry findTopByLastNameLike(String name); - - /** - * Getting ids of all the Person satisfying the custom query from {@link Query} annotation. - * - * @param orgId Query parameter. - * @param pageable Pageable interface. - * @return A list of Persons' ids. - */ - @Query("SELECT id FROM Person WHERE orgId > ?") - public List selectId(long orgId, Pageable pageable); -} ----- --- - -* `@RepositoryConfig` annotation should be specified to map a repository to a distributed cache. In the above example, `PersonRepository` is mapped to `PersonCache`. -* Signatures of custom methods like `findByFirstName(name)` and `findTopByLastNameLike(name)` will be automatically processed and turned -into SQL queries when methods get executed. In addition, `@Query(queryString)` annotation can be used if a concrete​ SQL -query needs to be executed as a result of a method call. - - -[CAUTION] -==== -[discrete] -=== Unsupported CRUD Operations - -Some operations of CrudRepository interface are not currently supported. These are the operations that do not require providing the key as a parameter: - -* save(S entity) -* save(Iterable entities) -* delete(T entity) -* delete(Iterable entities) - -Instead of these operations you can use Ignite specific counterparts available via `IgniteRepository` interface: - -* save(ID key, S entity) -* save(Map entities) -* deleteAll(Iterable ids) - -==== - -== Spring Data and Apache Ignite Configuration - -Apache Ignite Spring Data integration supports connecting to the Apache Ignite cluster through the Apache Ignite node or -Apache Ignite thin client. Both approaches to configuring access to the Apache Ignite cluster use the same API shown -below. Apache Ignite Spring Data integration automatically recognizes the type of the provided bean and uses the -appropriate cluster connection. - -To enable Apache Ignite backed repositories in Spring Data, mark an application configuration with `@EnableIgniteRepositories` -annotation, as shown below: - -[tabs] --- -tab:Ignite node connection configuration[] -[source,java] ----- -@Configuration -@EnableIgniteRepositories -public class SpringAppCfg { - /** - * Creating Apache Ignite instance bean. A bean will be passed - * to IgniteRepositoryFactoryBean to initialize all Ignite based Spring Data repositories and connect to a cluster. - */ - @Bean - public Ignite igniteInstance() { - IgniteConfiguration cfg = new IgniteConfiguration(); - - // Setting some custom name for the node. - cfg.setIgniteInstanceName("springDataNode"); - - // Enabling peer-class loading feature. - cfg.setPeerClassLoadingEnabled(true); - - // Defining and creating a new cache to be used by Ignite Spring Data - // repository. - CacheConfiguration ccfg = new CacheConfiguration("PersonCache"); - - // Setting SQL schema for the cache. - ccfg.setIndexedTypes(Long.class, Person.class); - - cfg.setCacheConfiguration(ccfg); - - return Ignition.start(cfg); - } -} ----- -tab:Ignite thin client connection configuration[] -[source,java] ----- -@Configuration -@EnableIgniteRepositories -public class SpringAppCfg { - /** - * Creating Apache Ignite thin client instance bean. A bean will be passed to the IgniteRepositoryFactoryBean to - * connect to the Ignite cluster and perform cache operations. - */ - @Bean - public IgniteClient igniteInstance() { - return Ignition.startClient(new ClientConfiguration().setAddresses("127.0.0.1:10800");; - } -} ----- --- - -The configuration has to instantiate the Apache Ignite bean (node) or the Apache Ignite thin client bean that is passed -to `IgniteRepositoryFactoryBean` and is used by all the Apache Ignite repositories in order to connect to the cluster. - -In the example above, the bean is initialized directly by the application and is named `igniteInstance`. -Alternatively, the following beans can be registered in your configuration and an Apache Ignite node will be started automatically: - -* `IgniteConfiguration` object named as `igniteCfg` bean. -* A path to Apache Ignite's Spring XML configuration named `igniteSpringCfgPath`. - -In the case of connecting to the cluster via Apache Ignite thin client, you can alternatively register the -`ClientConfiguration` bean named `igniteCfg`, so that the Apache Ignite thin client instance is started automatically by -the Apache Ignite Spring Data integration. - -== Using Apache Ignite Repositories - -Once all the configurations and repositories are ready to be used, you can register the configuration in an application context and get a reference to the repository. -The following example shows how to register `SpringAppCfg` - our sample configuration from the section above - in an application context and get a reference to `PersonRepository`: - -[tabs] --- -tab:Java[] -[source,java] ----- -ctx = new AnnotationConfigApplicationContext(); - -// Explicitly registering Spring configuration. -ctx.register(SpringAppCfg.class); - -ctx.refresh(); - -// Getting a reference to PersonRepository. -repo = ctx.getBean(PersonRepository.class); ----- --- - -Now, you can put data in Ignite using Spring Data API: - -[tabs] --- -tab:Java[] -[source,java] ----- -TreeMap persons = new TreeMap<>(); - -persons.put(1L, new Person(1L, 2000L, "John", "Smith", 15000, "Worked for Apple")); - -persons.put(2L, new Person(2L, 2000L, "Brad", "Pitt", 16000, "Worked for Oracle")); - -persons.put(3L, new Person(3L, 1000L, "Mark", "Tomson", 10000, "Worked for Sun")); - -// Adding data into the repository. -repo.save(persons); ----- --- - -To query the data, we can use basic CRUD operations or methods that will be automatically turned into Apache Ignite SQL queries: - -[tabs] --- -tab:Java[] -[source,java] ----- -List persons = repo.findByFirstName("John"); - -for (Person person: persons) - System.out.println(" >>> " + person); - -Cache.Entry topPerson = repo.findTopByLastNameLike("Smith"); - -System.out.println("\n>>> Top Person with surname 'Smith': " + - topPerson.getValue()); ----- --- - -== Example - -The complete example is available on link: https://github.com/apache/ignite-extensions/tree/master/modules/spring-data-ext/examples[GitHub, windows="_blank"] - -== Tutorial - -Follow the tutorial that shows how to build a https://www.gridgain.com/docs/tutorials/spring/spring-ignite-tutorial[RESTful web service with Apache Ignite and Spring Data, window=_blank]. - diff --git a/docs/_docs/spring/spring-sessions.adoc b/docs/_docs/spring/spring-sessions.adoc deleted file mode 100644 index 875cd2383..000000000 --- a/docs/_docs/spring/spring-sessions.adoc +++ /dev/null @@ -1,110 +0,0 @@ -// 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. -= Apache Ignite With Spring Session - -== Overview - - -Apache Ignite Spring Session integration provides SessionRepository and IndexedSessionRepository implementation and configuration support. Spring Session simplifies support for clustered sessions without being tied to an application container specific solution. - - -== Maven Configuration - -Add the `ignite-spring-session-ext` extension to your Maven to use your Ignite cluster for Spring Session storage and replication. Here is how you can add this extension to your project: - -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - - org.springframework.session - spring-session-core - - - org.apache.ignite - ignite-spring-session-ext - 1.0.0 - - ----- --- - -=== Set Ignite Up Programmatically - -To expose Spring Sessions to Ignite: - -- Add the `@EnableIgniteHttpSession` annotation to the class that configures Ignite session. -- Add the `@SpringSessionIgnite` annotation to your Ignite instance. - -Here is how you can add these annotations: - -[source,java] ----- -@Configuration -@EnableIgniteHttpSession -public class SessionConfiguration { - @Bean - @SpringSessionIgnite - public Ignite ignite() { - IgniteConfiguration cfg = new IgniteConfiguration(); - - TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi(); - - tcpDiscoverySpi.setLocalAddress("127.0.0.1") - .setLocalPort(47500) - .setLocalPortRange(10); - - cfg.setDiscoverySpi(); - - return Ignition.start(cfg); - } -} ----- - -After you add these annotations, Spring Session will use Ignite as a data storage for sessions. For example, here is how you can create a simple controller: - -[source,java] ----- -@Controller -public class SampleController { - @GetMapping("/") - public String SessionId(HttpSession session) { - return session.getId(); - } -} ----- - - -== Configuration - - -`@EnableIgniteHttpSession` annotation provides arguments to configure the session storage: - -- `maxInactiveIntervalInSeconds` – session timeout in seconds. By default, it is set to 1800 seconds (30 minutes). -- `sessionMapName` – the name of the distributed map that will be used in Ignite to store the session data. -By default, it is set to `"spring:session:sessions"`. -- `flushMode` – flush mode for the Ignite sessions. -The default is `FlushMode#ON_SAVE` which only updates the backing distributed storage when `SessionRepository#save(Session)` is invoked. -In a web environment this happens just before the HTTP response is committed. -- `saveMode` – save mode for the session. The default is `SaveMode#ON_SET_ATTRIBUTE`, which -only saves changes made to session. - - -== Example - - -You can find an example in the https://github.com/antkr/ignite-spring-session-demo[example repository, windows="_blank"]. In it, an Ignite node is started with a Spring Session controller. diff --git a/docs/_docs/spring/spring-tx.adoc b/docs/_docs/spring/spring-tx.adoc deleted file mode 100644 index 442b03d83..000000000 --- a/docs/_docs/spring/spring-tx.adoc +++ /dev/null @@ -1,533 +0,0 @@ -// 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. -= Apache Ignite with Spring Transactions - -== Overview - -http://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html[Spring Transactions, window="_blank"] -abstraction allows you to use a declarative transaction management to concentrate on business logic rather than -transaction life-cycle. - -Apache Ignite provides the `ignite-spring-tx-ext` extension that allows to manage -https://ignite.apache.org/docs/latest/key-value-api/transactions#performing-transactions[Apache Ignite Transactions, window="_blank"] -through the Spring Transactions abstraction. The mentioned above integration is achieved by providing implementations of the -`TransactionManager` Spring Transactions interface. There are two such implementations: `SpringTransactionManager` and -`IgniteClientSpringTransactionManager`, which use either Apache Ignite node or Apache Ignite thin client to connect to the -Apache Ignite cluster and manage the Apache Ignite transactions. - -To enable declarative transaction management in your Spring application, create and configure -`SpringTransactionManager` or `IgniteClientSpringTransactionManager` bean in the Spring application context. The choice -of implementation depends on your preferable way to access the Apache Ignite cluster. - -== Maven Configuration - -If you use Maven to manage dependencies in your project, you can add Spring Transactions extension dependencies to -the application's `pom.xml` file like this: - -[tabs] --- -tab:For all Apache Ignite versions since 2.12.0[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-tx-ext - ${ignite-spring-tx-ext.version} - - - - org.apache.ignite - ignite-core - ${ignite.version} - - - - org.apache.ignite - ignite-spring - ${ignite.version} - - - org.springframework - spring-context - - - - - - org.springframework - spring-context - ${spring.version} - - - - org.springframework - spring-tx - ${spring.version} - ----- -tab: For Apache Ignite 2.11.0[] -[source,xml] ----- - - org.apache.ignite - ignite-spring-tx-ext - ${ignite-spring-tx-ext.version} - - - - org.apache.ignite - ignite-core - ${ignite.version} - - - - org.apache.ignite - ignite-spring - ${ignite.version} - - - org.springframework - spring-context - - - org.springframework - spring-core - - - org.springframework - spring-aop - - - org.springframework - spring-expressions - - - org.springframework - spring-beans - - - org.springframework - spring-jdbc - - - org.springframework - spring-tx - - - - - - org.springframework - spring-context - ${spring.version} - - - - org.springframework - spring-tx - ${spring.version} - ----- --- - -Replace `${ignite-spring-tx-ext.version}`, `${spring.version}`, and -`${ignite.version}` with an actual version of Apache Ignite Spring Transactions extension, Spring, and -Apache Ignite dependency you need, respectively. - -The table below shows available versions of the Apache Ignite Spring Transactions extension and compatible versions -of the Apache Ignite and Spring. - -[cols="4,5,5", opts="header"] -|=== -|Apache Ignite Spring Transactions extension version | Apache Ignite versions | Spring versions -| 1.0.0 | All versions since 2.11.0 | All versions since 4.3.0 -|=== - -== Apache Ignite Node Transaction Manager Configuration -This chapter shows how to set up `SpringTransactionManager` that relies on Apache Ignite node to connect to the cluster -and to manage transactions. The configuration consists of two steps - -link:extensions-and-integrations/spring/spring-tx#cluster-connection-configuration[Cluster connection configuration] -and link:extensions-and-integrations/spring/spring-tx#transaction-concurrency-mode-configuration[Transaction concurrency mode configuration]. - -=== Cluster Connection Configuration - -Cluster connection configuration defines Apache Ignite node used by `SpringTransactionManager` to access the cluster. -There are several approaches to do this: - -[NOTE] -==== -Mixing of multiple approaches is incorrect and results in the exception during the manager startup. -==== - -[discrete] -=== 1. Specifying Name of the Manually Started Apache Ignite Node Instance - -This approach is suitable if you have Apache Ignite node instance already running in your application. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableTransactionManagement -public class SpringApplicationConfiguration { - @Bean - public SpringTransactionManager transactionManager() { - SpringTransactionManager mgr = new SpringTransactionManager(); - - mgr.setIgniteInstanceName(""); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - - ----- --- - -[discrete] -=== 2. Specifying Apache Ignite Node Configuration - -In this case, Apache Ignite node instance is started automatically by the manager based on the provided configuration. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableTransactionManagement -public class SpringApplicationConfiguration { - @Bean - public SpringTransactionManager transactionManager() { - SpringTransactionManager mgr = new SpringTransactionManager(); - - mgr.setConfiguration(new IgniteConfiguration() - .setIgniteInstanceName("") - // Other required configuration parameters. - ); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - ... - - - - - - - ----- --- - -[discrete] -=== 3. Specifying Path to Apache Ignite XML Node Configuration File - -In this case, Apache Ignite node instance is started automatically by the manager based on the provided configuration. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableTransactionManagement -public class SpringApplicationConfiguration { - @Bean - public SpringTransactionManager transactionManager() { - SpringTransactionManager mgr = new SpringTransactionManager(); - - mgr.setConfigurationPath("") - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - - ----- --- - -[NOTE] -==== -If no connection configuration is specified, `SpringTransactionManager` uses Apache Ignite node instance with the -default name. If it does not exist, an exception is thrown during the `SpringTransactionManager` startup. -==== - -[IMPORTANT] -==== -[discrete] -Regardless the configuration approach you chose, the same Apache Ignite node instance must be used to initialize the -transaction manager and perform the transactional operations. In case Apache Ignite node was started by the transaction manager, -you can obtain its instance in your application through `Ignition.ignite("");`. -==== - - -=== Transaction Concurrency Mode Configuration - -The transaction concurrency mode configuration defines the -link:https://ignite.apache.org/docs/latest/key-value-api/transactions#concurrency-modes-and-isolation-levels[Apache Ignite -transaction concurrency mode,window="_blank"] -that a manager will apply to all transactions that it processes. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableTransactionManagement -public class SpringApplicationConfiguration { - @Bean - public SpringTransactionManager transactionManager() { - SpringTransactionManager mgr = new SpringTransactionManager(); - - mgr.setTransactionConcurrency(TransactionConcurrency.OPTIMISTIC); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - - - ----- --- - -[NOTE] -==== -If no transaction concurrency mode configuration is specified, `PESSIMISTIC` concurrency mode is used. -==== - -In case you need to support multiple transaction concurrency modes in your application, create separate -transaction managers for each transaction concurrency mode that you need, and for each Spring transaction specify the -manager that will process it. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableTransactionManagement -public class SpringApplicationConfiguration { - @Bean - public SpringTransactionManager pessimisticTransactionManager() { - SpringTransactionManager mgr = new SpringTransactionManager(); - - mgr.setTransactionConcurrency(TransactionConcurrency.PESSIMISTIC); - - return mgr; - } - - @Bean - public SpringTransactionManager optimisticTransactionManager() { - SpringTransactionManager mgr = new SpringTransactionManager(); - - mgr.setTransactionConcurrency(TransactionConcurrency.OPTIMISTIC); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - - - - - - - ----- --- - -[source,java] ----- -public class TransactionalService { - @Transactional("optimisticTransactionManager") - public void doOptimistically() { - // Method body. - } - - @Transactional("pessimisticTransactionManager") - public void doPessimistically() { - // Method body. - } -} ----- - -== Apache Ignite Thin Client Transaction Manager Configuration -This chapter shows how to set up `IgniteClientSpringTransactionManager` that relies on Ignite thin client to connect -to the cluster and manage transactions. - -=== Cluster Connection Configuration -Cluster connection configuration defines Apache Ignite thin client instance used by `IgniteClientSpringTransactionManager` -to access the cluster. - -[tabs] --- -tab:Java[] -[source,java] ----- -@Configuration -@EnableTransactionManagement -public static class SpringApplicationConfiguration { - @Bean - public IgniteClient igniteClient() { - return Ignition.startClient(new ClientConfiguration().setAddresses("127.0.0.1:10800")); - } - - @Bean - public IgniteClientSpringTransactionManager transactionManager(IgniteClient cli) { - IgniteClientSpringTransactionManager mgr = new IgniteClientSpringTransactionManager(); - - mgr.setClientInstance(cli); - - return mgr; - } -} ----- -tab:XML[] -[source,xml] ----- - - - - - - - - 127.0.0.1:10800 - - - - - - - - - - - - - - ----- --- - -[IMPORTANT] -==== -[discrete] -The same Apache Ignite thin client instance must be used to initialize the transaction manager and to perform -transactional operations. -==== - -=== Transaction Concurrency Mode Configuration -Transaction concurrency mode configuration for `IgniteClientSpringTransactionManager` is performed the same way as for -link:extensions-and-integrations/spring/spring-tx#transaction-concurrency-mode-configuration[SpringTransactionManager] -that uses Apache Ignite node instance to access the cluster. - -== Examples - -The example of using Apache Ignite Spring Transactions integration is available on https://github.com/apache/ignite-extensions/tree/master/modules/spring-tx-ext/examples/main/java/org/apache/ignite/transactions/spring/examples[GitHub, window="_blank"]. diff --git a/docs/_docs/storm/storm-streamer.adoc b/docs/_docs/storm/storm-streamer.adoc deleted file mode 100644 index 887712e10..000000000 --- a/docs/_docs/storm/storm-streamer.adoc +++ /dev/null @@ -1,62 +0,0 @@ -// 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. -= Apache Storm Streamer - -Apache Ignite Storm Streamer module provides streaming via http://storm.apache.org/[Storm, window=_blank] to Ignite. - -Starting data transfer to Ignite can be done with the following steps. - -. Import Ignite Storm Streamer Module In Maven Project. If you are using Maven to manage dependencies of your project, -you can add Storm module dependency like this (replace `${ignite-storm-ext.version}` with actual Ignite Storm Extension version you are interested in): -+ -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - ... - - ... - - org.apache.ignite - ignite-storm-ext - ${ignite-storm-ext.version} - - ... - - ... - ----- --- - -. Create an Ignite configuration file (see `example-ignite.xml` in `modules/storm/src/test/resources/example-ignite.xml`) -and make sure it is accessible from the streamer. -. Make sure your key-value data input to the streamer is specified with the field named `ignite` (or a different one you -configure with `StormStreamer.setIgniteTupleField(...)`). -See TestStormSpout.declareOutputFields(...) for an example. -. Create a topology with the streamer, make a jar file with all dependencies and run the following -+ -[tabs] --- -tab:Shell[] -[source,shell] ----- -storm jar ignite-storm-streaming-jar-with-dependencies.jar my.company.ignite.MyStormTopology ----- --- diff --git a/docs/_docs/topology-validator/topology-validator.adoc b/docs/_docs/topology-validator/topology-validator.adoc deleted file mode 100644 index 767306f8d..000000000 --- a/docs/_docs/topology-validator/topology-validator.adoc +++ /dev/null @@ -1,70 +0,0 @@ -= Topology Validator - -Some network issues can cause the Ignite cluster to split into several isolated parts - segments. Nodes from different -segments cannot communicate with each other, while nodes from the same segment do not experience communication problems. -In this case, each segment marks the nodes with which the connection was lost as failed and considers itself as an -independent Ignite cluster. Let's call this scenario cluster segmentation. - -Cluster segmentation can lead to cache data inconsistency across different segments because each segment can continue to handle cache update requests independently. - -Apache Ignite allows the user to provide custom validation logic for Ignite caches that will be applied to -each topology change, and if the validation fails, writes to the corresponding cache will be blocked. The mentioned -validation logic is passed to Ignite as an TopologyValidation interface implementation. It can be done through cache -configuration or through Ignite plugin extensions mechanism (see CacheTopologyValidatorProvider interface). - -This module represents an implementation of the Ignite plugin that provides the guarantee that -after cluster segmentation, no more than one segment can process write requests to all caches. This is achieved by -providing implementation of the TopologyValidation interface as mentioned above. - -The current implementation of TopologyValidation uses remaining Ignite baseline nodes in the topology to determine -segmentation. - -== In what cases cache writes will be blocked for the segment? - -The following rules are used to determine which segment can process cache write requests after segmentation and which -cannot: - -1. The segment is allowed to process cache writes requests after segmentation if and only if more than configured -fraction of the baseline nodes remain in the segment, otherwise all writes to the cache will be blocked. -2. If the cluster is split into two equal segments, writing to both of them will be blocked. -3. Since Ignite treats segmentation as sequential node failures, even a single node failure in an active cluster in -which alive baseline nodes count is less or equals to segmentation threshold is considered as segmentation and results -in write block for all caches. - -== Configuration - -1. Configure CacheTopologyValidatorPluginProvider on each server node: -+ ----- - ``` - new IgniteConfiguration() - ... - .setPluginProviders(new CacheTopologyValidatorPluginProvider()); - ``` ----- -+ -2. Configure baseline nodes explicitly, or configure baseline nodes auto adjustment with a timeout that significantly -exceeds the node failure detection timeout. It can be done through Java Api or through control script. -See [1] and [2] for more info. - -Note that it is illegal to use baseline nodes auto adjustment with a zero timeout along with current -TopologyValidator implementation. - -3. Configure deactivation threshold. -The deactivation threshold is a fraction of nodes that determines how many nodes must remain in the baseline topology in -order to this segment was considered valid and continued to accept write requests. -This value must be in range from 0.5 (inclusively) to 1. Default value is 0.5. If the default value suits you, nothing -to do is required. - -To set up custom deactivation threshold value set the `org.apache.ignite.topology.validator.deactivation.threshold` -distributed configuration property via control script (see https://ignite.apache.org/docs/latest/tools/control-script#working-with-cluster-properties) - -== Manual segmentation resolving - -The state of each segment for which cache writes were blocked will be eventually switched to the READ-ONLY mode. -Manually switching the cluster state back to ACTIVE mode will restore cache write availability. It can be done through -Java Api or through control script. See [1] and [2] for more info. - -[1] - https://ignite.apache.org/docs/latest/clustering/baseline-topology - -[2] - https://ignite.apache.org/docs/latest/tools/control-script#activation-deactivation-and-topology-management \ No newline at end of file diff --git a/docs/_docs/twitter/twitter-streamer.adoc b/docs/_docs/twitter/twitter-streamer.adoc deleted file mode 100644 index 4f47c60f2..000000000 --- a/docs/_docs/twitter/twitter-streamer.adoc +++ /dev/null @@ -1,65 +0,0 @@ -// 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. -= Twitter Streamer - -Ignite Twitter Streamer module consumes tweets from Twitter and feeds the transformed key-value pairs `` into Ignite. - -To stream data from Twitter into Ignite, you need to: - -. Import Ignite Twitter Module with Maven and replace `${ignite-twitter-ext.version}` with the actual Ignite Twitter Extension version you are interested in. -+ -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - org.apache.ignite - ignite-twitter-ext - ${ignite-twitter-ext.version} - ----- --- - -. In your code, set the necessary parameters and start the streamer, like so: -+ -[tabs] --- -tab:Java[] -[source,java] ----- -IgniteDataStreamer dataStreamer = ignite.dataStreamer("myCache"); -dataStreamer.allowOverwrite(true); -dataStreamer.autoFlushFrequency(10); - -OAuthSettings oAuthSettings = new OAuthSettings("setting1", "setting2", "setting3", "setting4"); - -TwitterStreamer streamer = new TwitterStreamer<>(oAuthSettings); -streamer.setIgnite(ignite); -streamer.setStreamer(dataStreamer); - -Map params = new HashMap<>(); -params.put("track", "apache, twitter"); -params.put("follow", "3004445758"); - -streamer.setApiParams(params);// Twitter Streaming API params. -streamer.setEndpointUrl(endpointUrl);// Twitter streaming API endpoint. -streamer.setThreadsCount(8); - -streamer.start(); ----- --- - -Refer to https://dev.twitter.com/streaming/overview[Twitter streaming API, window=_blank] documentation for more information on various streaming parameters. diff --git a/docs/_docs/zeromq/zeromq-streamer.adoc b/docs/_docs/zeromq/zeromq-streamer.adoc deleted file mode 100644 index 918c0e827..000000000 --- a/docs/_docs/zeromq/zeromq-streamer.adoc +++ /dev/null @@ -1,67 +0,0 @@ -// 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. -= ZeroMQ Streamer - -Apache Ignite ZeroMQ Streamer module enables streaming capabilities via http://zeromq.org/[ZeroMQ, window=_blank] into Ignite. - -To start streaming into Ignite, you need to do the following: - -. Add Ignite ZeroMQ Streamer Module to your Maven `pom.xml` file. -+ -[tabs] --- -tab:pom.xml[] -[source,xml] ----- - - ... - - org.apache.ignite - ignite-zeromq-ext - ${ignite-zeromq-ext.version} - - ... - ----- --- - -. Implement either the https://github.com/apache/ignite/blob/f2f82f09b35368f25e136c9fce5e7f2198a91171/modules/core/src/main/java/org/apache/ignite/stream/StreamSingleTupleExtractor.java[StreamSingleTupleExtractor, window=_blank] or -the https://github.com/apache/ignite/blob/f2f82f09b35368f25e136c9fce5e7f2198a91171/modules/core/src/main/java/org/apache/ignite/stream/StreamMultipleTupleExtractor.java[StreamMultipleTupleExtractor, window=_blank] for ZeroMQ streamer. -Refer to https://github.com/apache/ignite/blob/7492843ad9e22c91764fb8d0c3a096b8ce6c653e/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/ZeroMqStringSingleTupleExtractor.java[this sample implementation, window=_blank] for more details. -. Set the extractor and initiate the streaming as shown below: -+ -[tabs] --- -tab:Java[] -[source,java] ----- -try (IgniteDataStreamer dataStreamer = - grid().dataStreamer("myCacheName")) { - - dataStreamer.allowOverwrite(true); - dataStreamer.autoFlushFrequency(1); - - try (IgniteZeroMqStreamer streamer = new IgniteZeroMqStreamer( - 1, ZeroMqTypeSocket.PULL, "tcp://localhost:5671", null)) { - streamer.setIgnite(grid()); - streamer.setStreamer(dataStreamer); - - streamer.setSingleTupleExtractor(new ZeroMqStringSingleTupleExtractor()); - - streamer.start(); - } -} ----- --- diff --git a/docs/_docs/zookeeper/zookeeper-ip.adoc b/docs/_docs/zookeeper/zookeeper-ip.adoc deleted file mode 100644 index cefe2b1b3..000000000 --- a/docs/_docs/zookeeper/zookeeper-ip.adoc +++ /dev/null @@ -1,49 +0,0 @@ -= ZooKeeper IP Finder - - -To set up ZooKeeper IP finder use `TcpDiscoveryZookeeperIpFinder` (note that `ignite-zookeeper` module has to be enabled). - -[tabs] --- -tab:XML[] -[source,xml] ----- - - - - - - - - - - - - ----- - -tab:Java[] -[source,java] ----- -TcpDiscoverySpi spi = new TcpDiscoverySpi(); - -TcpDiscoveryZookeeperIpFinder ipFinder = new TcpDiscoveryZookeeperIpFinder(); - -// Specify ZooKeeper connection string. -ipFinder.setZkConnectionString("127.0.0.1:2181"); - -spi.setIpFinder(ipFinder); - -IgniteConfiguration cfg = new IgniteConfiguration(); - -// Override default discovery SPI. -cfg.setDiscoverySpi(spi); - -// Start the node. -Ignite ignite = Ignition.start(cfg); ----- - -tab:C#/.NET[unsupported] -tab:C++[unsupported] - --- diff --git a/docs/_includes/copyright.html b/docs/_includes/copyright.html deleted file mode 100644 index 00e196c36..000000000 --- a/docs/_includes/copyright.html +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html deleted file mode 100644 index 76a3ffefd..000000000 --- a/docs/_includes/footer.html +++ /dev/null @@ -1,20 +0,0 @@ - - {% assign doc_var = page.leftNav | append: "_var" %} - {% assign base_url = '' %} -
-
diff --git a/docs/_includes/header.html b/docs/_includes/header.html deleted file mode 100644 index cfcb87722..000000000 --- a/docs/_includes/header.html +++ /dev/null @@ -1,35 +0,0 @@ - - -
- -
- -
- - Apache Ignite logo - -
- - -
-
diff --git a/docs/_includes/left-nav.html b/docs/_includes/left-nav.html deleted file mode 100644 index 6e4d223cb..000000000 --- a/docs/_includes/left-nav.html +++ /dev/null @@ -1,88 +0,0 @@ - - -{% assign prefix = site.attrs.base_url %} -{% assign normalized_path = page.url | replace: ".html","" | remove_first: prefix %} -{% if page.toc != false %} - -
-{% endif %} diff --git a/docs/_includes/right-nav.html b/docs/_includes/right-nav.html deleted file mode 100644 index 7fccc8a9a..000000000 --- a/docs/_includes/right-nav.html +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/docs/_includes/section-toc.html b/docs/_includes/section-toc.html deleted file mode 100644 index 8e793fca8..000000000 --- a/docs/_includes/section-toc.html +++ /dev/null @@ -1,31 +0,0 @@ - - -{% assign s = include.section %} - -{% if include.title %} -{{s.title}} -{% endif %} - -{% if s.items %} - -{% endif %} - diff --git a/docs/_includes/toc.html b/docs/_includes/toc.html deleted file mode 100644 index 683b4000e..000000000 --- a/docs/_includes/toc.html +++ /dev/null @@ -1,63 +0,0 @@ - - -
-{% assign path = page.path | remove: "/index.adoc" | remove_first: "_" | remove_first: page.collection | remove_first: "/" %} - -{% assign current_guide = path | split: "/" | first %} -{% assign section = path | remove: current_guide | remove : "/" %} - - -{% if current_guide != nil %} - - {% assign current_guide_url = current_guide | prepend: "/" %} - - - {% assign guide = site.data.toc | where: "url", current_guide_url | first %} - - - {% if section != "" %} - {% assign section_url = "/" | append: current_guide | append: "/" | append: section %} - {% assign sect = guide.items | where: "url", section_url | first %} - - {% include section-toc.html section=sect title=false %} - {% else %} -
    - {% for sect in guide.items %} -
  • - {% include section-toc.html section=sect title=true%} -
  • - {% endfor %} -
- {% endif %} -{% else %} - {% for guide in site.data.toc %} - -

-{{guide.title}}

- {% if guide.items %} -
    - {% for sect in guide.items %} -
  • - {% include section-toc.html section=sect title=true%} -
  • - {% endfor %} -
- {% endif %} - {% endfor %} -{% endif %} -
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index 9c7a42e4b..000000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - {% assign doc_var = page.leftNav | append: "_var" %} - - - - - - - - {% if page.content == nil or page.content == "" %} - -{% endif %} - - - {{page.title}} | Ignite Documentation - {% if site.attrs.base_url contains "/latest" %} - - {% else %} - - {% endif %} - {% capture timestamp %}{{"now"| date: '%s'}}{% endcapture %} - - - - - - - - - - - - - - - {% include header.html %} - {{content}} - - - - diff --git a/docs/_layouts/doc.html b/docs/_layouts/doc.html deleted file mode 100644 index 9d5e83116..000000000 --- a/docs/_layouts/doc.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: default ---- - - -
- {% include left-nav.html %} -
- Edit - {% if page.path contains ".adoc" %} -

{{page.title}}

- {% endif %} - {{content}} - {% include copyright.html %} -
- {% include right-nav.html %} -
- diff --git a/docs/_layouts/toc.html b/docs/_layouts/toc.html deleted file mode 100644 index 682f77ce8..000000000 --- a/docs/_layouts/toc.html +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: default ---- - - -
- {% include left-nav.html %} -
- {% if page.path contains ".adoc" %} -

{{page.title}}

- {% endif %} - {{ content }} - {% include toc.html %} -
- {% include right-nav.html %} -
- diff --git a/docs/_plugins/asciidoctor-extensions.rb b/docs/_plugins/asciidoctor-extensions.rb deleted file mode 100644 index 715d33d11..000000000 --- a/docs/_plugins/asciidoctor-extensions.rb +++ /dev/null @@ -1,180 +0,0 @@ -# MIT License -# -# Copyright (C) 2012-2020 Dan Allen, Sarah White, Ryan Waldron, and the -# individual contributors to Asciidoctor. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -require 'asciidoctor' -require 'asciidoctor/extensions' -require 'set' - -include Asciidoctor - -class TabsBlock < Asciidoctor::Extensions::BlockProcessor - use_dsl - - named :tabs - on_context :open - parse_content_as :simple - - def render_tab(parent, name, options, tab_content, use_xml) - if (options == 'unsupported') - content = Asciidoctor.convert "[source]\n----\nThis API is not presently available for #{name}."+( use_xml ? " You can use XML configuration." : "")+"\n----", parent: parent.document - return "#{content}" - else - if tab_content.empty? - warn "There is an empty tab (#{name}) on the " + parent.document.attributes['doctitle'] + " page: " + parent.document.attributes['docfile'] - # File.write("log.txt", "There is an empty tab (#{name}) on the " + parent.document.attributes['doctitle'] + " page: " + parent.document.attributes['docfile'] + "\n", mode: "a") - end - content = Asciidoctor.convert tab_content, parent: parent.document - return "#{content}" - end - end - - - def process parent, reader, attrs - lines = reader.lines - - html = '' - tab_content = '' - name = '' - options = '' - tabs = Set.new - lines.each do |line| - if (line =~ /^tab:.*\[.*\]/ ) - # render the previous tab if there is one - unless name.empty? - html = html + render_tab(parent, name, options, tab_content, tabs.include?("XML")) - end - - tab_content = ''; - name = line[/tab:(.*)\[.*/,1] - tabs << name - options = line[/tab:.*\[(.*)\]/,1] - else - tab_content = tab_content + "\n" + line; - end - end - - unless name.empty? - html = html + render_tab(parent, name, options, tab_content, tabs.include?("XML")) - end - - - html = %(#{html}) - - create_pass_block parent, html, attrs - - end -end - - -Asciidoctor::Extensions.register do - block TabsBlock -end - - -class JavadocUrlMacro < Extensions::InlineMacroProcessor - use_dsl - - named :javadoc - name_positional_attributes 'text' - - def process parent, target, attrs - - parts = target.split('.') - - if attrs['text'] == nil - text = parts.last(); - else - text = attrs['text'] - end - - target = parent.document.attributes['javadoc_base_url'] + '/' + parts.join('/') + ".html" - attrs.store('window', '_blank') - - (create_anchor parent, text, type: :link, target: target, attributes: attrs).render - end -end - -Asciidoctor::Extensions.register do - inline_macro JavadocUrlMacro -end -Extensions.register do - inline_macro do - named :link - parse_content_as :text - - process do |parent, target, attrs| -# if(parent.document.attributes['latest']) -# base_url = parent.document.attributes['base_url'] + '/latest' -# else -# base_url = parent.document.attributes['base_url'] + '/' + parent.document.attributes['version'] -# end - -# print parent.document.attributes - base_url = parent.document.attributes['base_url'] # + '/' + parent.document.attributes['version'] - - if (text = attrs['text']).empty? - text = target - end - - if text =~ /(\^|, *window=_?blank *)$/ - text = text.sub(/\^$/,'') - text = text.sub(/, *window=_?blank *$/,'') - attrs.store('window', '_blank') - end - - if target.start_with? 'http','ftp', '/', '#' - else - target = base_url + '/' + %(#{target}) - end - - (create_anchor parent, text, type: :link, target: target, attributes: attrs).render - end - end -end - -class ImageTreeProcessor < Extensions::Treeprocessor - def process document - - image_width = (document.attr 'image_width', "") - - imagedir = document.attributes['docdir'] - - #scan for images - (document.find_by context: :image).each do |img| - - imagefile = imagedir + '/' + img.attributes['target'] - - if !File.file?(imagefile) - warn 'Image does not exist: ' +imagefile - end - - if !(img.attributes['width'] || image_width.empty?) - img.attributes['width'] = image_width - end - end - end -end - -Extensions.register do - treeprocessor ImageTreeProcessor -end diff --git a/docs/_sass/callouts.scss b/docs/_sass/callouts.scss deleted file mode 100644 index 2aad06fb6..000000000 --- a/docs/_sass/callouts.scss +++ /dev/null @@ -1,75 +0,0 @@ -// 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. -aside { - border-left: 6px solid var(--callout-border); - background: var(--callout-background); - color: var(--callout-text); - margin-left: 0; - padding-right: 10px; - padding-left:20px; - position: relative; - display: flex; - margin-bottom: 16px; - - h3 { - font-weight: bold; - color:var(--callout-text); - } - - &+aside { - margin-top: 1em; - } - - &:before { - font-size: 18px; - width: 78px; - flex: 0 0 auto; - align-self: center; - text-align: center; - } - - .callout__margin-collapse-root { - margin-top: 16px; - margin-bottom: 16px; - } - - &.note { - --callout-text: #723c81; - --callout-border: #723c81; - --callout-background: #f7f7f7; - --callout-icon: "\2B50"; - } - - &.tip { - --callout-text: #af4e17; - --callout-border: #f18329; - --callout-background: #f7f7f7; - --callout-icon: "\2B50"; - } - - &.caution, &.important { - --callout-text: #65666a; - --callout-border: #e9502c; - --callout-background: #f7f7f7; - --callout-icon: "\01F449"; - } - - &.warning { - --callout-text: #df2226; - --callout-border: #df2226; - --callout-background: #f7f7f7; - --callout-icon: "\01F4CD"; - } -} diff --git a/docs/_sass/code.scss b/docs/_sass/code.scss deleted file mode 100644 index d0e2eeac2..000000000 --- a/docs/_sass/code.scss +++ /dev/null @@ -1,115 +0,0 @@ -// 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. -pre, pre.rouge { - padding: 8px 15px; - background: var(--block-code-background) !important; - border-radius: 5px; - border: 1px solid #e5e5e5; - overflow-x: auto; - // So code copy button doesn't overflow - min-height: 36px; - line-height: 18px; - color: #545454; -} - -code { - color: #545454; -} - -pre.rouge code { - background: none !important; -} - -pre.rouge .tok-err { - border: none !important; - } - - -.highlight .err { - background: initial !important; - color: initial !important; -} - -code-tabs.code-tabs__initialized { - display: block; - margin-bottom: 1.5em; - - nav { - border-bottom: 1px solid #e0e0e0 - } - - nav button { - background: white; - color: inherit; - border: none; - padding: 0.7em 1em; - cursor: pointer; - transform: translateY(1px); - font-size: .9em; - - &.active { - border-bottom: var(--orange-line-thickness) solid var(--link-color); - } - &.grey { - color: grey; - } - } - - code-tab:not([hidden]) { - display: block; - } -} - -*:not(pre) > code { - background: var(--inline-code-background); - padding: 0.1em 0.5em; - background-clip: padding-box; - border-radius: 3px; - color: #545454; - font-size: 90% -} - -// Required for copy button positioning -.listingblock .content { - position: relative; -} - -.copy-to-clipboard-button { - margin: 0; - padding: 0; - width: 36px; - height: 36px; - display: flex; - align-items: center; - justify-content: center; - background: none; - border: none; - - position: absolute; - top: 0; - right: 0; - background: url('../images/copy-icon.svg') center center no-repeat; - - &.copy-to-clipboard-button__success { - color: green; - background: none; - font-size: 20px; - font-weight: bold; - } - - &:hover:not(.copy-to-clipboard-button__success) { - filter: var(--gg-orange-filter); - } -} diff --git a/docs/_sass/docs.scss b/docs/_sass/docs.scss deleted file mode 100644 index 58dc0f2ec..000000000 --- a/docs/_sass/docs.scss +++ /dev/null @@ -1,238 +0,0 @@ -// 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. -section.page-docs { - display: grid; - transition: grid-template-columns 0.15s; - grid-template-columns: auto 1fr auto; - grid-template-rows: 100%; - grid-template-areas: 'left-nav content right-nav'; - line-height: 20px; - max-width: 1440px; - margin: auto; - width: 100%; - - &>article { - // box-shadow: -1px 13px 20px 0 #696c70; - border-left: 1px solid #eeeeee; - background-color: #ffffff; - padding: 0 50px 30px; - grid-area: content; - overflow: hidden; - font-family: sans-serif; - font-size: 16px; - color: #545454; - line-height: 1.6em; - - h1, h2, h3:not(.discrete), h4, h5, strong, th { - font-family: 'Open Sans'; - } - - li { - margin-bottom: 0.5em; - - > p { - margin-top: 0; - margin-bottom: 0; - } - } - - @media (max-width: 800px) { - padding-left: 15px; - padding-right: 15px - } - } - - .edit-link { - position:relative; - top: 10px; - right:10px; - float: right; - padding-top: calc(var(--header-height) + var(--padding-top)); - margin-top: calc((-1 * var(--header-height))); - } - - h1, h2, h3:not(.discrete), h4, h5 { - margin-bottom: 0; - - &[id] { - margin-top: var(--margin-top); - margin-bottom: calc(var(--margin-top) * 0.5); - // padding-top: calc(var(--header-height) + var(--padding-top)); - z-index: -1; - } - } - - .toc > ul { - margin: 0; - } - - - .content > .pygments.highlight { - margin-top: 0px; - } - - .title { - font-style: italic; - } - - .checkmark:before { - content: '\f14a'; - visibility: visible; - font-family: FontAwesome; - color: #00a100; - } - .checkmark { - visibility: hidden; - } - - .stretch {width: 100%;} - h1[id] { - --margin-top: 1em; - } - h2[id] { - --margin-top: 1.2em; - } - .toc > h2 { - --margin-top: 1em; - } - - h3[id] { - --margin-top: 1.2em; - } - h4[id] { - --margin-top: 0.5em; - } - h5[id] { - --margin-top: 1.67em; - } - .imageblock .content, .image { - text-align: center; - display: block; - } - .imageblock, .image { - img:not([width]):not([height]) { - width: auto; - height: auto; - max-width: 100%; - max-height: 450px; - } - } - strong { - color: #757575; - } - - th.valign-top,td.valign-top { - vertical-align:top; - } - - table { - margin: 16px 0; - } - - table tr td { - hyphens: auto; - } - - table thead,table tfoot { - background:#f7f8f7; - color: #757575; - } - table tr.even,table tr.alt{background:#f8f8f7} - table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7} - -} -.copyright { - margin-top: 3em; - padding-top: 1em; - border-top: 1px solid #f0f0f0; - font-size: 0.9em; - line-height: 1.8em; - color: #757575; -} - -body.hide-left-nav { - .left-nav { - display: none; - } -} - -.left-nav { - top: 0; - bottom: 0; - position: -webkit-sticky; - position: sticky; -} -.left-nav { - max-height: calc(100vh ); - grid-area: left-nav; -} -.right-nav { - grid-area: right-nav; -} -.left-nav__overlay { - display: none; - background: rgba(0, 0, 0, 0.50); - z-index: 1; - position: fixed; - top: var(--header-height); - bottom: 0; - left: 0; - right: 0; -} -@media (max-width: 990px) { - body:not(.hide-left-nav) { - .left-nav__overlay { - display: block; - } - } - nav.left-nav { - background: #fafafa; - grid-area: left-nav; - box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12); - min-height: calc(100vh - var(--header-height)); - max-height: calc(100vh - var(--header-height)); - position: fixed; - bottom: 0; - top: var(--header-height); - z-index: 2; - } - section.page-docs > article { - grid-column-start: left-nav; - grid-column-end: content; - grid-row: content; - } -} -@media (max-width: 800px) { - nav.right-nav { - display: none; - } -} - -:target:before { - content: ""; - display: block; - margin-top: calc(var(--header-height) * -1); - height: var(--header-height); - width: 1px; -} -@media (min-width: 600px) and (max-width: 900px) { - :target:before { - content: ""; - display: block; - width: 1px; - margin-top: -150px; - height: 150px; - } -} diff --git a/docs/_sass/footer.scss b/docs/_sass/footer.scss deleted file mode 100644 index c8afea49d..000000000 --- a/docs/_sass/footer.scss +++ /dev/null @@ -1,48 +0,0 @@ -// 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. -body > footer { - border-top: 2px solid #dddddd; - height: var(--footer-height); - font-size: 16px; - color: #393939; - display: flex; - justify-content: space-between; - align-items: center; - - - @media (max-width: 570px) { - .copyright__extra { - display: none; - } - } -} -.right-nav footer { - font-size: 12px; - padding: calc(var(--footer-gap) * 0.3) 0 5px;; - text-align: left; - margin: auto 0 0; - - a { - margin: 0; - } - - img { - width: 70px; - } - - .copyright { - display: none; - } -} diff --git a/docs/_sass/github.scss b/docs/_sass/github.scss deleted file mode 100644 index 069805c75..000000000 --- a/docs/_sass/github.scss +++ /dev/null @@ -1,223 +0,0 @@ -// 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. -.highlight table td { padding: 5px; } -.highlight table pre { margin: 0; } -.highlight .cm { - color: #777772; - font-style: italic; -} -.highlight .cp { - color: #797676; - font-weight: bold; -} -.highlight .c1 { - color: #777772; - font-style: italic; -} -.highlight .cs { - color: #797676; - font-weight: bold; - font-style: italic; -} -.highlight .c, .highlight .cd { - color: #777772; - font-style: italic; -} -.highlight .err { - color: #a61717; - background-color: #e3d2d2; -} -.highlight .gd { - color: #000000; - background-color: #ffdddd; -} -.highlight .ge { - color: #000000; - font-style: italic; -} -.highlight .gr { - color: #aa0000; -} -.highlight .gh { - color: #797676; -} -.highlight .gi { - color: #000000; - background-color: #ddffdd; -} -.highlight .go { - color: #888888; -} -.highlight .gp { - color: #555555; -} -.highlight .gs { - font-weight: bold; -} -.highlight .gu { - color: #aaaaaa; -} -.highlight .gt { - color: #aa0000; -} -.highlight .kc { - color: #000000; - font-weight: bold; -} -.highlight .kd { - color: #000000; - font-weight: bold; -} -.highlight .kn { - color: #000000; - font-weight: bold; -} -.highlight .kp { - color: #000000; - font-weight: bold; -} -.highlight .kr { - color: #000000; - font-weight: bold; -} -.highlight .kt { - color: #445588; - font-weight: bold; -} -.highlight .k, .highlight .kv { - color: #000000; - font-weight: bold; -} -.highlight .mf { - color: #009999; -} -.highlight .mh { - color: #009999; -} -.highlight .il { - color: #009999; -} -.highlight .mi { - color: #009999; -} -.highlight .mo { - color: #009999; -} -.highlight .m, .highlight .mb, .highlight .mx { - color: #009999; -} -.highlight .sb { - color: #d14; -} -.highlight .sc { - color: #d14; -} -.highlight .sd { - color: #d14; -} -.highlight .s2 { - color: #d14; -} -.highlight .se { - color: #d14; -} -.highlight .sh { - color: #d14; -} -.highlight .si { - color: #d14; -} -.highlight .sx { - color: #d14; -} -.highlight .sr { - color: #009926; -} -.highlight .s1 { - color: #d14; -} -.highlight .ss { - color: #990073; -} -.highlight .s { - color: #d14; -} -.highlight .na { - color: #008080; -} -.highlight .bp { - color: #797676; -} -.highlight .nb { - color: #0086B3; -} -.highlight .nc { - color: #445588; - font-weight: bold; -} -.highlight .no { - color: #008080; -} -.highlight .nd { - color: #3c5d5d; - font-weight: bold; -} -.highlight .ni { - color: #800080; -} -.highlight .ne { - color: #990000; - font-weight: bold; -} -.highlight .nf { - color: #990000; - font-weight: bold; -} -.highlight .nl { - color: #990000; - font-weight: bold; -} -.highlight .nn { - color: #555555; -} -.highlight .nt { - color: #000080; -} -.highlight .vc { - color: #008080; -} -.highlight .vg { - color: #008080; -} -.highlight .vi { - color: #008080; -} -.highlight .nv { - color: #008080; -} -.highlight .ow { - color: #000000; - font-weight: bold; -} -.highlight .o { - color: #000000; - font-weight: bold; -} -.highlight .w { - color: #bbbbbb; -} -.highlight { - background-color: #f8f8f8; -} diff --git a/docs/_sass/header.scss b/docs/_sass/header.scss deleted file mode 100644 index e45b3498d..000000000 --- a/docs/_sass/header.scss +++ /dev/null @@ -1,374 +0,0 @@ -// 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. -header { - - min-height: var(--header-height); - background: white; - display: grid; - grid-template-columns: auto auto 1fr auto auto auto; - grid-template-areas: 'left-toggle home nav search gh gg'; - grid-template-rows: 40px; - flex-direction: row; - align-items: center; - justify-content: flex-start; - padding: 12px 20px; - box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12); - z-index: 1; - - a:hover, button:hover { - opacity: 0.85; - } - - li:hover .dropdown, a:focus + .dropdown { - display: block; - } - - .dropdown-arrow { - margin-left: 5px; - margin-bottom: 3px; - - width: 8px; - height: 4px; - } - - .dropdown { - display: none; - position: fixed; - top: calc(var(--header-height) - 12px); - width: max-content; - background: white; - box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12); - border-radius: 4px; - padding-top: 10px; - padding-bottom: 12px; - z-index: 2; - - li { - display: flex; - } - - a { - color: grey !important; - font-size: 16px; - padding-top: 5px; - padding-bottom: 4px; - &:hover { - color: var(--gg-orange) !important; - } - } - } - - .menu { - border: none; - background: none; - width: 40px; - height: 40px; - margin-right: 12px; - cursor: pointer; - grid-area: left-toggle; - - img { - width: 18px; - height: 12px; - } - } - - .search-toggle, .top-nav-toggle, .github, .search-close { - background: none; - border: none; - padding: 0; - width: 36px; - height: 36px; - display: inline-flex; - align-items: center; - justify-content: center; - color: var(--gg-dark-gray); - font-size: 26px; - } - .search-toggle { - grid-area: search; - } - .top-nav-toggle { - grid-area: top-toggle; - } - - .home { - - grid-area: home; - margin-right: auto; - img { - height: 36px; - } - } - - - .search { - margin-left: auto; - margin-right: 20px; - grid-area: search; - - input[type='search'] { - color: var(--gg-dark-gray); - - background: rgba(255, 255, 255, 0.8); - border: 1px solid #cccccc; - padding: 10px 15px; - font-family: inherit; - max-width: 148px; - height: 37px; - font-size: 14px; - -webkit-appearance: unset; - appearance: unset; - - &[disabled] { - opacity: 0.5; - cursor: not-allowed; - } - } - - } - - - - - - &>nav { - grid-area: nav; - font-size: 18px; - display: flex; - flex-direction: row; - margin: 0 20px; - - li { - list-style: none; - margin-right: 0.5em; - display: flex; - } - - a { - padding: 9px 14px; - color: var(--gg-dark-gray) !important; - text-decoration: none; - white-space: nowrap; - - &.active { - border-radius: 3px; - background-color: #f0f0f0; - } - } - } - - .github { - grid-area: gh; - } - - - .search-close { - margin-right: 10px; - } - - - @media (max-width: 900px) { - grid-template-columns: auto auto 1fr auto auto auto; - grid-template-areas: - 'left-toggle home spacer top-toggle search gh gg' - 'nav nav nav nav nav nav nav'; - - nav { - justify-content: center; - margin: 20px 0 10px; - } - - & > nav > li { - position: relative; - } - - .dropdown { - - top: calc(var(--header-height) + 25px); - } - } - - @media (max-width: 600px) { - .search { - margin-right: 5px; - input[type='search'] { - max-width: 110px; - } - } - } - - &:not(.narrow-header) { - .search-toggle, .top-nav-toggle, .search-close { - display: none; - } - } - &.narrow-header { - a.home { - top: 0; - } - &:not(.show-nav) { - nav { - display: none; - } - } - &.show-search { - .search-toggle, .home, .top-nav-toggle, .github, .menu { - display: none; - } - .search { - grid-column-start: home; - grid-column-end: github; - width: 100%; - display: flex; - - input { - max-width: initial; - width: 100%; - } - } - } - &:not(.show-search) { - .search { - display: none; - } - } - nav { - flex-direction: column; - justify-content: stretch; - - li { - display: flex; - } - - a { - width: 100%; - } - } - } -} -.swiftype-widget { - - .autocomplete { - background-color: white; - display: block; - list-style-type: none; - margin: 0; - padding: 0; - box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.37); - position: absolute; - border-radius: 3px; - text-align: left; - right: 75px !important; - min-width: 350px; - - ul { - - background-color: white; - display: block; - list-style-type: none; - margin: 0; - padding: 0; - border-radius: 3px; - text-align: left; - max-height: 70vh; - overflow: auto; - - li { - border-top: 1px solid #e5e5e5; - border-bottom: 1px solid #fff; - cursor: pointer; - padding: 10px 8px; - font-size: 13px; - list-style-type: none; - background-image: none; - margin: 0; - } - - li.active { - border-top: 1px solid #cccccc; - border-bottom: 1px solid #cccccc; - background-color: #f0f0f0; - } - - p { - font-size: 13px; - line-height: 16px; - margin: 0; - padding: 0; - - &.url { - font-size: 11px; - color: #999; - } - } - - a { - font-size: 15px; - } - em { - font-weight: bold - } - } - } -} -section.hero { - background-image: url(../images/dev-internal-bg.jpg); - background-position: center; - background-position-x: left; - background-repeat: no-repeat; - background-size: cover; - display: grid; - grid-template-columns: 1fr auto; - grid-template-areas: 'title versions'; - grid-template-rows: 60px; - align-items: center; - padding: 5px 30px; - flex: unset; - - - .title { - color: #f3f3f3; - text-transform: uppercase; - font-size: 22px; - } - - select { - list-style: none; - - line-height: 28px; - border-radius: 3px; - - - color: #333333; - line-height: 24px; - padding: 5px 10px; - white-space: nowrap; - font-size: 14px; - background: #f0f0f0 url("/assets/images/arrow-down.svg") no-repeat center right 5px; - } -} - -@media (max-width: 450px) { - section.hero { - grid-template-rows: auto; - padding: 15px; - - .title { - font-size: 18px; - } - } - -} diff --git a/docs/_sass/layout.scss b/docs/_sass/layout.scss deleted file mode 100644 index cd0c288a8..000000000 --- a/docs/_sass/layout.scss +++ /dev/null @@ -1,45 +0,0 @@ -// 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. -body { - --header-height: 64px; - --footer-height: 104px; - --footer-gap: 60px; - - @media (min-width: 451px) and (max-width: 850px) { - --header-height: 111px; - } - - padding: 0; - margin: 0; - display: flex; - flex-direction: column; - min-height: 100vh; - - &>section { - flex: 1; - } -} -header { - position: -webkit-sticky; - position: sticky; - top: 0; - z-index: 2; -} -body > footer { - margin: var(--footer-gap) 30px 0; -} -* { - box-sizing: border-box; -} diff --git a/docs/_sass/left-nav.scss b/docs/_sass/left-nav.scss deleted file mode 100644 index 0fd55fdd1..000000000 --- a/docs/_sass/left-nav.scss +++ /dev/null @@ -1,109 +0,0 @@ -// 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. -.left-nav { - padding: 10px 20px; - width: 289px; - overflow-y: auto; -/* height: calc(100vh - var(--header-height)); */ - font-family: 'Open Sans'; - padding-top: var(--padding-top); - - - li { - list-style: none; - } - a, button { - text-decoration: none; - color: #757575; - font-size: 16px; - display: inline-flex; - width: 100%; - margin: 2px 0; - padding: 0.25em 0.375em; - background: none; - border: none; - cursor: pointer; - font: inherit; - text-align: left; - - &.active, &:hover { - color: var(--link-color); - } - } - - *:focus { - outline: none; - } - - .nav-group { - margin-left: 6px; - font-size: 14px; - } - - nav { - border-left: 2px solid #dddddd; -// margin-top: 5px; - margin-bottom: 5px; - - &.collapsed { - display: none; - } - } - - nav > li > a, nav > li > button { - padding-left: 20px; - text-align: left; - - &.active { - border-left: var(--orange-line-thickness) solid var(--active-color); - padding-left: calc(20px - var(--orange-line-thickness)); - } - } - - nav.sub_pages { - border: none; - } - - nav.sub_pages a, nav.sub_pages button { - padding-left: 32px; - - &.active { - padding-left: calc(32px - var(--orange-line-thickness)); - } - } - - .parent { - color: #393939; - } - - .state-indicator { - margin-left: auto; - margin-top: 5px; - width: 6.2px; - height: 10px; - flex: 0 0 auto; - transition: transform 0.1s; - filter: invert(49%) sepia(4%) saturate(5%) hue-rotate(23deg) brightness(92%) contrast(90%); - } - - button:hover .state-indicator, - button.current .state-indicator { - filter: invert(47%) sepia(61%) saturate(1950%) hue-rotate(345deg) brightness(100%) contrast(95%); - } - - button.expanded .state-indicator { - transform: rotate(90deg); - } -} diff --git a/docs/_sass/right-nav.scss b/docs/_sass/right-nav.scss deleted file mode 100644 index 68589c020..000000000 --- a/docs/_sass/right-nav.scss +++ /dev/null @@ -1,73 +0,0 @@ -// 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. -.right-nav { - width: 289px; - padding: 12px 26px; - overflow-y: auto; - height: calc(100vh - var(--header-height)); - top: 0; - position: -webkit-sticky; - position: sticky; - display: flex; - flex-direction: column; - font-family: 'Open sans'; - padding-top: var(--padding-top); - - h6 { - margin: 12px 0; - font-size: 16px; - font-weight: normal; - } - - ul { - list-style: none; - padding: 0; - margin: 0; - // margin-bottom: auto; - } - - li { - padding: 0; - } - - a { - --border-width: 0px; - font-size: 14px; - color: #757575; - padding-left: calc(15px * var(--nesting-level) + 8px - var(--border-width)); - margin: 0.3em 0; - display: inline-block; - - &:hover { - color: var(--link-color); - } - - &.active { - --border-width: var(--orange-line-thickness); - border-left: var(--border-width) solid var(--link-color); - color: #393939; - } - } - - .sectlevel1 { - border-left: 2px solid #dddddd; - } - - @for $i from 1 through 6 { - .sectlevel#{$i} { - --nesting-level: #{$i - 1}; - } - } -} diff --git a/docs/_sass/rouge-base16-solarized.scss b/docs/_sass/rouge-base16-solarized.scss deleted file mode 100644 index 10b189166..000000000 --- a/docs/_sass/rouge-base16-solarized.scss +++ /dev/null @@ -1,99 +0,0 @@ -//# MIT license. See http://www.opensource.org/licenses/mit-license.php -// -//Copyright (c) 2012 Jeanine Adkisson. -// -//Permission is hereby granted, free of charge, to any person obtaining a copy -//of this software and associated documentation files (the "Software"), to deal -//in the Software without restriction, including without limitation the rights -//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//copies of the Software, and to permit persons to whom the Software is -//furnished to do so, subject to the following conditions: -// -//The above copyright notice and this permission notice shall be included in -//all copies or substantial portions of the Software. -// -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//THE SOFTWARE. - -.highlight table td { padding: 5px; } -.highlight table pre { margin: 0; } -.highlight, .highlight .w { - color: #586e75; -} -.highlight .err { - color: #002b36; - background-color: #dc322f; -} -.highlight .c, .highlight .cd, .highlight .cm, .highlight .c1, .highlight .cs { - color: #657b83; -} -.highlight .cp { - color: #b58900; -} -.highlight .nt { - color: #b58900; -} -.highlight .o, .highlight .ow { - color: #93a1a1; -} -.highlight .p, .highlight .pi { - color: #93a1a1; -} -.highlight .gi { - color: #859900; -} -.highlight .gd { - color: #dc322f; -} -.highlight .gh { - color: #268bd2; - background-color: #002b36; - font-weight: bold; -} -.highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv { - color: #6c71c4; -} -.highlight .kc { - color: #cb4b16; -} -.highlight .kt { - color: #cb4b16; -} -.highlight .kd { - color: #cb4b16; -} -.highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 { - color: #859900; -} -.highlight .sr { - color: #2aa198; -} -.highlight .si { - color: #d33682; -} -.highlight .se { - color: #d33682; -} -.highlight .nn { - color: #b58900; -} -.highlight .nc { - color: #b58900; -} -.highlight .no { - color: #b58900; -} -.highlight .na { - color: #268bd2; -} -.highlight .m, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mb, .highlight .mx { - color: #859900; -} -.highlight .ss { - color: #859900; -} diff --git a/docs/_sass/text.scss b/docs/_sass/text.scss deleted file mode 100644 index 711ba7d56..000000000 --- a/docs/_sass/text.scss +++ /dev/null @@ -1,62 +0,0 @@ -// 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. -body { - font-family: 'Open Sans', sans-serif; -} - -h1, h2, h3, h4 { - color: #000; - font-weight: normal; - font-family: 'Open Sans'; -} - -h1 { - font-size: 36px; - line-height: 40px; -} - -a { - text-decoration: none; - color: var(--link-color); -} - - -section { - color: #545454; -} - -table { - border-collapse: collapse; - - td, th { - text-align: left; - padding: 5px 10px; - border-bottom: 1px solid hsl(0, 0%, 85%); - border-top: 1px solid hsl(0, 0%, 85%); - } - - td p.tableblock { - margin-top: 0.5em; - margin-bottom: 0.5em; - - &:first-child { - margin-top: 0.125em; - } - - &:last-child { - margin-bottom: 0.125em; - } - } -} diff --git a/docs/_sass/variables.scss b/docs/_sass/variables.scss deleted file mode 100644 index 9b63c5bac..000000000 --- a/docs/_sass/variables.scss +++ /dev/null @@ -1,33 +0,0 @@ -// 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. -:root { - --gg-red: #ec1c24; - --gg-orange: #ec1c24; - --gg-orange-dark: #bc440b; - --gg-orange-filter: invert(47%) sepia(61%) saturate(1950%) hue-rotate(345deg) brightness(100%) contrast(95%); - --gg-dark-gray: #333333; - --orange-line-thickness: 3px; - --block-code-background: rgba(241, 241, 241, 20%); - --inline-code-background: rgba(241, 241, 241, 90%); - --padding-top: 25px; - --link-color: #ec1c24; -} - -@font-face { - font-family: 'Open Sans'; - font-weight: 300; - font-display: swap; - font-style: normal; -} diff --git a/docs/assets/css/asciidoc-pygments.css b/docs/assets/css/asciidoc-pygments.css deleted file mode 100644 index 6de1084a3..000000000 --- a/docs/assets/css/asciidoc-pygments.css +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2013-2018 Dan Allen, Paul Rayner, and the Asciidoctor Project - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -pre.pygments .hll { background-color: #ffffcc } -pre.pygments, pre.pygments code { background: #ffffff; } -pre.pygments .tok-c { color: #008000 } /* Comment */ -pre.pygments .tok-err { border: 1px solid #FF0000 } /* Error */ -pre.pygments .tok-k { color: #0000ff } /* Keyword */ -pre.pygments .tok-ch { color: #008000 } /* Comment.Hashbang */ -pre.pygments .tok-cm { color: #008000 } /* Comment.Multiline */ -pre.pygments .tok-cp { color: #0000ff } /* Comment.Preproc */ -pre.pygments .tok-cpf { color: #008000 } /* Comment.PreprocFile */ -pre.pygments .tok-c1 { color: #008000 } /* Comment.Single */ -pre.pygments .tok-cs { color: #008000 } /* Comment.Special */ -pre.pygments .tok-ge { font-style: italic } /* Generic.Emph */ -pre.pygments .tok-gh { font-weight: bold } /* Generic.Heading */ -pre.pygments .tok-gp { font-weight: bold } /* Generic.Prompt */ -pre.pygments .tok-gs { font-weight: bold } /* Generic.Strong */ -pre.pygments .tok-gu { font-weight: bold } /* Generic.Subheading */ -pre.pygments .tok-kc { color: #0000ff } /* Keyword.Constant */ -pre.pygments .tok-kd { color: #0000ff } /* Keyword.Declaration */ -pre.pygments .tok-kn { color: #0000ff } /* Keyword.Namespace */ -pre.pygments .tok-kp { color: #0000ff } /* Keyword.Pseudo */ -pre.pygments .tok-kr { color: #0000ff } /* Keyword.Reserved */ -pre.pygments .tok-kt { color: #2b91af } /* Keyword.Type */ -pre.pygments .tok-s { color: #a31515 } /* Literal.String */ -pre.pygments .tok-nc { color: #2b91af } /* Name.Class */ -pre.pygments .tok-ow { color: #0000ff } /* Operator.Word */ -pre.pygments .tok-sa { color: #a31515 } /* Literal.String.Affix */ -pre.pygments .tok-sb { color: #a31515 } /* Literal.String.Backtick */ -pre.pygments .tok-sc { color: #a31515 } /* Literal.String.Char */ -pre.pygments .tok-dl { color: #a31515 } /* Literal.String.Delimiter */ -pre.pygments .tok-sd { color: #a31515 } /* Literal.String.Doc */ -pre.pygments .tok-s2 { color: #a31515 } /* Literal.String.Double */ -pre.pygments .tok-se { color: #a31515 } /* Literal.String.Escape */ -pre.pygments .tok-sh { color: #a31515 } /* Literal.String.Heredoc */ -pre.pygments .tok-si { color: #a31515 } /* Literal.String.Interpol */ -pre.pygments .tok-sx { color: #a31515 } /* Literal.String.Other */ -pre.pygments .tok-sr { color: #a31515 } /* Literal.String.Regex */ -pre.pygments .tok-s1 { color: #a31515 } /* Literal.String.Single */ -pre.pygments .tok-ss { color: #a31515 } /* Literal.String.Symbol */ diff --git a/docs/assets/css/docs.scss b/docs/assets/css/docs.scss deleted file mode 100644 index a3379e71c..000000000 --- a/docs/assets/css/docs.scss +++ /dev/null @@ -1,21 +0,0 @@ ---- ---- -/* - * 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. - */ -// Docs-specific global styles -body { -} diff --git a/docs/assets/css/styles.scss b/docs/assets/css/styles.scss deleted file mode 100644 index dcc18bd1b..000000000 --- a/docs/assets/css/styles.scss +++ /dev/null @@ -1,30 +0,0 @@ ---- ---- -/* - * 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. - */ -@import "variables"; -@import "header"; -@import "code"; -@import "rouge-base16-solarized"; -@import "text"; -@import "callouts"; -@import "layout"; -@import "left-nav"; -@import "right-nav"; -@import "footer"; - -@import "docs"; diff --git a/docs/assets/images/apple-blob.svg b/docs/assets/images/apple-blob.svg deleted file mode 100644 index 308bf94c8..000000000 --- a/docs/assets/images/apple-blob.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/arrow-down-white.svg b/docs/assets/images/arrow-down-white.svg deleted file mode 100644 index 12a561372..000000000 --- a/docs/assets/images/arrow-down-white.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/arrow-down.svg b/docs/assets/images/arrow-down.svg deleted file mode 100644 index 170a167ec..000000000 --- a/docs/assets/images/arrow-down.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/background-lines.svg b/docs/assets/images/background-lines.svg deleted file mode 100644 index 50524eb56..000000000 --- a/docs/assets/images/background-lines.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/cancel.svg b/docs/assets/images/cancel.svg deleted file mode 100644 index 1ca9a6aab..000000000 --- a/docs/assets/images/cancel.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - Cancel-icon - Created with Sketch. - - - - - - \ No newline at end of file diff --git a/docs/assets/images/checkmark-green.svg b/docs/assets/images/checkmark-green.svg deleted file mode 100644 index 7f4bd06ca..000000000 --- a/docs/assets/images/checkmark-green.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/copy-icon.svg b/docs/assets/images/copy-icon.svg deleted file mode 100644 index 9ee5957dc..000000000 --- a/docs/assets/images/copy-icon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/assets/images/cpp.svg b/docs/assets/images/cpp.svg deleted file mode 100644 index 2ad3e6d16..000000000 --- a/docs/assets/images/cpp.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/assets/images/dev-internal-bg.jpg b/docs/assets/images/dev-internal-bg.jpg deleted file mode 100644 index 847a3f586..000000000 Binary files a/docs/assets/images/dev-internal-bg.jpg and /dev/null differ diff --git a/docs/assets/images/dotnet.svg b/docs/assets/images/dotnet.svg deleted file mode 100644 index 580127124..000000000 --- a/docs/assets/images/dotnet.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/assets/images/edition-ce.svg b/docs/assets/images/edition-ce.svg deleted file mode 100644 index fad4eb561..000000000 --- a/docs/assets/images/edition-ce.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/edition-ee.svg b/docs/assets/images/edition-ee.svg deleted file mode 100644 index fbc466d13..000000000 --- a/docs/assets/images/edition-ee.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/edition-ue.svg b/docs/assets/images/edition-ue.svg deleted file mode 100644 index 0d788edb1..000000000 --- a/docs/assets/images/edition-ue.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/events-nav-arrow.svg b/docs/assets/images/events-nav-arrow.svg deleted file mode 100644 index 217fdaa8e..000000000 --- a/docs/assets/images/events-nav-arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/feature-easy-installation.svg b/docs/assets/images/feature-easy-installation.svg deleted file mode 100644 index 0d788edb1..000000000 --- a/docs/assets/images/feature-easy-installation.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/feature-fast.svg b/docs/assets/images/feature-fast.svg deleted file mode 100644 index 58898784f..000000000 --- a/docs/assets/images/feature-fast.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/feature-reliable.svg b/docs/assets/images/feature-reliable.svg deleted file mode 100644 index d677c70e3..000000000 --- a/docs/assets/images/feature-reliable.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/github-gray.svg b/docs/assets/images/github-gray.svg deleted file mode 100644 index 664368e60..000000000 --- a/docs/assets/images/github-gray.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/github-white.svg b/docs/assets/images/github-white.svg deleted file mode 100644 index 5ae1ae69c..000000000 --- a/docs/assets/images/github-white.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/glowing-box.svg b/docs/assets/images/glowing-box.svg deleted file mode 100644 index c384c4a67..000000000 --- a/docs/assets/images/glowing-box.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/integrations/CDC-design.svg b/docs/assets/images/integrations/CDC-design.svg deleted file mode 100644 index d314d42b9..000000000 --- a/docs/assets/images/integrations/CDC-design.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
ignite.sh
ignite.sh
WAL
WAL
ignite-cdc.sh
ignite-cdc.sh
Sever node host
Sever node host
DC-1 Changes
DC-1 Changes
DC-1 Changes
DC-1 Changes
WAL archive
WAL archive
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/assets/images/integrations/hibernate.svg b/docs/assets/images/integrations/hibernate.svg deleted file mode 100644 index 38e4f313e..000000000 --- a/docs/assets/images/integrations/hibernate.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/assets/images/integrations/kafka.svg b/docs/assets/images/integrations/kafka.svg deleted file mode 100644 index db145e2c6..000000000 --- a/docs/assets/images/integrations/kafka.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/integrations/more.svg b/docs/assets/images/integrations/more.svg deleted file mode 100644 index 42a3af10d..000000000 --- a/docs/assets/images/integrations/more.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/docs/assets/images/integrations/oracle.svg b/docs/assets/images/integrations/oracle.svg deleted file mode 100644 index 484c750d2..000000000 --- a/docs/assets/images/integrations/oracle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/integrations/osgi.svg b/docs/assets/images/integrations/osgi.svg deleted file mode 100644 index dae8409d1..000000000 --- a/docs/assets/images/integrations/osgi.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/integrations/spark.svg b/docs/assets/images/integrations/spark.svg deleted file mode 100644 index c0cb1b8e0..000000000 --- a/docs/assets/images/integrations/spark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/assets/images/integrations/spring.svg b/docs/assets/images/integrations/spring.svg deleted file mode 100644 index 0e5f74ebe..000000000 --- a/docs/assets/images/integrations/spring.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/java.svg b/docs/assets/images/java.svg deleted file mode 100644 index 962f9d745..000000000 --- a/docs/assets/images/java.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/assets/images/left-nav-arrow.svg b/docs/assets/images/left-nav-arrow.svg deleted file mode 100644 index 747a83d8e..000000000 --- a/docs/assets/images/left-nav-arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/lines-bg-1.svg b/docs/assets/images/lines-bg-1.svg deleted file mode 100644 index c6f714aa3..000000000 --- a/docs/assets/images/lines-bg-1.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/lines-bg-2.svg b/docs/assets/images/lines-bg-2.svg deleted file mode 100644 index 42c4afad5..000000000 --- a/docs/assets/images/lines-bg-2.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/lines-bg-3.svg b/docs/assets/images/lines-bg-3.svg deleted file mode 100644 index 42c4afad5..000000000 --- a/docs/assets/images/lines-bg-3.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/lines-bg-4.svg b/docs/assets/images/lines-bg-4.svg deleted file mode 100644 index 87b0a9bf9..000000000 --- a/docs/assets/images/lines-bg-4.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/menu-icon.svg b/docs/assets/images/menu-icon.svg deleted file mode 100644 index 0bf1e7f19..000000000 --- a/docs/assets/images/menu-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/assets/images/mousepad-blob.svg b/docs/assets/images/mousepad-blob.svg deleted file mode 100644 index a05769b2d..000000000 --- a/docs/assets/images/mousepad-blob.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/assets/images/piece-of-paper-with-folded-top-right-corner.svg b/docs/assets/images/piece-of-paper-with-folded-top-right-corner.svg deleted file mode 100644 index aa493a799..000000000 --- a/docs/assets/images/piece-of-paper-with-folded-top-right-corner.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/scala.svg b/docs/assets/images/scala.svg deleted file mode 100644 index 5f2778964..000000000 --- a/docs/assets/images/scala.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/search.svg b/docs/assets/images/search.svg deleted file mode 100644 index 4123a57f2..000000000 --- a/docs/assets/images/search.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - 76A07A59-5A01-45B5-86ED-1007B13A770C - Created with sketchtool. - - - - - - - - - - \ No newline at end of file diff --git a/docs/assets/images/violent-blob.svg b/docs/assets/images/violent-blob.svg deleted file mode 100644 index 4bef98b5c..000000000 --- a/docs/assets/images/violent-blob.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/assets/images/watermelon-blob.svg b/docs/assets/images/watermelon-blob.svg deleted file mode 100644 index c2fe4451a..000000000 --- a/docs/assets/images/watermelon-blob.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/assets/js/anchor.min.js b/docs/assets/js/anchor.min.js deleted file mode 100644 index e302d89b5..000000000 --- a/docs/assets/js/anchor.min.js +++ /dev/null @@ -1,9 +0,0 @@ -// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat -// -// AnchorJS - v4.2.0 - 2019-01-01 -// https://github.com/bryanbraun/anchorjs -// Copyright (c) 2019 Bryan Braun; Licensed MIT -// -// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat -!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),A||(A="h2, h3, h4, h5, h6"),0===(e=p(A)).length)return this;for(function(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}}); -// @license-end \ No newline at end of file diff --git a/docs/assets/js/code-copy-to-clipboard.js b/docs/assets/js/code-copy-to-clipboard.js deleted file mode 100644 index 3fd42b224..000000000 --- a/docs/assets/js/code-copy-to-clipboard.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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. - -const BUTTON_CLASSNAME = 'copy-to-clipboard-button' -const BUTTON_CLASSNAME_SUCCESS = 'copy-to-clipboard-button__success' - -const TEMPLATE = document.createElement('button') -TEMPLATE.classList.add(BUTTON_CLASSNAME) -TEMPLATE.title = 'Copy to clipboard' -TEMPLATE.type = 'button' - -const SECOND = 1000 -const RESULT_DISPLAY_DURATION = 0.5 * SECOND - -/** - * @param {HTMLElement?} el Element to copy text from - * @returns {boolean} Copy success/failure - */ -function copyCode(el) { - if (!el) return - if (!el.matches('code')) return - - const range = document.createRange() - range.selectNode(el) - window.getSelection().addRange(range) - - try { - return document.execCommand('copy') - } catch (err) {} finally { - window.getSelection().removeAllRanges() - } -} - -function init() { - for (const code of document.querySelectorAll('pre>code')) { - try { - const container = code.closest('.listingblock .content') - if (!container) break - const button = TEMPLATE.cloneNode(true) - container.appendChild(button) - } catch (err) {} - } - document.addEventListener('click', e => { - if (e.target.classList.contains(BUTTON_CLASSNAME)) { - const result = copyCode(e.target.parentElement.querySelector('code')) - if (result) { - e.target.innerText = '✓' - e.target.classList.add(BUTTON_CLASSNAME_SUCCESS) - setTimeout(() => { - e.target.innerText = TEMPLATE.textContent - e.target.classList.remove(BUTTON_CLASSNAME_SUCCESS) - }, RESULT_DISPLAY_DURATION) - } - } - }) -} - -window.addEventListener('load', init) diff --git a/docs/assets/js/code-tabs.js b/docs/assets/js/code-tabs.js deleted file mode 100644 index 6d8118af2..000000000 --- a/docs/assets/js/code-tabs.js +++ /dev/null @@ -1,155 +0,0 @@ -// 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. - -const TAB_BUTTON = document.createRange().createContextualFragment(` - -`) - -const getAllCodeTabs = () => document.querySelectorAll('code-tabs') - -/** - * @typedef CodeTabsState - * @prop {string?} currentTab - * @prop {string[]} tabs - * @prop {number?} boundingClientRectTop - */ - -/** - * @typedef {number} ScrollState - */ - -class CodeTabs { - /** @param {HTMLElement} el */ - constructor(el) { - this.el = el - this.el.codeTabs = this - /** - * @type {CodeTabsState} - */ - this._state = {tabs: []} - } - get state() { - return this._state - } - /** - * @param {CodeTabsState} newState - */ - set state(newState) { - const oldState = this._state - this._state = newState - this._render(oldState, newState) - } - connectedCallback() { - this._tabElements = this.el.querySelectorAll('code-tab') - this.state = { - currentTab: this._tabElements[0].dataset.tab, - tabs: [...this._tabElements].map(el => el.dataset.tab), - } - } - /** - * @private - * @param {CodeTabsState} oldState - * @param {CodeTabsState} newState - */ - _render(oldState, newState) { - if (!oldState.tabs.length && newState.tabs.length) { - /** @type {HTMLElement} */ - this.el.prepend(newState.tabs.reduce((nav, tab, i) => { - const button = TAB_BUTTON.firstElementChild.cloneNode() - button.dataset.tab = tab - button.innerText = tab - button.onclick = () => { - const scrollState = this._rememberScrollState() - this._openTab(tab) - this._restoreScrollState(scrollState) - } - if (this._tabElements[i].dataset.unavailable) { - button.classList.add('grey') - } - - this._tabElements[i].button = button - nav.appendChild(button) - return nav - }, document.createElement('NAV'))) - this.el.classList.add('code-tabs__initialized') - } - if (oldState.currentTab !== newState.currentTab) { - for (const tab of this._tabElements) { - const hidden = tab.dataset.tab !== newState.currentTab - if (hidden) { - tab.setAttribute('hidden', 'hidden') - } else { - tab.removeAttribute('hidden') - } - tab.button.classList.toggle('active', !hidden) - } - } - } - /** - * @private - * @param {string} tab - */ - _openTab(tab, emitEvent = true) { - if (!this.state.tabs.includes(tab)) return - this.state = Object.assign({}, this.state, {currentTab: tab}) - if (emitEvent) this.el.dispatchEvent(new CustomEvent('tabopen', { - bubbles: true, - detail: {tab} - })) - } - /** - * @param {string} tab - */ - openTab(tab) { - this._openTab(tab, false) - } - - /** - * @private - * @returns {ScrollState} - */ - _rememberScrollState() { - return this.el.getBoundingClientRect().top - } - - /** - * @private - * @param {ScrollState} scrollState - * @returns {void} - */ - _restoreScrollState(scrollState) { - const currentRectTop = this.el.getBoundingClientRect().top - const delta = currentRectTop - scrollState - document.scrollingElement.scrollBy(0, delta) - } -} - -/** - * @param {NodeListOf} tabs - */ -const setupSameLanguageSync = (tabs) => { - document.addEventListener('tabopen', (e) => { - [...tabs].filter(tab => tab !== e.target).forEach(tab => { - tab.codeTabs.openTab(e.detail.tab) - }) - }) -} - -// Edge does not support custom elements V1 -for (const el of getAllCodeTabs()) { - const instance = new CodeTabs(el) - instance.connectedCallback() -} -setupSameLanguageSync(getAllCodeTabs()) diff --git a/docs/assets/js/docs-menu.js b/docs/assets/js/docs-menu.js deleted file mode 100644 index 8e598da55..000000000 --- a/docs/assets/js/docs-menu.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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. - -const button = document.querySelector('button.menu') -const overlay = document.querySelector('.left-nav__overlay') - -const eventTypes = { - show: 'leftNavigationShow', - hide: 'leftNavigationHide' -} - -/** - * @param {keyof eventTypes} type - */ -const emit = type => { - if (!CustomEvent) return - document.dispatchEvent(new CustomEvent(type, {bubbles: true})) -} - -/** - * @param {boolean} force - */ -const toggleMenu = (force) => { - const body = document.querySelector('body') - const HIDE_CLASS = 'hide-left-nav' - body.classList.toggle(HIDE_CLASS, force) - emit(eventTypes[body.classList.contains(HIDE_CLASS) ? 'hide' : 'show']) -} - -export const hideLeftNav = () => { - toggleMenu(true, false) -} - -if (button && overlay) { - const query = window.matchMedia('(max-width: 990px)') - - button.addEventListener('click', () => toggleMenu()) - overlay.addEventListener('click', () => toggleMenu()) - query.addListener((e) => { - toggleMenu(e.matches) - }) - toggleMenu(query.matches) -} - -document.addEventListener('click', e => { - if (e.target.matches('.left-nav button')) { - e.target.classList.toggle('expanded') - e.target.classList.toggle('collapsed') - e.target.nextElementSibling.classList.toggle('expanded') - e.target.nextElementSibling.classList.toggle('collapsed') - } -}) diff --git a/docs/assets/js/index.js b/docs/assets/js/index.js deleted file mode 100644 index 0fa36f799..000000000 --- a/docs/assets/js/index.js +++ /dev/null @@ -1,51 +0,0 @@ -// 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. - -import './code-tabs.js?1' -import {hideLeftNav} from './docs-menu.js' -//import {hideTopNav} from './top-navigation.js' -import './page-nav.js' - - - - -document.addEventListener('topNavigationShow', hideLeftNav) -document.addEventListener('leftNavigationShow', hideTopNav) - - - - -// enables search with Swiftype widget -jQuery(document).ready(function(){ - - var customRenderFunction = function(document_type, item) { - var out = '' + item.highlight['title'] + ''; - return out.concat('

' + String(item['url']).replace("https://www.", '') + '

' + item.highlight['body'] + '

'); - } - -/* jQuery("#search-input").swiftype({ - fetchFields: { 'page': ['url'] }, - renderFunction: customRenderFunction, - highlightFields: { - 'page': { - 'title': {'size': 60, 'fallback': true }, - 'body': { 'size': 100, 'fallback':true } - } - }, - engineKey: '_t6sDkq6YsFC_12W6UH2' - }); - */ - -}); diff --git a/docs/assets/js/page-nav.js b/docs/assets/js/page-nav.js deleted file mode 100644 index 8f484649d..000000000 --- a/docs/assets/js/page-nav.js +++ /dev/null @@ -1,37 +0,0 @@ -// 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. - -const rightNav = document.querySelector('.right-nav .sectlevel1') - -if (IntersectionObserver && rightNav) { - const tocAnchors = [...rightNav.querySelectorAll('a[href]')] - let last; - tocAnchors.forEach((a, i, all) => { - const target = document.querySelector(`${a.hash}`) - if (!target) return - const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - a.classList.toggle('visible', entry.isIntersecting) - if (entry.isIntersecting) last = a - - const firstVisible = rightNav.querySelector('.visible') - tocAnchors.forEach(a => a.classList.remove('active')) - if (firstVisible) firstVisible.classList.add('active') - else if (last) last.classList.add('active') - }) - }); - observer.observe(target) - }) -} diff --git a/docs/assets/js/top-navigation.js b/docs/assets/js/top-navigation.js deleted file mode 100644 index 291ae92f4..000000000 --- a/docs/assets/js/top-navigation.js +++ /dev/null @@ -1,92 +0,0 @@ -// 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. - -const query = window.matchMedia('(max-width: 450px)') -const header = document.querySelector('header') -const search = document.querySelector('header .search input') - -let state = { - narrowMode: false, - showSearch: false, - showNav: false -} - -const eventTypes = { - navShow: 'topNavigationShow', - navHide: 'topNavigationHide' -} - -/** - * @param {keyof eventTypes} type - */ -const emit = type => { - if (!CustomEvent) return - header.dispatchEvent(new CustomEvent(type, {bubbles: true})) -} - -/** - * @param {typeof state} newState - */ -const render = (newState) => { - if (state.narrowMode !== newState.narrowMode) - header.classList.toggle('narrow-header') - if (state.showSearch !== newState.showSearch) { - header.classList.toggle('show-search') - search.value = '' - if (newState.showSearch) search.focus() - } - if (state.showNav !== newState.showNav) { - header.classList.toggle('show-nav') - emit(eventTypes[newState.showNav ? 'navShow' : 'navHide']) - } - state = newState -} - -render(Object.assign({}, state, {narrowMode: query.matches})) - -query.addListener((e) => { - render(Object.assign({}, state, { - narrowMode: e.matches, - showSearch: false, - showNav: false - })) -}) - -document.querySelector('.top-nav-toggle').addEventListener('click', () => { - render(Object.assign({}, state, { - showNav: !state.showNav, - showSearch: false - })) -}) - -document.querySelector('.search-toggle').addEventListener('click', () => { - render(Object.assign({}, state, { - showSearch: !state.showSearch, - showNav: false - })) -}) - -search.addEventListener('blur', () => { - render(Object.assign({}, state, { - showSearch: false - })) -}) - -export const hideTopNav = () => { - render(Object.assign({}, state, { - showNav: false, - showSearch: false - })) -} diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 62d5ea639..000000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/run.sh b/docs/run.sh deleted file mode 100644 index bcbe32c15..000000000 --- a/docs/run.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# -# 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. -# - -rm -rf _site -rm -rf .jekyll-cache - -bundle exec jekyll s -lI --force_polling --trace