Skip to content

Commit

Permalink
Stop returning unidir edges as properties
Browse files Browse the repository at this point in the history
titan-hadoop iterates over unidirected edges as if they were
properties; this produces an exception as reported in thinkaurelius#941.

This commit makes FaunusElement.getPropertyKeysDirect stop returning
unidirected edges.  This avoids the exception in thinkaurelius#941.  However,
dumping edges from Cassandra to GraphSON omits unidirected edges.

titan-hadoop could probably use more tweaking to resolve the tension
between unidirected edges being represented as relations with a type
that extends edge but which use the setProperty interface.

The existing TitanOutputFormatTest.testUnidirectionEdges still passes,
but given my track record of unintended collateral breakage caused by
faunus schema changes during titan05 development, I'm hesitant to
declare victory.  There may be unintended consequences that I'm
missing.
  • Loading branch information
dalaro committed Feb 10, 2015
1 parent 879c9a1 commit 79a942a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public String apply(@Nullable RelationType relationType) {
protected Iterable<RelationType> getPropertyKeysDirect() {
final Set<RelationType> result = Sets.newHashSet();
for (final TitanRelation r : query().relations()) {
if (r.isEdge() && (this instanceof FaunusVertex)) continue;
if (r.isEdge()) continue;
result.add(r.getType());
}
return result;
Expand Down

0 comments on commit 79a942a

Please sign in to comment.