FlumeConfiguration extends Configuration { public synchronized static FlumeConfiguration get() { if (singleton == null) singleton = new FlumeConfiguration(); return singleton; } protected  FlumeConfiguration(); protected  FlumeConfiguration(boolean loadDefaults); static String getFlumeHome(); static String getFlumeConfDir(); synchronized static FlumeConfiguration get(); synchronized static FlumeConfiguration createTestableConfiguration(); boolean getMasterIsDistributed(); String getMasterStore(); String getMasterZKServers(); String getMasterZKConnectString(); int getMasterZKClientPort(); int getMasterZKServerQuorumPort(); int getMasterZKServerElectionPort(); boolean getMasterZKUseExternal(); String getMasterZKLogDir(); int getMasterZKTickTime(); int getMasterZKInitLimit(); int getMasterZKSyncLimit(); int getMasterServerId(); String getAgentLogsDir(); long getAgentLogMaxAge(); int getMaxRestartsPerMin(); int getNodeStatusPort(); long getAgentAckedRetransmit(); float getAgentMemoryThreshold(); int getAgentMultimasterMaxRetries(); int getAgentMultimasterRetryBackoff(); long getFailoverInitialBackoff(); long getFailoverMaxSingleBackoff(); long getFailoverMaxCumulativeBackoff(); int getPollerQueueSize(); int getThriftQueueSize(); int getThriftSocketTimeoutMs(); long getInsistentOpenInitBackoff(); long getHistoryDefaultPeriod(); long getHistoryMaxLength(); long getTailPollPeriod(); String getCollectorHost(); int getCollectorPort(); String getEventRPC(); String getCollectorDfsDir(); String getCollectorDfsCompressCodec(); long getCollectorRollMillis(); String getMasterServers(); String getMasterHeartbeatServers(); List<Pair<String, Integer>> getMasterHeartbeatServersList(); int getMasterHttpPort(); int getReportServerPort(); String getReportServerRPC(); int getMasterHeartbeatPort(); String getMasterHeartbeatRPC(); int getMasterGossipPeriodMs(); long getMasterGossipMaxAgeMs(); int getMasterGossipPort(); String getMasterGossipServers(); List<Pair<String, Integer>> getConfigMasterGossipHostsList(); long getConfigHeartbeatPeriod(); int getMasterMaxMissedheartbeats(); long getNodeHeartbeatBackoffLimit(); boolean getNodeAutofindHttpPort(); int getConfigAdminPort(); int getConfigReportPort(); String getMasterSavefile(); boolean getMasterSavefileAutoload(); String getKerberosPrincipal(); String getKerberosKeytab(); long getReporterPollPeriod(); String getFlurkerEncoding(); String getWebAppsPath(); static FlumeConfiguration hardExitLoadConfig(); String getTwitterName(); String getTwitterPW(); String getTwitterURL(); String getDefaultOutputFormat(); String getGangliaServers(); long getEventMaxSizeBytes(); String getPluginClasses(); String getHiveHost(); int getHivePort(); String getHiveUser(); String getHiveUserPW(); long getHeartbeatBackoff(); long getThriftCloseMaxSleep(); int getScribeSourcePort(); String getDefaultFlowName(); String getMasterWebappRoot(); String getNodeWebappRoot(); String toHtml(); long getNodeCloseTimeout(); boolean getWALOutputBuffering(); static final int DEFAULT_HEARTBEAT_PORT; static final int DEFAULT_GOSSIP_PORT; static final int DEFAULT_ADMIN_PORT; static final int DEFAULT_HTTP_PORT; static final int DEFAULT_REPORT_SERVER_PORT; static final int DEFAULT_ZK_CLIENT_PORT; static final int DEFAULT_ZK_SERVER_QUORUM_PORT; static final int DEFAULT_ZK_SERVER_ELECTION_PORT; static final int DEFAULT_SCRIBE_SOURCE_PORT; final static String WATCHDOG_MAX_RESTARTS; final static String AGENT_LOG_DIR_NEW; final static String AGENT_LOG_MAX_AGE; static final String AGENT_LOG_ACKED_RETRANSMIT_AGE; final static String NODE_STATUS_PORT; static final String AGENT_FAILOVER_INITIAL_BACKOFF; static final String AGENT_FAILOVER_MAX_BACKOFF; static final String AGENT_FAILOVER_MAX_CUMULATIVE_BACKOFF; static final String AGENT_HEARTBEAT_BACKOFF; static final String AGENT_MEMTHRESHOLD; static final String AGENT_MULTIMASTER_MAXRETRIES; static final String AGENT_MULTIMASTER_RETRYBACKOFF; static final String WAL_OUTPUT_BUFFER; static final String DEFAULT_FLOW_NAME; static final String POLLER_QUEUESIZE; static final String THRIFT_QUEUESIZE; static final String THRIFT_CLOSE_MAX_SLEEP; static final String THRIFT_SOCKET_TIMEOUT_MS; static final String INSISTENTOPEN_INIT_BACKOFF; static final String HISTORY_DEFAULTPERIOD; static final String HISTORY_MAXLENGTH; static final String TAIL_POLLPERIOD; static final String EVENT_RPC_TYPE; final static String COLLECTOR_EVENT_HOST; final static String COLLECTOR_EVENT_PORT; static final String COLLECTOR_DFS_DIR; static final String COLLECTOR_ROLL_MILLIS; static final String COLLECTOR_OUTPUT_FORMAT; static final String COLLECTOR_DFS_COMPRESS_CODEC; static final String MASTER_HTTP_PORT; static final String MASTER_HEARTBEAT_PORT; static final String MASTER_HEARTBEAT_SERVERS; static final String MASTER_HEARBEAT_RPC; static final String CONFIG_HEARTBEAT_PERIOD; static final String MASTER_HEARTBEAT_MAX_MISSED; static final String NODE_HEARTBEAT_BACKOFF_LIMIT; static final String NODE_HTTP_AUTOFINDPORT; static final String NODE_CLOSE_TIMEOUT; static final String CONFIG_ADMIN_PORT; static final String REPORT_SERVER_PORT; static final String REPORT_SERVER_RPC_TYPE; static final String MASTER_SAVEFILE; static final String MASTER_SAVEFILE_AUTOLOAD; static final String REPORTER_POLLER_PERIOD; static final String SECURITY_KERBEROS_PRINCIPAL; static final String SECURITY_KERBEROS_KEYTAB; static final String FLURKER_ENCODING; static final String TWITTER_STREAM_URL; static final String TWITTER_USER; static final String TWITTER_PW; static final String SCRIBE_SOURCE_PORT; static final String WEBAPPS_PATH; static final String MASTER_SERVERS; static final String MASTER_STORE; static final String MASTER_SERVER_ID; static final String MASTER_GOSSIP_SERVERS; static final String MASTER_GOSSIP_PERIOD_MS; static final String MASTER_GOSSIP_MAXAGE_MS; static final String MASTER_GOSSIP_PORT; static final String MASTER_ZK_LOGDIR; static final String MASTER_ZK_CLIENT_PORT; static final String MASTER_ZK_SERVER_QUORUM_PORT; static final String MASTER_ZK_SERVER_ELECTION_PORT; static final String MASTER_ZK_SERVERS; static final String MASTER_ZK_USE_EXTERNAL; static final String ZK_TICK_TIME; static final String ZK_INIT_LIMIT; static final String ZK_SYNC_LIMIT; static final String EVENT_MAX_SIZE; static final String GANGLIA_SERVERS; static final String HIVE_HOST; static final String HIVE_PORT; static final String HIVE_USER; static final String HIVE_PW; static final String PLUGIN_CLASSES; static final String OUTPUT_FORMAT_PLUGIN_CLASSES; static final String RPC_TYPE_THRIFT; static final String RPC_TYPE_AVRO; static final String WEBAPP_ROOT_NODE; static final String WEBAPP_ROOT_MASTER; }
@Test public void testNewFlumeConfDir() { String curConfDirProp = System.getProperty("flume.conf.dir"); try { System.setProperty("flume.conf.dir", "/a/path/that/cannot/exist"); FlumeConfiguration cfg = FlumeConfiguration.get(); assertNull(cfg.get(FlumeConfiguration.NODE_STATUS_PORT)); } finally { if (null == curConfDirProp) { System.clearProperty("flume.conf.dir"); } else { System.setProperty("flume.conf.dir", curConfDirProp); } } }