0
我正在嘗試使用Bigtable上的開始和結束行進行掃描。 掃描之間的元素大約爲100K。 我希望能夠在HBase中使用setCaching(500)
批量處理它們。Hbase vs Google Bigtable:掃描大量的行
在Bigtable中,似乎setCaching
被忽略,它會嘗試在1個RPC中獲取整個結果集。怎樣才能實現類似HBase?
我使用Java驅動程序bigtable-hbase-1.1
和版本1.0.0-pre3
Bigtable的配置:
Configuration conf = new Configuration();
conf.set("google.bigtable.buffered.mutator.throttling.enable", "false");
conf.set("google.bigtable.rpc.timeout.ms", "1500000");
conf.set("google.bigtable.grpc.read.partial.row.timeout.ms","1500000");
conf.set("google.bigtable.long.rpc.timeout.ms", "1500000");
conf.set("google.bigtable.grpc.retry.deadlineexceeded.enable", "false");
conf.set("google.bigtable.buffered.mutator.max.inflight.rpcs", "500");
conf.set("google.bigtable.bulk.max.row.key.count", "500");
Configuration conff = BigtableConfiguration.configure(conf,projectID,instanceID);
connection = BigtableConfiguration.connect(conff);
掃描器配置:
byte[] start = "prefix".getbytes() ;
byte[] end = Bytes.add("prefix".getbytes(),(byte))0xff);
Scan scan = new Scan(start, end);
預計排出來的數字是100KS的順序。
我一直保持了5分鐘之久RPC超時,並仍然得到超過截止日期錯誤。只有10萬行? – Peter
有沒有辦法調整緩衝區塊的大小?可能它太小了。 在我的情況下,因爲客戶端在新加坡和臺灣bigtable一次往返需要大約50毫秒 – Peter
或者是因爲Bigtable首先在服務器上獲取整個結果,然後將其傳輸到客戶端。我想那麼得到整個結果集可能會很費時間呢? – Peter