Skip to content

Commit

Permalink
add put load producer
Browse files Browse the repository at this point in the history
  • Loading branch information
manbearpig1996 committed Jan 27, 2025
1 parent f655855 commit c3599e7
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
package com.github.ambry.tools.perf.serverperf;

import com.github.ambry.clustermap.ClusterMap;
import com.github.ambry.clustermap.DataNodeId;
import com.github.ambry.clustermap.ReplicaId;
import com.github.ambry.tools.perf.serverperf.ServerPerformance.ServerPerformanceConfig;
import java.util.List;


public class PutLoadProducerConsumer implements LoadProducerConsumer {
private final ServerPerfNetworkQueue networkQueue;
private final ServerPerformanceConfig config;
private final ClusterMap clusterMap;

public PutLoadProducerConsumer(ServerPerfNetworkQueue networkQueue, ServerPerformanceConfig config,
ClusterMap clusterMap) {
this.networkQueue = networkQueue;
this.config = config;
this.clusterMap = clusterMap;
}

@Override
public void produce() throws Exception {
DataNodeId dataNodeId = clusterMap.getDataNodeId(config.serverPerformanceHostname, config.serverPerformancePort);
List<? extends ReplicaId> replicaIds = clusterMap.getReplicaIds(dataNodeId);

replicaIds.forEach(replicaId -> {
if (!replicaId.isUnsealed()) {
return;
}

// PutRequest putRequest = new PutRequest(1, BlobId.BlobIdType.NATIVE, clusterMap.getLocalDatacenterId(), )
});
}

@Override
Expand Down

0 comments on commit c3599e7

Please sign in to comment.