@Test public void testSegmentBuildException() throws Exception { FakeLLRealtimeSegmentDataManager segmentDataManager = createFakeSegmentManager(); LLRealtimeSegmentDataManager.PartitionConsumer consumer = segmentDataManager.createPartitionConsumer(); final LongMsgOffset endOffset = new LongMsgOffset(_startOffsetValue + 500); segmentDataManager._consumeOffsets.add(endOffset); final SegmentCompletionProtocol.Response commitResponse = new SegmentCompletionProtocol.Response( new SegmentCompletionProtocol.Response.Params().withStreamPartitionMsgOffset(endOffset.toString()) .withStatus(SegmentCompletionProtocol.ControllerResponseStatus.COMMIT)); segmentDataManager._responses.add(commitResponse); segmentDataManager._failSegmentBuild = true; consumer.run(); Assert.assertTrue(segmentDataManager._buildSegmentCalled); Assert.assertEquals(segmentDataManager._state.get(segmentDataManager), LLRealtimeSegmentDataManager.State.ERROR); segmentDataManager.destroy(); }
public void destroy() { try { stop(); } catch (InterruptedException e) { segmentLogger.error("Could not stop consumer thread"); } _realtimeSegment.destroy(); closeKafkaConsumers(); }
LLRealtimeSegmentDataManager extends RealtimeSegmentDataManager { public void destroy() { try { stop(); } catch (InterruptedException e) { segmentLogger.error("Could not stop consumer thread"); } _realtimeSegment.destroy(); closeKafkaConsumers(); } }
LLRealtimeSegmentDataManager extends RealtimeSegmentDataManager { public void destroy() { try { stop(); } catch (InterruptedException e) { segmentLogger.error("Could not stop consumer thread"); } _realtimeSegment.destroy(); closeKafkaConsumers(); } LLRealtimeSegmentDataManager(RealtimeSegmentZKMetadata segmentZKMetadata, TableConfig tableConfig,
      RealtimeTableDataManager realtimeTableDataManager, String resourceDataDir, IndexLoadingConfig indexLoadingConfig,
      Schema schema, LLCSegmentName llcSegmentName, Semaphore partitionConsumerSemaphore, ServerMetrics serverMetrics); }
LLRealtimeSegmentDataManager extends RealtimeSegmentDataManager { public void destroy() { try { stop(); } catch (InterruptedException e) { segmentLogger.error("Could not stop consumer thread"); } _realtimeSegment.destroy(); closeKafkaConsumers(); } LLRealtimeSegmentDataManager(RealtimeSegmentZKMetadata segmentZKMetadata, TableConfig tableConfig,
      RealtimeTableDataManager realtimeTableDataManager, String resourceDataDir, IndexLoadingConfig indexLoadingConfig,
      Schema schema, LLCSegmentName llcSegmentName, Semaphore partitionConsumerSemaphore, ServerMetrics serverMetrics); void goOnlineFromConsuming(RealtimeSegmentZKMetadata metadata); void destroy(); void stop(); @Override MutableSegment getSegment(); @Override String getSegmentName(); }
LLRealtimeSegmentDataManager extends RealtimeSegmentDataManager { public void destroy() { try { stop(); } catch (InterruptedException e) { segmentLogger.error("Could not stop consumer thread"); } _realtimeSegment.destroy(); closeKafkaConsumers(); } LLRealtimeSegmentDataManager(RealtimeSegmentZKMetadata segmentZKMetadata, TableConfig tableConfig,
      RealtimeTableDataManager realtimeTableDataManager, String resourceDataDir, IndexLoadingConfig indexLoadingConfig,
      Schema schema, LLCSegmentName llcSegmentName, Semaphore partitionConsumerSemaphore, ServerMetrics serverMetrics); void goOnlineFromConsuming(RealtimeSegmentZKMetadata metadata); void destroy(); void stop(); @Override MutableSegment getSegment(); @Override String getSegmentName();  }