List of usage examples for org.apache.commons.lang.time FastDateFormat getInstance
public static FastDateFormat getInstance()
Gets a formatter instance using the default pattern in the default locale.
From source file:com.intuit.tank.PreferencesBeanTest.java
/** * Run the void setScreenWidth(int) method test. * * @throws Exception/*from w w w . ja va 2 s.c om*/ * * @generatedBy CodePro at 12/15/14 3:52 PM */ @Test public void testSetScreenWidth_1() throws Exception { PreferencesBean fixture = new PreferencesBean(); fixture.setDateTimeFotmat(FastDateFormat.getInstance()); fixture.setScreenWidth(1); fixture.setScreenHeight(1); fixture.setTimestampFormat(FastDateFormat.getInstance()); int screenWidth = 1; fixture.setScreenWidth(screenWidth); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder // at com.intuit.tank.PreferencesBean.<init>(PreferencesBean.java:179) }
From source file:com.intuit.tank.PreferencesBeanTest.java
/** * Run the void setTimestampFormat(FastDateFormat) method test. * * @throws Exception/*from w w w.j a v a 2 s . com*/ * * @generatedBy CodePro at 12/15/14 3:52 PM */ @Test public void testSetTimestampFormat_1() throws Exception { PreferencesBean fixture = new PreferencesBean(); fixture.setDateTimeFotmat(FastDateFormat.getInstance()); fixture.setScreenWidth(1); fixture.setScreenHeight(1); fixture.setTimestampFormat(FastDateFormat.getInstance()); FastDateFormat timestampFormat = FastDateFormat.getInstance(); fixture.setTimestampFormat(timestampFormat); // An unexpected exception was thrown in user code while executing this test: // java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder // at com.intuit.tank.PreferencesBean.<init>(PreferencesBean.java:179) }
From source file:org.apache.hadoop.mapred.gridmix.ClusterSummarizer.java
@Override @SuppressWarnings("deprecation") public void update(ClusterStats item) { try {/*from w w w.j av a 2 s.c o m*/ numBlacklistedTrackers = item.getStatus().getBlacklistedTrackers(); numActiveTrackers = item.getStatus().getTaskTrackers(); maxMapTasks = item.getStatus().getMaxMapTasks(); maxReduceTasks = item.getStatus().getMaxReduceTasks(); } catch (Exception e) { long time = System.currentTimeMillis(); LOG.info("Error in processing cluster status at " + FastDateFormat.getInstance().format(time)); } }