asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <>
Subject Change in asterixdb[master]: Remove Server Context
Date Sat, 29 Oct 2016 17:25:48 GMT
Yingyi Bu has posted comments on this change.

Change subject: Remove Server Context

Patch Set 1:

(1 comment)

I like various context classes.

At the high level, it provides:

(1)  a facet for separating concerns and modularizing code.  For example, AqlMetadataProvider
is an example that lacks those, which deserves more refactoring.

(2)  extensibility.  If you want to pass more things to a calling client, you just need to
pass the context, instead of every individual parameters.  If tomorrow you want to add things,
add things to the context and no interface (contract) will need to change.  That's also why
SonarQube warns us if we pass more parameters to a method.
File hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/application/

Line 39:     public ApplicationContext(File baseDir, IApplicationConfig appConfig, ThreadFactory
threadFactory) {
Passing a serverCtx is easier to extend.

For example, if tomorrow you need to additional things into the class, you don't need to add
additional parameters.  So as other interfaces if any.

Again, maybe it's under utilized, but the design was well conceived.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I4261cf44410b498e84ffcac5e217281a306a7f03
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <>
Gerrit-Reviewer: Jenkins <>
Gerrit-Reviewer: Michael Blow <>
Gerrit-Reviewer: Till Westmann <>
Gerrit-Reviewer: Yingyi Bu <>
Gerrit-Reviewer: abdullah alamoudi <>
Gerrit-HasComments: Yes

View raw message