Java Code Examples for org.apache.storm.utils.Utils#get()
The following examples show how to use
org.apache.storm.utils.Utils#get() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfUtils.java From storm-crawler with Apache License 2.0 | 5 votes |
public static float getFloat(Map<String, Object> conf, String key, float defaultValue) { Object obj = Utils.get(conf, key, defaultValue); if (obj instanceof Double) return ((Double) obj).floatValue(); return (Float) obj; }
Example 2
Source File: ConfUtils.java From storm-crawler with Apache License 2.0 | 4 votes |
public static int getInt(Map<String, Object> conf, String key, int defaultValue) { Object obj = Utils.get(conf, key, defaultValue); return Utils.getInt(obj); }
Example 3
Source File: ConfUtils.java From storm-crawler with Apache License 2.0 | 4 votes |
public static long getLong(Map<String, Object> conf, String key, long defaultValue) { return (Long) Utils.get(conf, key, defaultValue); }
Example 4
Source File: ConfUtils.java From storm-crawler with Apache License 2.0 | 4 votes |
public static boolean getBoolean(Map<String, Object> conf, String key, boolean defaultValue) { Object obj = Utils.get(conf, key, defaultValue); return Utils.getBoolean(obj, defaultValue); }
Example 5
Source File: ConfUtils.java From storm-crawler with Apache License 2.0 | 4 votes |
public static String getString(Map<String, Object> conf, String key) { return (String) Utils.get(conf, key, null); }
Example 6
Source File: ConfUtils.java From storm-crawler with Apache License 2.0 | 4 votes |
public static String getString(Map<String, Object> conf, String key, String defaultValue) { return (String) Utils.get(conf, key, defaultValue); }