Skip to content

Commit

Permalink
[INLONG-9187][Agent] Delete useless memory manager (#9188)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwwhuang authored Nov 1, 2023
1 parent 5c7682c commit e136f2d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 341 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
import org.apache.inlong.agent.conf.AgentConfiguration;
import org.apache.inlong.agent.conf.JobProfile;
import org.apache.inlong.agent.constant.CommonConstants;
import org.apache.inlong.agent.core.task.MemoryManager;
import org.apache.inlong.agent.core.task.PositionManager;
import org.apache.inlong.agent.message.BatchProxyMessage;
import org.apache.inlong.agent.metrics.AgentMetricItem;
import org.apache.inlong.agent.metrics.AgentMetricItemSet;
import org.apache.inlong.agent.metrics.audit.AuditUtils;
import org.apache.inlong.agent.plugin.message.SequentialID;
import org.apache.inlong.agent.utils.AgentUtils;
import org.apache.inlong.agent.utils.ThreadUtils;
Expand All @@ -53,7 +51,6 @@

import static org.apache.inlong.agent.constant.CommonConstants.DEFAULT_PROXY_BATCH_FLUSH_INTERVAL;
import static org.apache.inlong.agent.constant.CommonConstants.PROXY_BATCH_FLUSH_INTERVAL;
import static org.apache.inlong.agent.constant.FetcherConstants.AGENT_GLOBAL_WRITER_PERMIT;
import static org.apache.inlong.agent.constant.FetcherConstants.AGENT_MANAGER_AUTH_SECRET_ID;
import static org.apache.inlong.agent.constant.FetcherConstants.AGENT_MANAGER_AUTH_SECRET_KEY;
import static org.apache.inlong.agent.constant.FetcherConstants.AGENT_MANAGER_VIP_HTTP_HOST;
Expand Down Expand Up @@ -175,10 +172,6 @@ private void cleanResendQueue() {
while (!resendQueue.isEmpty()) {
try {
AgentSenderCallback callback = resendQueue.poll(1, TimeUnit.SECONDS);
if (callback != null) {
MemoryManager.getInstance()
.release(AGENT_GLOBAL_WRITER_PERMIT, (int) callback.batchMessage.getTotalSize());
}
} catch (InterruptedException e) {
LOGGER.error("clean resend queue error{}", e.getMessage());
}
Expand Down Expand Up @@ -324,9 +317,6 @@ public void onMessageAck(SendResult result) {
String jobId = batchMessage.getJobId();
long dataTime = batchMessage.getDataTime();
if (result != null && result.equals(SendResult.OK)) {
MemoryManager.getInstance().release(AGENT_GLOBAL_WRITER_PERMIT, (int) batchMessage.getTotalSize());
AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_SEND_SUCCESS, groupId, streamId, dataTime, msgCnt,
batchMessage.getTotalSize());
getMetricItem(groupId, streamId).pluginSendSuccessCount.addAndGet(msgCnt);
PositionManager.getInstance()
.updateSinkPosition(batchMessage.getJobId(), sourcePath, msgCnt, false);
Expand Down

0 comments on commit e136f2d

Please sign in to comment.