- Notifications
You must be signed in to change notification settings - Fork 44
refactor: add common hugegraph output implement and writeType config #175
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
Conversation
30f3d5a
to 574eeb7
Compare 574eeb7
to 9dff0aa
Compare Codecov Report
@@ Coverage Diff @@ ## master #175 +/- ## ============================================ - Coverage 87.32% 87.18% -0.15% + Complexity 3058 3057 -1 ============================================ Files 324 325 +1 Lines 11465 11478 +13 Branches 995 995 ============================================ - Hits 10012 10007 -5 - Misses 983 1001 +18 Partials 470 470
Continue to review full report at Codecov.
|
ValueMinCombiner.class.getName()); | ||
this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, | ||
LimitedLogOutput.class.getName()); | ||
IdHugeGraphOutput.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer HugeGraphIdOutput
BetweennessMessage.class.getName()); | ||
this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, | ||
BetweennessCentralityOutput.class.getName()); | ||
DoubleHugeGraphOutput.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer HugeGraphDoubleOutput
TriangleCountValue.class.getName()); | ||
this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, | ||
TriangleCountOutput.class.getName()); | ||
IntHugeGraphOutput.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
public static final ConfigOption<String> OUTPUT_RESULT_WRITE_TYPE = | ||
new ConfigOption<>( | ||
"output.result_write_type", | ||
"The value is write-type of result output to hugegraph.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result write-type to output to hugegraph, allowed values are: [xx].
return value; | ||
} | ||
| ||
public WriteType writeType() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set protected
.writeType(this.writeType()) | ||
.ifNotExist() | ||
.create(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a class HugeGraphDefaultOutput, and use switch-cache to create schema according to result value class option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to make the code unclear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, there are pros and cons.
pros: can use an unique output class instead of adding a new output class for each value type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moreover, this way is unable to process CustomizeValue
f302422
to 84d328f
Compare 84d328f
to 2988973
Compare | ||
public static class ClosenessWithWeightPropertyTestOutput | ||
extends DoubleHugeGraphOutput { | ||
extends HugeGraphDoubleOutput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align with class
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE, | ||
WriteType.OLAP_RANGE.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OLAP_COMMON
is better, user can set OLAP_RANGE
if they need
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE, | ||
WriteType.OLAP_RANGE.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE, | ||
WriteType.OLAP_RANGE.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE, | ||
WriteType.OLAP_RANGE.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE, | ||
WriteType.OLAP_RANGE.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
public static class BetweennessCentralityTestOutput | ||
extends BetweennessCentralityOutput { | ||
extends HugeGraphDoubleOutput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align with class
No description provided.