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
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v5

- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '11'
java-version: '21'
distribution: 'zulu'
cache: maven

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# Install library dependencies before actually building source.
# This caches libraries into an image layer that can be reused when only source code has changed.

FROM azul/zulu-openjdk-debian:11 as build_environment
FROM azul/zulu-openjdk-debian:21 as build_environment
LABEL maintainer="Forrest Collman <forrestc@alleninstitute.org>, Eric Trautman <trautmane@janelia.hhmi.org>"

RUN apt-get update && apt-get install -y maven
Expand Down Expand Up @@ -85,7 +85,7 @@ RUN mkdir -p /root/render-lib && \
# Once web service application is built, set up jetty server and deploy application to it.

# NOTE: jetty version should be kept in sync with values in render/render-ws/pom.xml and render/render-ws/src/main/scripts/install.sh
FROM jetty:10.0.13-jre11 as render-ws
FROM jetty:10.0.26-jre21 as render-ws

# add packages not included in base image:
# curl and coreutils are always needed for gnu readlink, tzdata is needed to set timezone
Expand Down
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>modules-root</artifactId>
<groupId>org.janelia.render</groupId>
<version>4.3.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>

<name>Render Documents</name>
Expand Down
13 changes: 8 additions & 5 deletions docs/src/site/markdown/how-to/how-to-local-spark-intellij.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How To: Run Spark Locally in IntelliJ

It can be useful to run and test render spark clients within an IDE
[using a local master URL](https://spark.apache.org/docs/3.4.1/submitting-applications.html#master-urls). Unfortunately
[using a local master URL](https://spark.apache.org/docs/4.0.4/submitting-applications.html#master-urls). Unfortunately
because we need to exclude spark libraries from the render-ws-spark-client fat jar, you'll need to add a
few extra settings to your IntelliJ run configuration to get spark clients to run within the IDE.

Expand All @@ -10,7 +10,7 @@ few extra settings to your IntelliJ run configuration to get spark clients to ru
The hadoop client runtime library is required to run spark locally. If you don't already have it in a local directory,
an easy way to install it is to:
- Comment out the library's exclusion block in the
[render-ws-spark-client pom.xml](../../../../../render-ws-spark-client/pom.xml#L213-L216):
[render-ws-spark-client pom.xml](../../../../../render-ws-spark-client/pom.xml#L267-L270):
```
<!--
<exclusion>
Expand All @@ -21,10 +21,10 @@ an easy way to install it is to:
```
- Run `mvn compile` to pull the library into your local .m2/repository. The compilation will fail because of
the enforcer no-duplicate-classes rule, but the jar will get pulled.
- Once `${HOME}/.m2/repository/org/apache/hadoop/hadoop-client-runtime/3.3.4/hadoop-client-runtime-3.3.4.jar` exists,
- Once `${HOME}/.m2/repository/org/apache/hadoop/hadoop-client-runtime/3.4.1/hadoop-client-runtime-3.4.1.jar` exists,
restore the pom.xml file to its original state by uncommenting the exclusion.

The local hadoop-client-runtime-3.3.4.jar path can then be referenced in all IntelliJ run configurations
The local hadoop-client-runtime-3.4.1.jar path can then be referenced in all IntelliJ run configurations
that use spark. This means you'll only need to do this install process once unless you change spark versions
or clean out your local `${HOME}/.m2/repository`.

Expand All @@ -44,10 +44,13 @@ Select the run drop-down menu and click Edit Configurations...

Then make the following changes to the run configuration (and save the changes):
- A: Add `SPARK_LOCAL_IP=127.0.0.1` to the environment variables so that runs will work when you are connected via VPN.
Also make sure the configuration's JDK is 21: spark 4 supports java 17 and 21 only, and on java 24+ every
spark client dies in `new JavaSparkContext(...)` with `UnsupportedOperationException: getSubject is not supported`
(hadoop's `UserGroupInformation` uses the security manager API that JEP 486 removed).
- B: Select the `Modify options` drop-down menu.
- C: Select `Modify classpath`.
- D: Select `Add dependencies with "provided" scope to classpath` and close the drop-down menu.
- E: Click the `+` button below `Modify classpath:` and use the dialog to add the hadoop-client-runtime-3.3.4.jar
- E: Click the `+` button below `Modify classpath:` and use the dialog to add the hadoop-client-runtime-3.4.1.jar
path from your local .m2/repository. This can be a little tricky on Macs because the .m2 directory is usually
hidden from Finder windows. On Macs you can use `⌘⇧.` to reveal dot files or use `⌘⇧G` to open a
Go dialog and paste in a path.
Expand Down
42 changes: 25 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<name>Janelia Render Tools And Services</name>
<groupId>org.janelia.render</groupId>
<artifactId>modules-root</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>

<description>A collection of tools and HTTP services (APIs) for rendering transformed image tiles.</description>
<url>https://github.com/saalfeldlab/render</url>
Expand Down Expand Up @@ -150,18 +150,13 @@
-->
<n5-version>4.0.1</n5-version>

<!-- pom-scijava 45 bumps Descriptor_based_registration to 3.0.1, whose SPIM_Registration replacement
(net.preibisch:multiview-reconstruction) drops the point-descriptor / DoG API render's geometric
descriptor matcher is built on (mpicbg.pointdescriptor.matcher.*, mpicbg.spim.segmentation.*). Porting
that matcher is a separate effort, so keep the 2.x line reactor-wide (render-app also pins 2.1.3). -->
<Descriptor_based_registration.version>2.1.3</Descriptor_based_registration.version>

<!-- pom-scijava 45 bumps Stitching_ to 3.1.10, which is compiled for JDK 21 and trips the
EnforceBytecodeVersion enforcer rule (render targets JDK 11). Keep 3.1.9 (pom-scijava 39's version,
JDK 8 bytecode); render only uses stable mpicbg.stitching.* / stitching.* APIs. -->
<Stitching.version>3.1.9</Stitching.version>

<jackson-version>2.14.3</jackson-version> <!-- NOTE: 2.15.3 causes NullPointerException in maven enforcer plugin -->
<!--
Keep this in sync with the jackson version bundled with the spark version in
render-ws-spark-client/pom.xml: spark refuses to start when its jackson-module-scala does not
match the jackson-databind on the classpath. Overriding pom-scijava's jackson.version keeps
jackson-databind, jackson-core, jackson-annotations and jackson-jaxrs-json-provider aligned with each other.
-->
<jackson.version>2.18.6</jackson.version>

<swagger-version>1.6.2</swagger-version>

Expand All @@ -173,9 +168,9 @@
<license.licenseName>gpl_v2</license.licenseName>
<license.copyrightOwners>Howard Hughes Medical Institute</license.copyrightOwners>

<!-- Override JDK 8 settings in pom-scijava-base now that Jetty 10 has forced us to JDK 11 -->
<scijava.jvm.version>11</scijava.jvm.version>
<scijava.jvm.build.version>[11,]</scijava.jvm.build.version>
<!-- render targets JDK 21; try to not lag behind scijava too much -->
<scijava.jvm.version>21</scijava.jvm.version>
<scijava.jvm.build.version>[21,]</scijava.jvm.build.version>

<!-- only print test summaries for failures and avoid warnings for skipped tests -->
<surefire.printSummary>false</surefire.printSummary>
Expand All @@ -189,7 +184,20 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
<release>21</release>
<!--
Render has no annotation processors of its own and no scijava annotations
(no @Plugin, no org.scijava.annotations usage), but scijava-common puts
org.scijava.annotations.AnnotationProcessor on the class path where javac
discovers it automatically. That processor still declares
@SupportedSourceVersion(SourceVersion.RELEASE_8) as of scijava-common 2.100.1,
so every module compile prints:
[WARNING] Supported source version 'RELEASE_8' from annotation processor
'org.scijava.annotations.AnnotationProcessor' less than -source '21'
That warning is not covered by -Xlint:processing, so turn processing off
instead. Remove this if render ever needs a compile time annotation processor.
-->
<proc>none</proc>
</configuration>
</plugin>
<plugin>
Expand Down
7 changes: 3 additions & 4 deletions render-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.janelia.render</groupId>
<artifactId>modules-root</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>

<name>Render Application</name>
Expand Down Expand Up @@ -164,11 +164,11 @@
<artifactId>n5-hdf5</artifactId>
</dependency>

<!-- Use older version of jackson to keep consistent with render-ws jackson-jaxrs-json-provider version. -->
<!-- Version comes from the jackson.version property in the root pom, which keeps jackson-databind
in sync with jackson-core, jackson-annotations and the jaxrs provider. -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>

<!-- Dependencies not defined in SciJava -->
Expand All @@ -182,7 +182,6 @@
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>Descriptor_based_registration</artifactId>
<version>2.1.3</version>
<exclusions>
<!-- filter out slf4j jar so that it does not conflict with jetty version -->
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import mpicbg.imglib.type.numeric.real.FloatType;
import mpicbg.models.Model;
import mpicbg.models.PointMatch;
import mpicbg.pointdescriptor.matcher.Matcher;
import mpicbg.pointdescriptor.matcher.SubsetMatcher;
import net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher;
import net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.SubsetMatcher;
import mpicbg.util.Timer;

import org.janelia.alignment.match.parameters.GeometricDescriptorParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.io.Serializable;
import java.util.Objects;

import mpicbg.spim.segmentation.InteractiveDoG;
import net.preibisch.mvrecon.fiji.plugin.interestpointdetection.interactive.HelperFunctions;

import plugin.DescriptorParameters;

Expand Down Expand Up @@ -149,7 +149,7 @@ public DescriptorParameters toDescriptorParameters() {
dp.redundancy = redundancy;
dp.significance = significance;
dp.sigma1 = sigma;
dp.sigma2 = InteractiveDoG.computeSigma2(sigma.floatValue(), InteractiveDoG.standardSensitivity );
dp.sigma2 = HelperFunctions.computeSigma2(sigma, 4); // 4 = former InteractiveDoG.standardSensitivity
dp.threshold = threshold;
dp.localization = localization.code;
dp.lookForMinima = lookForMinima;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import mpicbg.imglib.type.numeric.real.FloatType;
import mpicbg.models.Model;
import mpicbg.models.PointMatch;
import mpicbg.pointdescriptor.matcher.Matcher;
import net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import mpicbg.models.AffineModel2D;
import mpicbg.models.Point;
import mpicbg.models.PointMatch;
import mpicbg.spim.io.IOFunctions;
import net.preibisch.legacy.io.IOFunctions;
import mpicbg.trakem2.transform.TransformMeshMappingWithMasks.ImageProcessorWithMasks;

import org.janelia.alignment.RenderParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ public void testJsonProcessing() {
final Map.Entry<Integer, ImageAndMask> firstMipMap = tileSpec.getFirstMipmapEntry();
Assert.assertNotNull("first mipmap entry is null", firstMipMap);
Assert.assertEquals("mipmap sorting failed, unexpected first entry returned",
new Integer(0), firstMipMap.getKey());
Integer.valueOf(0), firstMipMap.getKey());

final ChannelSpec channelSpec = tileSpec.getAllChannels().get(0);
final ChannelSpec channelSpec = tileSpec.getAllChannels().getFirst();

Map.Entry<Integer, ImageAndMask> floorMipMap = channelSpec.getFloorMipmapEntry(3);
Assert.assertNotNull("floor 3 mipmap entry is null", floorMipMap);
Assert.assertEquals("invalid key for floor 3 mipmap entry",
new Integer(3), floorMipMap.getKey());
Integer.valueOf(3), floorMipMap.getKey());

floorMipMap = channelSpec.getFloorMipmapEntry(4);
Assert.assertNotNull("floor 4 mipmap entry is null", floorMipMap);
Assert.assertEquals("invalid key for floor 3 mipmap entry",
new Integer(3), floorMipMap.getKey());
Integer.valueOf(3), floorMipMap.getKey());

final FilterSpec filterSpec = channelSpec.getFilterSpec();
Assert.assertNotNull("filterSpec is null", filterSpec);
Expand Down
4 changes: 2 additions & 2 deletions render-ws-java-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# so I switched to use the same zulu image used for the final image
# rather than try to debug alpine issues.

FROM azul/zulu-openjdk-debian:11 as builder
FROM azul/zulu-openjdk-debian:21 as builder

RUN apt-get update && apt-get install -y git maven

Expand All @@ -34,7 +34,7 @@ RUN git clone --branch $GIT_TAG https://github.com/saalfeldlab/render.git . \
# ---------------------------------------------------------------------
# Stage 2: Create slimmed down final image that only contains client jar and scripts.

FROM azul/zulu-openjdk-debian:11
FROM azul/zulu-openjdk-debian:21

# ARGs need to be re-declared for each stage in multi-stage builds - who knew?
ARG GIT_COMMIT
Expand Down
8 changes: 4 additions & 4 deletions render-ws-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>modules-root</artifactId>
<groupId>org.janelia.render</groupId>
<version>4.3.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>

<name>Render Web Service Java Client</name>
Expand Down Expand Up @@ -111,7 +111,7 @@
</excludes>
</filter>
<filter>
<artifact>sc.fiji:SPIM_Registration</artifact>
<artifact>net.preibisch:multiview-reconstruction</artifact>
<excludes>
<exclude>META-INF/json/**</exclude>
</excludes>
Expand Down Expand Up @@ -270,11 +270,11 @@
<version>${n5-version}</version>
</dependency>

<!-- Use older version of jackson to keep consistent with render-ws jackson-jaxrs-json-provider version. -->
<!-- Version comes from the jackson.version property in the root pom, which keeps jackson-databind
in sync with jackson-core, jackson-annotations and the jaxrs provider. -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>

<!-- Dependencies not defined in SciJava -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void runClient(final String[] args)
client.setUpDerivedStack();

for (final String z : parameters.zValues) {
client.fixStackDataForZ(new Double(z));
client.fixStackDataForZ(Double.valueOf(z));
}

if (parameters.completeTargetStack) {
Expand Down Expand Up @@ -128,7 +128,7 @@ private FixMaskClient(final Parameters parameters)
.filter(path -> path.toString().endsWith(".png"))
.forEach(path -> fixedMaskNamesToUrls.put(path.getFileName().toString(), "file:" + path));

if (this.fixedMaskNamesToUrls.size() == 0) {
if (this.fixedMaskNamesToUrls.isEmpty()) {
throw new IOException(fixedMasksDirectoryPath + " does not contain any fixed .png mask files");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void run()
// Z,Max PM Residual,Tile 1,Tile 2,PM X,PM Y,Mean Tile Pair Residual Is Outlier
final String[] v = line.split(",");
if (v.length > 3) {
final Double z = new Double(v[0]);
final Double z = Double.valueOf(v[0]);
if ((zValues == null) || (zValues.contains(z))) {
final List<OutlierPair> pairList =
zToOutlierPairsMap.computeIfAbsent(z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void cloneStackVersion()
if (parameters.zValues != null) {
zValues = new ArrayList<>(parameters.zValues.size());
for (final String zString : parameters.zValues) {
zValues.add(new Double(zString));
zValues.add(Double.valueOf(zString));
}
}

Expand Down Expand Up @@ -304,9 +304,9 @@ private void deleteStack()
renderDataClient.deleteStackSection(stack, parameters.sectionId);
}
} else {
Double z;
double z;
for (final String zString : parameters.zValues) {
z = new Double(zString);
z = Double.parseDouble(zString);
renderDataClient.deleteStack(stack, z);
}
if (parameters.sectionId != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static class Parameters extends CommandLineParameters {
public String roughMatchCollection;

public String getTargetStack() {
if ((targetStack == null) || (targetStack.trim().length() == 0)) {
if ((targetStack == null) || (targetStack.trim().isEmpty())) {
targetStack = stack;
}
return targetStack;
Expand Down Expand Up @@ -147,7 +147,7 @@ private TerraceLayersClient(final Parameters parameters)
this.sourceRenderDataClient = parameters.renderWeb.getDataClient();

if ((parameters.targetProject == null) ||
(parameters.targetProject.trim().length() == 0) ||
(parameters.targetProject.trim().isEmpty()) ||
(parameters.targetProject.equals(parameters.renderWeb.project))) {
this.targetRenderDataClient = sourceRenderDataClient;
} else {
Expand Down Expand Up @@ -254,14 +254,14 @@ private void mapMinCoordinatesByConnectedCluster(final List<Double> sortedZs,
for (final Set<String> connectedGroupIdSet : connectedGroupIdSets) {
Bounds connectedBounds = null;
for (final String groupId : connectedGroupIdSet) {
final Double z = new Double(groupId);
final Double z = Double.valueOf(groupId);
final Bounds layerBounds = zToBoundsMap.get(z);
connectedBounds = connectedBounds == null ? layerBounds : connectedBounds.union(layerBounds);
connectedLayerCount++;
}

for (final String groupId : connectedGroupIdSet) {
final Double z = new Double(groupId);
final Double z = Double.valueOf(groupId);
zToBoundsMap.put(z, connectedBounds);
zToMinCoordinateMap.put(z, minCoordinate);
}
Expand Down
Loading
Loading