HBaseåè®°å½è¿ç¨ä¸regionnameæ¥æ¾ç®ä»ï¼ä¸»è¦æ¯çå¦ä½è¿è¡regionéæ©ï¼å®æædomainåçæ°æ®æ£åï¼åæè³ä¸åregionä¸
|-->HTable table = new HTable(config, tablename);
|-->Put put = new Put(Bytes.toBytes("test2"));
|-->put.add(Bytes.toBytes(cfs[j]), Bytes.toBytes(String.valueOf(1)), Bytes.toBytes("value_3"));
|-->table.put(put);
HTable-->put() |å©ç¨HTable管çè®°å½
|-->doPut(Arrays.asList(put));
|-->for (Put put : puts)
|-->writeBuffer.add(put);
|-->if (n % DOPUT_WB_CHECK == 0 && currentWriteBufferSize > writeBufferSize)
|-->flushCommits();
|-->if (autoFlush || currentWriteBufferSize > writeBufferSize)
|-->flushCommits();
HTable-->flushCommits() |æ交添å çè®°å½ï¼å
åéå¼å¯æ§å¶
|-->Object[] results = new Object[writeBuffer.size()];
|-->this.connection.processBatch(writeBuffer, tableName, pool, results);
|-->finally
|-->for (int i = results.length - 1; i>=0; i--)
|-->if (results[i] instanceof Result)
|-->writeBuffer.remove(i);
温馨提示:答案为网友推荐,仅供参考