/** * Set the value of <code>name</code> to the given time duration. This * is equivalent to <code>set(<name>, value + <time suffix>)</code>. * @param name Property name * @param value Time duration * @param unit Unit of time */ public void setTimeDuration(String name, long value, TimeUnit unit) { set(name, value + ParsedTimeDuration.unitFor(unit).suffix()); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param conf Configuration object from which to load properties */ public void addResource(Configuration conf) { addResourceObject(new Resource(conf.getProps())); }
/** * Parse the given attribute as a set of integer ranges * @param name the attribute name * @param defaultValue the default value if it is not set * @return a new set of ranges from the configured value */ public IntegerRanges getRange(String name, String defaultValue) { return new IntegerRanges(get(name, defaultValue)); }
/** * Sets Storage Size for the specified key. * * @param name - Key to set. * @param value - The numeric value to set. * @param unit - Storage Unit to be used. */ public void setStorageSize(String name, double value, StorageUnit unit) { set(name, value + unit.getShortName()); }
@Override public void configure(Configuration parameters) { // enforce sequential configure() calls synchronized (CONFIGURE_MUTEX) { if (this.mapreduceOutputFormat instanceof Configurable) { ((Configurable) this.mapreduceOutputFormat).setConf(this.configuration); } } }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param name resource to be added, the classpath is examined for a file * with that name. */ public void addResource(String name) { addResourceObject(new Resource(name)); }
/** * Set the value of <code>name</code> to the given time duration. This * is equivalent to <code>set(<name>, value + <time suffix>)</code>. * @param name Property name * @param value Time duration * @param unit Unit of time */ public void setTimeDuration(String name, long value, TimeUnit unit) { set(name, value + ParsedTimeDuration.unitFor(unit).suffix()); }
/** * Parse the given attribute as a set of integer ranges * @param name the attribute name * @param defaultValue the default value if it is not set * @return a new set of ranges from the configured value */ public IntegerRanges getRange(String name, String defaultValue) { return new IntegerRanges(get(name, defaultValue)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param name resource to be added, the classpath is examined for a file * with that name. */ public void addResource(String name) { addResourceObject(new Resource(name)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param conf Configuration object from which to load properties */ public void addResource(Configuration conf) { addResourceObject(new Resource(conf.getProps(), conf.restrictSystemProps)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param file file-path of resource to be added, the local filesystem is * examined directly to find the resource, without referring to * the classpath. */ public void addResource(Path file) { addResourceObject(new Resource(file)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param url url of the resource to be added, the local filesystem is * examined directly to find the resource, without referring to * the classpath. */ public void addResource(URL url) { addResourceObject(new Resource(url)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param file file-path of resource to be added, the local filesystem is * examined directly to find the resource, without referring to * the classpath. */ public void addResource(Path file) { addResourceObject(new Resource(file)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param in InputStream to deserialize the object from. * @param name the name of the resource because InputStream.toString is not * very descriptive some times. */ public void addResource(InputStream in, String name) { addResourceObject(new Resource(in, name)); }
public void addResource(InputStream in, String name, boolean restrictedParser) { addResourceObject(new Resource(in, name, restrictedParser)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param url url of the resource to be added, the local filesystem is * examined directly to find the resource, without referring to * the classpath. */ public void addResource(URL url) { addResourceObject(new Resource(url)); }
/** * Add a configuration resource. * * The properties of this resource will override properties of previously * added resources, unless they were marked <a href="#Final">final</a>. * * @param in InputStream to deserialize the object from. * @param name the name of the resource because InputStream.toString is not * very descriptive some times. */ public void addResource(InputStream in, String name) { addResourceObject(new Resource(in, name)); }
public void addResource(InputStream in, boolean restrictedParser) { addResourceObject(new Resource(in, restrictedParser)); }