Package org.apache.giraph.conf
Class GiraphConfiguration
- java.lang.Object
-
- org.apache.hadoop.conf.Configuration
-
- org.apache.giraph.conf.GiraphConfiguration
-
- All Implemented Interfaces:
Iterable<Map.Entry<String,String>>,GiraphConstants,org.apache.hadoop.io.Writable
- Direct Known Subclasses:
ImmutableClassesGiraphConfiguration
public class GiraphConfiguration extends org.apache.hadoop.conf.Configuration implements GiraphConstants
Adds user methods specific to Giraph. This will be put into an ImmutableClassesGiraphConfiguration that provides the configuration plus the immutable classes.Keeps track of parameters which were set so it easily set them in another copy of configuration.
-
-
Field Summary
-
Fields inherited from interface org.apache.giraph.conf.GiraphConstants
ADDITIONAL_EDGE_REQUEST_SIZE, ADDITIONAL_MSG_REQUEST_SIZE, ADDITIONAL_VERTEX_REQUEST_SIZE, AGGREGATOR_BASE_SERVER_PORT, AGGREGATOR_WRITER_CLASS, ASYNC_MESSAGE_STORE_THREADS_COUNT, AUTHENTICATE, BASE_ZNODE_KEY, CHANNELS_PER_SERVER, CHECKPOINT_COMPRESSION_CODEC, CHECKPOINT_DIRECTORY, CHECKPOINT_FREQUENCY, CHECKPOINT_SUPPORTED_CHECKER, CLEANUP_CHECKPOINTS_AFTER_SUCCESS, CLIENT_RECEIVE_BUFFER_SIZE, CLIENT_SEND_BUFFER_SIZE, clientCacheSize, COMPUTATION_CLASS, COMPUTATION_FACTORY_CLASS, COMPUTATION_LANGUAGE, CREATE_EDGE_SOURCE_VERTICES, CREATE_EDGE_SOURCE_VERTICES_CALLBACK, DEFAULT_ZOOKEEPER_MAX_CLIENT_CNXNS, DEFAULT_ZOOKEEPER_SNAP_COUNT, DEFAULT_ZOOKEEPER_TICK_TIME, DISABLE_GIRAPH_CLASS_RESOLVER, DNS_INTERFACE, DNS_NAMESERVER, DO_OUTPUT_DURING_COMPUTATION, EDGE_INPUT_FILTER_CLASS, EDGE_INPUT_FORMAT_CLASS, EDGE_MANAGER, EDGE_OUTPUT_FORMAT_CLASS, EDGE_OUTPUT_FORMAT_SUBDIR, EDGE_STORE_FACTORY_CLASS, EDGE_TRANSLATION_CLASS, EDGE_VALUE_CLASS, EDGE_VALUE_FACTORY_CLASS, EVENT_WAIT_MSECS, FAIL_FIRST_IPC_PORT_BIND_ATTEMPT, FAIL_ON_EMPTY_INPUT, GC_OBSERVER_CLASSES, GIRAPH_TEXT_OUTPUT_FORMAT_REVERSE, GIRAPH_TEXT_OUTPUT_FORMAT_SEPARATOR, GIRAPH_YARN_CONF_FILE, GIRAPH_YARN_LIBJARS, GIRAPH_YARN_PRIORITY, GIRAPH_YARN_TASK_HEAP_MB, GIRAPH_YARN_TASK_HEAP_MB_DEFAULT, GRAPH_PARTITIONER_FACTORY_CLASS, GRAPH_TYPE_LANGUAGES, GRAPH_TYPES_NEEDS_WRAPPERS, HADOOP_OUTPUT_FORMAT_CLASS, HALT_INSTRUCTIONS_WRITER_CLASS, HDFS_FILE_CREATION_RETRIES, HDFS_FILE_CREATION_RETRY_WAIT_MS, INCOMING_MESSAGE_VALUE_CLASS, INET_ADDRESS_MAX_RESOLVE_TIMES, INPUT_SPLIT_MAX_EDGES, INPUT_SPLIT_MAX_VERTICES, INPUT_SPLIT_SAMPLE_PERCENT, INPUT_VERTEX_EDGES_CLASS, INPUT_VERTEX_EDGES_FACTORY_CLASS, IPC_INITIAL_PORT, IS_PURE_YARN_JOB, JMAP_ENABLE, JMAP_LIVE_ONLY, JMAP_PATH, JMAP_PRINT_LINES, JMAP_SLEEP_MILLIS, JOB_OBSERVER_CLASS, JOB_PROGRESS_TRACKER_CLIENT_CLASS, JOB_PROGRESS_TRACKER_SERVICE_CLASS, JOB_RETRY_CHECKER_CLASS, KEEP_ZOOKEEPER_DATA, LB_MAPPINGSTORE_LOWER, LB_MAPPINGSTORE_UPPER, LOCAL_TEST_MODE, LOG_LEVEL, LOG_THREAD_LAYOUT, MAPPER_OBSERVER_CLASSES, MAPPING_INPUT_FORMAT_CLASS, MAPPING_STORE_CLASS, MAPPING_STORE_OPS_CLASS, MASTER_COMPUTE_CLASS, MASTER_OBSERVER_CLASSES, MAX_ALLOWED_JOB_TIME_MS, MAX_CONN_TRY_ATTEMPTS, MAX_COUNTER_WAIT_MSECS, MAX_EDGE_REQUEST_SIZE, MAX_FRAME_LENGTH, MAX_IPC_PORT_BIND_ATTEMPTS, MAX_MASTER_SUPERSTEP_WAIT_MSECS, MAX_MSG_REQUEST_SIZE, MAX_MUTATIONS_PER_REQUEST, MAX_NUMBER_OF_SUPERSTEPS, MAX_OUT_MSG_CACHE_SIZE, MAX_PARTITIONS_IN_MEMORY, MAX_REQUEST_MILLISECONDS, MAX_RESOLVE_ADDRESS_ATTEMPTS, MAX_TASK_ATTEMPTS, MAX_VERTEX_REQUEST_SIZE, MAX_WORKERS, MESSAGE_AGGREGATE_SIZE, MESSAGE_COMBINER_CLASS, MESSAGE_ENCODE_AND_STORE_TYPE, MESSAGE_MANAGER_BASE_SERVER_PORT, MESSAGE_MANAGER_TYPE, MESSAGE_STORE_FACTORY_CLASS, METRICS_DIRECTORY, METRICS_ENABLE, MIN_FREE_MBS_ON_HEAP, MIN_PARTITIONS_PER_COMPUTE_THREAD, MIN_PERCENT_RESPONDED, MIN_WORKERS, MSG_NUM_FLUSH_THREADS, NETTY_CLIENT_EXECUTION_AFTER_HANDLER, NETTY_CLIENT_EXECUTION_THREADS, NETTY_CLIENT_THREADS, NETTY_CLIENT_USE_EXECUTION_HANDLER, NETTY_COMPRESSION_ALGORITHM, NETTY_MAX_CONNECTION_FAILURES, NETTY_REQUEST_ENCODER_BUFFER_SIZE, NETTY_SERVER_BOSS_THREADS, NETTY_SERVER_EXECUTION_AFTER_HANDLER, NETTY_SERVER_EXECUTION_THREADS, NETTY_SERVER_THREADS, NETTY_SERVER_USE_EXECUTION_HANDLER, NETTY_SERVER_WORKER_THREADS, NETTY_SIMULATE_FIRST_REQUEST_CLOSED, NETTY_SIMULATE_FIRST_RESPONSE_FAILED, NETTY_USE_DIRECT_MEMORY, NETTY_USE_POOLED_ALLOCATOR, NUM_CHECKPOINT_IO_THREADS, NUM_COMPUTE_THREADS, NUM_INPUT_THREADS, NUM_OUT_OF_CORE_THREADS, NUM_OUTPUT_THREADS, ONE_KB, ONE_MB, OUT_MESSAGE_CACHE_TYPE, OUT_OF_CORE_DATA_ACCESSOR, OUT_OF_CORE_ORACLE, OUTGOING_MESSAGE_VALUE_CLASS, OUTGOING_MESSAGE_VALUE_FACTORY_CLASS, PARTITION_CLASS, PARTITION_COUNT_MULTIPLIER, PARTITION_LONG_TAIL_MIN_PRINT, PARTITION_VERTEX_KEY_SPACE_SIZE, PARTITIONS_DIRECTORY, PREFER_IP_ADDRESSES, REACTIVE_JMAP_ENABLE, REQUEST_SIZE_WARNING_THRESHOLD, RESEND_TIMED_OUT_REQUESTS, RESOLVER_CREATE_VERTEX_ON_MSGS, RESTART_JOB_ID, RESTART_SUPERSTEP, SERVER_RECEIVE_BUFFER_SIZE, SERVER_SEND_BUFFER_SIZE, SPLIT_MASTER_WORKER, SSL_ENCRYPT, STATIC_GRAPH, SUPERSTEP_COUNT, TCP_BACKLOG, TRACK_JOB_PROGRESS_ON_CLIENT, TYPES_HOLDER_CLASS, USE_BIG_DATA_IO_FOR_MESSAGES, USE_INPUT_SPLIT_LOCALITY, USE_MESSAGE_SIZE_ENCODING, USE_OUT_OF_CORE_GRAPH, USE_PRIMITIVE_MESSAGE_STORE, USE_SUPERSTEP_COUNTERS, USE_UNSAFE_SERIALIZATION, USER_PARTITION_COUNT, VERTEX_CLASS, VERTEX_EDGES_CLASS, VERTEX_EDGES_FACTORY_CLASS, VERTEX_ID_CLASS, VERTEX_ID_FACTORY_CLASS, VERTEX_INPUT_FILTER_CLASS, VERTEX_INPUT_FORMAT_CLASS, VERTEX_OUTPUT_FORMAT_CLASS, VERTEX_OUTPUT_FORMAT_SUBDIR, VERTEX_OUTPUT_FORMAT_THREAD_SAFE, VERTEX_OUTPUT_PATH, VERTEX_RESOLVER_CLASS, VERTEX_VALUE_CLASS, VERTEX_VALUE_COMBINER_CLASS, VERTEX_VALUE_FACTORY_CLASS, VERTICES_TO_UPDATE_PROGRESS, WAIT_FOR_OTHER_WORKERS_TIMEOUT_MSEC, WAIT_TASK_DONE_TIMEOUT_MS, WAIT_TIME_BETWEEN_CONNECTION_RETRIES_MS, WAIT_ZOOKEEPER_TIMEOUT_MSEC, WAITING_REQUEST_MSECS, WORKER_CONTEXT_CLASS, WORKER_OBSERVER_CLASSES, YOURKIT_OUTPUT_DIR, YOURKIT_OUTPUT_DIR_DEFAULT, ZOOKEEPER_BASE_PATH_COUNTER_GROUP, ZOOKEEPER_CONNECTION_ATTEMPTS, ZOOKEEPER_DIR, ZOOKEEPER_FORCE_SYNC, ZOOKEEPER_HALT_NODE_COUNTER_GROUP, ZOOKEEPER_IS_EXTERNAL, ZOOKEEPER_LIST, ZOOKEEPER_MANAGER_DIRECTORY, ZOOKEEPER_MAX_SESSION_TIMEOUT, ZOOKEEPER_MIN_SESSION_TIMEOUT, ZOOKEEPER_OPS_MAX_ATTEMPTS, ZOOKEEPER_OPS_RETRY_WAIT_MSECS, ZOOKEEPER_PURGE_INTERVAL, ZOOKEEPER_SERVER_PORT, ZOOKEEPER_SERVER_PORT_COUNTER_GROUP, ZOOKEEPER_SERVERLIST_POLL_MSECS, ZOOKEEPER_SESSION_TIMEOUT, ZOOKEEPER_SKIP_ACL, ZOOKEEPER_SNAP_RETAIN_COUNT
-
-
Constructor Summary
Constructors Constructor Description GiraphConfiguration()Constructor that creates the configurationGiraphConfiguration(org.apache.hadoop.conf.Configuration conf)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAggregatorServerInitPort()Get the initial port for netty server used in aggregatorClass<? extends org.apache.giraph.graph.Computation>getComputationClass()Get the user's subclassedComputationStringgetEdgeManager()StringgetLocalHostOrIp()Return local host name by default.intgetMessagerInitServerPort()Get the init port for message manager(Netty base).io.netty.buffer.ByteBufAllocatorgetNettyAllocator()Used by netty client and server to create ByteBufAllocatorintgetNettyServerExecutionThreads()Class<? extends org.apache.giraph.io.VertexInputFormat>getVertexInputFormatClass()get vertex input class.Class<? extends WorkerContext>getWorkerContextClass()booleanhasVertexOutputFormat()Does the job have aVertexOutputFormat?booleanhasVertexOutputFormatSubdir()Does the job have aVertexOutputFormatsubdir?voidsetComputationClass(Class<? extends AbstractComputation> appClass)Set the computation class(user app).voidsetEdgeInputFormatClass(Class<? extends org.apache.giraph.io.EdgeInputFormat> edgeInputFormatClass)Set vertex input class.voidsetEdgeManager(String edgeManager)voidsetMasterComputeClass(Class<? extends MasterCompute> masterComputeClass)Set the master class (optional)voidsetMessageCombinerClass(Class<? extends org.apache.giraph.combiner.MessageCombiner> messageCombinerClass)Set the message combiner class (optional)voidsetUsePrimitiveMessageStore(boolean value)voidsetVertexInputFormatClass(Class<? extends org.apache.giraph.io.VertexInputFormat> vertexInputFormatClass)Set vertex input class.voidsetVertexOutputFormatClass(Class<? extends org.apache.giraph.io.VertexOutputFormat> vertexOutputFormatClass)voidsetVertexOutputFormatSubdir(String path)Set the vertex output format pathvoidsetVertexOutputPath(String path)The the path where we output.voidsetWorkerContextClass(Class<? extends WorkerContext> workerContextClass)Set the worker context class (optional)booleanusePrimitiveMessageStore()-
Methods inherited from class org.apache.hadoop.conf.Configuration
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addTags, clear, dumpConfiguration, dumpConfiguration, dumpDeprecatedKeys, get, get, getAllPropertiesByTag, getAllPropertiesByTags, getBoolean, getClass, getClass, getClassByName, getClassByNameOrNull, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getEnum, getFile, getFinalParameters, getFloat, getInstances, getInt, getInts, getLocalPath, getLong, getLongBytes, getPassword, getPasswordFromConfig, getPasswordFromCredentialProviders, getPattern, getPropertySources, getProps, getPropsWithPrefix, getRange, getRaw, getResource, getSocketAddr, getSocketAddr, getStorageSize, getStorageSize, getStringCollection, getStrings, getStrings, getTimeDuration, getTimeDuration, getTimeDurationHelper, getTimeDurations, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, isPropertyTag, iterator, main, onlyKeyExists, readFields, reloadConfiguration, reloadExistingConfigurations, set, set, setAllowNullValueProperties, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDeprecatedProperties, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setRestrictSystemProperties, setRestrictSystemPropertiesDefault, setRestrictSystemProps, setSocketAddr, setStorageSize, setStrings, setTimeDuration, size, toString, unset, updateConnectAddr, updateConnectAddr, write, writeXml, writeXml, writeXml
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getWorkerContextClass
public Class<? extends WorkerContext> getWorkerContextClass()
-
setWorkerContextClass
public final void setWorkerContextClass(Class<? extends WorkerContext> workerContextClass)
Set the worker context class (optional)- Parameters:
workerContextClass- Determines what code is executed on a each worker before and after each superstep and computation
-
getComputationClass
public Class<? extends org.apache.giraph.graph.Computation> getComputationClass()
Get the user's subclassedComputation- Returns:
- User's computation class
-
setComputationClass
public final void setComputationClass(Class<? extends AbstractComputation> appClass)
Set the computation class(user app).- Parameters:
appClass- User specified computation class.
-
getVertexInputFormatClass
public final Class<? extends org.apache.giraph.io.VertexInputFormat> getVertexInputFormatClass()
get vertex input class.
-
setVertexInputFormatClass
public final void setVertexInputFormatClass(Class<? extends org.apache.giraph.io.VertexInputFormat> vertexInputFormatClass)
Set vertex input class.- Parameters:
vertexInputFormatClass- User specified computation class.
-
setEdgeInputFormatClass
public final void setEdgeInputFormatClass(Class<? extends org.apache.giraph.io.EdgeInputFormat> edgeInputFormatClass)
Set vertex input class.- Parameters:
edgeInputFormatClass- User specified computation class.
-
hasVertexOutputFormat
public boolean hasVertexOutputFormat()
Does the job have aVertexOutputFormat?- Returns:
- True iff a
VertexOutputFormathas been specified.
-
setVertexOutputFormatClass
public final void setVertexOutputFormatClass(Class<? extends org.apache.giraph.io.VertexOutputFormat> vertexOutputFormatClass)
-
setMessageCombinerClass
public void setMessageCombinerClass(Class<? extends org.apache.giraph.combiner.MessageCombiner> messageCombinerClass)
Set the message combiner class (optional)- Parameters:
messageCombinerClass- Determines how vertex messages are combined
-
setMasterComputeClass
public final void setMasterComputeClass(Class<? extends MasterCompute> masterComputeClass)
Set the master class (optional)- Parameters:
masterComputeClass- Runs master computation
-
hasVertexOutputFormatSubdir
public boolean hasVertexOutputFormatSubdir()
Does the job have aVertexOutputFormatsubdir?- Returns:
- True iff a
VertexOutputFormatsubdir has been specified.
-
setVertexOutputFormatSubdir
public final void setVertexOutputFormatSubdir(String path)
Set the vertex output format path- Parameters:
path- path where the vertices will be written
-
setVertexOutputPath
public final void setVertexOutputPath(String path)
The the path where we output.- Parameters:
path- output path.
-
getNettyAllocator
public io.netty.buffer.ByteBufAllocator getNettyAllocator()
Used by netty client and server to create ByteBufAllocator- Returns:
- ByteBufAllocator
-
getNettyServerExecutionThreads
public int getNettyServerExecutionThreads()
-
getLocalHostOrIp
public String getLocalHostOrIp() throws UnknownHostException
Return local host name by default. Or local host IP if preferIP option is set.- Returns:
- local host name or IP
- Throws:
UnknownHostException
-
getMessagerInitServerPort
public int getMessagerInitServerPort()
Get the init port for message manager(Netty base).- Returns:
- port
-
getAggregatorServerInitPort
public int getAggregatorServerInitPort()
Get the initial port for netty server used in aggregator- Returns:
- port
-
getEdgeManager
public String getEdgeManager()
-
setEdgeManager
public void setEdgeManager(String edgeManager)
-
usePrimitiveMessageStore
public boolean usePrimitiveMessageStore()
-
setUsePrimitiveMessageStore
public void setUsePrimitiveMessageStore(boolean value)
-
-