test_class.declarator: events = new ArrayList<>()
test_class.modifier: private
test_class.original_string: private List<String> events = new ArrayList<>();
test_class.type: List<String>
test_class.var_name: events
test_class.declarator: mockCollector
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private OutputCollector mockCollector;
test_class.type: OutputCollector
test_class.var_name: mockCollector
test_class.declarator: input
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private Tuple input;
test_class.type: Tuple
test_class.var_name: input
test_class.file: hendrix-storm/src/test/java/io/symcpe/hendrix/storm/bolts/TestJSONTranslatorBolt.java
test_class.identifier: TestJSONTranslatorBolt
test_case.body: @Test
  	public void testPrepare() {
  		JSONTranslatorBolt bolt = new JSONTranslatorBolt();
  		bolt.prepare(new HashMap<>(), null, mockCollector);
  		assertNotNull(bolt.getFactory());
  		assertNotNull(bolt.getGson());
  		assertNotNull(bolt.getType());
  		assertNotNull(bolt.getCollector());
  		assertEquals(mockCollector, bolt.getCollector());
  	}
test_case.class_method_signature: TestJSONTranslatorBolt.testPrepare()
test_case.full_signature: @Test public void testPrepare()
test_case.identifier: testPrepare
test_case.invocations: prepare assertNotNull getFactory assertNotNull getGson assertNotNull getType assertNotNull getCollector assertEquals getCollector
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPrepare()
focal_class.declarator: _METRIC_TRANSLATOR_FAIL = "cm.translator.fail"
focal_class.modifier: private static final
focal_class.original_string: private static final String _METRIC_TRANSLATOR_FAIL = "cm.translator.fail";
focal_class.type: String
focal_class.var_name: _METRIC_TRANSLATOR_FAIL
focal_class.declarator: _METRIC_TRANSLATOR_SUCCESS = "cm.translator.success"
focal_class.modifier: private static final
focal_class.original_string: private static final String _METRIC_TRANSLATOR_SUCCESS = "cm.translator.success";
focal_class.type: String
focal_class.var_name: _METRIC_TRANSLATOR_SUCCESS
focal_class.declarator: DEFAULT_TENANT_ID = "tenant_id"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_TENANT_ID = "tenant_id";
focal_class.type: String
focal_class.var_name: DEFAULT_TENANT_ID
focal_class.declarator: DEFAULT_TIMESTAMP = "@timestamp"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_TIMESTAMP = "@timestamp";
focal_class.type: String
focal_class.var_name: DEFAULT_TIMESTAMP
focal_class.declarator: TRANSLATOR_TIMESTAMP_KEY = "translator.timestampKey"
focal_class.modifier: private static final
focal_class.original_string: private static final String TRANSLATOR_TIMESTAMP_KEY = "translator.timestampKey";
focal_class.type: String
focal_class.var_name: TRANSLATOR_TIMESTAMP_KEY
focal_class.declarator: TRANSLATOR_TENAN_ID_KEY = "translator.tenanIdKey"
focal_class.modifier: private static final
focal_class.original_string: private static final String TRANSLATOR_TENAN_ID_KEY = "translator.tenanIdKey";
focal_class.type: String
focal_class.var_name: TRANSLATOR_TENAN_ID_KEY
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: INVALID_JSON = new PerformantException("Invalid JSON")
focal_class.modifier: private static final
focal_class.original_string: private static final PerformantException INVALID_JSON = new PerformantException("Invalid JSON");
focal_class.type: PerformantException
focal_class.var_name: INVALID_JSON
focal_class.declarator: logger
focal_class.modifier: private transient
focal_class.original_string: private transient Logger logger;
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: type
focal_class.modifier: private transient
focal_class.original_string: private transient Type type;
focal_class.type: Type
focal_class.var_name: type
focal_class.declarator: factory
focal_class.modifier: private transient
focal_class.original_string: private transient UnifiedFactory factory;
focal_class.type: UnifiedFactory
focal_class.var_name: factory
focal_class.declarator: gson
focal_class.modifier: private transient
focal_class.original_string: private transient Gson gson;
focal_class.type: Gson
focal_class.var_name: gson
focal_class.declarator: collector
focal_class.modifier: private transient
focal_class.original_string: private transient OutputCollector collector;
focal_class.type: OutputCollector
focal_class.var_name: collector
focal_class.declarator: timestampKey
focal_class.modifier: private transient
focal_class.original_string: private transient String timestampKey;
focal_class.type: String
focal_class.var_name: timestampKey
focal_class.declarator: tenantIdKey
focal_class.modifier: private transient
focal_class.original_string: private transient String tenantIdKey;
focal_class.type: String
focal_class.var_name: tenantIdKey
focal_class.declarator: sucessMetric
focal_class.modifier: private transient
focal_class.original_string: private transient CountMetric sucessMetric;
focal_class.type: CountMetric
focal_class.var_name: sucessMetric
focal_class.declarator: failMetric
focal_class.modifier: private transient
focal_class.original_string: private transient CountMetric failMetric;
focal_class.type: CountMetric
focal_class.var_name: failMetric
focal_class.file: hendrix-storm/src/main/java/io/symcpe/hendrix/storm/bolts/JSONTranslatorBolt.java
focal_class.identifier: JSONTranslatorBolt
focal_class.class_method_signature: JSONTranslatorBolt.prepare(Map stormConf, TopologyContext context, OutputCollector collector)
focal_class.full_signature: @SuppressWarnings("rawtypes") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector)
focal_class.identifier: prepare
focal_class.modifiers: @SuppressWarnings("rawtypes") @Override public
focal_class.parameters: (Map stormConf, TopologyContext context, OutputCollector collector)
focal_class.return: void
focal_class.signature: void prepare(Map stormConf, TopologyContext context, OutputCollector collector)
focal_class.class_method_signature: JSONTranslatorBolt.execute(Tuple input)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public void execute(Tuple input)
focal_class.identifier: execute
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Tuple input)
focal_class.return: void
focal_class.signature: void execute(Tuple input)
focal_class.class_method_signature: JSONTranslatorBolt.declareOutputFields(OutputFieldsDeclarer declarer)
focal_class.full_signature: @Override public void declareOutputFields(OutputFieldsDeclarer declarer)
focal_class.identifier: declareOutputFields
focal_class.modifiers: @Override public
focal_class.parameters: (OutputFieldsDeclarer declarer)
focal_class.return: void
focal_class.signature: void declareOutputFields(OutputFieldsDeclarer declarer)
focal_class.class_method_signature: JSONTranslatorBolt.getType()
focal_class.full_signature: protected Type getType()
focal_class.identifier: getType
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: Type
focal_class.signature: Type getType()
focal_class.class_method_signature: JSONTranslatorBolt.getFactory()
focal_class.full_signature: protected UnifiedFactory getFactory()
focal_class.identifier: getFactory
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: UnifiedFactory
focal_class.signature: UnifiedFactory getFactory()
focal_class.class_method_signature: JSONTranslatorBolt.getGson()
focal_class.full_signature: protected Gson getGson()
focal_class.identifier: getGson
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: Gson
focal_class.signature: Gson getGson()
focal_class.class_method_signature: JSONTranslatorBolt.getCollector()
focal_class.full_signature: protected OutputCollector getCollector()
focal_class.identifier: getCollector
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: OutputCollector
focal_class.signature: OutputCollector getCollector()
focal_class.superclass: extends BaseRichBolt
focal_method.body: @SuppressWarnings("rawtypes")
  	@Override
  	public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
  		this.logger = Logger.getLogger(JSONTranslatorBolt.class.getName());
  		this.collector = collector;
  		gson = new GsonBuilder().create();
  		type = new TypeToken<HashMap<String, Object>>() {
  		}.getType();
  		factory = new UnifiedFactory();
  		if (stormConf.get(TRANSLATOR_TIMESTAMP_KEY) != null) {
  			this.timestampKey = stormConf.get(TRANSLATOR_TIMESTAMP_KEY).toString();
  		} else {
  			timestampKey = DEFAULT_TIMESTAMP;
  		}
  		if (stormConf.get(TRANSLATOR_TENAN_ID_KEY) != null) {
  			this.timestampKey = stormConf.get(TRANSLATOR_TENAN_ID_KEY).toString();
  		} else {
  			tenantIdKey = DEFAULT_TENANT_ID;
  		}
  		sucessMetric = new CountMetric();
  		failMetric = new CountMetric();
  		if (context != null) {
  			context.registerMetric(_METRIC_TRANSLATOR_SUCCESS, sucessMetric, Constants.METRICS_FREQUENCY);
  			context.registerMetric(_METRIC_TRANSLATOR_FAIL, failMetric, Constants.METRICS_FREQUENCY);
  		}
  		logger.info("Translator bolt initialized");
  	}
focal_method.class_method_signature: JSONTranslatorBolt.prepare(Map stormConf, TopologyContext context, OutputCollector collector)
focal_method.full_signature: @SuppressWarnings("rawtypes") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector)
focal_method.identifier: prepare
focal_method.invocations: getLogger getName create getType get toString get get toString get registerMetric registerMetric info
focal_method.modifiers: @SuppressWarnings("rawtypes") @Override public
focal_method.parameters: (Map stormConf, TopologyContext context, OutputCollector collector)
focal_method.return: void
focal_method.signature: void prepare(Map stormConf, TopologyContext context, OutputCollector collector)