private static synchronized void loadRoundRobinPartitionPolicy() { if (!datanodesConnected.isEmpty()) datanodesConnected.clear(); datanodesConnected = getDatanodesConnected(); partitionPolicy.clear(); partitionPolicy.addNodes(datanodesConnected.toArray(new NodeStatus[datanodesConnected.size()])); }
public static NodeStatus nextDatanode() { return partitionPolicy.nextNode(); }