Skip to content

Commit

Permalink
remove deprecated LogParse class (#1310)
Browse files Browse the repository at this point in the history
* remove deprecated LogParse class
  • Loading branch information
henryzhx8 authored Jan 4, 2024
1 parent d895044 commit 1a3830a
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 2,319 deletions.
1 change: 1 addition & 0 deletions core/monitor/Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ void LogtailMonitor::Stop() {
lock_guard<mutex> lock(mThreadRunningMux);
mIsThreadRunning = false;
}
mStopCV.notify_one();
future_status s = mThreadRes.wait_for(chrono::seconds(1));
if (s == future_status::ready) {
LOG_INFO(sLogger, ("profiling", "stopped successfully"));
Expand Down
6 changes: 1 addition & 5 deletions core/parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ project(parser)
file(GLOB LIB_SOURCE_FILES *.cpp *.h)
append_source_files(LIB_SOURCE_FILES)
add_library(${PROJECT_NAME} STATIC ${LIB_SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} common)
target_link_libraries(${PROJECT_NAME} logger)
target_link_libraries(${PROJECT_NAME} log_pb)
target_link_libraries(${PROJECT_NAME} monitor)
target_link_libraries(${PROJECT_NAME} app_config)
target_link_libraries(${PROJECT_NAME} models)
776 changes: 0 additions & 776 deletions core/parser/LogParser.cpp

This file was deleted.

146 changes: 0 additions & 146 deletions core/parser/LogParser.h

This file was deleted.

1 change: 1 addition & 0 deletions core/pipeline/PipelineManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "pipeline/PipelineManager.h"

#include "config_manager/ConfigManager.h"
#include "file_server/FileServer.h"
#include "go_pipeline/LogtailPlugin.h"
#ifdef __linux__
Expand Down
1 change: 0 additions & 1 deletion core/processor/ProcessorSPL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ void ProcessorSPL::Process(std::vector<PipelineEventGroup>& logGroupList) {
PipelineEventGroup logGroup = std::move(logGroupList[0]);
std::vector<PipelineEventGroup>().swap(logGroupList);

size_t inSize = logGroup.GetEvents().size();
std::vector<std::string> colNames{FIELD_CONTENT};
// 根据spip->getInputSearches(),设置input数组
std::vector<Input*> inputs;
Expand Down
1 change: 0 additions & 1 deletion core/processor/daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ append_source_files(LIB_SOURCE_FILES)
add_library(${PROJECT_NAME} STATIC ${LIB_SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} common)
target_link_libraries(${PROJECT_NAME} logger)
target_link_libraries(${PROJECT_NAME} parser)
target_link_libraries(${PROJECT_NAME} log_pb)
target_link_libraries(${PROJECT_NAME} monitor)
target_link_libraries(${PROJECT_NAME} app_config)
Expand Down
1 change: 0 additions & 1 deletion core/processor/daemon/LogProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "models/PipelineEventGroup.h"
#include "pipeline/PipelineManager.h"
#include "monitor/Monitor.h"
#include "parser/LogParser.h"
#include "sdk/Client.h"
#include "sender/Sender.h"
#include "log_pb/sls_logs.pb.h"
Expand Down
1 change: 0 additions & 1 deletion core/reader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ append_source_files(LIB_SOURCE_FILES)
add_library(${PROJECT_NAME} STATIC ${LIB_SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} common)
target_link_libraries(${PROJECT_NAME} logger)
target_link_libraries(${PROJECT_NAME} parser)
target_link_libraries(${PROJECT_NAME} checkpoint)
target_link_libraries(${PROJECT_NAME} monitor)
target_link_libraries(${PROJECT_NAME} event_handler)
Expand Down
29 changes: 16 additions & 13 deletions core/reader/LogFileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,28 @@
*/

#pragma once
#include <utility>

#include <atomic>
#include <deque>
#include <string>
#include <vector>
#include <unordered_set>
#include <deque>
#include <atomic>
#include "parser/LogParser.h"
#include "common/TimeUtil.h"
#include "common/StringTools.h"
#include "common/EncodingConverter.h"
#include <utility>
#include <vector>

#include "checkpoint/RangeCheckpoint.h"
#include "common/DevInode.h"
#include "common/EncodingConverter.h"
#include "common/FileInfo.h"
#include "common/LogFileOperator.h"
#include "logger/Logger.h"
#include "common/StringTools.h"
#include "common/TimeUtil.h"
#include "event/Event.h"
#include "file_server/FileDiscoveryOptions.h"
#include "file_server/MultilineOptions.h"
#include "log_pb/sls_logs.pb.h"
#include "common/FileInfo.h"
#include "checkpoint/RangeCheckpoint.h"
#include "reader/SourceBuffer.h"
#include "logger/Logger.h"
#include "reader/FileReaderOptions.h"
#include "file_server/MultilineOptions.h"
#include "reader/SourceBuffer.h"

namespace logtail {

Expand Down
2 changes: 1 addition & 1 deletion core/spl/PipelineEventGroupOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace apsara::sls::spl {

void PipelineEventGroupOutput::setHeader(const IOHeader& header, std::string& err) {
mIOHeader = &header;
for (int32_t i = 0; i < header.columnNames.size(); i++) {
for (size_t i = 0; i < header.columnNames.size(); i++) {
auto field = header.columnNames[i].ToString();
auto length = field.length();
if (length >= LENGTH_FIELD_PREFIX_TAG
Expand Down
1 change: 0 additions & 1 deletion core/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ add_subdirectory(input)
add_subdirectory(log_pb)
add_subdirectory(models)
add_subdirectory(monitor)
add_subdirectory(parser)
add_subdirectory(pipeline)
add_subdirectory(plugin)
add_subdirectory(polling)
Expand Down
25 changes: 0 additions & 25 deletions core/unittest/parser/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 1a3830a

Please # to comment.