@Override
	public boolean dump(String fileName) throws RemoteException{
		if(isExist(fileName)){
			updateDataNodes();
			try {
				if(nameNodeMaster.checkFileExistence(fileName)){
					System.out.println("File already exist and is distributed.");
					System.out.println("Please remove the file : " + fileName);
					System.out.println("And try again.");
				} else { // We need to partition the file now.
					
					// Get file partition Size
					Double partition_size = Double.parseDouble(SystemConstants.getConfig(SystemConstants.FILE_PARITION_SIZE));
					System.out.println("fileSize   " + partition_size);
					
					// 1024*1024 will be 1MB. We are adjusting the size by ratio of 1MB
					Double file_size = 1024*1024*partition_size;
					
					
					// Get replication number for the file
					Integer replication = Integer.parseInt(SystemConstants.getConfig(SystemConstants.REPLICATION));
					
					InputFileInfo fileInfo = new InputFileInfo(fileName);
					
					
					// The FileSpliter will handling the partitioning of the input.
					FileSpliter spliter;
					try {
						spliter = new FileSpliter(fileName, file_size);
						
						// This is get the first block of the partitioned file.
						String data = spliter.getNextBlock();

						while (data != null){
							
							String paritioned_fileName = fileName+"_"+spliter.getParitionSize().toString();
							
							// After getting the first block of the file, we send it out to 
							// other DataNodes and make replication according to the configuration.
							sendOutFile(data,paritioned_fileName,replication,fileInfo);
							
							data = new String();
							// Then get the new block.
							data = spliter.getNextBlock();
						}
						fileInfo.setParitionNumber(spliter.getParitionSize());

					} catch (FileNotFoundException e) {
						System.out.println("Error while accessing file : " + fileName);
						System.out.println("Check on the file and retry.");
					} catch (IOException e) {
						System.out.println("Error while opening the file please try again.");
					}
											
					
					if(fileInfo.validateFiles()){
						// Add the fileInfo on my local				
						list_inputFileInfo.add(fileInfo);
						// Register the FileInfo onto the Master.
						nameNodeMaster.registerFileInformation(fileInfo);
					} else {
						System.out.println("FileInfo is not valid, please check.");
					}
				
					return true;
					
				}
			} catch (RemoteException e) {
				// TODO Auto-generated catch block
				System.out.println("Error while accessing the remote object, please try again.");
				return false;
			} 
		} else {
			System.out.println("File that Needs to be partitioned does not exist.");
			System.out.println("Please try again.");
			return false;
		}
		return false;
	
	}