From 221057dfa50209ae7edc9c6c0b637e15902c3516 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 26 Aug 2024 09:40:09 +0300 Subject: [PATCH] Replace '++version++' to the respective version for released versions Signed-off-by: Martin Tzvetanov Grigorov --- .../en/docs/1.11.1/Getting started (Java)/_index.md | 10 +++++----- .../en/docs/1.11.1/Getting started (Python)/_index.md | 6 +++--- doc/content/en/docs/1.11.1/MapReduce guide/_index.md | 10 +++++----- .../en/docs/1.11.2/Getting started (Java)/_index.md | 10 +++++----- .../en/docs/1.11.2/Getting started (Python)/_index.md | 6 +++--- doc/content/en/docs/1.11.2/MapReduce guide/_index.md | 10 +++++----- .../en/docs/1.11.3/Getting started (Java)/_index.md | 10 +++++----- .../en/docs/1.11.3/Getting started (Python)/_index.md | 6 +++--- doc/content/en/docs/1.11.3/MapReduce guide/_index.md | 10 +++++----- .../en/docs/1.12.0/Getting started (Java)/_index.md | 10 +++++----- .../en/docs/1.12.0/Getting started (Python)/_index.md | 6 +++--- doc/content/en/docs/1.12.0/MapReduce guide/_index.md | 10 +++++----- 12 files changed, 52 insertions(+), 52 deletions(-) diff --git a/doc/content/en/docs/1.11.1/Getting started (Java)/_index.md b/doc/content/en/docs/1.11.1/Getting started (Java)/_index.md index f3944cf020e..7731dae06f9 100644 --- a/doc/content/en/docs/1.11.1/Getting started (Java)/_index.md +++ b/doc/content/en/docs/1.11.1/Getting started (Java)/_index.md @@ -31,7 +31,7 @@ This is a short guide for getting started with Apache Avro™ using Java. This g ## Download -Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. For the examples in this guide, download avro-{{< avro_version >}}.jar and avro-tools-{{< avro_version >}}.jar. +Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro 1.11.1, the latest version at the time of writing. For the examples in this guide, download avro-1.11.1.jar and avro-tools-1.11.1.jar. Alternatively, if you are using Maven, add the following dependency to your POM: @@ -39,7 +39,7 @@ Alternatively, if you are using Maven, add the following dependency to your POM: org.apache.avro avro - {{< avro_version >}} + 1.11.1 ``` @@ -49,7 +49,7 @@ As well as the Avro Maven plugin (for performing code generation): org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.11.1 generate-sources @@ -101,13 +101,13 @@ Fields are defined via an array of objects, each of which defines a name and typ Code generation allows us to automatically create classes based on our previously-defined schema. Once we have defined the relevant classes, there is no need to use the schema directly in our programs. We use the avro-tools jar to generate code as follows: ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema +java -jar /path/to/avro-tools-1.11.1.jar compile schema ``` This will generate the appropriate source files in a package based on the schema's namespace in the provided destination folder. For instance, to generate a User class in package example.avro from the schema defined above, run ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema user.avsc . +java -jar /path/to/avro-tools-1.11.1.jar compile schema user.avsc . ``` Note that if you using the Avro Maven plugin, there is no need to manually invoke the schema compiler; the plugin automatically performs code generation on any .avsc files present in the configured source directory. diff --git a/doc/content/en/docs/1.11.1/Getting started (Python)/_index.md b/doc/content/en/docs/1.11.1/Getting started (Python)/_index.md index ded4aca5d89..26c36f0f1ec 100644 --- a/doc/content/en/docs/1.11.1/Getting started (Python)/_index.md +++ b/doc/content/en/docs/1.11.1/Getting started (Python)/_index.md @@ -39,11 +39,11 @@ For Python, the easiest way to get started is to install it from PyPI. Python's $ python3 -m pip install avro ``` -The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. Download and unzip avro-{{< avro_version >}}.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. +The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro 1.11.1, the latest version at the time of writing. Download and unzip avro-1.11.1.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. ```shell -$ tar xvf avro-{{< avro_version >}}.tar.gz -$ cd avro-{{< avro_version >}} +$ tar xvf avro-1.11.1.tar.gz +$ cd avro-1.11.1 $ python setup.py install $ python >>> import avro # should not raise ImportError diff --git a/doc/content/en/docs/1.11.1/MapReduce guide/_index.md b/doc/content/en/docs/1.11.1/MapReduce guide/_index.md index f262bc6e2a7..e51def02142 100644 --- a/doc/content/en/docs/1.11.1/MapReduce guide/_index.md +++ b/doc/content/en/docs/1.11.1/MapReduce guide/_index.md @@ -35,12 +35,12 @@ The code from this guide is included in the Avro docs under examples/mr-example. org.apache.avro avro - {{< avro_version >}} + 1.11.1 org.apache.avro avro-mapred - {{< avro_version >}} + 1.11.1 org.apache.hadoop @@ -53,7 +53,7 @@ And the following plugin: org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.11.1 generate-sources @@ -71,7 +71,7 @@ And the following plugin: If you do not configure the *sourceDirectory* and *outputDirectory* properties, the defaults will be used. The *sourceDirectory* property defaults to *src/main/avro*. The *outputDirectory* property defaults to *target/generated-sources*. You can change the paths to match your project layout. -Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-{{< avro_version >}}.jar* and *avro-mapred-{{< avro_version >}}.jar*, as well as *avro-tools-{{< avro_version >}}.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. +Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-1.11.1.jar* and *avro-mapred-1.11.1.jar*, as well as *avro-tools-1.11.1.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. ## Example: ColorCount Below is a simple example of a MapReduce that uses Avro. There is an example for both the old (org.apache.hadoop.mapred) and new (org.apache.hadoop.mapreduce) APIs under *examples/mr-example/src/main/java/example/*. _MapredColorCount_ is the example for the older mapred API while _MapReduceColorCount_ is the example for the newer mapreduce API. Both examples are below, but we will detail the mapred API in our subsequent examples. @@ -291,7 +291,7 @@ part-00000.avro _SUCCESS ``` You can check the contents of the generated Avro file using the avro-tools jar: ```shell -$ java -jar /path/to/avro-tools-{{< avro_version >}}.jar tojson output/part-00000.avro +$ java -jar /path/to/avro-tools-1.11.1.jar tojson output/part-00000.avro {"value": 3, "key": "blue"} {"value": 7, "key": "green"} {"value": 1, "key": "none"} diff --git a/doc/content/en/docs/1.11.2/Getting started (Java)/_index.md b/doc/content/en/docs/1.11.2/Getting started (Java)/_index.md index f3944cf020e..20a680b1d88 100644 --- a/doc/content/en/docs/1.11.2/Getting started (Java)/_index.md +++ b/doc/content/en/docs/1.11.2/Getting started (Java)/_index.md @@ -31,7 +31,7 @@ This is a short guide for getting started with Apache Avro™ using Java. This g ## Download -Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. For the examples in this guide, download avro-{{< avro_version >}}.jar and avro-tools-{{< avro_version >}}.jar. +Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro 1.11.2, the latest version at the time of writing. For the examples in this guide, download avro-1.11.2.jar and avro-tools-1.11.2.jar. Alternatively, if you are using Maven, add the following dependency to your POM: @@ -39,7 +39,7 @@ Alternatively, if you are using Maven, add the following dependency to your POM: org.apache.avro avro - {{< avro_version >}} + 1.11.2 ``` @@ -49,7 +49,7 @@ As well as the Avro Maven plugin (for performing code generation): org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.11.2 generate-sources @@ -101,13 +101,13 @@ Fields are defined via an array of objects, each of which defines a name and typ Code generation allows us to automatically create classes based on our previously-defined schema. Once we have defined the relevant classes, there is no need to use the schema directly in our programs. We use the avro-tools jar to generate code as follows: ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema +java -jar /path/to/avro-tools-1.11.2.jar compile schema ``` This will generate the appropriate source files in a package based on the schema's namespace in the provided destination folder. For instance, to generate a User class in package example.avro from the schema defined above, run ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema user.avsc . +java -jar /path/to/avro-tools-1.11.2.jar compile schema user.avsc . ``` Note that if you using the Avro Maven plugin, there is no need to manually invoke the schema compiler; the plugin automatically performs code generation on any .avsc files present in the configured source directory. diff --git a/doc/content/en/docs/1.11.2/Getting started (Python)/_index.md b/doc/content/en/docs/1.11.2/Getting started (Python)/_index.md index f11fcc05134..96ae73660ae 100644 --- a/doc/content/en/docs/1.11.2/Getting started (Python)/_index.md +++ b/doc/content/en/docs/1.11.2/Getting started (Python)/_index.md @@ -39,11 +39,11 @@ For Python, the easiest way to get started is to install it from PyPI. Python's $ python3 -m pip install avro ``` -The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. Download and unzip avro-{{< avro_version >}}.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. +The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro 1.11.2, the latest version at the time of writing. Download and unzip avro-1.11.2.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. ```shell -$ tar xvf avro-{{< avro_version >}}.tar.gz -$ cd avro-{{< avro_version >}} +$ tar xvf avro-1.11.2.tar.gz +$ cd avro-1.11.2 $ python setup.py install $ python >>> import avro # should not raise ImportError diff --git a/doc/content/en/docs/1.11.2/MapReduce guide/_index.md b/doc/content/en/docs/1.11.2/MapReduce guide/_index.md index f262bc6e2a7..5e767936c18 100644 --- a/doc/content/en/docs/1.11.2/MapReduce guide/_index.md +++ b/doc/content/en/docs/1.11.2/MapReduce guide/_index.md @@ -35,12 +35,12 @@ The code from this guide is included in the Avro docs under examples/mr-example. org.apache.avro avro - {{< avro_version >}} + 1.11.2 org.apache.avro avro-mapred - {{< avro_version >}} + 1.11.2 org.apache.hadoop @@ -53,7 +53,7 @@ And the following plugin: org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.11.2 generate-sources @@ -71,7 +71,7 @@ And the following plugin: If you do not configure the *sourceDirectory* and *outputDirectory* properties, the defaults will be used. The *sourceDirectory* property defaults to *src/main/avro*. The *outputDirectory* property defaults to *target/generated-sources*. You can change the paths to match your project layout. -Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-{{< avro_version >}}.jar* and *avro-mapred-{{< avro_version >}}.jar*, as well as *avro-tools-{{< avro_version >}}.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. +Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-1.11.2.jar* and *avro-mapred-1.11.2.jar*, as well as *avro-tools-1.11.2.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. ## Example: ColorCount Below is a simple example of a MapReduce that uses Avro. There is an example for both the old (org.apache.hadoop.mapred) and new (org.apache.hadoop.mapreduce) APIs under *examples/mr-example/src/main/java/example/*. _MapredColorCount_ is the example for the older mapred API while _MapReduceColorCount_ is the example for the newer mapreduce API. Both examples are below, but we will detail the mapred API in our subsequent examples. @@ -291,7 +291,7 @@ part-00000.avro _SUCCESS ``` You can check the contents of the generated Avro file using the avro-tools jar: ```shell -$ java -jar /path/to/avro-tools-{{< avro_version >}}.jar tojson output/part-00000.avro +$ java -jar /path/to/avro-tools-1.11.2.jar tojson output/part-00000.avro {"value": 3, "key": "blue"} {"value": 7, "key": "green"} {"value": 1, "key": "none"} diff --git a/doc/content/en/docs/1.11.3/Getting started (Java)/_index.md b/doc/content/en/docs/1.11.3/Getting started (Java)/_index.md index f3944cf020e..60e3a827340 100644 --- a/doc/content/en/docs/1.11.3/Getting started (Java)/_index.md +++ b/doc/content/en/docs/1.11.3/Getting started (Java)/_index.md @@ -31,7 +31,7 @@ This is a short guide for getting started with Apache Avro™ using Java. This g ## Download -Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. For the examples in this guide, download avro-{{< avro_version >}}.jar and avro-tools-{{< avro_version >}}.jar. +Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro 1.11.3, the latest version at the time of writing. For the examples in this guide, download avro-1.11.3.jar and avro-tools-1.11.3.jar. Alternatively, if you are using Maven, add the following dependency to your POM: @@ -39,7 +39,7 @@ Alternatively, if you are using Maven, add the following dependency to your POM: org.apache.avro avro - {{< avro_version >}} + 1.11.3 ``` @@ -49,7 +49,7 @@ As well as the Avro Maven plugin (for performing code generation): org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.11.3 generate-sources @@ -101,13 +101,13 @@ Fields are defined via an array of objects, each of which defines a name and typ Code generation allows us to automatically create classes based on our previously-defined schema. Once we have defined the relevant classes, there is no need to use the schema directly in our programs. We use the avro-tools jar to generate code as follows: ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema +java -jar /path/to/avro-tools-1.11.3.jar compile schema ``` This will generate the appropriate source files in a package based on the schema's namespace in the provided destination folder. For instance, to generate a User class in package example.avro from the schema defined above, run ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema user.avsc . +java -jar /path/to/avro-tools-1.11.3.jar compile schema user.avsc . ``` Note that if you using the Avro Maven plugin, there is no need to manually invoke the schema compiler; the plugin automatically performs code generation on any .avsc files present in the configured source directory. diff --git a/doc/content/en/docs/1.11.3/Getting started (Python)/_index.md b/doc/content/en/docs/1.11.3/Getting started (Python)/_index.md index f11fcc05134..8675b399fcd 100644 --- a/doc/content/en/docs/1.11.3/Getting started (Python)/_index.md +++ b/doc/content/en/docs/1.11.3/Getting started (Python)/_index.md @@ -39,11 +39,11 @@ For Python, the easiest way to get started is to install it from PyPI. Python's $ python3 -m pip install avro ``` -The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. Download and unzip avro-{{< avro_version >}}.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. +The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro 1.11.3, the latest version at the time of writing. Download and unzip avro-1.11.3.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. ```shell -$ tar xvf avro-{{< avro_version >}}.tar.gz -$ cd avro-{{< avro_version >}} +$ tar xvf avro-1.11.3.tar.gz +$ cd avro-1.11.3 $ python setup.py install $ python >>> import avro # should not raise ImportError diff --git a/doc/content/en/docs/1.11.3/MapReduce guide/_index.md b/doc/content/en/docs/1.11.3/MapReduce guide/_index.md index f262bc6e2a7..0d2df4db1e8 100644 --- a/doc/content/en/docs/1.11.3/MapReduce guide/_index.md +++ b/doc/content/en/docs/1.11.3/MapReduce guide/_index.md @@ -35,12 +35,12 @@ The code from this guide is included in the Avro docs under examples/mr-example. org.apache.avro avro - {{< avro_version >}} + 1.11.3 org.apache.avro avro-mapred - {{< avro_version >}} + 1.11.3 org.apache.hadoop @@ -53,7 +53,7 @@ And the following plugin: org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.11.3 generate-sources @@ -71,7 +71,7 @@ And the following plugin: If you do not configure the *sourceDirectory* and *outputDirectory* properties, the defaults will be used. The *sourceDirectory* property defaults to *src/main/avro*. The *outputDirectory* property defaults to *target/generated-sources*. You can change the paths to match your project layout. -Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-{{< avro_version >}}.jar* and *avro-mapred-{{< avro_version >}}.jar*, as well as *avro-tools-{{< avro_version >}}.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. +Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-1.11.3.jar* and *avro-mapred-1.11.3.jar*, as well as *avro-tools-1.11.3.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. ## Example: ColorCount Below is a simple example of a MapReduce that uses Avro. There is an example for both the old (org.apache.hadoop.mapred) and new (org.apache.hadoop.mapreduce) APIs under *examples/mr-example/src/main/java/example/*. _MapredColorCount_ is the example for the older mapred API while _MapReduceColorCount_ is the example for the newer mapreduce API. Both examples are below, but we will detail the mapred API in our subsequent examples. @@ -291,7 +291,7 @@ part-00000.avro _SUCCESS ``` You can check the contents of the generated Avro file using the avro-tools jar: ```shell -$ java -jar /path/to/avro-tools-{{< avro_version >}}.jar tojson output/part-00000.avro +$ java -jar /path/to/avro-tools-1.11.3.jar tojson output/part-00000.avro {"value": 3, "key": "blue"} {"value": 7, "key": "green"} {"value": 1, "key": "none"} diff --git a/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md b/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md index 429e9837641..c4022685395 100644 --- a/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md +++ b/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md @@ -31,7 +31,7 @@ This is a short guide for getting started with Apache Avro™ using Java. This g ## Download -Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. For the examples in this guide, download avro-{{< avro_version >}}.jar and avro-tools-{{< avro_version >}}.jar. +Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the [Apache Avro™ Download]({{< relref "/project/download" >}}) page. This guide uses Avro 1.12.0, the latest version at the time of writing. For the examples in this guide, download avro-1.12.0.jar and avro-tools-1.12.0.jar. Alternatively, if you are using Maven, add the following dependency to your POM: @@ -39,7 +39,7 @@ Alternatively, if you are using Maven, add the following dependency to your POM: org.apache.avro avro - {{< avro_version >}} + 1.12.0 ``` @@ -49,7 +49,7 @@ As well as the Avro Maven plugin (for performing code generation): org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.12.0 ${project.basedir}/src/main/avro/ ${project.basedir}/src/main/java/ @@ -101,13 +101,13 @@ Fields are defined via an array of objects, each of which defines a name and typ Code generation allows us to automatically create classes based on our previously-defined schema. Once we have defined the relevant classes, there is no need to use the schema directly in our programs. We use the avro-tools jar to generate code as follows: ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema +java -jar /path/to/avro-tools-1.12.0.jar compile schema ``` This will generate the appropriate source files in a package based on the schema's namespace in the provided destination folder. For instance, to generate a User class in package example.avro from the schema defined above, run ```shell -java -jar /path/to/avro-tools-{{< avro_version >}}.jar compile schema user.avsc . +java -jar /path/to/avro-tools-1.12.0.jar compile schema user.avsc . ``` Note that if you using the Avro Maven plugin, there is no need to manually invoke the schema compiler; the plugin automatically performs code generation on any .avsc files present in the configured source directory. diff --git a/doc/content/en/docs/1.12.0/Getting started (Python)/_index.md b/doc/content/en/docs/1.12.0/Getting started (Python)/_index.md index 44e3a8f37fd..8ec8f6d4e82 100644 --- a/doc/content/en/docs/1.12.0/Getting started (Python)/_index.md +++ b/doc/content/en/docs/1.12.0/Getting started (Python)/_index.md @@ -39,11 +39,11 @@ For Python, the easiest way to get started is to install it from PyPI. Python's $ python3 -m pip install avro ``` -The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro {{< avro_version >}}, the latest version at the time of writing. Download and unzip avro-{{< avro_version >}}.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. +The official releases of the Avro implementations for C, C++, C#, Java, PHP, Python, and Ruby can be downloaded from the Apache Avro™ Releases page. This guide uses Avro 1.12.0, the latest version at the time of writing. Download and unzip avro-1.12.0.tar.gz, and install via python setup.py (this will probably require root privileges). Ensure that you can import avro from a Python prompt. ```shell -$ tar xvf avro-{{< avro_version >}}.tar.gz -$ cd avro-{{< avro_version >}} +$ tar xvf avro-1.12.0.tar.gz +$ cd avro-1.12.0 $ python setup.py install $ python >>> import avro # should not raise ImportError diff --git a/doc/content/en/docs/1.12.0/MapReduce guide/_index.md b/doc/content/en/docs/1.12.0/MapReduce guide/_index.md index f262bc6e2a7..fdae67a78c6 100644 --- a/doc/content/en/docs/1.12.0/MapReduce guide/_index.md +++ b/doc/content/en/docs/1.12.0/MapReduce guide/_index.md @@ -35,12 +35,12 @@ The code from this guide is included in the Avro docs under examples/mr-example. org.apache.avro avro - {{< avro_version >}} + 1.12.0 org.apache.avro avro-mapred - {{< avro_version >}} + 1.12.0 org.apache.hadoop @@ -53,7 +53,7 @@ And the following plugin: org.apache.avro avro-maven-plugin - {{< avro_version >}} + 1.12.0 generate-sources @@ -71,7 +71,7 @@ And the following plugin: If you do not configure the *sourceDirectory* and *outputDirectory* properties, the defaults will be used. The *sourceDirectory* property defaults to *src/main/avro*. The *outputDirectory* property defaults to *target/generated-sources*. You can change the paths to match your project layout. -Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-{{< avro_version >}}.jar* and *avro-mapred-{{< avro_version >}}.jar*, as well as *avro-tools-{{< avro_version >}}.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. +Alternatively, Avro jars can be downloaded directly from the Apache Avro™ Releases [page](https://avro.apache.org/releases.html). The relevant Avro jars for this guide are *avro-1.12.0.jar* and *avro-mapred-1.12.0.jar*, as well as *avro-tools-1.12.0.jar* for code generation and viewing Avro data files as JSON. In addition, you will need to install Hadoop in order to use MapReduce. ## Example: ColorCount Below is a simple example of a MapReduce that uses Avro. There is an example for both the old (org.apache.hadoop.mapred) and new (org.apache.hadoop.mapreduce) APIs under *examples/mr-example/src/main/java/example/*. _MapredColorCount_ is the example for the older mapred API while _MapReduceColorCount_ is the example for the newer mapreduce API. Both examples are below, but we will detail the mapred API in our subsequent examples. @@ -291,7 +291,7 @@ part-00000.avro _SUCCESS ``` You can check the contents of the generated Avro file using the avro-tools jar: ```shell -$ java -jar /path/to/avro-tools-{{< avro_version >}}.jar tojson output/part-00000.avro +$ java -jar /path/to/avro-tools-1.12.0.jar tojson output/part-00000.avro {"value": 3, "key": "blue"} {"value": 7, "key": "green"} {"value": 1, "key": "none"}