Skip to content

Commit

Permalink
Remove fce
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Jan 10, 2019
1 parent 5f9accb commit 02fd4d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions plugin/storage/es/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package es
import (
"bufio"
"flag"
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -157,8 +156,6 @@ func createSpanWriter(
archive bool,
) (spanstore.Writer, error) {
var tags []string
fmt.Println("AAAAAA")
fmt.Println(cfg.GetTagsFilePath())
if cfg.GetTagsFilePath() != "" {
var err error
if tags, err = loadTagsFromFile(cfg.GetTagsFilePath()); err != nil {
Expand Down
12 changes: 6 additions & 6 deletions plugin/storage/es/spanstore/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ type SpanReader struct {
spanIndexPrefix string
serviceIndexPrefix string
spanConverter dbmodel.ToDomain
indicesForTimeRangeFce indicesForTimeRangeFn
indicesForTimeRangeFn indicesForTimeRangeFn
}

// SpanReaderParams holds constructor params for NewSpanReader
Expand Down Expand Up @@ -137,7 +137,7 @@ func newSpanReader(p SpanReaderParams) *SpanReader {
spanIndexPrefix: p.IndexPrefix + spanIndex,
serviceIndexPrefix: p.IndexPrefix + serviceIndex,
spanConverter: dbmodel.NewToDomain(p.TagDotReplacement),
indicesForTimeRangeFce: getIndicesFnForTimeRange(p.Archive, archivePrefix),
indicesForTimeRangeFn: getIndicesFnForTimeRange(p.Archive, archivePrefix),
}
}

Expand Down Expand Up @@ -188,7 +188,7 @@ func (s *SpanReader) GetServices(ctx context.Context) ([]string, error) {
span, ctx := opentracing.StartSpanFromContext(ctx, "GetServices")
defer span.Finish()
currentTime := time.Now()
jaegerIndices := s.indicesForTimeRangeFce(s.serviceIndexPrefix, currentTime.Add(-s.maxSpanAge), currentTime)
jaegerIndices := s.indicesForTimeRangeFn(s.serviceIndexPrefix, currentTime.Add(-s.maxSpanAge), currentTime)
return s.serviceOperationStorage.getServices(jaegerIndices)
}

Expand All @@ -197,7 +197,7 @@ func (s *SpanReader) GetOperations(ctx context.Context, service string) ([]strin
span, ctx := opentracing.StartSpanFromContext(ctx, "GetOperations")
defer span.Finish()
currentTime := time.Now()
jaegerIndices := s.indicesForTimeRangeFce(s.serviceIndexPrefix, currentTime.Add(-s.maxSpanAge), currentTime)
jaegerIndices := s.indicesForTimeRangeFn(s.serviceIndexPrefix, currentTime.Add(-s.maxSpanAge), currentTime)
return s.serviceOperationStorage.getOperations(jaegerIndices, service)
}

Expand Down Expand Up @@ -250,7 +250,7 @@ func (s *SpanReader) multiRead(ctx context.Context, traceIDs []string, startTime
var traces []*model.Trace
// Add an hour in both directions so that traces that straddle two indexes are retrieved.
// i.e starts in one and ends in another.
indices := s.indicesForTimeRangeFce(s.spanIndexPrefix, startTime.Add(-time.Hour), endTime.Add(time.Hour))
indices := s.indicesForTimeRangeFn(s.spanIndexPrefix, startTime.Add(-time.Hour), endTime.Add(time.Hour))
fmt.Println(indices)
nextTime := model.TimeAsEpochMicroseconds(startTime.Add(-time.Hour))

Expand Down Expand Up @@ -400,7 +400,7 @@ func (s *SpanReader) findTraceIDs(ctx context.Context, traceQuery *spanstore.Tra
aggregation := s.buildTraceIDAggregation(traceQuery.NumTraces)
boolQuery := s.buildFindTraceIDsQuery(traceQuery)

jaegerIndices := s.indicesForTimeRangeFce(s.spanIndexPrefix, traceQuery.StartTimeMin, traceQuery.StartTimeMax)
jaegerIndices := s.indicesForTimeRangeFn(s.spanIndexPrefix, traceQuery.StartTimeMin, traceQuery.StartTimeMax)

searchService := s.client.Search(jaegerIndices...).
Type(spanType).
Expand Down
2 changes: 1 addition & 1 deletion plugin/storage/es/spanstore/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func TestSpanReaderFindIndices(t *testing.T) {
}
withSpanReader(func(r *spanReaderTest) {
for _, testCase := range testCases {
actual := r.reader.indicesForTimeRangeFce(spanIndex, testCase.startTime, testCase.endTime)
actual := r.reader.indicesForTimeRangeFn(spanIndex, testCase.startTime, testCase.endTime)
assert.EqualValues(t, testCase.expected, actual)
}
})
Expand Down

0 comments on commit 02fd4d6

Please sign in to comment.