@Test public void testGetIntValue() throws Exception { config.put(CONF_VAR, "1"); assertTrue(config.getIntValue(CONF_VAR) == 1); }
public int getIntValue(String key) throws StreamingException { if (this.containsKey(key)) { String strValue = get(key).toString(); try { return Integer.valueOf(strValue); } catch (NumberFormatException e) { StreamingException exception= new StreamingException(ErrorCode.CONFIG_FORMAT, strValue, "int"); LOG.error(exception.getLocalizedMessage()); throw exception; } } else { StreamingException exception = new StreamingException(ErrorCode.CONFIG_NOT_FOUND, key); LOG.error(exception.getLocalizedMessage()); throw exception; } }
StreamingConfig extends HashMap<String, Object> implements Serializable { public int getIntValue(String key) throws StreamingException { if (this.containsKey(key)) { String strValue = get(key).toString(); try { return Integer.valueOf(strValue); } catch (NumberFormatException e) { StreamingException exception= new StreamingException(ErrorCode.CONFIG_FORMAT, strValue, "int"); LOG.error(exception.getLocalizedMessage()); throw exception; } } else { StreamingException exception = new StreamingException(ErrorCode.CONFIG_NOT_FOUND, key); LOG.error(exception.getLocalizedMessage()); throw exception; } } }
StreamingConfig extends HashMap<String, Object> implements Serializable { public int getIntValue(String key) throws StreamingException { if (this.containsKey(key)) { String strValue = get(key).toString(); try { return Integer.valueOf(strValue); } catch (NumberFormatException e) { StreamingException exception= new StreamingException(ErrorCode.CONFIG_FORMAT, strValue, "int"); LOG.error(exception.getLocalizedMessage()); throw exception; } } else { StreamingException exception = new StreamingException(ErrorCode.CONFIG_NOT_FOUND, key); LOG.error(exception.getLocalizedMessage()); throw exception; } } StreamingConfig(); }
StreamingConfig extends HashMap<String, Object> implements Serializable { public int getIntValue(String key) throws StreamingException { if (this.containsKey(key)) { String strValue = get(key).toString(); try { return Integer.valueOf(strValue); } catch (NumberFormatException e) { StreamingException exception= new StreamingException(ErrorCode.CONFIG_FORMAT, strValue, "int"); LOG.error(exception.getLocalizedMessage()); throw exception; } } else { StreamingException exception = new StreamingException(ErrorCode.CONFIG_NOT_FOUND, key); LOG.error(exception.getLocalizedMessage()); throw exception; } } StreamingConfig(); int getIntValue(String key); long getLongValue(String key); double getDoubleValue(String key); float getFloatValue(String key); String getStringValue(String key); boolean getBooleanValue(String key); }
StreamingConfig extends HashMap<String, Object> implements Serializable { public int getIntValue(String key) throws StreamingException { if (this.containsKey(key)) { String strValue = get(key).toString(); try { return Integer.valueOf(strValue); } catch (NumberFormatException e) { StreamingException exception= new StreamingException(ErrorCode.CONFIG_FORMAT, strValue, "int"); LOG.error(exception.getLocalizedMessage()); throw exception; } } else { StreamingException exception = new StreamingException(ErrorCode.CONFIG_NOT_FOUND, key); LOG.error(exception.getLocalizedMessage()); throw exception; } } StreamingConfig(); int getIntValue(String key); long getLongValue(String key); double getDoubleValue(String key); float getFloatValue(String key); String getStringValue(String key); boolean getBooleanValue(String key); static final String STREAMING_INNER_INPUT_STREAM_NAME; static final String STREAMING_INNER_OUTPUT_STREAM_NAME; static final String STREAMING_INNER_INPUT_SCHEMA; static final String STREAMING_INNER_OUTPUT_SCHEMA; static final String STREAMING_KILLAPPLICATION_OVERTIME; static final String STREAMING_USERFILE_MAXSIZE; static final String STREAMING_COMMON_ISTESTMODEL; static final String STREAMING_COMMON_OUTPUT_TYPE; static final String STREAMING_COMMON_PARALLEL_NUMBER; static final String STREAMING_ADAPTOR_APPLICATION; static final String STREAMING_TEMPLATE_DIRECTORY; static final String STREAMING_STORM_COMMON_ISACK; static final String STREAMING_STORM_NIMBUS_HOST; static final String STREAMING_STORM_NIMBUS_PORT; static final String STREAMING_STORM_THRIFT_TRANSPORT_PLUGIN; static final String STREAMING_STORM_SUBMIT_ISLOCAL; static final String STREAMING_STORM_WORKER_NUMBER; static final String STREAMING_STORM_REBALANCE_WAITSECONDS; static final String STREAMING_LOCALTASK_ALIVETIME_MS; static final String STREAMING_STORM_KILLTASK_WAITSECONDS; static final String STREAMING_STORM_HA_ZKADDRESS; static final String STREAMING_STORM_HA_ZKPORT; static final String STREAMING_STORM_HA_ZKSESSIONTIMEOUT; static final String STREAMING_STORM_HA_ZKSCONNECTIONTIMEOUT; static final String STREAMING_SECURITY_AUTHENTICATION; static final String STREAMING_SECURITY_ZOOKEEPER_PRINCIPAL; static final String STREAMING_SECURITY_STORM_PRINCIPAL; static final String STREAMING_SECURITY_USER_PRINCIPAL; static final String STREAMING_SECURITY_USER_PRINCIPAL_INSTANCE; static final String STREAMING_SECURITY_KEYTAB_PATH; static final String STREAMING_SECURITY_SASL_QOP; static final String STREAMING_SECURITY_KRBCONF_PATH; static final String OPERATOR_JOIN_INNER_LEFT_INPUT_STREAM_NAME; static final String OPERATOR_JOIN_INNER_RIGHT_INPUT_STREAM_NAME; static final String OPERATOR_JOIN_INNER_LEFT_SCHEMA; static final String OPERATOR_JOIN_INNER_RIGHT_SCHEMA; static final String OPERATOR_JOIN_INNER_UNIDIRECTIONAL; static final String OPERATOR_JOIN_INNER_UNIDIRECTIONAL_INDEX; static final String OPERATOR_SELFJOIN_INNER_LEFT_INPUT_STREAM_NAME; static final String OPERATOR_SELFJOIN_INNER_RIGHT_INPUT_STREAM_NAME; static final String OPERATOR_SELFJOIN_INNER_INPUT_SCHEMA; static final String OPERATOR_SELFJOIN_INNER_UNIDIRECTIONAL; static final String OPERATOR_SELFJOIN_INNER_UNIDIRECTIONAL_INDEX; static final String OPERATOR_TCPCLIENT_SERVER; static final String OPERATOR_TCPCLIENT_PORT; static final String OPERATOR_TCPCLIENT_SESSIONTIMEOUT; static final String OPERATOR_TCPCLIENT_PACKAGELENGTH; static final String OPERATOR_KAFKA_ZOOKEEPERS; static final String OPERATOR_KAFKA_GROUPID; static final String OPERATOR_KAFKA_MESSAGESERIALIZERCLASS; static final String OPERATOR_KAFKA_ZKSESSIONTIMEOUT; static final String OPERATOR_KAFKA_ZKSYNCTIME; static final String OPERATOR_KAFKA_BROKERS; static final String OPERATOR_KAFKA_TOPIC; static final String OPERATOR_KAFKA_READ_FROMBEGINNING; static final String OPERATOR_HEADSTREAM_TIMEUNIT; static final String OPERATOR_HEADSTREAM_EVENTNUMPERPERIOD; static final String OPERATOR_HEADSTREAM_PERIOD; static final String OPERATOR_HEADSTREAM_ISSCHEDULE; static final String OPERATOR_HEADSTREAM_TOTALNUMBER; static final String OPERATOR_HEADSTREAM_DELAYTIME; static final String OPERATOR_CONSOLEPRINT_FREQUENCE; static final String STREAMING_SERDE_DEFAULT; static final String SERDE_SIMPLESERDE_SEPARATOR; static final String SERDE_KEYVALUESERDE_SEPARATOR; static final String SERDE_BINARYSERDE_ATTRIBUTESLENGTH; static final String SERDE_BINARYSERDE_TIMETYPE; static final String SERDE_BINARYSERDE_DECIMALYPE; static final String OPERATOR_UNION_INNER_INPUTNAMES_AND_EXPRESSION; static final String OPERATOR_UNION_INPUTNAMES_AND_SCHEMA; static final String OPERATOR_MQ_SERVICES; static final String OPERATOR_MQ_EVENTIDS; static final String OPERATOR_MQ_QUEUENAME; static final String OPERATOR_MQ_QUEUETYPE; static final String OPERATOR_MQ_LIFETIME; static final String OPERATOR_MQ_DELETETIMEOUT; static final String OPERATOR_MQ_READTIMEOUT; static final String OPERATOR_COMBINE_INPUTNAMES; static final String OPERATOR_COMBINE_INPUTNAMES_AND_KEY; static final String OPERATOR_COMBINE_INPUTNAMES_AND_EXPRESSION; static final String OPERATOR_COMBINE_INPUTNAMES_AND_SCHEMA; static final String DATASOURCE_RDB_DRIVER; static final String DATASOURCE_RDB_URL; static final String DATASOURCE_RDB_USERNAME; static final String DATASOURCE_RDB_PASSWORD; static final String DATASOURCE_RDB_DECRYPTCLASS; static final String DATASOURCE_RDB_DECRYPTTYPE; static final String OPERATOR_TCPSERVER_PORT; static final String OPERATOR_TCPSERVER_FIXEDLENGTH; static final String LIST_ALIAS; }