public class DefaultHBaseQPSResourceAllocator extends Object implements HBaseIndexQPSResourceAllocator
| Constructor and Description |
|---|
DefaultHBaseQPSResourceAllocator(HoodieWriteConfig hoodieWriteConfig) |
| Modifier and Type | Method and Description |
|---|---|
float |
acquireQPSResources(float desiredQPSFraction,
long numPuts)
This method acquires the requested QPS Fraction against HBase cluster for index operation.
|
float |
calculateQPSFractionForPutsTime(long numPuts,
int numRegionServers)
This method returns the QPS Fraction value that needs to be acquired such that the respective HBase index operation
can be completed in desiredPutsTime.
|
void |
releaseQPSResources()
This method releases the acquired QPS Fraction.
|
public DefaultHBaseQPSResourceAllocator(HoodieWriteConfig hoodieWriteConfig)
public float calculateQPSFractionForPutsTime(long numPuts,
int numRegionServers)
HBaseIndexQPSResourceAllocatorcalculateQPSFractionForPutsTime in interface HBaseIndexQPSResourceAllocatornumPuts - Number of inserts to be written to HBase indexnumRegionServers - Total expected time for the HBase inserts operationpublic float acquireQPSResources(float desiredQPSFraction,
long numPuts)
HBaseIndexQPSResourceAllocatoracquireQPSResources in interface HBaseIndexQPSResourceAllocatordesiredQPSFraction - QPS fraction that needs to be requested and acquirednumPuts - Number of inserts to be written to HBase indexpublic void releaseQPSResources()
HBaseIndexQPSResourceAllocatorreleaseQPSResources in interface HBaseIndexQPSResourceAllocatorCopyright © 2024 The Apache Software Foundation. All rights reserved.