public Builder iterations(final int iterations) { configuration.setProperty(MAX_ITERATIONS, iterations); return this; } }
public Builder seed(final long seed) { this.configuration.setProperty(SEED, seed); return this; } }
public Builder maxDepth(final int maxDepth) { this.configuration.setProperty(MAX_DEPTH, maxDepth); return this; }
public Builder vertexCount(final long vertexCount) { configuration.setProperty(VERTEX_COUNT, vertexCount); return this; }
public Builder dampingFactor(final double dampingFactor) { configuration.setProperty(DAMPING_FACTOR, dampingFactor); return this; }
public Builder seed(final long seed) { this.configuration.setProperty(SEED, seed); return this; } }
public Builder iterations(final int iterations) { configuration.setProperty(MAX_ITERATIONS, iterations); return this; } }
public Builder vertexCount(final long vertexCount) { configuration.setProperty(VERTEX_COUNT, vertexCount); return this; }
public Builder dampingFactor(final double dampingFactor) { configuration.setProperty(DAMPING_FACTOR, dampingFactor); return this; }
public Builder maxDepth(final int maxDepth) { this.configuration.setProperty(MAX_DEPTH, maxDepth); return this; }
/** * Sets the class name of the BulkLoader implementation to be used. */ public Builder bulkLoader(final String className) { configuration.setProperty(BULK_LOADER_CLASS_CFG_KEY, className); return this; }
/** * The batch size for a single transaction (number of vertices in the vertex loading stage; number of edges in * the edge loading stage). */ public Builder intermediateBatchSize(final int batchSize) { configuration.setProperty(INTERMEDIATE_BATCH_SIZE_CFG_KEY, batchSize); return this; }
/** * Sets the name of the property that is used to store the original vertex identifiers in the target graph. */ public Builder vertexIdProperty(final String name) { configuration.setProperty(BULK_LOADER_VERTEX_ID_CFG_KEY, name); return this; }
/** * Specifies whether user supplied identifiers should be used when the bulk loader creates vertices in the * target graph. */ public Builder userSuppliedIds(final boolean useUserSuppliedIds) { configuration.setProperty(USER_SUPPLIED_IDS_CFG_KEY, useUserSuppliedIds); return this; }
/** * Specifies whether the original vertex identifiers should be kept in the target graph or not. In case of false * BulkLoaderVertexProgram will add another iteration to remove the properties and it won't be possible to use * the data for further incremental bulk loads. */ public Builder keepOriginalIds(final boolean keepOriginalIds) { configuration.setProperty(KEEP_ORIGINAL_IDS_CFG_KEY, keepOriginalIds); return this; }
/** * @deprecated As of release 3.2.0, replaced by {@link org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram.Builder#initialRank(Traversal.Admin)} */ @Deprecated public Builder vertexCount(final long vertexCount) { this.configuration.setProperty(VERTEX_COUNT, (double) vertexCount); return this; }
/** * {@inheritDoc} */ @Override public B configure(final Object... keyValues) { VertexProgramHelper.legalConfigurationKeyValueArray(keyValues); for (int i = 0; i < keyValues.length; i = i + 2) { this.configuration.setProperty((String) keyValues[i], keyValues[i + 1]); } return (B) this; }
public Builder maxDistance(final Number distance) { if (null != distance) this.configuration.setProperty(MAX_DISTANCE, distance); else this.configuration.clearProperty(MAX_DISTANCE); return this; }
public Builder direction(final Direction direction) { configuration.setProperty(DIRECTION_CFG_KEY, direction.toString()); return this; } }
public static org.apache.commons.configuration.Configuration makeApacheConfiguration(final Configuration hadoopConfiguration) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); hadoopConfiguration.iterator().forEachRemaining(e -> apacheConfiguration.setProperty(e.getKey(), e.getValue())); return apacheConfiguration; }