public final class ConfigurationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addOption(String opt,
String longOpt,
boolean hasArg,
String description)
Callers can place additional options to be parsed and stored in our job's
GiraphConfiguration via this utility call.
|
static void |
configureIfPossible(Object object,
ImmutableClassesGiraphConfiguration configuration)
Configure an object with an
ImmutableClassesGiraphConfiguration
if that objects supports it. |
static Class<? extends TypesHolder> |
getTypesHolderClass(org.apache.hadoop.conf.Configuration conf)
Get a class which is parameterized by the graph types defined by user.
|
static org.apache.commons.cli.CommandLine |
parseArgs(GiraphConfiguration giraphConf,
String[] args)
Translate CLI arguments to GiraphRunner or 'bin/hadoop jar' into
Configuration Key-Value pairs.
|
public static void configureIfPossible(Object object, ImmutableClassesGiraphConfiguration configuration)
ImmutableClassesGiraphConfiguration
if that objects supports it.object - The object to configureconfiguration - The configurationpublic static Class<? extends TypesHolder> getTypesHolderClass(org.apache.hadoop.conf.Configuration conf)
TypesHolder class directly.
2) The Computation class, as that holds all the types.conf - ConfigurationTypesHolder or null if could not find one.public static org.apache.commons.cli.CommandLine parseArgs(GiraphConfiguration giraphConf, String[] args) throws ClassNotFoundException, org.apache.commons.cli.ParseException, IOException
giraphConf - the current job Configuration.args - the raw CLI args to parseClassNotFoundExceptionorg.apache.commons.cli.ParseExceptionIOExceptionpublic static void addOption(String opt, String longOpt, boolean hasArg, String description)
parseArgs
Calling code must query this CommandLine to take action on these options.opt - short options name, i.e. -hlongOpt - long option name, i.e. --helphasArg - should we expect an argument for this option?description - English description of this option.Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.