Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #164 from Thericecookers/master
Browse files Browse the repository at this point in the history
bugfix: Reverse edge has wrong partitionId
  • Loading branch information
Nicole00 authored Oct 18, 2021
2 parents 4cd75f0 + f41f41d commit 6c2700f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ class EdgeProcessor(data: DataFrame,
hostAddrs.append(new HostAddress(addr.getHostText, addr.getPort))
}

val partitionId = NebulaUtils.getPartitionId(srcId, partitionNum, vidType)
val srcPartitionId = NebulaUtils.getPartitionId(srcId, partitionNum, vidType)
val dstPartitionId = NebulaUtils.getPartitionId(dstId, partitionNum, vidType)
val codec = new NebulaCodecImpl()

import java.nio.ByteBuffer
Expand All @@ -199,13 +200,13 @@ class EdgeProcessor(data: DataFrame,
dstId.getBytes()
}
val positiveEdgeKey = codec.edgeKeyByDefaultVer(spaceVidLen,
partitionId,
srcPartitionId,
srcBytes,
edgeItem.getEdge_type,
ranking,
dstBytes)
val reverseEdgeKey = codec.edgeKeyByDefaultVer(spaceVidLen,
partitionId,
dstPartitionId,
dstBytes,
-edgeItem.getEdge_type,
ranking,
Expand Down

0 comments on commit 6c2700f

Please sign in to comment.