private static void parseArgs(String[] args) {
		
		try {
			boolean isNameNode = false;
			InetAddress address = InetAddress.getLocalHost();
			int port = 15332;

			for (int i = 0; i < args.length; i++) {

				/* It is the namenode */
				if ("-n".equalsIgnoreCase(args[i])) {
					isNameNode = true;
				}

				/* Address of this node */
				else if ("-a".equalsIgnoreCase(args[i])) {
					if (args.length > i+1) {
						address = InetAddress.getByName(args[i+1]);
					}
				}

				/* Port of this node */
				else if ("-p".equalsIgnoreCase(args[i])) {
					if (args.length > i+1) {
						port = Integer.parseInt(args[i+1]);
					}
				}
			}

			/* Initialize this node */
			if (isNameNode) {
				node = new NameNode(address, port);
			}
			else {
				node = new DataNode(address, port);
			}
			
			System.out.println("Host [ip:port]: [" + address + ":" + port + "]");
			
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
	}