/** * Set the outgoing message value data from the option * * @param option EnumConfOption option to use * @param conf Configuration */ public void setOutgoingMessage(BooleanConfOption option, Configuration conf) { outgoingMessage = option.get(conf); }
/** * Set whether or not we should do output during computation * * @param doOutputDuringComputation True iff we want output to happen * during computation */ public final void setDoOutputDuringComputation( boolean doOutputDuringComputation) { DO_OUTPUT_DURING_COMPUTATION.set(this, doOutputDuringComputation); }
/** * Constructor * * @param keyPrefix Configuration key prefix * @param defaultValue default value * @param description description of the option */ public PerGraphTypeBooleanConfOption(String keyPrefix, boolean defaultValue, String description) { vertexId = new BooleanConfOption(keyPrefix + ".vertex.id", defaultValue, description); vertexValue = new BooleanConfOption(keyPrefix + ".vertex.value", defaultValue, description); edgeValue = new BooleanConfOption(keyPrefix + ".edge.value", defaultValue, description); outgoingMessage = new BooleanConfOption(keyPrefix + ".outgoing.message", defaultValue, description); }
NettyClient.LIMIT_NUMBER_OF_OPEN_REQUESTS.setIfUnset(conf, true); StaticFlowControl.MAX_NUMBER_OF_OPEN_REQUESTS.setIfUnset(conf, 100); GiraphConstants.NETTY_USE_POOLED_ALLOCATOR.setIfUnset(conf, true); GiraphConstants.NETTY_AUTO_READ.setIfUnset(conf, false); MemoryObserver.USE_MEMORY_OBSERVER.setIfUnset(conf, true); GiraphConstants.PREFER_IP_ADDRESSES.setIfUnset(conf, true); GiraphConstants.TRACK_JOB_PROGRESS_ON_CLIENT.setIfUnset(conf, true); GiraphConstants.LOG_THREAD_LAYOUT.setIfUnset(conf, true); GiraphConstants.METRICS_ENABLE.setIfUnset(conf, true); if (CONFIGURE_JAVA_OPTS.get(conf)) { List<String> javaOpts = getMemoryJavaOpts(conf); javaOpts.addAll(getGcJavaOpts(conf));
conf, getVertexValueClass(conf)); GiraphConstants.EDGE_VALUE_CLASS.setIfUnset(conf, getEdgeValueClass(conf)); GiraphConstants.RESOLVER_CREATE_VERTEX_ON_MSGS.setIfUnset( conf, shouldCreateVertexOnMsgs(conf)); if (shouldSendOneMessageToAll(conf)) {
/** * Lookup value in Configuration * * @param conf Configuration * @return value for key in conf, or defaultValue if not present */ public boolean get(Configuration conf) { return conf.getBoolean(getKey(), defaultValue); }
if (KEEP_ZOOKEEPER_DATA.isFalse(getConfiguration()) && (removeableSuperstep >= 0)) { String oldSuperstepPath =
/** * Whether to track, print, and aggregate metrics. * * @return true if metrics are enabled, false otherwise (default) */ public boolean metricsEnabled() { return METRICS_ENABLE.isTrue(this); }
this.maxRequestsCredit = (short) CreditBasedFlowControl.MAX_NUM_OF_OPEN_REQUESTS_PER_WORKER.get(conf); NettyClient.LIMIT_OPEN_REQUESTS_PER_WORKER.setIfUnset(conf, true); boolean useCredit = NettyClient.LIMIT_OPEN_REQUESTS_PER_WORKER.get(conf); checkState(useCredit, "ThresholdBasedOracle: credit-based flow control " + "must be enabled. Use giraph.waitForPerWorkerRequests=true");
/** * Set value in configuration for this key * * @param conf Configuration * @param value to set */ public void set(Configuration conf, boolean value) { conf.setBoolean(getKey(), value); }
KEEP_ZOOKEEPER_DATA.isFalse(getConfiguration())) { if (LOG.isInfoEnabled()) { LOG.info("cleanupZooKeeper: Removing the following path " +
/** * Check whether to enable heap memory supervisor thread * * @return true if jmap dumper is reactively enabled */ public boolean isReactiveJmapHistogramDumpEnabled() { return REACTIVE_JMAP_ENABLE.get(this); }
/** * Flag this job as a local test run. * * @param flag the test status for this job */ public void setLocalTestMode(boolean flag) { LOCAL_TEST_MODE.set(this, flag); }
/** * Set value in configuration if it hasn't been set already * * @param conf Configuration * @param value to set */ public void setIfUnset(Configuration conf, boolean value) { conf.setBooleanIfUnset(getKey(), value); } }
/** * Constructor * * @param graphType GraphType */ public JythonGraphTypeOptions(GraphType graphType) { this.graphType = graphType; jythonClassNameOption = new StrConfOption("giraph.jython." + graphType.dotString() + ".class.name", null, "Name of class in Jython implementing " + graphType.spaceString()); needsWrapperOption = new BooleanConfOption("giraph.jython." + graphType.dotString() + ".needs.wrapper", false, "Whether the " + graphType.spaceString() + " jython type needs a wrapper"); languageOption = EnumConfOption.create("giraph." + graphType.dotString() + ".language", Language.class, Language.JAVA, "Language " + graphType.spaceString() + " is implemented in"); }
/** * Check if VertexOutputFormat is thread-safe * * @return True iff VertexOutputFormat is thread-safe */ public final boolean vertexOutputFormatThreadSafe() { return VERTEX_OUTPUT_FORMAT_THREAD_SAFE.get(this); }
/** * Set whether or not selected VertexOutputFormat is thread-safe * * @param vertexOutputFormatThreadSafe True iff selected VertexOutputFormat * is thread-safe */ public final void setVertexOutputFormatThreadSafe( boolean vertexOutputFormatThreadSafe) { VERTEX_OUTPUT_FORMAT_THREAD_SAFE.set(this, vertexOutputFormatThreadSafe); }
/** * Use the log thread layout option? * * @return True if use the log thread layout option, false otherwise */ public boolean useLogThreadLayout() { return LOG_THREAD_LAYOUT.get(this); }
/** * set option whether to create a source vertex present only in edge input * @param createVertex create source vertex option */ public void setCreateSourceVertex(boolean createVertex) { CREATE_EDGE_SOURCE_VERTICES.set(this, createVertex); }
/** * Use message size encoding? This feature may help with complex message * objects. * * @return Whether to use message size encoding */ public boolean useMessageSizeEncoding() { return USE_MESSAGE_SIZE_ENCODING.get(this); }