예제 #1
0
  private static synchronized void loadRoundRobinPartitionPolicy() {
    if (!datanodesConnected.isEmpty()) datanodesConnected.clear();

    datanodesConnected = getDatanodesConnected();
    partitionPolicy.clear();
    partitionPolicy.addNodes(datanodesConnected.toArray(new NodeStatus[datanodesConnected.size()]));
  }
예제 #2
0
 public static NodeStatus nextDatanode() {
   return partitionPolicy.nextNode();
 }