private void setCurrentState(String clusterName, String instance, String resourceGroupName,
String resourceKey, String sessionId, String state) {
ZKHelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, _baseAccessor);
Builder keyBuilder = accessor.keyBuilder();
CurrentState curState = new CurrentState(resourceGroupName);
curState.setState(PartitionId.from(resourceKey), State.from(state));
curState.setSessionId(SessionId.from(sessionId));
curState.setStateModelDefRef("MasterSlave");
accessor.setProperty(keyBuilder.currentState(instance, sessionId, resourceGroupName), curState);
}