You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/03/17 15:33:33 UTC
[jira] [Comment Edited] (TINKERPOP-1222) Allow default
GraphComputer configuration
[ https://issues.apache.org/jira/browse/TINKERPOP-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199607#comment-15199607 ]
Marko A. Rodriguez edited comment on TINKERPOP-1222 at 3/17/16 2:32 PM:
------------------------------------------------------------------------
This is the logic. This will go into an upcoming PR that has a bunch of other Hadoop configuration related work.
{code}
@Override
public GraphComputer compute() {
if (this.configuration.containsKey(Constants.GREMLIN_HADOOP_DEFAULT_GRAPH_COMPUTER)) {
try {
return this.compute((Class<? extends GraphComputer>) Class.forName(this.configuration.getString(Constants.GREMLIN_HADOOP_DEFAULT_GRAPH_COMPUTER)));
} catch (final Exception e) {
throw new IllegalStateException(e.getMessage(), e);
}
} else
throw new IllegalArgumentException("There is no default GraphComputer for HadoopGraph. Use HadoopGraph.compute(class) or gremlin.hadoop.defaultGraphComputer to specify the GraphComputer to use.");
}
{code}
was (Author: okram):
This is the logic. This will go into an upcoming PR that has a bunch of other Hadoop configuration related work.
{code}
@Override
public GraphComputer compute() {
if (this.configuration.getBoolean(Constants.GREMLIN_HADOOP_DEFAULT_GRAPH_COMPUTER, false)) {
try {
return this.compute((Class<? extends GraphComputer>) Class.forName(this.configuration.getString(Constants.GREMLIN_HADOOP_DEFAULT_GRAPH_COMPUTER)));
} catch (final Exception e) {
throw new IllegalStateException(e.getMessage(), e);
}
} else
throw new IllegalArgumentException("There is no default GraphComputer for HadoopGraph. Use HadoopGraph.compute(class) or gremlin.hadoop.defaultGraphComputer to specify the GraphComputer to use.");
}
{code}
> Allow default GraphComputer configuration
> -----------------------------------------
>
> Key: TINKERPOP-1222
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1222
> Project: TinkerPop
> Issue Type: Bug
> Affects Versions: 3.2.0-incubating
> Reporter: Matthias Broecheler
> Fix For: 3.2.0-incubating
>
>
> so that the user can simply do {{graph.compute()...}} without having to specify the graph computer.
> As of 3.0, we HadoopGraph does NOT have a default graph computer. This was done to not favor one technology over the other. We could allow the configuration to have a gremlin.hadoop.defaultGraphComputer=org.tinkerpop.SparkGRaphcomputer
> That configuration would be carried through the various result sets so that the user would only have to choose the graph computer initially (or it is pre-selected by the graph implementation) and from that point on would be defaulted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)