Package org.apache.parquet.conf
Class PlainParquetConfiguration
- java.lang.Object
-
- org.apache.parquet.conf.PlainParquetConfiguration
-
- All Implemented Interfaces:
Iterable<Map.Entry<String,String>>,ParquetConfiguration
public class PlainParquetConfiguration extends Object implements ParquetConfiguration
Configuration for Parquet without Hadoop dependency.
-
-
Constructor Summary
Constructors Constructor Description PlainParquetConfiguration()PlainParquetConfiguration(Map<String,String> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(String name)Gets the value of the name property.Stringget(String name, String defaultValue)Gets the value of the name property.booleangetBoolean(String name, boolean defaultValue)Gets the value of the name property as a boolean.Class<?>getClass(String name, Class<?> defaultValue)Gets the value of the name property as a class.<U> Class<? extends U>getClass(String name, Class<? extends U> defaultValue, Class<U> xface)Gets the value of the name property as a class implementing the xface interface.Class<?>getClassByName(String name)Load a class by name.intgetInt(String name, int defaultValue)Gets the value of the name property as an integer.longgetLong(String name, long defaultValue)Gets the value of the name property as a long.String[]getStrings(String name, String[] defaultValue)Gets the value of the name property as an array ofStrings.StringgetTrimmed(String name)Gets the trimmed value of the name property.StringgetTrimmed(String name, String defaultValue)Gets the trimmed value of the name property as a boolean.Iterator<Map.Entry<String,String>>iterator()voidset(String s, String s1)Sets the value of the name property.voidsetBoolean(String name, boolean value)Sets the value of the name property to a boolean.voidsetClass(String name, Class<?> value, Class<?> xface)Sets the value of the name property to a class.voidsetInt(String name, int value)Sets the value of the name property to an integer.voidsetLong(String name, long value)Sets the value of the name property to a long.voidsetStrings(String name, String... value)Sets the value of the name property to an array of comma delimited values.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
set
public void set(String s, String s1)
Description copied from interface:ParquetConfigurationSets the value of the name property.- Specified by:
setin interfaceParquetConfiguration- Parameters:
s- the property to sets1- the value to set the property to
-
setLong
public void setLong(String name, long value)
Description copied from interface:ParquetConfigurationSets the value of the name property to a long.- Specified by:
setLongin interfaceParquetConfiguration- Parameters:
name- the property to setvalue- the value to set the property to
-
setInt
public void setInt(String name, int value)
Description copied from interface:ParquetConfigurationSets the value of the name property to an integer.- Specified by:
setIntin interfaceParquetConfiguration- Parameters:
name- the property to setvalue- the value to set the property to
-
setBoolean
public void setBoolean(String name, boolean value)
Description copied from interface:ParquetConfigurationSets the value of the name property to a boolean.- Specified by:
setBooleanin interfaceParquetConfiguration- Parameters:
name- the property to setvalue- the value to set the property to
-
setStrings
public void setStrings(String name, String... value)
Description copied from interface:ParquetConfigurationSets the value of the name property to an array of comma delimited values.- Specified by:
setStringsin interfaceParquetConfiguration- Parameters:
name- the property to setvalue- the values to set the property to
-
setClass
public void setClass(String name, Class<?> value, Class<?> xface)
Description copied from interface:ParquetConfigurationSets the value of the name property to a class.- Specified by:
setClassin interfaceParquetConfiguration- Parameters:
name- the property to setvalue- the value to set the property toxface- the interface implemented by the value
-
get
public String get(String name)
Description copied from interface:ParquetConfigurationGets the value of the name property. Returns null if no such value exists.- Specified by:
getin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value of- Returns:
- the value of the property, or null if it does not exist
-
get
public String get(String name, String defaultValue)
Description copied from interface:ParquetConfigurationGets the value of the name property. Returns the default value if no such value exists.- Specified by:
getin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property, or the default value if it does not exist
-
getLong
public long getLong(String name, long defaultValue)
Description copied from interface:ParquetConfigurationGets the value of the name property as a long. Returns the default value if no such value exists.- Specified by:
getLongin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property as a long, or the default value if it does not exist
-
getInt
public int getInt(String name, int defaultValue)
Description copied from interface:ParquetConfigurationGets the value of the name property as an integer. Returns the default value if no such value exists.- Specified by:
getIntin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property as an integer, or the default value if it does not exist
-
getBoolean
public boolean getBoolean(String name, boolean defaultValue)
Description copied from interface:ParquetConfigurationGets the value of the name property as a boolean. Returns the default value if no such value exists.- Specified by:
getBooleanin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property as a boolean, or the default value if it does not exist
-
getTrimmed
public String getTrimmed(String name)
Description copied from interface:ParquetConfigurationGets the trimmed value of the name property. Returns null if no such value exists.- Specified by:
getTrimmedin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value of- Returns:
- the trimmed value of the property, or null if it does not exist
-
getTrimmed
public String getTrimmed(String name, String defaultValue)
Description copied from interface:ParquetConfigurationGets the trimmed value of the name property as a boolean. Returns the default value if no such value exists.- Specified by:
getTrimmedin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the trimmed value of the property, or the default value if it does not exist
-
getStrings
public String[] getStrings(String name, String[] defaultValue)
Description copied from interface:ParquetConfigurationGets the value of the name property as an array ofStrings. Returns the default value if no such value exists. Interprets the stored value as a comma delimited array.- Specified by:
getStringsin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property as an array, or the default value if it does not exist
-
getClass
public Class<?> getClass(String name, Class<?> defaultValue)
Description copied from interface:ParquetConfigurationGets the value of the name property as a class. Returns the default value if no such value exists.- Specified by:
getClassin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property as a class, or the default value if it does not exist
-
getClass
public <U> Class<? extends U> getClass(String name, Class<? extends U> defaultValue, Class<U> xface)
Description copied from interface:ParquetConfigurationGets the value of the name property as a class implementing the xface interface. Returns the default value if no such value exists.- Specified by:
getClassin interfaceParquetConfiguration- Parameters:
name- the property to retrieve the value ofdefaultValue- the default return if no value is set for the property- Returns:
- the value of the property as a class, or the default value if it does not exist
-
getClassByName
public Class<?> getClassByName(String name) throws ClassNotFoundException
Description copied from interface:ParquetConfigurationLoad a class by name.- Specified by:
getClassByNamein interfaceParquetConfiguration- Parameters:
name- the name of theClassto load- Returns:
- the loaded class
- Throws:
ClassNotFoundException- when the specified class cannot be found
-
-