diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc.go b/pkg/compactor/client/grpc.go similarity index 93% rename from pkg/storage/stores/shipper/indexshipper/compactor/client/grpc.go rename to pkg/compactor/client/grpc.go index 4716b177ac..89fdbd7015 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc.go +++ b/pkg/compactor/client/grpc.go @@ -12,8 +12,8 @@ import ( "github.com/prometheus/common/model" "google.golang.org/grpc" - deletion_grpc "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" + deletion_grpc "github.com/grafana/loki/pkg/compactor/client/grpc" + "github.com/grafana/loki/pkg/compactor/deletion" ) type GRPCConfig struct { diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.pb.go b/pkg/compactor/client/grpc/grpc.pb.go similarity index 92% rename from pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.pb.go rename to pkg/compactor/client/grpc/grpc.pb.go index df8587446e..a6a9aabdd1 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.pb.go +++ b/pkg/compactor/client/grpc/grpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.proto +// source: pkg/compactor/client/grpc/grpc.proto package grpc @@ -34,7 +34,7 @@ type GetDeleteRequestsRequest struct { func (m *GetDeleteRequestsRequest) Reset() { *m = GetDeleteRequestsRequest{} } func (*GetDeleteRequestsRequest) ProtoMessage() {} func (*GetDeleteRequestsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5620dfc5f1418630, []int{0} + return fileDescriptor_24a5f361c0f660df, []int{0} } func (m *GetDeleteRequestsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -70,7 +70,7 @@ type GetDeleteRequestsResponse struct { func (m *GetDeleteRequestsResponse) Reset() { *m = GetDeleteRequestsResponse{} } func (*GetDeleteRequestsResponse) ProtoMessage() {} func (*GetDeleteRequestsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5620dfc5f1418630, []int{1} + return fileDescriptor_24a5f361c0f660df, []int{1} } func (m *GetDeleteRequestsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -118,7 +118,7 @@ type DeleteRequest struct { func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5620dfc5f1418630, []int{2} + return fileDescriptor_24a5f361c0f660df, []int{2} } func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -195,7 +195,7 @@ type GetCacheGenNumbersRequest struct { func (m *GetCacheGenNumbersRequest) Reset() { *m = GetCacheGenNumbersRequest{} } func (*GetCacheGenNumbersRequest) ProtoMessage() {} func (*GetCacheGenNumbersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5620dfc5f1418630, []int{3} + return fileDescriptor_24a5f361c0f660df, []int{3} } func (m *GetCacheGenNumbersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -231,7 +231,7 @@ type GetCacheGenNumbersResponse struct { func (m *GetCacheGenNumbersResponse) Reset() { *m = GetCacheGenNumbersResponse{} } func (*GetCacheGenNumbersResponse) ProtoMessage() {} func (*GetCacheGenNumbersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5620dfc5f1418630, []int{4} + return fileDescriptor_24a5f361c0f660df, []int{4} } func (m *GetCacheGenNumbersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,36 +276,35 @@ func init() { } func init() { - proto.RegisterFile("pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.proto", fileDescriptor_5620dfc5f1418630) -} - -var fileDescriptor_5620dfc5f1418630 = []byte{ - // 393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x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, - 0x78, 0xc6, 0xb4, 0xc9, 0x8c, 0x69, 0xdd, 0xaa, 0xfa, 0x1d, 0x4f, 0xbe, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xd3, 0x51, 0x00, 0xbe, 0xda, 0x02, 0x00, 0x00, + proto.RegisterFile("pkg/compactor/client/grpc/grpc.proto", fileDescriptor_24a5f361c0f660df) +} + +var fileDescriptor_24a5f361c0f660df = []byte{ + // 373 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xbb, 0x4e, 0xe3, 0x40, + 0x14, 0xf5, 0x6c, 0x1e, 0xab, 0xcc, 0x6a, 0x77, 0xc5, 0x80, 0xd0, 0x60, 0xd0, 0xc5, 0xb2, 0x28, + 0x5c, 0x25, 0x52, 0xa0, 0xa3, 0x82, 0x44, 0x44, 0x34, 0x14, 0x56, 0x24, 0x68, 0x1d, 0xe7, 0x2a, + 0x44, 0x24, 0xb6, 0x33, 0x33, 0x2e, 0xe8, 0xf8, 0x04, 0x3e, 0x83, 0x96, 0x96, 0x2f, 0xa0, 0x4c, + 0x99, 0x92, 0x38, 0x0d, 0x65, 0x3e, 0x01, 0x65, 0xec, 0x24, 0xca, 0xab, 0xb1, 0xe7, 0x9e, 0x73, + 0xe6, 0x3e, 0xce, 0x1d, 0x7a, 0x16, 0x3d, 0x75, 0x2a, 0x7e, 0xd8, 0x8f, 0x3c, 0x5f, 0x85, 0xa2, + 0xe2, 0xf7, 0xba, 0x18, 0xa8, 0x4a, 0x47, 0x44, 0xbe, 0xfe, 0x94, 0x23, 0x11, 0xaa, 0x90, 0xe5, + 0x67, 0x67, 0xdb, 0xa4, 0xbc, 0x81, 0xaa, 0x8e, 0x3d, 0x54, 0xe8, 0xe2, 0x20, 0x46, 0xa9, 0x64, + 0xf6, 0xb7, 0x1f, 0xe8, 0xd1, 0x16, 0x4e, 0x46, 0x61, 0x20, 0x91, 0x5d, 0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0x98, 0x8e, 0x81, 0xbc, 0x24, 0x40, 0xde, 0x12, 0x20, 0x9f, 0x09, 0x90, 0x61, 0x02, + 0xe4, 0x2b, 0x01, 0xf2, 0x9d, 0x80, 0x31, 0x4d, 0x80, 0xbc, 0x4e, 0xc0, 0x18, 0x4e, 0xc0, 0x18, + 0x4d, 0xc0, 0x68, 0x15, 0xf5, 0x73, 0x3c, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x80, 0xfa, 0x3c, + 0xc9, 0xb6, 0x02, 0x00, 0x00, } func (this *GetDeleteRequestsRequest) Equal(that interface{}) bool { @@ -619,7 +618,7 @@ var _Compactor_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.proto", + Metadata: "pkg/compactor/client/grpc/grpc.proto", } func (m *GetDeleteRequestsRequest) Marshal() (dAtA []byte, err error) { diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.proto b/pkg/compactor/client/grpc/grpc.proto similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/client/grpc/grpc.proto rename to pkg/compactor/client/grpc/grpc.proto diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/client/http.go b/pkg/compactor/client/http.go similarity index 98% rename from pkg/storage/stores/shipper/indexshipper/compactor/client/http.go rename to pkg/compactor/client/http.go index 3ac2593717..b5026a8194 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/client/http.go +++ b/pkg/compactor/client/http.go @@ -13,7 +13,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/crypto/tls" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" + "github.com/grafana/loki/pkg/compactor/deletion" "github.com/grafana/loki/pkg/util/log" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/compactor.go b/pkg/compactor/compactor.go similarity index 99% rename from pkg/storage/stores/shipper/indexshipper/compactor/compactor.go rename to pkg/compactor/compactor.go index e3583d4ea7..d3fae20f9a 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/compactor.go +++ b/pkg/compactor/compactor.go @@ -21,12 +21,12 @@ import ( "github.com/prometheus/common/model" "github.com/grafana/loki/pkg/analytics" + "github.com/grafana/loki/pkg/compactor/deletion" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/chunk/client" "github.com/grafana/loki/pkg/storage/chunk/client/local" chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" "github.com/grafana/loki/pkg/util" "github.com/grafana/loki/pkg/util/filter" diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/compactor_test.go b/pkg/compactor/compactor_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/compactor_test.go rename to pkg/compactor/compactor_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_request.go b/pkg/compactor/deletion/delete_request.go similarity index 98% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_request.go rename to pkg/compactor/deletion/delete_request.go index c4314ee588..5af9716a74 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_request.go +++ b/pkg/compactor/deletion/delete_request.go @@ -7,8 +7,8 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/util/filter" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_request_test.go b/pkg/compactor/deletion/delete_request_test.go similarity index 99% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_request_test.go rename to pkg/compactor/deletion/delete_request_test.go index 7df4763c33..bd83f95913 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_request_test.go +++ b/pkg/compactor/deletion/delete_request_test.go @@ -12,8 +12,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/util/filter" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_client.go b/pkg/compactor/deletion/delete_requests_client.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_client.go rename to pkg/compactor/deletion/delete_requests_client.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_client_test.go b/pkg/compactor/deletion/delete_requests_client_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_client_test.go rename to pkg/compactor/deletion/delete_requests_client_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_manager.go b/pkg/compactor/deletion/delete_requests_manager.go similarity index 98% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_manager.go rename to pkg/compactor/deletion/delete_requests_manager.go index 5c3e7e95a0..0e22439dd2 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_manager.go +++ b/pkg/compactor/deletion/delete_requests_manager.go @@ -12,8 +12,8 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" + "github.com/grafana/loki/pkg/compactor/deletionmode" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/util/filter" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_manager_test.go b/pkg/compactor/deletion/delete_requests_manager_test.go similarity index 99% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_manager_test.go rename to pkg/compactor/deletion/delete_requests_manager_test.go index 012a6d7140..c2777c9801 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_manager_test.go +++ b/pkg/compactor/deletion/delete_requests_manager_test.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/compactor/deletionmode" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/util/filter" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_store.go b/pkg/compactor/deletion/delete_requests_store.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_store.go rename to pkg/compactor/deletion/delete_requests_store.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_store_test.go b/pkg/compactor/deletion/delete_requests_store_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_store_test.go rename to pkg/compactor/deletion/delete_requests_store_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_table.go b/pkg/compactor/deletion/delete_requests_table.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_table.go rename to pkg/compactor/deletion/delete_requests_table.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_table_test.go b/pkg/compactor/deletion/delete_requests_table_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/delete_requests_table_test.go rename to pkg/compactor/deletion/delete_requests_table_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/grpc_request_handler.go b/pkg/compactor/deletion/grpc_request_handler.go similarity index 96% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/grpc_request_handler.go rename to pkg/compactor/deletion/grpc_request_handler.go index 4029895b9d..94ba7c1635 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/grpc_request_handler.go +++ b/pkg/compactor/deletion/grpc_request_handler.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/dskit/tenant" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc" + "github.com/grafana/loki/pkg/compactor/client/grpc" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/grpc_request_handler_test.go b/pkg/compactor/deletion/grpc_request_handler_test.go similarity index 97% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/grpc_request_handler_test.go rename to pkg/compactor/deletion/grpc_request_handler_test.go index 8f1f9560de..f0b2002e8d 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/grpc_request_handler_test.go +++ b/pkg/compactor/deletion/grpc_request_handler_test.go @@ -17,8 +17,8 @@ import ( "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" - compactor_client_grpc "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode" + compactor_client_grpc "github.com/grafana/loki/pkg/compactor/client/grpc" + "github.com/grafana/loki/pkg/compactor/deletionmode" ) func server(t *testing.T, h *GRPCRequestHandler) (compactor_client_grpc.CompactorClient, func()) { diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/metrics.go b/pkg/compactor/deletion/metrics.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/metrics.go rename to pkg/compactor/deletion/metrics.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/noop_delete_requests_store.go b/pkg/compactor/deletion/noop_delete_requests_store.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/noop_delete_requests_store.go rename to pkg/compactor/deletion/noop_delete_requests_store.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/request_handler.go b/pkg/compactor/deletion/request_handler.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/request_handler.go rename to pkg/compactor/deletion/request_handler.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/request_handler_test.go b/pkg/compactor/deletion/request_handler_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/request_handler_test.go rename to pkg/compactor/deletion/request_handler_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_delete_requests_client.go b/pkg/compactor/deletion/tenant_delete_requests_client.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_delete_requests_client.go rename to pkg/compactor/deletion/tenant_delete_requests_client.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_delete_requests_client_test.go b/pkg/compactor/deletion/tenant_delete_requests_client_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_delete_requests_client_test.go rename to pkg/compactor/deletion/tenant_delete_requests_client_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_request_handler.go b/pkg/compactor/deletion/tenant_request_handler.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_request_handler.go rename to pkg/compactor/deletion/tenant_request_handler.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_request_handler_test.go b/pkg/compactor/deletion/tenant_request_handler_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/tenant_request_handler_test.go rename to pkg/compactor/deletion/tenant_request_handler_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/util.go b/pkg/compactor/deletion/util.go similarity index 91% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/util.go rename to pkg/compactor/deletion/util.go index f5165ec07f..18d5822141 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/util.go +++ b/pkg/compactor/deletion/util.go @@ -3,8 +3,8 @@ package deletion import ( "errors" + "github.com/grafana/loki/pkg/compactor/deletionmode" "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode" ) var ( diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletion/util_test.go b/pkg/compactor/deletion/util_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletion/util_test.go rename to pkg/compactor/deletion/util_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode/mode.go b/pkg/compactor/deletionmode/mode.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletionmode/mode.go rename to pkg/compactor/deletionmode/mode.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode/mode_test.go b/pkg/compactor/deletionmode/mode_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/deletionmode/mode_test.go rename to pkg/compactor/deletionmode/mode_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/generationnumber/gennumber_loader.go b/pkg/compactor/generationnumber/gennumber_loader.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/generationnumber/gennumber_loader.go rename to pkg/compactor/generationnumber/gennumber_loader.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/generationnumber/gennumber_loader_test.go b/pkg/compactor/generationnumber/gennumber_loader_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/generationnumber/gennumber_loader_test.go rename to pkg/compactor/generationnumber/gennumber_loader_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/generationnumber/metrics.go b/pkg/compactor/generationnumber/metrics.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/generationnumber/metrics.go rename to pkg/compactor/generationnumber/metrics.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/index_set.go b/pkg/compactor/index_set.go similarity index 99% rename from pkg/storage/stores/shipper/indexshipper/compactor/index_set.go rename to pkg/compactor/index_set.go index 2800401196..9b6267d607 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/index_set.go +++ b/pkg/compactor/index_set.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" "github.com/grafana/loki/pkg/chunkenc" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" util_log "github.com/grafana/loki/pkg/util/log" diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/metrics.go b/pkg/compactor/metrics.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/metrics.go rename to pkg/compactor/metrics.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/expiration.go b/pkg/compactor/retention/expiration.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/expiration.go rename to pkg/compactor/retention/expiration.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/expiration_test.go b/pkg/compactor/retention/expiration_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/expiration_test.go rename to pkg/compactor/retention/expiration_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/marker.go b/pkg/compactor/retention/marker.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/marker.go rename to pkg/compactor/retention/marker.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/marker_test.go b/pkg/compactor/retention/marker_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/marker_test.go rename to pkg/compactor/retention/marker_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/metrics.go b/pkg/compactor/retention/metrics.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/metrics.go rename to pkg/compactor/retention/metrics.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/pool.go b/pkg/compactor/retention/pool.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/pool.go rename to pkg/compactor/retention/pool.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/retention.go b/pkg/compactor/retention/retention.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/retention.go rename to pkg/compactor/retention/retention.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/retention_test.go b/pkg/compactor/retention/retention_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/retention_test.go rename to pkg/compactor/retention/retention_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/series.go b/pkg/compactor/retention/series.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/series.go rename to pkg/compactor/retention/series.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/series_test.go b/pkg/compactor/retention/series_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/series_test.go rename to pkg/compactor/retention/series_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/util.go b/pkg/compactor/retention/util.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/util.go rename to pkg/compactor/retention/util.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/retention/util_test.go b/pkg/compactor/retention/util_test.go similarity index 100% rename from pkg/storage/stores/shipper/indexshipper/compactor/retention/util_test.go rename to pkg/compactor/retention/util_test.go diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/table.go b/pkg/compactor/table.go similarity index 98% rename from pkg/storage/stores/shipper/indexshipper/compactor/table.go rename to pkg/compactor/table.go index 01dcd340bb..92059a7c15 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/table.go +++ b/pkg/compactor/table.go @@ -12,9 +12,9 @@ import ( "github.com/grafana/dskit/concurrency" "github.com/prometheus/common/model" + "github.com/grafana/loki/pkg/compactor/retention" chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/table_test.go b/pkg/compactor/table_test.go similarity index 99% rename from pkg/storage/stores/shipper/indexshipper/compactor/table_test.go rename to pkg/compactor/table_test.go index 552e911690..c08c0390de 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/table_test.go +++ b/pkg/compactor/table_test.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" ) diff --git a/pkg/storage/stores/shipper/indexshipper/compactor/testutil.go b/pkg/compactor/testutil.go similarity index 99% rename from pkg/storage/stores/shipper/indexshipper/compactor/testutil.go rename to pkg/compactor/testutil.go index b79be210ec..094eea2903 100644 --- a/pkg/storage/stores/shipper/indexshipper/compactor/testutil.go +++ b/pkg/compactor/testutil.go @@ -17,10 +17,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/client/util" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" ) diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index d9cd00ac71..4cd39e6052 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -33,6 +33,7 @@ import ( "go.uber.org/atomic" "github.com/grafana/loki/pkg/analytics" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/distributor/clientpool" "github.com/grafana/loki/pkg/distributor/shardstreams" "github.com/grafana/loki/pkg/distributor/writefailures" @@ -41,7 +42,6 @@ import ( "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/logql/syntax" "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/util" util_log "github.com/grafana/loki/pkg/util/log" "github.com/grafana/loki/pkg/validation" diff --git a/pkg/distributor/limits.go b/pkg/distributor/limits.go index 5ee4e22bef..761ec8b2aa 100644 --- a/pkg/distributor/limits.go +++ b/pkg/distributor/limits.go @@ -3,8 +3,8 @@ package distributor import ( "time" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" ) // Limits is an interface for distributor limits/related configs diff --git a/pkg/loki/delete_store_listener.go b/pkg/loki/delete_store_listener.go index 327c949fbb..10fbc88a98 100644 --- a/pkg/loki/delete_store_listener.go +++ b/pkg/loki/delete_store_listener.go @@ -3,7 +3,7 @@ package loki import ( "github.com/grafana/dskit/services" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" + "github.com/grafana/loki/pkg/compactor/deletion" ) func deleteRequestsStoreListener(d deletion.DeleteRequestsClient) *listener { diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 7c5c6a8f4a..4f00f8a850 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -30,6 +30,9 @@ import ( "google.golang.org/grpc/health/grpc_health_v1" "github.com/grafana/loki/pkg/analytics" + "github.com/grafana/loki/pkg/compactor" + compactorclient "github.com/grafana/loki/pkg/compactor/client" + "github.com/grafana/loki/pkg/compactor/deletion" "github.com/grafana/loki/pkg/distributor" "github.com/grafana/loki/pkg/ingester" ingester_client "github.com/grafana/loki/pkg/ingester/client" @@ -48,9 +51,6 @@ import ( "github.com/grafana/loki/pkg/storage" "github.com/grafana/loki/pkg/storage/config" "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" - compactor_client "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/client" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" "github.com/grafana/loki/pkg/tracing" "github.com/grafana/loki/pkg/util" @@ -73,27 +73,27 @@ type Config struct { UseBufferedLogger bool `yaml:"use_buffered_logger" doc:"hidden"` UseSyncLogger bool `yaml:"use_sync_logger" doc:"hidden"` - Server server.Config `yaml:"server,omitempty"` - InternalServer internalserver.Config `yaml:"internal_server,omitempty" doc:"hidden"` - Distributor distributor.Config `yaml:"distributor,omitempty"` - Querier querier.Config `yaml:"querier,omitempty"` - QueryScheduler scheduler.Config `yaml:"query_scheduler"` - Frontend lokifrontend.Config `yaml:"frontend,omitempty"` - QueryRange queryrange.Config `yaml:"query_range,omitempty"` - Ruler ruler.Config `yaml:"ruler,omitempty"` - IngesterClient ingester_client.Config `yaml:"ingester_client,omitempty"` - Ingester ingester.Config `yaml:"ingester,omitempty"` - IndexGateway indexgateway.Config `yaml:"index_gateway"` - StorageConfig storage.Config `yaml:"storage_config,omitempty"` - ChunkStoreConfig config.ChunkStoreConfig `yaml:"chunk_store_config,omitempty"` - SchemaConfig config.SchemaConfig `yaml:"schema_config,omitempty"` - CompactorConfig compactor.Config `yaml:"compactor,omitempty"` - CompactorHTTPClient compactor_client.HTTPConfig `yaml:"compactor_client,omitempty" doc:"hidden"` - CompactorGRPCClient compactor_client.GRPCConfig `yaml:"compactor_grpc_client,omitempty" doc:"hidden"` - LimitsConfig validation.Limits `yaml:"limits_config,omitempty"` - Worker worker.Config `yaml:"frontend_worker,omitempty"` - TableManager index.TableManagerConfig `yaml:"table_manager,omitempty"` - MemberlistKV memberlist.KVConfig `yaml:"memberlist"` + Server server.Config `yaml:"server,omitempty"` + InternalServer internalserver.Config `yaml:"internal_server,omitempty" doc:"hidden"` + Distributor distributor.Config `yaml:"distributor,omitempty"` + Querier querier.Config `yaml:"querier,omitempty"` + QueryScheduler scheduler.Config `yaml:"query_scheduler"` + Frontend lokifrontend.Config `yaml:"frontend,omitempty"` + QueryRange queryrange.Config `yaml:"query_range,omitempty"` + Ruler ruler.Config `yaml:"ruler,omitempty"` + IngesterClient ingester_client.Config `yaml:"ingester_client,omitempty"` + Ingester ingester.Config `yaml:"ingester,omitempty"` + IndexGateway indexgateway.Config `yaml:"index_gateway"` + StorageConfig storage.Config `yaml:"storage_config,omitempty"` + ChunkStoreConfig config.ChunkStoreConfig `yaml:"chunk_store_config,omitempty"` + SchemaConfig config.SchemaConfig `yaml:"schema_config,omitempty"` + CompactorConfig compactor.Config `yaml:"compactor,omitempty"` + CompactorHTTPClient compactorclient.HTTPConfig `yaml:"compactor_client,omitempty" doc:"hidden"` + CompactorGRPCClient compactorclient.GRPCConfig `yaml:"compactor_grpc_client,omitempty" doc:"hidden"` + LimitsConfig validation.Limits `yaml:"limits_config,omitempty"` + Worker worker.Config `yaml:"frontend_worker,omitempty"` + TableManager index.TableManagerConfig `yaml:"table_manager,omitempty"` + MemberlistKV memberlist.KVConfig `yaml:"memberlist"` RuntimeConfig runtimeconfig.Config `yaml:"runtime_config,omitempty"` Tracing tracing.Config `yaml:"tracing"` diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index d4534016ff..a43aba18ee 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -34,6 +34,11 @@ import ( "github.com/prometheus/common/version" "github.com/grafana/loki/pkg/analytics" + "github.com/grafana/loki/pkg/compactor" + compactorclient "github.com/grafana/loki/pkg/compactor/client" + "github.com/grafana/loki/pkg/compactor/client/grpc" + "github.com/grafana/loki/pkg/compactor/deletion" + "github.com/grafana/loki/pkg/compactor/generationnumber" "github.com/grafana/loki/pkg/distributor" "github.com/grafana/loki/pkg/ingester" "github.com/grafana/loki/pkg/logproto" @@ -59,11 +64,6 @@ import ( "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" boltdbcompactor "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb/compactor" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" - compactor_client "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/client" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/client/grpc" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/generationnumber" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" "github.com/grafana/loki/pkg/util/httpreq" @@ -765,12 +765,12 @@ func (t *Loki) initCacheGenerationLoader() (_ services.Service, err error) { reg := prometheus.WrapRegistererWith(prometheus.Labels{"for": "cache_gen", "client_type": t.Cfg.Target.String()}, prometheus.DefaultRegisterer) if isGRPCAddress { - client, err = compactor_client.NewGRPCClient(compactorAddress, t.Cfg.CompactorGRPCClient, reg) + client, err = compactorclient.NewGRPCClient(compactorAddress, t.Cfg.CompactorGRPCClient, reg) if err != nil { return nil, err } } else { - client, err = compactor_client.NewHTTPClient(compactorAddress, t.Cfg.CompactorHTTPClient) + client, err = compactorclient.NewHTTPClient(compactorAddress, t.Cfg.CompactorHTTPClient) if err != nil { return nil, err } @@ -1386,12 +1386,12 @@ func (t *Loki) deleteRequestsClient(clientType string, limits limiter.CombinedLi reg := prometheus.WrapRegistererWith(prometheus.Labels{"for": "delete_requests", "client_type": clientType}, prometheus.DefaultRegisterer) var compactorClient deletion.CompactorClient if isGRPCAddress { - compactorClient, err = compactor_client.NewGRPCClient(compactorAddress, t.Cfg.CompactorGRPCClient, reg) + compactorClient, err = compactorclient.NewGRPCClient(compactorAddress, t.Cfg.CompactorGRPCClient, reg) if err != nil { return nil, err } } else { - compactorClient, err = compactor_client.NewHTTPClient(compactorAddress, t.Cfg.CompactorHTTPClient) + compactorClient, err = compactorclient.NewHTTPClient(compactorAddress, t.Cfg.CompactorHTTPClient) if err != nil { return nil, err } diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 6c7ab92470..870e5b474a 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -21,6 +21,7 @@ import ( "golang.org/x/sync/errgroup" "google.golang.org/grpc/health/grpc_health_v1" + "github.com/grafana/loki/pkg/compactor/deletion" "github.com/grafana/loki/pkg/iter" "github.com/grafana/loki/pkg/loghttp" "github.com/grafana/loki/pkg/logproto" @@ -28,7 +29,6 @@ import ( "github.com/grafana/loki/pkg/logql/syntax" "github.com/grafana/loki/pkg/storage" "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" listutil "github.com/grafana/loki/pkg/util" "github.com/grafana/loki/pkg/util/spanlogger" util_validation "github.com/grafana/loki/pkg/util/validation" diff --git a/pkg/querier/querier_test.go b/pkg/querier/querier_test.go index 79c706847c..356ff7fd65 100644 --- a/pkg/querier/querier_test.go +++ b/pkg/querier/querier_test.go @@ -18,11 +18,11 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/compactor/deletion" "github.com/grafana/loki/pkg/ingester/client" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/logql" "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" "github.com/grafana/loki/pkg/validation" ) diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go index acdd7ab655..d1ea9fcca6 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go @@ -12,12 +12,12 @@ import ( "github.com/prometheus/prometheus/model/labels" "go.etcd.io/bbolt" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/config" seriesindex "github.com/grafana/loki/pkg/storage/stores/series/index" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" shipperutil "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" ) diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go index 0a34688126..ace66e0f06 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go @@ -12,12 +12,12 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/config" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go index edfdb15117..402fb8471c 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" + "github.com/grafana/loki/pkg/compactor/retention" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go index 1f4a1c7d91..b017cb82f7 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go @@ -5,8 +5,8 @@ import ( "github.com/go-kit/log" + "github.com/grafana/loki/pkg/compactor" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go index 0a192398aa..450ccfabfc 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "go.etcd.io/bbolt" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/config" series_index "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go index adeb643a99..509e5661a4 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" ) func Test_ChunkIterator(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go index 65cedc8211..95a02137fc 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" "go.etcd.io/bbolt" + "github.com/grafana/loki/pkg/compactor" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" shipper_util "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" ) diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go index 95ea695d10..4a2b6d2371 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go @@ -16,11 +16,11 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" + "github.com/grafana/loki/pkg/compactor" "github.com/grafana/loki/pkg/storage/chunk/client" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/chunk/client/util" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" util_log "github.com/grafana/loki/pkg/util/log" diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go b/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go index c78baab0c5..21cdbc8aa4 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go @@ -14,9 +14,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" + "github.com/grafana/loki/pkg/compactor/deletion" "github.com/grafana/loki/pkg/storage/chunk/client/util" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletion" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" "github.com/grafana/loki/pkg/validation" diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go index 4beb7b0178..dac072d7a3 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go @@ -14,11 +14,11 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" + "github.com/grafana/loki/pkg/compactor" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go index a34df17b47..5a9dcea579 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go @@ -17,14 +17,14 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/compactor" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/client" "github.com/grafana/loki/pkg/storage/chunk/client/local" "github.com/grafana/loki/pkg/storage/chunk/client/util" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" util_log "github.com/grafana/loki/pkg/util/log" diff --git a/pkg/util/limiter/combined_limits.go b/pkg/util/limiter/combined_limits.go index 700460ca8e..2c2440b0f9 100644 --- a/pkg/util/limiter/combined_limits.go +++ b/pkg/util/limiter/combined_limits.go @@ -1,6 +1,7 @@ package limiter import ( + "github.com/grafana/loki/pkg/compactor" "github.com/grafana/loki/pkg/distributor" "github.com/grafana/loki/pkg/ingester" "github.com/grafana/loki/pkg/querier" @@ -8,7 +9,6 @@ import ( "github.com/grafana/loki/pkg/ruler" "github.com/grafana/loki/pkg/scheduler" "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" ) diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index 6730fea5fb..54343f6ed1 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -19,11 +19,11 @@ import ( "golang.org/x/time/rate" "gopkg.in/yaml.v2" + "github.com/grafana/loki/pkg/compactor/deletionmode" "github.com/grafana/loki/pkg/distributor/shardstreams" "github.com/grafana/loki/pkg/logql/syntax" ruler_config "github.com/grafana/loki/pkg/ruler/config" "github.com/grafana/loki/pkg/ruler/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode" "github.com/grafana/loki/pkg/util/flagext" util_log "github.com/grafana/loki/pkg/util/log" "github.com/grafana/loki/pkg/util/validation" diff --git a/pkg/validation/limits_test.go b/pkg/validation/limits_test.go index 22a0157a39..4e449e421c 100644 --- a/pkg/validation/limits_test.go +++ b/pkg/validation/limits_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/deletionmode" + "github.com/grafana/loki/pkg/compactor/deletionmode" ) func TestLimitsTagsYamlMatchJson(t *testing.T) { diff --git a/tools/doc-generator/parse/root_blocks.go b/tools/doc-generator/parse/root_blocks.go index e2dedd316c..74fe3e2fab 100644 --- a/tools/doc-generator/parse/root_blocks.go +++ b/tools/doc-generator/parse/root_blocks.go @@ -14,6 +14,7 @@ import ( "github.com/grafana/dskit/server" "github.com/grafana/loki/pkg/analytics" + "github.com/grafana/loki/pkg/compactor" "github.com/grafana/loki/pkg/distributor" "github.com/grafana/loki/pkg/ingester" ingester_client "github.com/grafana/loki/pkg/ingester/client" @@ -36,7 +37,6 @@ import ( "github.com/grafana/loki/pkg/storage/chunk/client/openstack" storage_config "github.com/grafana/loki/pkg/storage/config" "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" "github.com/grafana/loki/pkg/tracing" "github.com/grafana/loki/pkg/validation" diff --git a/tools/tsdb/tsdb-map/main.go b/tools/tsdb/tsdb-map/main.go index 4c302dbf26..7748b48c80 100644 --- a/tools/tsdb/tsdb-map/main.go +++ b/tools/tsdb/tsdb-map/main.go @@ -11,9 +11,9 @@ import ( "go.etcd.io/bbolt" "gopkg.in/yaml.v2" + "github.com/grafana/loki/pkg/compactor/retention" "github.com/grafana/loki/pkg/storage/config" boltdbcompactor "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb/compactor" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/compactor/retention" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util"