@Test (expectedExceptions = IllegalStateException.class) public void failedToInitThread() throws Exception { final Properties p = getUTProperties(); final TimeSeriesWorkload wl = getWorkload(p, true); final MockDB db = new MockDB(); wl.doInsert(db, null); }
@Override public boolean doInsert(DB db, Object threadstate) { if (threadstate == null) { throw new IllegalStateException("Missing thread state."); } final Map<String, ByteIterator> tags = new TreeMap<String, ByteIterator>(); final String key = ((ThreadState)threadstate).nextDataPoint(tags, true); if (db.insert(table, key, tags) == Status.OK) { return true; } return false; }
TimeSeriesWorkload extends Workload { @Override public boolean doInsert(DB db, Object threadstate) { if (threadstate == null) { throw new IllegalStateException("Missing thread state."); } final Map<String, ByteIterator> tags = new TreeMap<String, ByteIterator>(); final String key = ((ThreadState)threadstate).nextDataPoint(tags, true); if (db.insert(table, key, tags) == Status.OK) { return true; } return false; } }
TimeSeriesWorkload extends Workload { @Override public boolean doInsert(DB db, Object threadstate) { if (threadstate == null) { throw new IllegalStateException("Missing thread state."); } final Map<String, ByteIterator> tags = new TreeMap<String, ByteIterator>(); final String key = ((ThreadState)threadstate).nextDataPoint(tags, true); if (db.insert(table, key, tags) == Status.OK) { return true; } return false; }  }
TimeSeriesWorkload extends Workload { @Override public boolean doInsert(DB db, Object threadstate) { if (threadstate == null) { throw new IllegalStateException("Missing thread state."); } final Map<String, ByteIterator> tags = new TreeMap<String, ByteIterator>(); final String key = ((ThreadState)threadstate).nextDataPoint(tags, true); if (db.insert(table, key, tags) == Status.OK) { return true; } return false; }  @Override void init(final Properties p); @Override Object initThread(Properties p, int mythreadid, int threadcount); @Override boolean doInsert(DB db, Object threadstate); @Override boolean doTransaction(DB db, Object threadstate); }
TimeSeriesWorkload extends Workload { @Override public boolean doInsert(DB db, Object threadstate) { if (threadstate == null) { throw new IllegalStateException("Missing thread state."); } final Map<String, ByteIterator> tags = new TreeMap<String, ByteIterator>(); final String key = ((ThreadState)threadstate).nextDataPoint(tags, true); if (db.insert(table, key, tags) == Status.OK) { return true; } return false; }  @Override void init(final Properties p); @Override Object initThread(Properties p, int mythreadid, int threadcount); @Override boolean doInsert(DB db, Object threadstate); @Override boolean doTransaction(DB db, Object threadstate); static final String TIMESTAMP_KEY_PROPERTY; static final String TIMESTAMP_KEY_PROPERTY_DEFAULT; static final String VALUE_KEY_PROPERTY; static final String VALUE_KEY_PROPERTY_DEFAULT; static final String TIMESTAMP_INTERVAL_PROPERTY; static final String TIMESTAMP_INTERVAL_PROPERTY_DEFAULT; static final String TIMESTAMP_UNITS_PROPERTY; static final String TIMESTAMP_UNITS_PROPERTY_DEFAULT; static final String TAG_COUNT_PROPERTY; static final String TAG_COUNT_PROPERTY_DEFAULT; static final String TAG_CARDINALITY_PROPERTY; static final String TAG_CARDINALITY_PROPERTY_DEFAULT; static final String TAG_KEY_LENGTH_PROPERTY; static final String TAG_KEY_LENGTH_PROPERTY_DEFAULT; static final String TAG_VALUE_LENGTH_PROPERTY; static final String TAG_VALUE_LENGTH_PROPERTY_DEFAULT; static final String PAIR_DELIMITER_PROPERTY; static final String PAIR_DELIMITER_PROPERTY_DEFAULT; static final String DELETE_DELIMITER_PROPERTY; static final String DELETE_DELIMITER_PROPERTY_DEFAULT; static final String RANDOMIZE_TIMESTAMP_ORDER_PROPERTY; static final String RANDOMIZE_TIMESTAMP_ORDER_PROPERTY_DEFAULT; static final String RANDOMIZE_TIMESERIES_ORDER_PROPERTY; static final String RANDOMIZE_TIMESERIES_ORDER_PROPERTY_DEFAULT; static final String VALUE_TYPE_PROPERTY; static final String VALUE_TYPE_PROPERTY_DEFAULT; static final String SPARSITY_PROPERTY; static final String SPARSITY_PROPERTY_DEFAULT; static final String DELAYED_SERIES_PROPERTY; static final String DELAYED_SERIES_PROPERTY_DEFAULT; static final String DELAYED_INTERVALS_PROPERTY; static final String DELAYED_INTERVALS_PROPERTY_DEFAULT; static final String QUERY_TIMESPAN_PROPERTY; static final String QUERY_TIMESPAN_PROPERTY_DEFAULT; static final String QUERY_RANDOM_TIMESPAN_PROPERTY; static final String QUERY_RANDOM_TIMESPAN_PROPERTY_DEFAULT; static final String QUERY_TIMESPAN_DELIMITER_PROPERTY; static final String QUERY_TIMESPAN_DELIMITER_PROPERTY_DEFAULT; static final String GROUPBY_KEY_PROPERTY; static final String GROUPBY_KEY_PROPERTY_DEFAULT; static final String GROUPBY_PROPERTY; static final String GROUPBY_KEYS_PROPERTY; static final String DOWNSAMPLING_KEY_PROPERTY; static final String DOWNSAMPLING_KEY_PROPERTY_DEFAULT; static final String DOWNSAMPLING_FUNCTION_PROPERTY; static final String DOWNSAMPLING_INTERVAL_PROPERTY; }