class PBHelper {

  public static NamenodeRole convert(NamenodeRoleProto role) {
    switch (role) {
      case NAMENODE:
        return NamenodeRole.NAMENODE;
      case BACKUP:
        return NamenodeRole.BACKUP;
      case CHECKPOINT:
        return NamenodeRole.CHECKPOINT;
    }
    return null;
  }

  private  PBHelper();

}