public String read(String filename) {
		if (true == namenode.exits(filename)) {
			String data = new String();
			List<String> chunk_uuids = (List<String> ) namenode.filetable.get(filename);
			for (Object chunk_uuid : chunk_uuids) {
				int chunkloc = (Integer) namenode.chunktable.get(chunk_uuid);
				String data_temp = ((DataNode)namenode.datanodes.get(chunkloc) ).read(chunk_uuid.toString());
				if (data_temp.equals("-1")) { //ȡǰDataNodeϵchunkڻDataNodekillĳһDataNode𻵡עʱԶȡݣǲ-1棩
					System.out.println("Current chunk is broken."); 
					data_temp = ((DataNode)namenode.datanodes.get(chunkloc%namenode.num_datanodes + 1) ).read(chunk_uuid.toString());//ȡһDataNodechunk
				}
				data = data + data_temp;
			}
			return data;
		}
		else{
			System.out.println("File:"+filename+ " not exits in HDFS.");
			return "-1";
		}
	}