Skip to content

Conversation

@scxwhite
Copy link
Contributor

Tips

What is the purpose of the pull request

This pull request adds thread factory in BoundedInMemoryExecutor.

Under the old code, we could not clearly distinguish the role of each thread in the thread dump during the data merging phase of the MOR table. So I added a CustomizedThreadFactory class. And added a thread pool factory name that can be used to identify the role of the thread for BoundedInMemoryExecutor.

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@scxwhite
Copy link
Contributor Author

@hudi-bot run azure

@nsivabalan nsivabalan requested a review from leesf March 1, 2022 23:47
@nsivabalan
Copy link
Contributor

@leesf : Can you help w/ reviewing this patch please

@nsivabalan nsivabalan added the priority:high Significant impact; potential bugs label Mar 1, 2022
import java.util.concurrent.atomic.AtomicLong;

/**
* A factory to named thread
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, I am a little confused about the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about "A thread factory for custom creation of threads" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@scxwhite A thread factory for creation of threads should be ok, and would you please create a jira ticket and change the PR title accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@leesf done.


// Executor service used for launching writer thread.
private final ExecutorService executorService;
// Executor service used for launching read thread.
Copy link
Contributor

Choose a reason for hiding this comment

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

producerExecutorService should be write thread and consumerExecutorService should be read thread?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm careless, I'll change it

@scxwhite scxwhite requested a review from leesf March 3, 2022 02:45
@scxwhite scxwhite changed the title add thread factory in BoundedInMemoryExecutor [HUDI-3566]add thread factory in BoundedInMemoryExecutor Mar 7, 2022
@scxwhite
Copy link
Contributor Author

scxwhite commented Mar 7, 2022

@hudi-bot run azure

@scxwhite
Copy link
Contributor Author

scxwhite commented Mar 8, 2022

@leesf please review again.

}

@Test
public void defaultThreadPrefixTest() throws ExecutionException, InterruptedException {
Copy link
Contributor

Choose a reason for hiding this comment

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

here please use testDefaultThreadPrefix

}

@Test
public void daemonThreadTest() throws ExecutionException, InterruptedException {
Copy link
Contributor

Choose a reason for hiding this comment

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

testDaemonThread

@scxwhite
Copy link
Contributor Author

scxwhite commented Mar 9, 2022

@hudi-bot run azure

@scxwhite
Copy link
Contributor Author

scxwhite commented Mar 9, 2022

@hudi-bot run azure

@hudi-bot
Copy link
Collaborator

hudi-bot commented Mar 9, 2022

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@scxwhite scxwhite requested a review from leesf March 10, 2022 01:59
@leesf leesf merged commit faed699 into apache:master Mar 11, 2022
vingov pushed a commit to vingov/hudi that referenced this pull request Apr 3, 2022
stayrascal pushed a commit to stayrascal/hudi that referenced this pull request Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high Significant impact; potential bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants