public void run() {
		HTable table = null;
		try {
			Configuration conf = HBaseConfiguration.create();
			table = new HTable(conf, tableName);
			table.setAutoFlush(false);
		} catch (IOException e) {
			System.err.println("Error writing to Hbase");
		}

		while ((!out.getStatus().equals("done")) || (out.getOutQ().size() != 0)) {
			if (out.getOutQ().size() == 0) {
				synchronized (out) {
					System.err.println("Exception while waiting");
					try {
						try {
							table.flushCommits();
						} catch (IOException e) {
							System.err.println("Exception while flushing");
						}
						out.wait();
					} catch (InterruptedException e) {
						System.err.println("Exception while waiting");
					}
				}
			}
			Map<String, String> kv = out.getOutQ().remove();
			List<Put> puts = new ArrayList<Put>();
			for (String key : kv.keySet()) {
				Put put = new Put(Bytes.toBytes(key));
				put.add(Bytes.toBytes(colFamily), Bytes.toBytes(colName),
						Bytes.toBytes(kv.get(key)));
				puts.add(put);
			}
			try {
				table.put(puts);
			} catch (IOException e) {
				System.err.println("Error writing to Hbase");
			}
		}
		try {
			table.close();
		} catch (IOException e) {
			System.err.println("Exception while closing table");
		}
	}