Skip to content

Conversation

Linary
Copy link
Contributor

@Linary Linary commented Sep 15, 2021

No description provided.

@Linary Linary force-pushed the closeness branch 5 times, most recently from a777aeb to c0beafd Compare September 28, 2021 06:37
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #104 (795697e) into master (77ea9aa) will decrease coverage by 0.15%.
The diff coverage is 78.30%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #104 +/- ## ============================================ - Coverage 87.50% 87.35% -0.16%  - Complexity 2933 2988 +55  ============================================ Files 308 314 +6 Lines 10999 11195 +196 Branches 941 964 +23 ============================================ + Hits 9625 9779 +154  - Misses 929 957 +28  - Partials 445 459 +14 
Impacted Files Coverage Δ
...ugegraph/computer/core/graph/value/FloatValue.java 96.87% <0.00%> (-3.13%) ⬇️
...hugegraph/computer/core/graph/value/LongValue.java 96.87% <0.00%> (-3.13%) ⬇️
...idu/hugegraph/computer/core/graph/value/Value.java 78.57% <0.00%> (-6.05%) ⬇️
.../baidu/hugegraph/computer/core/util/CoderUtil.java 57.14% <ø> (ø)
...du/hugegraph/computer/core/worker/Computation.java 100.00% <ø> (ø)
...ugegraph/computer/core/config/ComputerOptions.java 100.00% <ø> (ø)
.../hugegraph/computer/core/io/StructGraphOutput.java 85.29% <ø> (ø)
...ugegraph/computer/k8s/driver/KubernetesDriver.java 86.94% <ø> (ø)
...algorithm/centrality/closeness/ClosenessValue.java 14.28% <14.28%> (ø)
...gegraph/computer/core/io/OptimizedBytesOutput.java 98.80% <50.00%> (ø)
... and 21 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 e081a0a...795697e. Read the comment docs.

Comment on lines 82 to 88
for (int i = 0; i < size; i++) {
Id id = this.graphFactory.createId();
id.read(in);
Value<?> value = this.graphFactory.createValue(ValueType.DOUBLE);
value.read(in);
this.map.put(id, (DoubleValue) value);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

call map.read(in)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this map is HashMap

Copy link
Contributor

@javeme javeme Oct 15, 2021

Choose a reason for hiding this comment

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

let ClosenessValue extend MapValue, or just use MapValue class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just use MapValue

@Linary Linary force-pushed the closeness branch 2 times, most recently from 353e56a to e6be433 Compare October 15, 2021 06:46
javeme
javeme previously approved these changes Oct 15, 2021
}

@Override
public Object object() {
Copy link
Member

Choose a reason for hiding this comment

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

rename to value

* until any queue is available
*/
if (emptyQueueCount >= channelCount) {
LOG.info("The send executor was blocked " +
Copy link
Member

Choose a reason for hiding this comment

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

use debug level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will lead too many print info

Copy link
Contributor

Choose a reason for hiding this comment

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

will not lead too many print info?

* until any client is available
*/
if (busyClientCount >= channelCount) {
LOG.info("The send executor was blocked " +
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will lead too many print info

Comment on lines 40 to 44
MapValue<DoubleValue> localValue = vertex.value();
// Cumulative distance
double centrality = 0;
for (Map.Entry<Id, DoubleValue> entry : localValue.entrySet()) {
centrality += 1.0D / entry.getValue().value();
Copy link
Contributor

Choose a reason for hiding this comment

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

move to MapValue.string()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What mean? Move the for-loop logic into string() method?

Copy link
Contributor

@javeme javeme Nov 15, 2021

Choose a reason for hiding this comment

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

I mean try to let ClosenessCentralityValue extends MapValue, move this block to ClosenessCentralityValue.value()/string(), and delete ClosenessCentralityLogOutput since LimitedLogOutput can log through ClosenessCentralityValue.string()

* until any queue is available
*/
if (emptyQueueCount >= channelCount) {
LOG.info("The send executor was blocked " +
Copy link
Contributor

Choose a reason for hiding this comment

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

will not lead too many print info?

.put("F", 1.45)
.build();

public Vertex constructHugeVertex(
Copy link
Contributor

Choose a reason for hiding this comment

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

override value() method instead

.put("F", 3.333333333333333)
.build();

public Vertex constructHugeVertex(
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Comment on lines 40 to 44
MapValue<DoubleValue> localValue = vertex.value();
// Cumulative distance
double centrality = 0;
for (Map.Entry<Id, DoubleValue> entry : localValue.entrySet()) {
centrality += 1.0D / entry.getValue().value();
Copy link
Contributor

@javeme javeme Nov 15, 2021

Choose a reason for hiding this comment

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

I mean try to let ClosenessCentralityValue extends MapValue, move this block to ClosenessCentralityValue.value()/string(), and delete ClosenessCentralityLogOutput since LimitedLogOutput can log through ClosenessCentralityValue.string()

@Linary Linary force-pushed the closeness branch 3 times, most recently from b712b05 to 92d9c53 Compare December 13, 2021 06:19
@javeme javeme merged commit 0224cce into master Dec 13, 2021
@javeme javeme deleted the closeness branch December 13, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants