public synchronized List<DataNodeEntry> select(int replicaFactor) {
		
		Collection<DataNodeAbstract> dataNodeCollcetion = this.dataNodeTbl.values();
		DataNodeAbstract[] dataNodeArray = dataNodeCollcetion.toArray(new DataNodeAbstract[0]);
		Arrays.sort(dataNodeArray);
		
		List<DataNodeEntry> entries = new ArrayList<DataNodeEntry>();
		
		for (int i = 0; i < dataNodeArray.length && entries.size() < replicaFactor; i++) {
			
			if (dataNodeArray[i].isAvailable()) {
				
				entries.add(new DataNodeEntry(dataNodeArray[i].getDataNodeRegistryIp(), 
						dataNodeArray[i].getDataNodeRegistryPort(), 
						dataNodeArray[i].getDataNodeName()));
			} else {
				
				if (Hdfs.Core.DEBUG) {
					System.out.format("DEBUG NameNode.select(): Try to select DataNode<%s> but it is NOT Available.\n", dataNodeArray[i].getDataNodeName());
				}
				
			}
			
		}
		
		if (Hdfs.Core.DEBUG) {
			
			System.out.print("DEBUG NameNode.select(): Selected the following DataNodeEntries:");
			for (int i = 0; i < entries.size(); i++) {
				System.out.format("%s", entries.get(i).getNodeName());
			}
			System.out.println();
		}
		
		return entries;
	}