apache / apache/beam

Move class InMemoryBundleFinalizer into package org.apache.beam.runners.direct

Open
#23,896 0 comments 0 reactions 0 assignees View on GitHub
bug core P3 runners
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What happened?

Hi, @robertwb

**Issue Description**

Package **_org.apache.beam.runners.core_** is a promiscuous package, and groups together miscellaneous functionalities that might be useful to different subsystems. The package structure violates the “high cohesion and low coupling” design rules. I found that Class **_InMemoryBundleFinalizer_** is not used by classes in their package. The project has grown larger, leading to becoming increasingly hard to maintain. During the development process, one groups together classes (that often co-change) with similar responsibilities in one package to facilitate maintenance, which prevents a change that causes other packages to be modified. For example, if one modifies package **_org.apache.beam.runners.core_** (i.e., package rename), resulting in multiple classes of package **_org.apache.beam.runners.direct_** to be changed.

Location: The source file can be found at path File runners/core-java/src/main/java/org/apache/beam/runners/core

**Refactoring suggestions**

I suggest to move class **_InMemoryBundleFinalizer_** into package **_org.apache.beam.runners.direct_**.

![InMemoryBundleFinalizer-java](https://user-images.githubusercontent.com/29889989/198819488-789742cf-71ce-43c3-8b1a-98f1a1bd1f44.png)

### Issue Priority

Priority: 3

### Issue Component

Component: runner-core

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.