Skip to content

Commit

Permalink
[INLONG-10761][Agent] Delete reader related code
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwwhuang committed Aug 7, 2024
1 parent a755bde commit 0b3e0a9
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 247 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,13 @@
package org.apache.inlong.agent.plugin.file;

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.plugin.Message;

import java.util.List;

/**
* Source can be split into multiple reader.
*/
public interface Source {

/**
* Split source into a list of readers.
*
* @param conf job conf
* @return list of reader
*/
List<Reader> split(TaskProfile conf);

/**
* Read message
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
package org.apache.inlong.agent.plugin.sources;

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.plugin.Message;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import org.slf4j.Logger;
Expand All @@ -41,16 +39,6 @@ public class DatabaseSqlSource extends AbstractSource {
public DatabaseSqlSource() {
}

/**
* Use SQL or binlog to read data.
*
* @return reader list or null if database type is not correct.
*/
@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
protected String getThreadName() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
package org.apache.inlong.agent.plugin.sources;

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import org.apache.commons.lang3.ObjectUtils;
Expand Down Expand Up @@ -168,11 +166,6 @@ protected boolean isRunnable() {
return runnable;
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
public boolean sourceExist() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.OffsetProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.constant.DataCollectType;
import org.apache.inlong.agent.constant.TaskConstants;
import org.apache.inlong.agent.core.FileStaticManager;
import org.apache.inlong.agent.core.FileStaticManager.FileStatic;
import org.apache.inlong.agent.core.task.OffsetManager;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.metrics.audit.AuditUtils;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;
import org.apache.inlong.agent.plugin.utils.file.FileDataUtils;
import org.apache.inlong.agent.utils.AgentUtils;
Expand Down Expand Up @@ -315,11 +313,6 @@ public boolean sourceExist() {
return fileExist;
}

@Override
public List<Reader> split(TaskProfile jobConf) {
return null;
}

@Override
protected void releaseSource() {
if (randomAccessFile != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
import org.apache.inlong.agent.common.AgentThreadFactory;
import org.apache.inlong.agent.conf.AgentConfiguration;
import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.constant.AgentConstants;
import org.apache.inlong.agent.constant.TaskConstants;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import io.debezium.connector.mongodb.MongoDbConnector;
Expand Down Expand Up @@ -130,11 +128,6 @@ private void handleConsumerEvent(List<ChangeEvent<String, String>> records,
committer.markBatchFinished();
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
protected String getThreadName() {
return "mongo-source-" + taskId + "-" + instanceId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
import org.apache.inlong.agent.common.AgentThreadFactory;
import org.apache.inlong.agent.conf.AgentConfiguration;
import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.constant.AgentConstants;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.plugin.Message;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import io.debezium.connector.oracle.OracleConnector;
Expand Down Expand Up @@ -77,11 +75,6 @@ public class OracleSource extends AbstractSource {
public OracleSource() {
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
protected String getThreadName() {
return "oracle-source-" + taskId + "-" + instanceId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
import org.apache.inlong.agent.common.AgentThreadFactory;
import org.apache.inlong.agent.conf.AgentConfiguration;
import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.constant.AgentConstants;
import org.apache.inlong.agent.constant.TaskConstants;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import io.debezium.connector.postgresql.PostgresConnector;
Expand Down Expand Up @@ -145,11 +143,6 @@ private void handleConsumerEvent(List<ChangeEvent<String, String>> records,
committer.markBatchFinished();
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
protected String getThreadName() {
return "postgres-source-" + taskId + "-" + instanceId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
package org.apache.inlong.agent.plugin.sources;

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import org.apache.commons.lang3.ObjectUtils;
Expand Down Expand Up @@ -165,11 +163,6 @@ protected void releaseSource() {
}
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
public boolean sourceExist() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
package org.apache.inlong.agent.plugin.sources;

import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.plugin.Message;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import org.slf4j.Logger;
Expand All @@ -39,11 +37,6 @@ public RedisSource() {

}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
protected String getThreadName() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
import org.apache.inlong.agent.common.AgentThreadFactory;
import org.apache.inlong.agent.conf.AgentConfiguration;
import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.constant.AgentConstants;
import org.apache.inlong.agent.constant.SqlServerConstants;
import org.apache.inlong.agent.constant.TaskConstants;
import org.apache.inlong.agent.except.FileException;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.sources.file.AbstractSource;

import io.debezium.connector.sqlserver.SqlServerConnector;
Expand Down Expand Up @@ -157,11 +155,6 @@ private void handleConsumerEvent(List<ChangeEvent<String, String>> records,
committer.markBatchFinished();
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}

@Override
protected String getThreadName() {
return "SQLServer-source-" + taskId + "-" + instanceId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.inlong.agent.common.AgentThreadFactory;
import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.conf.OffsetProfile;
import org.apache.inlong.agent.conf.TaskProfile;
import org.apache.inlong.agent.constant.CycleUnitType;
import org.apache.inlong.agent.constant.TaskConstants;
import org.apache.inlong.agent.core.task.MemoryManager;
Expand All @@ -30,7 +29,6 @@
import org.apache.inlong.agent.metrics.AgentMetricItemSet;
import org.apache.inlong.agent.metrics.audit.AuditUtils;
import org.apache.inlong.agent.plugin.Message;
import org.apache.inlong.agent.plugin.file.Reader;
import org.apache.inlong.agent.plugin.file.Source;
import org.apache.inlong.agent.plugin.sources.file.extend.ExtendedHandler;
import org.apache.inlong.agent.utils.AgentUtils;
Expand Down Expand Up @@ -405,9 +403,4 @@ private void clearQueue(BlockingQueue<SourceData> queue) {
public boolean sourceFinish() {
return emptyCount > EMPTY_CHECK_COUNT_AT_LEAST;
}

@Override
public List<Reader> split(TaskProfile conf) {
return null;
}
}
Loading

0 comments on commit 0b3e0a9

Please sign in to comment.