Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FFM-8840] - Remove Google Guava libraries, part #1 #159

Merged
merged 6 commits into from
Aug 31, 2023

Conversation

andybharness
Copy link
Contributor

@andybharness andybharness commented Aug 25, 2023

FFM-8840 - Remove Google Guava libraries

What
part #1: Removes AtomicLongMap and mapdb
This PR will remove Google Guava from the SDK, including the following imports from every class file:

import com.google.common.collect.Maps;
import com.google.common.util.concurrent.AbstractScheduledService;
import com.google.common.util.concurrent.AtomicLongMap;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import static com.google.common.io.Files.fileTraverser;
import static com.google.common.util.concurrent.Service.State.*;
import static com.google.common.util.concurrent.Service.State.RUNNING;

Alternative implementations will be provided.
org.mapdb:mapdb will also be removed since this bring in Guava as well. This is only used by FileMapStore.

Why
Guava has a large footprint of around ~2MB with no ability to only import the features we need. This can cause problems for certain environments where class size is limited (Lambda). It can also bring in a lot of unwanted dependencies into the customer's classpath. We aim to make the SDKs as slim and non-intrusive as possible.

Testing
Unit testing, testgrid and manual

What
This PR will remove Google Guava from the SDK, including the following imports from every class file:

import com.google.common.collect.Maps;
import com.google.common.util.concurrent.AbstractScheduledService;
import com.google.common.util.concurrent.AtomicLongMap;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import static com.google.common.io.Files.fileTraverser;
import static com.google.common.util.concurrent.Service.State.*;
import static com.google.common.util.concurrent.Service.State.RUNNING;

Alternative implementations will be provided

Why
Guava has a large footprint of around ~2MB with no ability to only import the features we need. This can cause
problems for certain environments where class size is limited (Lambda). It can also bring in a lot of unwanted
dependencies into the customer's classpath. We aim to make the SDKs as slim and non-intrusive as possible.

Testing
Unit testing, testgrid and manual
@andybharness andybharness changed the title [FFM-8840] - Remove Google Guava libraries [FFM-8840] - Remove Google Guava libraries, part #1 Aug 30, 2023
@andybharness andybharness marked this pull request as ready for review August 30, 2023 12:41
Copy link
Contributor

@ribeirophillipe ribeirophillipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see comments

@andybharness andybharness merged commit f30efad into main Aug 31, 2023
5 checks passed
@andybharness andybharness deleted the FFM-8840-remove-guava branch October 17, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants