public static DataNodeRemoveState getStateByCode(int code) {
    for (DataNodeRemoveState state : DataNodeRemoveState.values()) {
      if (state.code == code) {
        return state;
      }
    }
    return null;
  }
get DataNodeRemoveState by code

@param code code
@return DataNodeRemoveState
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/DataNodeRemoveState.java