Package com.linkedin.venice.utils
Class VeniceProperties
java.lang.Object
com.linkedin.venice.utils.VeniceProperties
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated.VeniceProperties
(Map<CharSequence, CharSequence> properties) VeniceProperties
(Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionclipAndFilterNamespace
(String nameSpace) This method looks for all properties that begins with the given namespace.boolean
static long
convertSizeFromLiteral
(String size) static VeniceProperties
empty()
boolean
getAsMap()
boolean
getBoolean
(String key) boolean
getBoolean
(String key, boolean defaultValue) boolean
getBooleanWithAlternative
(String preferredKey, String altKey, boolean defaultValue) double
double
int
int
getListWithAlternative
(String preferredKey, String altKey, List<String> defaultValue) long
long
getOptionalInt
(String name) long
getSizeInBytes
(String name) long
getSizeInBytes
(String name, long defaultValue) getStoreProperties
(String storeName) Get store related properties.getStringWithAlternative
(String preferredKey, String altKey) getStringWithAlternative
(String preferredKey, String altKey, String defaultValue) int
hashCode()
boolean
isEmpty()
keySet()
void
storeFlattened
(File file) Store all properties in a filevoid
Store all properties to anOutputStream
toString()
toString
(boolean prettyPrint)
-
Constructor Details
-
VeniceProperties
Deprecated.Useempty()
-
VeniceProperties
-
VeniceProperties
-
-
Method Details
-
empty
-
getPropertiesCopy
-
keySet
-
containsKey
-
clipAndFilterNamespace
This method looks for all properties that begins with the given namespace. Once those properties are identified it removes the namespace and returns the properties. This enables support of dynamic kafka configurations. All Kafka Properties can follow an convention of namespace and the properties are extracted and supplied to the Kafka Producer/Consumer.- Parameters:
nameSpace
- namespace to look for- Returns:
- properties matches a namespace, but after removing the namespace.
-
getStoreProperties
Get store related properties. properties that do not begin with store- are considered common to all stores. out of properties that begins with store- , only properties that matches the store name are related to current store. These matching properties override the base properties if they are present.- Parameters:
storeName
- name of the store- Returns:
- Properties for the current store.
-
equals
-
hashCode
public int hashCode() -
toString
-
toString
-
storeFlattened
Store all properties in a file- Parameters:
file
- to store into- Throws:
IOException
- If there is an error writing
-
storeFlattened
Store all properties to anOutputStream
- Parameters:
out
- The stream to write to- Throws:
IOException
- If there is an error writing
-
getString
-
getString
-
getStringWithAlternative
-
getString
-
getStringWithAlternative
-
getBoolean
-
getBooleanWithAlternative
-
getBoolean
-
getLong
-
getLong
-
getInt
-
getInt
-
getOptionalInt
-
getDouble
-
getDouble
-
getSizeInBytes
-
getSizeInBytes
-
convertSizeFromLiteral
-
getList
-
getListWithAlternative
-
getList
-
getMap
-
getMap
-
toProperties
-
isEmpty
public boolean isEmpty() -
getAsMap
-
empty()