Skip to content

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented Dec 29, 2021

No description provided.

@coderzc coderzc force-pushed the common_hg_output branch 2 times, most recently from 30f3d5a to 574eeb7 Compare December 29, 2021 09:14
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #175 (0f66658) into master (8308ffd) will decrease coverage by 0.14%.
The diff coverage is 72.09%.

Impacted file tree graph

@@ 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 
Impacted Files Coverage Δ
.../computer/core/output/hg/HugeGraphFloatOutput.java 0.00% <0.00%> (ø)
...h/computer/core/output/hg/HugeGraphLongOutput.java 0.00% <0.00%> (ø)
...computer/core/output/hg/HugeGraphStringOutput.java 0.00% <0.00%> (ø)
...ality/betweenness/BetweennessCentralityParams.java 100.00% <100.00%> (ø)
...entrality/closeness/ClosenessCentralityParams.java 100.00% <100.00%> (ø)
...ithm/centrality/degree/DegreeCentralityParams.java 100.00% <100.00%> (ø)
.../algorithm/centrality/pagerank/PageRankParams.java 100.00% <100.00%> (ø)
...omputer/algorithm/community/kcore/KcoreParams.java 100.00% <100.00%> (ø)
...ph/computer/algorithm/community/lpa/LpaParams.java 100.00% <100.00%> (ø)
...gorithm/community/trianglecount/TriangleCount.java 89.58% <100.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8308ffd...0f66658. Read the comment docs.

@coderzc coderzc changed the title add common hugegraph output implement refactor: add common hugegraph output implement and add writeType config Dec 29, 2021
@coderzc coderzc changed the title refactor: add common hugegraph output implement and add writeType config refactor: add common hugegraph output implement and writeType config Dec 29, 2021
ValueMinCombiner.class.getName());
this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
LimitedLogOutput.class.getName());
IdHugeGraphOutput.class.getName());
Copy link
Contributor

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());
Copy link
Contributor

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());
Copy link
Contributor

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.",
Copy link
Contributor

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() {
Copy link
Contributor

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();
}
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

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

@coderzc coderzc requested a review from javeme January 4, 2022 06:31
javeme
javeme previously approved these changes Jan 11, 2022

public static class ClosenessWithWeightPropertyTestOutput
extends DoubleHugeGraphOutput {
extends HugeGraphDoubleOutput {
Copy link
Contributor

Choose a reason for hiding this comment

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

align with class

Comment on lines 46 to 47
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE,
WriteType.OLAP_RANGE.name());
Copy link
Member

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

Comment on lines 45 to 46
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE,
WriteType.OLAP_RANGE.name());
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Comment on lines 48 to 49
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE,
WriteType.OLAP_RANGE.name());
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Comment on lines 47 to 48
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE,
WriteType.OLAP_RANGE.name());
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Comment on lines 43 to 44
this.setIfAbsent(params, ComputerOptions.OUTPUT_RESULT_WRITE_TYPE,
WriteType.OLAP_RANGE.name());
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Comment on lines 133 to 134
public static class BetweennessCentralityTestOutput
extends BetweennessCentralityOutput {
extends HugeGraphDoubleOutput {
Copy link
Member

Choose a reason for hiding this comment

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

align with class

@javeme javeme merged commit 0ae7fea into master Jan 14, 2022
@javeme javeme deleted the common_hg_output branch January 14, 2022 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants