public class RegisterStreamer extends Object implements Iterator<RegisterWorkerPRequest>
RegisterWorkerPRequest
.
The stream lifecycle management lives internal to this instance.Constructor and Description |
---|
RegisterStreamer(BlockMasterWorkerServiceGrpc.BlockMasterWorkerServiceStub asyncClient,
long workerId,
List<String> storageTierAliases,
Map<String,Long> totalBytesOnTiers,
Map<String,Long> usedBytesOnTiers,
Map<BlockStoreLocation,List<Long>> currentBlocksOnLocation,
Map<String,List<String>> lostStorage,
List<ConfigProperty> configList)
Constructor.
|
RegisterStreamer(BlockMasterWorkerServiceGrpc.BlockMasterWorkerServiceStub asyncClient,
long workerId,
List<String> storageTierAliases,
Map<String,Long> totalBytesOnTiers,
Map<String,Long> usedBytesOnTiers,
Map<String,List<String>> lostStorage,
List<ConfigProperty> configList,
BlockMapIterator blockListIterator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
RegisterWorkerPRequest |
next() |
void |
registerWithMaster()
Manages the logic of registering with the master in a stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
public RegisterStreamer(BlockMasterWorkerServiceGrpc.BlockMasterWorkerServiceStub asyncClient, long workerId, List<String> storageTierAliases, Map<String,Long> totalBytesOnTiers, Map<String,Long> usedBytesOnTiers, Map<BlockStoreLocation,List<Long>> currentBlocksOnLocation, Map<String,List<String>> lostStorage, List<ConfigProperty> configList)
asyncClient
- the grpc clientworkerId
- the worker IDstorageTierAliases
- storage/tier setup from the configurationtotalBytesOnTiers
- the capacity of each tierusedBytesOnTiers
- the current usage of each tiercurrentBlocksOnLocation
- the blocks in each tier/dirlostStorage
- the lost storage pathsconfigList
- the configuration propertiespublic RegisterStreamer(BlockMasterWorkerServiceGrpc.BlockMasterWorkerServiceStub asyncClient, long workerId, List<String> storageTierAliases, Map<String,Long> totalBytesOnTiers, Map<String,Long> usedBytesOnTiers, Map<String,List<String>> lostStorage, List<ConfigProperty> configList, BlockMapIterator blockListIterator)
asyncClient
- the grpc clientworkerId
- the worker IDstorageTierAliases
- storage/tier setup from the configurationtotalBytesOnTiers
- the capacity of each tierusedBytesOnTiers
- the current usage of each tierlostStorage
- the lost storage pathsconfigList
- the configuration propertiesblockListIterator
- an iterator used to iterate the blockspublic void registerWithMaster() throws CancelledException, InternalException, DeadlineExceededException, InterruptedException
public boolean hasNext()
hasNext
in interface Iterator<RegisterWorkerPRequest>
public RegisterWorkerPRequest next()
next
in interface Iterator<RegisterWorkerPRequest>
Copyright © 2023. All Rights Reserved.