Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jlprat authored Mar 16, 2023
2 parents 23b140a + fd103e5 commit 1a7210e
Show file tree
Hide file tree
Showing 275 changed files with 9,036 additions and 4,493 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/maven4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# https://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.

name: 'Maven 4'
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths:
- .github/workflows/maven4.yml
- lang/java/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
maven4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Cache Local Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Maven 4 Build Cache
uses: actions/cache@v3
with:
path: ~/.m2/build-cache
key: ${{ runner.os }}-maven-build-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-build-cache
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Setup Maven 4
uses: stCarolas/[email protected]
with:
maven-version: 4.0.0-alpha-4

- name: Test
run: mvn clean package
3 changes: 1 addition & 2 deletions .github/workflows/test-lang-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
- '8'
- '11'
- '17'
- '18'
- '19'
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -153,4 +152,4 @@ jobs:

- name: Test Reproducible Build
working-directory: .
run: mvn clean verify -DskipTests artifact:compare
run: mvn clean verify -DskipTests -Dcyclonedx.skip artifact:compare
8 changes: 4 additions & 4 deletions .github/workflows/test-lang-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
strategy:
matrix:
ruby:
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
steps:
- uses: actions/checkout@v3

Expand All @@ -51,7 +51,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}

- name: Install Dependencies
run: sudo apt-get install -qqy bundler libsnappy-dev
run: sudo apt-get install -qqy libsnappy-dev

- uses: actions/cache@v3
with:
Expand Down Expand Up @@ -79,10 +79,10 @@ jobs:
strategy:
matrix:
ruby:
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
steps:
- uses: actions/checkout@v3

Expand All @@ -91,7 +91,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}

- name: Install Dependencies
run: sudo apt-get install -qqy bundler libsnappy-dev
run: sudo apt-get install -qqy libsnappy-dev

- uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The following packages must be installed before Avro can be built:
- C++: cmake 3.7.2 or greater, g++, flex, bison, libboost-dev
- C#: .NET Core 2.2 SDK
- JavaScript: Node 12.x+, nodejs, npm
- Ruby: Ruby 2.6 or greater, ruby-dev, gem, bundler, snappy
- Ruby: Ruby 2.7 or greater, ruby-dev, gem, bundler, snappy
- Perl: Perl 5.24.1 or greater, gmake, Module::Install,
Module::Install::ReadmeFromPod, Module::Install::Repository,
Math::BigInt, JSON::XS, Try::Tiny, Regexp::Common, Encode,
Expand Down
10 changes: 6 additions & 4 deletions doc/content/en/docs/++version++/IDL Language/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ Some of the logical types supported by Avro's JSON format are also supported by
* _date_ (logical type [date]({{< relref "specification#date" >}}))
* _time_ms_ (logical type [time-millis]({{< relref "specification#time-millisecond-precision" >}}))
* _timestamp_ms_ (logical type [timestamp-millis]({{< relref "specification#timestamp-millisecond-precision" >}}))
* _uuid_ (logical type [uuid]({{< relref "specification#uuid" >}}))
For example:
```java
Expand All @@ -183,6 +184,7 @@ record Job {
time_ms submitTime;
timestamp_ms finishTime;
decimal(9,2) finishRatio;
uuid pk = "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8";
}
```
Expand All @@ -203,7 +205,7 @@ record Card {
Suit suit; // refers to the enum Card defined above
int number;
}
```
```
### Default Values
Default values for fields may be optionally specified by using an equals sign after the field name followed by a JSON expression indicating the default value. This JSON is interpreted as described in the [spec]({{< relref "specification#schema-record" >}}).
Expand Down Expand Up @@ -270,7 +272,7 @@ Comments that begin with _/**_ are used as the documentation string for the type
Occasionally, one will need to use a reserved language keyword as an identifier. In order to do so, backticks (`) may be used to escape the identifier. For example, to define a message with the literal name error, you may write:
```java
void `error`();
```
```
This syntax is allowed anywhere an identifier is expected.
### Annotations for Ordering and Namespaces
Expand All @@ -283,13 +285,13 @@ record MyRecord {
string @order("descending") myDescendingField;
string @order("ignore") myIgnoredField;
}
```
```
A field's type (with the exception of type references) may also be preceded by annotations, e.g.:
```java
record MyRecord {
@java-class("java.util.ArrayList") array<string> myStrings;
}
```
```
This can be used to support java classes that can be serialized/deserialized via their `toString`/`String constructor`, e.g.:
```java
record MyRecord {
Expand Down
15 changes: 13 additions & 2 deletions doc/content/en/docs/++version++/Specification/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ A file header is thus described by the following schema:
"fields" : [
{"name": "magic", "type": {"type": "fixed", "name": "Magic", "size": 4}},
{"name": "meta", "type": {"type": "map", "values": "bytes"}},
{"name": "sync", "type": {"type": "fixed", "name": "Sync", "size": 16}},
{"name": "sync", "type": {"type": "fixed", "name": "Sync", "size": 16}}
]
}
```
Expand All @@ -472,7 +472,18 @@ A file data block consists of:
* The serialized objects. If a codec is specified, this is compressed by that codec.
* The file's 16-byte sync marker.

Thus, each block's binary data can be efficiently extracted or skipped without deserializing the contents. The combination of block size, object counts, and sync markers enable detection of corrupt blocks and help ensure data integrity.
A file data block is thus described by the following schema:
```json
{"type": "record", "name": "org.apache.avro.file.DataBlock",
"fields" : [
{"name": "count", "type": "long"},
{"name": "data", "type": "bytes"},
{"name": "sync", "type": {"type": "fixed", "name": "Sync", "size": 16}}
]
}
```

Each block's binary data can be efficiently extracted or skipped without deserializing the contents. The combination of block size, object counts, and sync markers enable detection of corrupt blocks and help ensure data integrity.

### Required Codecs

Expand Down
1 change: 1 addition & 0 deletions doc/content/en/project/Credits/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Apache Avro's active committers are:
| sekikn | Kengo Seki | NTT Data | perl, interoperability | +9 |
| sharadag | Sharad Agarwal | InMobi | python | +5.5 |
| thiru | Thiruvalluvan M. G. | VertiCloud | java | +5.5 |
| tjwp | Tim Perkins | Shopify | ruby | -5 |
| tomwhite | Tom White | Cloudera | java | 0 |
-------------

Expand Down
2 changes: 1 addition & 1 deletion lang/c++/api/Reader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public:
union {
double d;
uint64_t i;
} v;
} v = { 0 };
reader_.read(v.i);
val = v.d;
}
Expand Down
2 changes: 1 addition & 1 deletion lang/c++/api/buffer/Buffer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public:
**/

size_type wroteTo(size_type size) {
int wrote = 0;
size_type wrote = 0;
if (size) {
if (size > freeSpace()) {
throw std::length_error("Impossible to write more data than free space");
Expand Down
Loading

0 comments on commit 1a7210e

Please sign in to comment.