public static void insertOneRow(String tableName, String rowkey,String columnFamily, String column, String value) throws Exception { HTable table = new HTable(configuration, tableName); Put put = new Put(Bytes.toBytes(rowkey)); put.add(Bytes.toBytes(columnFamily), Bytes.toBytes(column), Bytes.toBytes(value)); table.put(put);// 放入表 table.close();// 释放资源 }