serializationConfig.set(SerializationConfig.Feature.AUTO_DETECT_FIELDS, true);
serializationConfig.set(SerializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS, true);
StringWriter sw = new StringWriter();
try
{
mapper.writeValue(sw, data);
} catch (Exception e)
{
logger.error("Exception during data serialization. Will not write to zk. Data (first 1k): "
+ sw.toString().substring(0, 1024), e);
throw new HelixException(e);