Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions .github/workflows/maven-full-its.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

# This workflow will build a Java project with Maven
# See also:
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#fromjson

Expand All @@ -45,14 +44,14 @@ jobs:
fastbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.buildRef }}
- name: Set up JDK 17
uses: actions/setup-java@v4
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
java-version: 21
cache: 'maven'
- name: Show the first log message
run: git log -n1
Expand All @@ -68,7 +67,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.CUSTOM_MATRIX }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.buildRef }}
- id: set-matrix
Expand All @@ -82,14 +81,14 @@ jobs:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.buildRef }}
- name: Set up JDK 17
uses: actions/setup-java@v4
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
java-version: 21
cache: 'maven'
- name: Override DNS to fix IP address for hostname
run: |
Expand All @@ -113,21 +112,21 @@ jobs:
MAVEN_OPTS: -Djansi.force=true
- name: Upload unit test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: surefire-reports-${{ matrix.profile.name }}
path: ./**/target/surefire-reports/
if-no-files-found: ignore
- name: Upload integration test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: failsafe-reports-${{ matrix.profile.name }}
path: ./**/target/failsafe-reports/
if-no-files-found: ignore
- name: Upload mini test logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: mini-tests-logs-${{ matrix.profile.name }}
path: ./**/target/**/mini-tests/**/logs/
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/maven-on-demand.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#

# This workflow will build a Java project with Maven
# See also:
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events

name: Manual Build

Expand Down Expand Up @@ -62,14 +59,14 @@ jobs:
name: mvn (triggered by ${{ github.event.sender.login }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.buildRef }}
- name: Set up JDK 17
uses: actions/setup-java@v4
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
java-version: 21
cache: 'maven'
- name: Show the first log message
run: git log -n1
Expand All @@ -95,21 +92,21 @@ jobs:
MAVEN_OPTS: -Djansi.force=true
- name: Upload unit test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: surefire-reports
path: ./**/target/surefire-reports/
if-no-files-found: ignore
- name: Upload integration test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: failsafe-reports
path: ./**/target/failsafe-reports/
if-no-files-found: ignore
- name: Upload mini test logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: mini-tests-logs
path: ./**/target/**/mini-tests/**/logs/
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#

# This workflow will build a Java project with Maven
# See also:
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: QA

Expand All @@ -37,12 +35,12 @@ jobs:
fastbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
java-version: 21
cache: 'maven'
- name: Show the first log message
run: git log -n1
Expand All @@ -65,16 +63,16 @@ jobs:
strategy:
matrix:
profile:
- {name: 'unit-tests', javaver: 17, args: 'verify -PskipQA -DskipTests=false'}
- {name: 'qa-checks', javaver: 17, args: 'verify javadoc:jar -Psec-bugs -DskipTests -Dspotbugs.timeout=3600000'}
- {name: 'compat', javaver: 17, args: 'package -DskipTests -Dversion.hadoop=3.0.3 -Dversion.zookeeper=3.5.10'}
- {name: 'errorprone', javaver: 17, args: 'verify -Derrorprone -PskipQA'}
- {name: 'unit-tests', javaver: 21, args: 'verify -PskipQA -DskipTests=false'}
- {name: 'qa-checks', javaver: 21, args: 'verify javadoc:jar -Psec-bugs -DskipTests -Dspotbugs.timeout=3600000'}
- {name: 'compat', javaver: 21, args: 'package -DskipTests -Dversion.hadoop=3.0.3 -Dversion.zookeeper=3.5.10'}
- {name: 'errorprone', javaver: 21, args: 'verify -Derrorprone -PskipQA'}
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.profile.javaver }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.profile.javaver }}
Expand All @@ -101,21 +99,21 @@ jobs:
MAVEN_OPTS: -Djansi.force=true
- name: Upload unit test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: surefire-reports-${{ matrix.profile.name }}
path: ./**/target/surefire-reports/
if-no-files-found: ignore
- name: Upload integration test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: failsafe-reports-${{ matrix.profile.name }}
path: ./**/target/failsafe-reports/
if-no-files-found: ignore
- name: Upload mini test logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: mini-tests-logs-${{ matrix.profile.name }}
path: ./**/target/**/mini-tests/**/logs/
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#

# This workflow will build a Java project with Maven
# See also:
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: ScriptQA

Expand Down
5 changes: 0 additions & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void process(WatchedEvent event) {
*/
static ZooKeeper connect(String host, int timeout, String scheme, byte[] auth, Watcher watcher) {
final int TIME_BETWEEN_CONNECT_CHECKS_MS = 100;
int connectTimeWait = Math.min(10_000, timeout);
long connectTimeWait = Math.min(10_000, timeout);
boolean tryAgain = true;
long sleepTime = 100;
ZooKeeper zooKeeper = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@
public class Authorizations implements Iterable<byte[]>, Serializable, AuthorizationContainer {

private static final long serialVersionUID = 1L;
private static final Set<ByteSequence> EMPTY_AUTH_SET = Collections.emptySet();
private static final List<byte[]> EMPTY_AUTH_LIST = Collections.emptyList();

private final Set<ByteSequence> auths;
private final List<byte[]> authsList; // sorted order
private final HashSet<ByteSequence> auths; // type must be serializable
private final ArrayList<byte[]> authsList; // sorted order; type must be serializable

/**
* An empty set of authorizations.
Expand Down Expand Up @@ -103,21 +101,12 @@ private void checkAuths() {
}
}

private static Set<ByteSequence> createInternalSet(int size) {
if (size < 1) {
return EMPTY_AUTH_SET;
} else {
return new HashSet<>(size);
}
private static HashSet<ByteSequence> createInternalSet(int size) {
return new HashSet<>(size);
}

private static List<byte[]> createInternalList(int size) {
if (size < 1) {
return EMPTY_AUTH_LIST;
} else {
return new ArrayList<>(size);
}

private static ArrayList<byte[]> createInternalList(int size) {
return new ArrayList<>(size);
}

/**
Expand Down Expand Up @@ -195,8 +184,8 @@ public Authorizations(byte[] authorizations) {
this.authsList = createInternalList(parts.length);
setAuthorizations(parts);
} else {
this.auths = EMPTY_AUTH_SET;
this.authsList = EMPTY_AUTH_LIST;
this.auths = createInternalSet(0);
this.authsList = createInternalList(0);
}
}
}
Expand All @@ -207,8 +196,8 @@ public Authorizations(byte[] authorizations) {
* @see #Authorizations(String...)
*/
public Authorizations() {
this.auths = EMPTY_AUTH_SET;
this.authsList = EMPTY_AUTH_LIST;
this.auths = createInternalSet(0);
this.authsList = createInternalList(0);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,20 @@ void checkBalance() {

Map<String,Integer> expectedCounts = new HashMap<>();

int totalExtra = 0;
long totalExtra = 0;
for (String group : groupCounts.keySet()) {
long groupCount = groupCounts.get(group);
totalExtra += groupCount % tservers.size();
expectedCounts.put(group, (int) (groupCount / tservers.size()));
}

// The number of extra tablets from all groups that each tserver must have.
int expectedExtra = totalExtra / tservers.size();
int maxExtraGroups = expectedExtra + ((totalExtra % tservers.size() > 0) ? 1 : 0);
long expectedExtra = totalExtra / tservers.size();
long maxExtraGroups = expectedExtra + ((totalExtra % tservers.size() > 0) ? 1 : 0);

for (Entry<TabletServerId,MapCounter<String>> entry : tserverGroupCounts.entrySet()) {
MapCounter<String> tgc = entry.getValue();
int tserverExtra = 0;
long tserverExtra = 0;
for (String group : groupCounts.keySet()) {
assertTrue(tgc.get(group) >= expectedCounts.get(group));
assertTrue(tgc.get(group) <= expectedCounts.get(group) + 1,
Expand Down
5 changes: 0 additions & 5 deletions minicluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Loading