diff --git a/.circleci/config.yml b/.circleci/config.yml index 498c56ea3..c3e1a43e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -144,16 +144,6 @@ jobs: - run: command: make test-external-lookup EXTERNAL_LOOKUP_DSN=postgresql://postgres:password@localhost/circle_test?sslmode=disable no_output_timeout: 30m - test-backup-restore: - executor: - name: golang - steps: - - checkout-plus - - skip-if-root-unchanged - - setup_remote_docker - - run: echo -n $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin - - run: make backuptests-build - - run: make backuptests cluster-tests: executor: name: golang @@ -273,10 +263,6 @@ workflows: context: molecula requires: - setup - - test-backup-restore: - context: molecula - requires: - - setup - cluster-tests: context: molecula requires: @@ -292,8 +278,6 @@ workflows: filters: tags: only: /^v.*/ - branches: - only: master - publish_release: context: molecula requires: diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index f0a523e1a..0b7cc21e9 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -74,7 +74,8 @@ run go tests: extends: .go-cache script: - echo "Running featurebase unit tests..." - - ./cover-everything.sh + - PKG_LIST=$(go list ./... | grep -v internal/clustertests | paste -s -d, -) + - go test -coverprofile=coverage.out -covermode=atomic -coverpkg=${PKG_LIST} ./... artifacts: paths: - coverage.out @@ -85,7 +86,8 @@ run go tests future: extends: .go-cache script: - echo "Running featurebase unit tests..." - - ./cover-everything.sh + - PKG_LIST=$(go list ./... | grep -v internal/clustertests | paste -s -d, -) + - go test -coverprofile=coverage.out -covermode=atomic -coverpkg=${PKG_LIST} ./... artifacts: paths: - coverage.out diff --git a/Dockerfile.pilosa b/Dockerfile.pilosa deleted file mode 100644 index 6ee2e0bbf..000000000 --- a/Dockerfile.pilosa +++ /dev/null @@ -1,37 +0,0 @@ -ARG GO_VERSION=latest - -###################### -### Pilosa builder ### -###################### - -FROM golang:${GO_VERSION} as pilosa-builder -ARG MAKE_FLAGS -WORKDIR /pilosa - -COPY . ./ - -RUN make build FLAGS="-o build/featurebase" ${MAKE_FLAGS} - -##################### -### Pilosa runner ### -##################### - -FROM alpine:3.13.2 as runner - -LABEL maintainer "dev@molecula.com" - -RUN apk add --no-cache curl jq - -COPY --from=pilosa-builder /pilosa/build/featurebase / - -COPY NOTICE /NOTICE - -EXPOSE 10101 -VOLUME /data - -ENV PILOSA_DATA_DIR /data -ENV PILOSA_BIND 0.0.0.0:10101 -ENV PILOSA_BIND_GRPC 0.0.0.0:20101 - -ENTRYPOINT ["/featurebase"] -CMD ["server"] diff --git a/Dockerfile.runner b/Dockerfile.runner deleted file mode 100644 index 12f49e13c..000000000 --- a/Dockerfile.runner +++ /dev/null @@ -1,23 +0,0 @@ -ARG GO_VERSION=latest - -###################### -### Pilosa builder ### -###################### - -FROM golang:${GO_VERSION} as pilosa-builder -ARG MAKE_FLAGS -WORKDIR /pilosa - -COPY . ./ - -RUN make build FLAGS="-o build/featurebase" ${MAKE_FLAGS} - -FROM moleculacorp/idk as idk -LABEL maintainer "dev@molecula.com" -RUN apt-get update -y -RUN apt-get install -y bash curl jq - - -COPY --from=pilosa-builder /pilosa/build/featurebase / -COPY testBackupRestore.sh / -CMD ["bash","/testBackupRestore.sh"] diff --git a/Makefile b/Makefile index f72517684..a24d8c40a 100644 --- a/Makefile +++ b/Makefile @@ -155,15 +155,6 @@ clustertests: vendor clustertests-build: vendor docker-compose -f $(DOCKER_COMPOSE) down -v docker-compose -f $(DOCKER_COMPOSE) up --exit-code-from=client1 --build -# Test Cluster backup and restore -backuptests-build: vendor - docker-compose -f docker-compose-3.yml down - docker-compose -f docker-compose-3.yml build - -backuptests: vendor - docker-compose -f docker-compose-3.yml down -v - docker-compose -f docker-compose-3.yml up --exit-code-from=client1 --abort-on-container-exit - # Install Pilosa install: diff --git a/api.go b/api.go index 65fe6d8db..d39a61f3d 100644 --- a/api.go +++ b/api.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:generate stringer -type=apiMethod package pilosa @@ -847,6 +834,15 @@ func (api *API) FragmentData(ctx context.Context, indexName, fieldName, viewName return f, nil } +type RedirectError struct { + HostPort string + error string +} + +func (r RedirectError) Error() string { + return r.error +} + // TranslateData returns all translation data in the specified partition. func (api *API) TranslateData(ctx context.Context, indexName string, partition int) (io.WriterTo, error) { span, _ := tracing.StartSpanFromContext(ctx, "API.TranslateData") @@ -862,6 +858,15 @@ func (api *API) TranslateData(ctx context.Context, indexName string, partition i return nil, newNotFoundError(ErrIndexNotFound, indexName) } + snap := topology.NewClusterSnapshot(api.cluster.noder, api.cluster.Hasher, api.cluster.ReplicaN) + nodes := snap.PartitionNodes(partition) + if nodes[0].ID != api.server.NodeID() { + return nil, RedirectError{ + HostPort: nodes[0].URI.HostPort(), + error: fmt.Sprintf("can't translate data, this node(%s) does not partition %d", api.server.uri, partition), + } + } + // Retrieve translatestore from holder. store := idx.TranslateStore(partition) if store == nil { @@ -991,7 +996,10 @@ func (api *API) Usage(ctx context.Context, remote bool) (map[string]NodeUsage, e return resp, nil } - if api.usageCache.lastCalcDuration < usageCacheMinDuration { + api.usageCache.muAssign.Lock() + lastCalc := api.usageCache.lastCalcDuration + api.usageCache.muAssign.Unlock() + if lastCalc < usageCacheMinDuration { err := api.ResetUsageCache() if err != nil { api.server.logger.Infof("could not reset usageCache: %s", err) @@ -2343,7 +2351,10 @@ func (api *API) GetTranslateEntryReader(ctx context.Context, offsets TranslateOf if field == nil { return nil, newNotFoundError(ErrFieldNotFound, fieldName) } - + store := field.TranslateStore() + if store == nil { + return nil, ErrTranslateStoreNotFound + } r, err := field.TranslateStore().EntryReader(ctx, uint64(offset)) if err != nil { return nil, errors.Wrap(err, "field translate reader") @@ -2643,7 +2654,13 @@ func (api *API) RestoreIDAlloc(r io.Reader) error { // rd is a boltdb file. func (api *API) TranslateIndexDB(ctx context.Context, indexName string, partitionID int, rd io.Reader) error { idx := api.holder.Index(indexName) + if idx == nil { + return fmt.Errorf("index %q not found", indexName) + } store := idx.TranslateStore(partitionID) + if store == nil { + return fmt.Errorf("index %q has no translate store", indexName) + } _, err := store.ReadFrom(rd) return err } @@ -2651,8 +2668,23 @@ func (api *API) TranslateIndexDB(ctx context.Context, indexName string, partitio // TranslateFieldDB is an internal function to load the field keys database func (api *API) TranslateFieldDB(ctx context.Context, indexName, fieldName string, rd io.Reader) error { idx := api.holder.Index(indexName) + if idx == nil { + return fmt.Errorf("index %q not found", indexName) + } field := idx.Field(fieldName) + if field == nil { + // Older versions used to accidentally provide an empty translation + // data file for a nonexistent field called "_keys". To make migration + // easier, we politely ignore that. + if fieldName == "_keys" { + return nil + } + return fmt.Errorf("field %q/%q not found", indexName, fieldName) + } store := field.TranslateStore() + if store == nil { + return fmt.Errorf("field %q/%q has no translate store", indexName, fieldName) + } _, err := store.ReadFrom(rd) return err } diff --git a/api/client/grpc.go b/api/client/grpc.go index 9f96dc17f..bb1479612 100644 --- a/api/client/grpc.go +++ b/api/client/grpc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client import ( diff --git a/api_test.go b/api_test.go index e5989ccb4..9ffdea841 100644 --- a/api_test.go +++ b/api_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( @@ -1356,3 +1343,75 @@ func createFieldForTest(index string, field string, coord *test.Command, t *test t.Fatalf("creating field: %v", err) } } + +func TestVariousApiTranslateCalls(t *testing.T) { + for i := 1; i < 8; i += 3 { + m := test.MustRunCluster(t, i) + defer m.Close() + node := m.GetNode(0) + api := node.API + // this should never actually get used because we're testing for errors here + r := strings.NewReader("") + // test index + idx, err := api.Holder().CreateIndex("index", pilosa.IndexOptions{}) + if err != nil { + t.Fatalf("%v: could not create test index", err) + } + _, err = idx.CreateFieldIfNotExistsWithOptions("field", &pilosa.FieldOptions{Keys: false}) + t.Run("translateIndexDbOnNilIndex", + func(t *testing.T) { + err := api.TranslateIndexDB(context.Background(), "nonExistentIndex", 0, r) + expected := fmt.Errorf("index %q not found", "nonExistentIndex") + if !reflect.DeepEqual(err, expected) { + t.Fatalf("expected '%#v', got '%#v'", expected, err) + } + }) + + t.Run("translateIndexDbOnNilTranslateStore", + func(t *testing.T) { + err := api.TranslateIndexDB(context.Background(), "index", 0, r) + expected := fmt.Errorf("index %q has no translate store", "index") + if !reflect.DeepEqual(err, expected) { + t.Fatalf("expected '%#v', got '%#v'", expected, err) + } + }) + + t.Run("translateFieldDbOnNilIndex", + func(t *testing.T) { + err := api.TranslateFieldDB(context.Background(), "nonExistentIndex", "field", r) + expected := fmt.Errorf("index %q not found", "nonExistentIndex") + if !reflect.DeepEqual(err, expected) { + t.Fatalf("expected '%#v', got '%#v'", expected, err) + } + }) + + t.Run("translateFieldDbOnNilField", + func(t *testing.T) { + err := api.TranslateFieldDB(context.Background(), "index", "nonExistentField", r) + expected := fmt.Errorf("field %q/%q not found", "index", "nonExistentField") + if !reflect.DeepEqual(err, expected) { + t.Fatalf("expected '%#v', got '%#v'", expected, err) + } + }) + + t.Run("translateFieldDbNilField_keys", + func(t *testing.T) { + err := api.TranslateFieldDB(context.Background(), "index", "_keys", r) + if err != nil { + t.Fatalf("expected 'nil', got '%#v'", err) + } + }) + /* + TODO: this test will break, bc currently all fields create translate + stores, which is a bug, but one that we will eventually fix. when we do, this + test might come in handy t.Run("translateFieldDbOnNilTranslateStore", + func(t *testing.T) { + err := api.TranslateFieldDB(context.Background(), "index", "field", r) + expected := fmt.Errorf("field %q/%q has no translate store", "index", "field") + if !reflect.DeepEqual(err, expected) { + t.Fatalf("expected '%#v', got '%#v'", expected, err) + } + }) + */ + } +} diff --git a/audit.go b/audit.go index 854853fbf..c86e56b74 100644 --- a/audit.go +++ b/audit.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/audit_internal_test.go b/audit_internal_test.go index a19c9f9b2..6382d9588 100644 --- a/audit_internal_test.go +++ b/audit_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/audit_test.go b/audit_test.go index 06f7cd4d5..c887a2398 100644 --- a/audit_test.go +++ b/audit_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/auth/auth.go b/auth/auth.go index 344055337..0d19f9461 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package auth import ( diff --git a/boltdb/translate.go b/boltdb/translate.go index 35ef2b08f..939be909c 100644 --- a/boltdb/translate.go +++ b/boltdb/translate.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package boltdb import ( diff --git a/boltdb/translate_test.go b/boltdb/translate_test.go index 61f2e61c3..c1640d62e 100644 --- a/boltdb/translate_test.go +++ b/boltdb/translate_test.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package boltdb_test import ( diff --git a/broadcast.go b/broadcast.go index 8e4285c96..022508855 100644 --- a/broadcast.go +++ b/broadcast.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/bsi.go b/bsi.go index 06a7a316b..7e776d64b 100644 --- a/bsi.go +++ b/bsi.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/bsi_test.go b/bsi_test.go index 091daf409..20e650691 100644 --- a/bsi_test.go +++ b/bsi_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/cache.go b/cache.go index 00c70a129..96b00ee1f 100644 --- a/cache.go +++ b/cache.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/cache_test.go b/cache_test.go index 65dc08f43..d3691e5b4 100644 --- a/cache_test.go +++ b/cache_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/catcher.go b/catcher.go index b4f23fa61..e1c5fd4d9 100644 --- a/catcher.go +++ b/catcher.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/client.go b/client.go index c35a67895..fe91eb124 100644 --- a/client.go +++ b/client.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/client/batch.go b/client/batch.go index 0b2ae36bb..3b8485279 100644 --- a/client/batch.go +++ b/client/batch.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client import ( @@ -342,6 +329,10 @@ func (qt *QuantizedTime) SetHour(hour string) { copy(qt.ymdh[8:10], hour) } +func (qt *QuantizedTime) Time() (time.Time, error) { + return time.Parse("2006010215", string(qt.ymdh[:])) +} + // Reset sets the time to the zero value which generates no time views. func (qt *QuantizedTime) Reset() { for i := range qt.ymdh { diff --git a/client/batch_test.go b/client/batch_test.go index 70a5d5dcb..f7fde4bad 100644 --- a/client/batch_test.go +++ b/client/batch_test.go @@ -1,18 +1,6 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//+build integration +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build integration +// +build integration package client diff --git a/client/client.go b/client/client.go index 4076069c2..211e7c3f7 100644 --- a/client/client.go +++ b/client/client.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. package client @@ -782,7 +769,7 @@ func (c *Client) readSchema() ([]SchemaIndex, error) { func (c *Client) IngestSchema(reqBody map[string]interface{}) (body []byte, err error) { data, err := json.Marshal(reqBody) if err != nil { - return data, errors.Wrap(err, " error building Schema body to Ingest") + return data, errors.Wrap(err, "error building Schema body to Ingest") } return c.IngestRequest("/internal/schema", data) } @@ -790,19 +777,19 @@ func (c *Client) IngestSchema(reqBody map[string]interface{}) (body []byte, err func (c *Client) IngestData(index string, reqBody []map[string]interface{}) (body []byte, err error) { data, err := json.Marshal(reqBody) if err != nil { - return data, errors.Wrap(err, " error building request body to Ingest") + return data, errors.Wrap(err, "error building request body to Ingest") } return c.IngestRequest("/internal/ingest/"+index, data) } -func (c *Client) IngestRequest(Uri string, data []byte) (body []byte, err error) { +func (c *Client) IngestRequest(uri string, data []byte) (body []byte, err error) { var header = make(map[string]string) header["Content-Type"] = "application/json" header["Accept"] = "application/json" header["User-Agent"] = "pilosa/" + pilosa.Version - _, body, err = c.HTTPRequest("POST", Uri, data, header) + status, body, err := c.HTTPRequest("POST", uri, data, header) if err != nil { - return nil, errors.Wrap(err, "requesting "+Uri) + return nil, errors.Wrapf(err, "requesting %s status: %d", uri, status) } return body, err } @@ -821,7 +808,6 @@ func (c *Client) shardsMax() (map[string]uint64, error) { } // HTTPRequest sends an HTTP request to the Pilosa server (used by idk) -// nolint: deadcode func (c *Client) HTTPRequest(method string, path string, data []byte, headers map[string]string) (status int, body []byte, err error) { span := c.tracer.StartSpan("Client.HTTPRequest") diff --git a/client/client_it_test.go b/client/client_it_test.go index b9137bee9..ef79f105c 100644 --- a/client/client_it_test.go +++ b/client/client_it_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client import ( diff --git a/client/client_test.go b/client/client_test.go index d567dbdb4..ea073eaac 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/cluster.go b/client/cluster.go index b883e176c..dfc407ddb 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/cluster_test.go b/client/cluster_test.go index 9b569be1d..797427371 100644 --- a/client/cluster_test.go +++ b/client/cluster_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/csv/csv.go b/client/csv/csv.go index a9c193d39..e2dd8f6a2 100644 --- a/client/csv/csv.go +++ b/client/csv/csv.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package csv import ( diff --git a/client/csv/csv_it_test.go b/client/csv/csv_it_test.go index 25fc39f31..de901816c 100644 --- a/client/csv/csv_it_test.go +++ b/client/csv/csv_it_test.go @@ -1,18 +1,6 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//+build integration +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build integration +// +build integration package csv_test diff --git a/client/csv/csv_test.go b/client/csv/csv_test.go index 66acc34f7..870237fb3 100644 --- a/client/csv/csv_test.go +++ b/client/csv/csv_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package csv_test import ( diff --git a/client/doc.go b/client/doc.go index e66240863..afd6cc244 100644 --- a/client/doc.go +++ b/client/doc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/egpool/egpool.go b/client/egpool/egpool.go index 92449cf7c..937c85912 100644 --- a/client/egpool/egpool.go +++ b/client/egpool/egpool.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package egpool import ( diff --git a/client/egpool/egpool_test.go b/client/egpool/egpool_test.go index d9b81870e..4413b813b 100644 --- a/client/egpool/egpool_test.go +++ b/client/egpool/egpool_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package egpool_test import ( diff --git a/client/error.go b/client/error.go index ee011bbc7..3c6685b62 100644 --- a/client/error.go +++ b/client/error.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client import "github.com/pkg/errors" diff --git a/client/ingest_api_batch.go b/client/ingest_api_batch.go new file mode 100644 index 000000000..2f6d35d5e --- /dev/null +++ b/client/ingest_api_batch.go @@ -0,0 +1,145 @@ +package client + +import ( + "time" + + "github.com/molecula/featurebase/v2/logger" + "github.com/pkg/errors" +) + +// NewIngestAPIBatch creates an alternate implementation of +// RecordBatch which exists to aid in testing the new Ingest API and +// is likely far slower than the Batch. +func NewIngestAPIBatch(client *Client, size int, logger logger.Logger, fields []*Field) *ingestAPIBatch { + if len(fields) == 0 { + return nil + } + + return &ingestAPIBatch{ + client: client, + log: logger, + fields: fields, + keyed: fields[0].index.Opts().Keys(), + index: fields[0].index.Name(), + batchSize: size, + + recordsK: make(map[string]map[string]interface{}), + records: make(map[uint64]map[string]interface{}), + } +} + +type ingestAPIBatch struct { + client *Client + log logger.Logger + batchSize int + + fields []*Field + keyed bool + index string + + // map[recordKey][fieldName]value + recordsK map[string]map[string]interface{} + records map[uint64]map[string]interface{} +} + +func (b *ingestAPIBatch) Add(row Row) error { + if len(row.Clears) > 0 { + return errors.New("ingest api batch does not support clears") + } + values := make(map[string]interface{}) + for i, val := range row.Values { + field := b.fields[i] + // val can be string, uint64, int64, []string, []uint64, nil + // TODO timestamp field might need special handling + // TODO check that the Row.Clears field is only used for packed bools, and then issue a warning/error (in IDK) if the ingest API mode is used in conjunction w/ packed bools. + if val == nil { + continue + } + zero := QuantizedTime{} + if field.Options().Type() == FieldTypeTime && row.Time != zero { + timeq, err := row.Time.Time() + if err != nil { + return errors.Wrap(err, "parsing row time") + } + values[field.Name()] = map[string]interface{}{"time": timeq.Format(time.RFC3339), "values": val} + } else { + values[field.Name()] = val + } + } + + if b.keyed { + switch rowID := row.ID.(type) { + case string: + b.recordsK[rowID] = values + case []byte: + b.recordsK[string(rowID)] = values + default: + return errors.Errorf("unsupported rowID %v of type %[1]T, must be string, or []byte for keyed index", rowID) + } + if len(b.recordsK) >= b.batchSize { + return ErrBatchNowFull + } + } else { + rowID, ok := row.ID.(uint64) + if !ok { + return errors.Errorf("unsupported rowID %v of type %[1]T, must be uint64 for unkeyed index", row.ID) + } + b.records[rowID] = values + if len(b.records) >= b.batchSize { + return ErrBatchNowFull + } + } + return nil +} + +func (b *ingestAPIBatch) Import() error { + if b.keyed { + return b.importKeyed() + } + return b.importUnkeyed() +} + +func (b *ingestAPIBatch) importKeyed() error { + req := []map[string]interface{}{ + { + "action": "set", + "records": b.recordsK, + }, + } + bod, err := b.client.IngestData(b.index, req) + if err != nil { + return errors.Wrapf(err, "importKeyed, body: %s", bod) + } + + for k := range b.recordsK { + delete(b.recordsK, k) + } + return nil +} + +func (b *ingestAPIBatch) importUnkeyed() error { + req := []map[string]interface{}{ + { + "action": "set", + "records": b.records, + }, + } + bod, err := b.client.IngestData(b.index, req) + if err != nil { + return errors.Wrapf(err, "importKeyed, body: %s", bod) + } + + for v := range b.records { + delete(b.records, v) + } + return nil +} + +func (b *ingestAPIBatch) Len() int { + if b.keyed { + return len(b.recordsK) + } + return len(b.records) +} + +func (b *ingestAPIBatch) Flush() error { return nil } diff --git a/client/ingest_api_batch_test.go b/client/ingest_api_batch_test.go new file mode 100644 index 000000000..df94ae33d --- /dev/null +++ b/client/ingest_api_batch_test.go @@ -0,0 +1,305 @@ +package client + +import ( + "strings" + "testing" + "time" + + "github.com/molecula/featurebase/v2/logger" + "github.com/molecula/featurebase/v2/test" +) + +func TestIngestAPIBatchAdd(t *testing.T) { + t.Run("unkeyed", func(t *testing.T) { + batch := NewIngestAPIBatch(nil, 10, logger.NopLogger, []*Field{ + { + name: "a", + index: &Index{name: "idxname", options: &IndexOptions{}}, + options: &FieldOptions{ + fieldType: FieldTypeSet, + }, + }, + { + name: "b", + index: &Index{name: "idxname", options: &IndexOptions{}}, + options: &FieldOptions{ + fieldType: FieldTypeSet, + keys: true, + }, + }, + { + name: "c", + index: &Index{name: "idxname", options: &IndexOptions{}}, + options: &FieldOptions{ + fieldType: FieldTypeTime, + keys: true, + }, + }, + }) + qt := QuantizedTime{} + qt.Set(time.Date(2007, time.January, 1, 15, 0, 0, 0, time.UTC)) + err := batch.Add(Row{ + ID: uint64(1), + Values: []interface{}{uint64(2), "bkey", "ckey"}, + Time: qt, + }) + if err != nil { + t.Fatalf("adding row to batch: %v", err) + } + + if batch.records[1]["a"] != uint64(2) { + t.Fatalf("unexpected batch.records: %+v", batch.records) + } + if batch.records[1]["b"] != "bkey" { + t.Fatalf("unexpected batch.records: %+v", batch.records) + } + if batch.records[1]["c"].(map[string]interface{})["time"] != "2007-01-01T15:00:00Z" { + t.Fatalf("unexpected batch.records: %+v", batch.records) + } + if batch.records[1]["c"].(map[string]interface{})["values"] != "ckey" { + t.Fatalf("unexpected batch.records: %+v", batch.records) + } + + }) + + t.Run("keyed", func(t *testing.T) { + batch := NewIngestAPIBatch(nil, 10, logger.NopLogger, []*Field{ + { + name: "a", + index: &Index{name: "idxname", options: &IndexOptions{keys: true}}, + options: &FieldOptions{ + fieldType: FieldTypeSet, + }, + }, + { + name: "b", + index: &Index{name: "idxname", options: &IndexOptions{keys: true}}, + options: &FieldOptions{ + fieldType: FieldTypeSet, + keys: true, + }, + }, + { + name: "c", + index: &Index{name: "idxname", options: &IndexOptions{keys: true}}, + options: &FieldOptions{ + fieldType: FieldTypeTime, + keys: true, + }, + }, + }) + qt := QuantizedTime{} + qt.Set(time.Date(2007, time.January, 1, 15, 0, 0, 0, time.UTC)) + err := batch.Add(Row{ + ID: "1", + Values: []interface{}{uint64(2), "bkey", "ckey"}, + Time: qt, + }) + + checkResult := func(batch *ingestAPIBatch, id string, err error) { + if err != nil { + t.Fatalf("adding row to batch: %v", err) + } + + if batch.recordsK[id]["a"] != uint64(2) { + t.Fatalf("unexpected batch.records: %+v", batch.recordsK) + } + if batch.recordsK[id]["b"] != "bkey" { + t.Fatalf("unexpected batch.records: %+v", batch.recordsK) + } + if batch.recordsK[id]["c"].(map[string]interface{})["time"] != "2007-01-01T15:00:00Z" { + t.Fatalf("unexpected batch.records: %+v", batch.recordsK) + } + if batch.recordsK[id]["c"].(map[string]interface{})["values"] != "ckey" { + t.Fatalf("unexpected batch.records: %+v", batch.recordsK) + } + } + checkResult(batch, "1", err) + + // test wrong type row ID + if err := batch.Add(Row{ID: 64.5}); !strings.Contains(err.Error(), "unsupported rowID") { + t.Fatalf("unexpected error w/ floating point rowID: %v", err) + } + + // test that byte slice ID works same as string + err = batch.Add(Row{ + ID: []byte("2"), + Values: []interface{}{uint64(2), "bkey", "ckey"}, + Time: qt, + }) + checkResult(batch, "2", err) + + }) +} + +func TestIngestAPIBatch(t *testing.T) { + c := test.MustRunCluster(t, 3) + defer c.Close() + + urls := make([]string, len(c.Nodes)) + for i, n := range c.Nodes { + urls[i] = n.URL() + } + + // Create a new client for the cluster + cli, err := newClientFromAddresses(urls, &ClientOptions{}) + if err != nil { + t.Fatalf("getting new client: %v", err) + } + defer cli.Close() + + cli.IngestSchema(map[string]interface{}{ + "index-name": "test-1", + "index-action": "create", + "primary-key-type": "uint", + "field-action": "create", + "fields": []map[string]interface{}{ + { + "field-name": "astr", + "field-type": "string", + "field-options": map[string]interface{}{}, + }, + { + "field-name": "bint", + "field-type": "int", + "field-options": map[string]interface{}{}, + }, + { + "field-name": "cid", + "field-type": "id", + "field-options": map[string]interface{}{}, + }, + { + "field-name": "dtimestamp", + "field-type": "timestamp", + "field-options": map[string]interface{}{ + "unit": "s", + }, + }, + { + "field-name": "etime", + "field-type": "string", + "field-options": map[string]interface{}{ + "time-quantum": "YMD", + }, + }, + { + "field-name": "fdecimal", + "field-type": "decimal", + "field-options": map[string]interface{}{ + "scale": 3, + }, + }, + { + "field-name": "gbool", + "field-type": "bool", + "field-options": map[string]interface{}{}, + }, + }, + }) + + schema, err := cli.Schema() + if err != nil { + t.Fatalf("getting schema: %v", err) + } + index := schema.Index("test-1") + defer cli.DeleteIndex(index) + + batch := NewIngestAPIBatch(cli, 10, logger.NopLogger, []*Field{ + { + name: "astr", + index: &Index{name: "test-1", options: &IndexOptions{}}, + options: &FieldOptions{fieldType: FieldTypeSet, keys: true}, + }, + { + name: "bint", + options: &FieldOptions{fieldType: FieldTypeInt}, + }, + { + name: "cid", + options: &FieldOptions{fieldType: FieldTypeSet, keys: false}, + }, + { + name: "dtimestamp", + options: &FieldOptions{fieldType: FieldTypeTimestamp}, + }, + { + name: "etime", + options: &FieldOptions{fieldType: FieldTypeTime, keys: true, timeQuantum: TimeQuantumYearMonthDay}, + }, + { + name: "fdecimal", + options: &FieldOptions{fieldType: FieldTypeDecimal, scale: 3}, + }, + { + name: "gbool", + options: &FieldOptions{fieldType: FieldTypeBool}, + }, + }) + + qt0 := &QuantizedTime{} + qt0.Set(time.Date(2010, time.January, 1, 0, 0, 0, 0, time.UTC)) + if err := batch.Add(Row{ + ID: uint64(7), + Values: []interface{}{"a", -2, 9, 1287367623, "e", 1.2345, true}, + Time: *qt0, + }); err != nil { + t.Fatalf("adding row: %v", err) + } + + // test nil value case + if err := batch.Add(Row{ + ID: uint64(8), + Values: []interface{}{nil, nil, nil, nil, nil, nil, nil}, + Time: QuantizedTime{}, + }); err != nil { + t.Fatalf("error adding all nil batch which should affect nothing: %v", err) + } + + if err := batch.Import(); err != nil { + t.Fatalf("importing row: %v", err) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(astr=a)", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(bint==-2)", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(cid=9)", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(dtimestamp=='2010-10-18T02:07:03Z')", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(etime=e, from='2010-01-01', to='2010-01-02')", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(fdecimal==1.234)", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + + if resp, err := cli.Query(NewPQLBaseQuery("Row(gbool=true)", &Index{name: "test-1", options: &IndexOptions{}}, nil)); err != nil { + t.Fatalf("querying: %v", err) + } else if len(resp.Result().Row().Columns) != 1 || resp.Result().Row().Columns[0] != uint64(7) { + t.Fatalf("unexpected Row(asr=a) result: %+v", resp.Result().Row().Columns) + } + +} diff --git a/client/logimport.go b/client/logimport.go index 56202b3a0..c5ff14ddd 100644 --- a/client/logimport.go +++ b/client/logimport.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client import ( diff --git a/client/logimport_test.go b/client/logimport_test.go index 85ceab535..8e7f1e4cb 100644 --- a/client/logimport_test.go +++ b/client/logimport_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client import ( diff --git a/client/metrics.go b/client/metrics.go index aaa14060b..86a615413 100644 --- a/client/metrics.go +++ b/client/metrics.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package client const ( diff --git a/client/orm.go b/client/orm.go index 5e8b4d76f..0c4262d63 100644 --- a/client/orm.go +++ b/client/orm.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/orm_test.go b/client/orm_test.go index 112d7556f..595710e53 100644 --- a/client/orm_test.go +++ b/client/orm_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/record.go b/client/record.go index 9f48cf750..6fc952dfc 100644 --- a/client/record.go +++ b/client/record.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/record_test.go b/client/record_test.go index a0232883a..b2aa892c8 100644 --- a/client/record_test.go +++ b/client/record_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/response.go b/client/response.go index da774f18f..b7ad51a84 100644 --- a/client/response.go +++ b/client/response.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/response_test.go b/client/response_test.go index 19ce3beec..41bd0b916 100644 --- a/client/response_test.go +++ b/client/response_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/shardnodes.go b/client/shardnodes.go index d7da05c59..332cb818c 100644 --- a/client/shardnodes.go +++ b/client/shardnodes.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/tracer.go b/client/tracer.go index f838bd3b6..53bb167d0 100644 --- a/client/tracer.go +++ b/client/tracer.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/validate.go b/client/validate.go index 77f89c42c..7e448f753 100644 --- a/client/validate.go +++ b/client/validate.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/validate_test.go b/client/validate_test.go index 1284ccf10..0d2524dd7 100644 --- a/client/validate_test.go +++ b/client/validate_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/client/version.go b/client/version.go index b3b3a474a..5bc46238a 100644 --- a/client/version.go +++ b/client/version.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. diff --git a/cluster.go b/cluster.go index 9b161ea41..6ae257352 100644 --- a/cluster.go +++ b/cluster.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( @@ -1480,6 +1467,10 @@ func (c *cluster) matchField(ctx context.Context, field *Field, like string) ([] if c.Node.ID == primary.ID { // The local copy is the authoritative copy. plan := planLike(like) + store := field.TranslateStore() + if store == nil { + return nil, ErrTranslateStoreNotFound + } return field.TranslateStore().Match(func(key []byte) bool { return matchLike(key, plan...) }) @@ -1521,6 +1512,10 @@ func (c *cluster) translateFieldListIDs(field *Field, ids []uint64) (keys []stri } if c.Node.ID == primary.ID { + store := field.TranslateStore() + if store == nil { + return nil, ErrTranslateStoreNotFound + } keys, err = field.TranslateStore().TranslateIDs(ids) } else { keys, err = c.InternalClient.TranslateIDsNode(context.Background(), &primary.URI, field.Index(), field.Name(), ids) diff --git a/cluster_internal_test.go b/cluster_internal_test.go index 5092cba73..fa3afd983 100644 --- a/cluster_internal_test.go +++ b/cluster_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/cmd.go b/cmd.go index c27e3cb4a..05036b941 100644 --- a/cmd.go +++ b/cmd.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/cmd/backup.go b/cmd/backup.go index d81029d7a..5761b6d57 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/badloader/badloader.go b/cmd/badloader/badloader.go index d64d93cde..f95d0a649 100644 --- a/cmd/badloader/badloader.go +++ b/cmd/badloader/badloader.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/cmd/check.go b/cmd/check.go index e382c779a..ac1700e07 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/check_test.go b/cmd/check_test.go index 053f840c4..a6abf0529 100644 --- a/cmd/check_test.go +++ b/cmd/check_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd_test import ( diff --git a/cmd/chksum.go b/cmd/chksum.go index 79751e525..a9fa14b0c 100644 --- a/cmd/chksum.go +++ b/cmd/chksum.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/config.go b/cmd/config.go index 6ba4e6c73..19d6bad7e 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/convert.go b/cmd/convert.go index 6c30e5a6f..4b86eff60 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/doc.go b/cmd/doc.go index 17a54043a..f959475aa 100644 --- a/cmd/doc.go +++ b/cmd/doc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. /* Package cmd contains all the pilosa subcommand definitions (1 per file). diff --git a/cmd/export.go b/cmd/export.go index 8c77f3df3..8d97b742f 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/export_test.go b/cmd/export_test.go index ec453819f..1ff43a2ab 100644 --- a/cmd/export_test.go +++ b/cmd/export_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd_test import ( diff --git a/cmd/featurebase-parse-sql/main.go b/cmd/featurebase-parse-sql/main.go index 292ff2231..d3143e419 100644 --- a/cmd/featurebase-parse-sql/main.go +++ b/cmd/featurebase-parse-sql/main.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/cmd/featurebase/main.go b/cmd/featurebase/main.go index ffabd808c..f185eac29 100644 --- a/cmd/featurebase/main.go +++ b/cmd/featurebase/main.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. /* This is the entrypoint for the Pilosa binary. */ diff --git a/cmd/generate_config.go b/cmd/generate_config.go index 8d283352e..2ee184ab9 100644 --- a/cmd/generate_config.go +++ b/cmd/generate_config.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/import.go b/cmd/import.go index eddcc6dd7..0ad7e293c 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/import_test.go b/cmd/import_test.go index 3c6f6ed85..d3713b67a 100644 --- a/cmd/import_test.go +++ b/cmd/import_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd_test import ( diff --git a/cmd/inspect_test.go b/cmd/inspect_test.go index 7de1c25ce..33dd616d6 100644 --- a/cmd/inspect_test.go +++ b/cmd/inspect_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd_test import ( diff --git a/cmd/pilosa-bench/main.go b/cmd/pilosa-bench/main.go index fda09b9ce..8f1569028 100644 --- a/cmd/pilosa-bench/main.go +++ b/cmd/pilosa-bench/main.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/cmd/random-query/main.go b/cmd/random-query/main.go index ab9adaf91..ed4416a28 100644 --- a/cmd/random-query/main.go +++ b/cmd/random-query/main.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/cmd/random-query/main_test.go b/cmd/random-query/main_test.go index 7ad6936fa..6f17c6518 100644 --- a/cmd/random-query/main_test.go +++ b/cmd/random-query/main_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/cmd/rbf.go b/cmd/rbf.go index aaeb2cd61..15c9900fd 100644 --- a/cmd/rbf.go +++ b/cmd/rbf.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/restore.go b/cmd/restore.go index 24b9a20f6..e9af62d24 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/roaring-migrate/ctim_darwin.go b/cmd/roaring-migrate/ctim_darwin.go index 0b50491ab..506ee9427 100644 --- a/cmd/roaring-migrate/ctim_darwin.go +++ b/cmd/roaring-migrate/ctim_darwin.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build darwin // +build darwin package main diff --git a/cmd/roaring-migrate/ctim_linux.go b/cmd/roaring-migrate/ctim_linux.go index 09a68435c..d52b17c37 100644 --- a/cmd/roaring-migrate/ctim_linux.go +++ b/cmd/roaring-migrate/ctim_linux.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build linux // +build linux diff --git a/cmd/roaring-migrate/main.go b/cmd/roaring-migrate/main.go index e12348e56..3ccc909a6 100644 --- a/cmd/roaring-migrate/main.go +++ b/cmd/roaring-migrate/main.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( @@ -243,9 +231,8 @@ func copyFile(src, dest string) error { } func Migrate(dataDir, backupPath string) error { - if strings.HasSuffix(dataDir, "/") { - dataDir = dataDir[:len(dataDir)-1] - } + dataDir = strings.TrimSuffix(dataDir, "/") + err := os.MkdirAll(backupPath, 0777) if err != nil { return err @@ -332,8 +319,7 @@ func Migrate(dataDir, backupPath string) error { return err } parts := strings.Split(filename, "/") - //destFile := fmt.Sprintf("%v/indexes/%v/translate/%v", backupPath, parts[1], parts[3]) - destFile := filepath.Join(backupPath, "indexes", parts[1], "translaste", parts[3]) + destFile := filepath.Join(backupPath, "indexes", parts[1], "translate", parts[3]) err = writeIfBigger(destFile, content) if err != nil { return err @@ -349,7 +335,6 @@ func Migrate(dataDir, backupPath string) error { return err } parts := strings.Split(filename, "/") - //destFile := fmt.Sprintf("%v/indexes/%v/fields/%v/translate", backupPath, parts[1], parts[2]) destFile := filepath.Join(backupPath, "indexes", parts[1], "fields", parts[2], "translate") err = writeIfBigger(destFile, content) if err != nil { diff --git a/cmd/root.go b/cmd/root.go index 98d0eb375..4ea6a30e0 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/root_test.go b/cmd/root_test.go index 2683b18df..23a36cd8c 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd_test import ( diff --git a/cmd/server.go b/cmd/server.go index 5b3bedfbd..60a541a0f 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd import ( diff --git a/cmd/server_test.go b/cmd/server_test.go index 83b8129d0..0843822b1 100644 --- a/cmd/server_test.go +++ b/cmd/server_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cmd_test import ( diff --git a/cmd/slurp/slurp.go b/cmd/slurp/slurp.go index e97768c4a..446db53b1 100644 --- a/cmd/slurp/slurp.go +++ b/cmd/slurp/slurp.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/const_amd64.go b/const_amd64.go index e0cc22abb..4864e27f9 100644 --- a/const_amd64.go +++ b/const_amd64.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build amd64 // +build amd64 diff --git a/const_other.go b/const_other.go index 7e99c229e..c283af2cb 100644 --- a/const_other.go +++ b/const_other.go @@ -1,17 +1,5 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build !amd64 // +build !amd64 package pilosa diff --git a/cover-everything.sh b/cover-everything.sh deleted file mode 100755 index 808fc9997..000000000 --- a/cover-everything.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# actually get test coverage for every single package and subpackage -# very slow but oh well what are you gonna do, not test things? -# note it skips the roaring migrate -echo "mode: atomic" > coverage.out -for pkg in $(go list all | grep featurebase ); do - go test -coverprofile=pkgcoverage.out -covermode=atomic $pkg; - tail -n +2 pkgcoverage.out >> coverage.out; done diff --git a/ctl/backup.go b/ctl/backup.go index 3a50a223b..0e8a257f1 100644 --- a/ctl/backup.go +++ b/ctl/backup.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( @@ -31,7 +18,7 @@ import ( "golang.org/x/sync/errgroup" ) -// BackupCommand represents a command for backing up a Pilosa node. +// BackupCommand represents a command for backing up a FeatureBase node. type BackupCommand struct { // nolint: maligned tlsConfig *tls.Config @@ -196,12 +183,17 @@ func (cmd *BackupCommand) backupIDAllocData(ctx context.Context) error { func (cmd *BackupCommand) backupIndexTranslation(ctx context.Context, ii *pilosa.IndexInfo) error { logger := cmd.Logger() logger.Printf("backing up index translation: %q", ii.Name) - if err := cmd.backupIndexTranslateData(ctx, ii.Name); err != nil { - return err + if ii.Options.Keys { + if err := cmd.backupIndexTranslateData(ctx, ii.Name); err != nil { + return err + } } // Back up field translation data. for _, fi := range ii.Fields { + if !fi.Options.Keys { + continue + } if err := cmd.backupFieldTranslateData(ctx, ii.Name, fi.Name); err != nil { return fmt.Errorf("cannot backup field translation data for field %q on index %q: %w", fi.Name, ii.Name, err) } @@ -299,7 +291,6 @@ func (cmd *BackupCommand) backupShardNode(ctx context.Context, indexName string, func (cmd *BackupCommand) backupIndexTranslateData(ctx context.Context, name string) error { partitionN := topology.DefaultPartitionN - // Back up all bitmap data for the index. ch := make(chan int, partitionN) for partitionID := 0; partitionID < partitionN; partitionID++ { ch <- partitionID @@ -331,9 +322,7 @@ func (cmd *BackupCommand) backupIndexPartitionTranslateData(ctx context.Context, logger.Printf("backing up index translation data: %s/%d", name, partitionID) rc, err := cmd.client.IndexTranslateDataReader(ctx, name, partitionID) - if err == pilosa.ErrTranslateStoreNotFound { - return nil - } else if err != nil { + if err != nil { return fmt.Errorf("fetching translate data reader: %w", err) } defer rc.Close() @@ -362,9 +351,7 @@ func (cmd *BackupCommand) backupFieldTranslateData(ctx context.Context, indexNam logger.Printf("backing up field translation data: %s/%s", indexName, fieldName) rc, err := cmd.client.FieldTranslateDataReader(ctx, indexName, fieldName) - if err == pilosa.ErrTranslateStoreNotFound { - return nil - } else if err != nil { + if err != nil { return fmt.Errorf("fetching translate data reader: %w", err) } defer rc.Close() diff --git a/ctl/check.go b/ctl/check.go index 7278521d0..da3a3412a 100644 --- a/ctl/check.go +++ b/ctl/check.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/check_test.go b/ctl/check_test.go index 5785b6396..cad35a4c3 100644 --- a/ctl/check_test.go +++ b/ctl/check_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/chksum.go b/ctl/chksum.go index 81fb28aae..af2430efb 100644 --- a/ctl/chksum.go +++ b/ctl/chksum.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( @@ -21,7 +8,7 @@ import ( "io" "github.com/cespare/xxhash" - "github.com/molecula/featurebase/v2" + pilosa "github.com/molecula/featurebase/v2" "github.com/molecula/featurebase/v2/server" ) @@ -74,14 +61,19 @@ func (cmd *ChkSumCommand) Run(ctx context.Context) (err error) { h := xxhash.New() for _, ii := range schema.Indexes { - qa := &pilosa.QueryRequest{Index: ii.Name, Query: "Count(All())"} + qa := &pilosa.QueryRequest{Index: ii.Name, Query: "All()"} rs, err := client.Query(ctx, ii.Name, qa) if err != nil { return err } - all := rs.Results[0].(uint64) - as := fmt.Sprintf("all=%v", all) - _, _ = h.Write([]byte(as)) + + all := rs.Results[0].(*pilosa.Row) + if len(all.Keys) > 0 { + allString := fmt.Sprintf("%v", all.Keys) + _, _ = h.Write([]byte(allString)) + } else { + _, _ = h.Write(all.Roaring()) + } for _, field := range ii.Fields { switch field.Options.Type { @@ -105,7 +97,7 @@ func (cmd *ChkSumCommand) Run(ctx context.Context) (err error) { } for _, item := range res.Results { rowids := item.(*pilosa.RowIdentifiers) - //either rowids or keys + // either rowids or keys for _, row := range rowids.Keys { countPql := fmt.Sprintf(`Count(Row(%v="%v"))`, field.Name, row) qr := &pilosa.QueryRequest{Index: ii.Name, Query: countPql} @@ -134,7 +126,7 @@ func (cmd *ChkSumCommand) Run(ctx context.Context) (err error) { } } - fmt.Printf("hash:%x\n", h.Sum(nil)) + fmt.Fprintf(cmd.Stdout, "hash:%x\n", h.Sum(nil)) } return nil diff --git a/ctl/common.go b/ctl/common.go index 976c83010..c23b42f4c 100644 --- a/ctl/common.go +++ b/ctl/common.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/config.go b/ctl/config.go index 830e9f526..526997cc0 100644 --- a/ctl/config.go +++ b/ctl/config.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/config_test.go b/ctl/config_test.go index b4036de06..a251ae008 100644 --- a/ctl/config_test.go +++ b/ctl/config_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/doc.go b/ctl/doc.go index 65623d1f7..ac7e945fe 100644 --- a/ctl/doc.go +++ b/ctl/doc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // package ctl contains all pilosa subcommands other than 'server'. These are // generally administration, testing, and debugging tools. package ctl diff --git a/ctl/export.go b/ctl/export.go index 8c1e48099..8df67c79e 100644 --- a/ctl/export.go +++ b/ctl/export.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/export_test.go b/ctl/export_test.go index 53fb4fd14..144ad3417 100644 --- a/ctl/export_test.go +++ b/ctl/export_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/generate_config.go b/ctl/generate_config.go index c35dcc2b6..96ae06f56 100644 --- a/ctl/generate_config.go +++ b/ctl/generate_config.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/generate_config_test.go b/ctl/generate_config_test.go index a431cd468..f06fee314 100644 --- a/ctl/generate_config_test.go +++ b/ctl/generate_config_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/import.go b/ctl/import.go index a616bbb67..f6ecf148c 100644 --- a/ctl/import.go +++ b/ctl/import.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/import_test.go b/ctl/import_test.go index fa82637da..fd3a2d66b 100644 --- a/ctl/import_test.go +++ b/ctl/import_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/inspect.go b/ctl/inspect.go index bbeb9d908..0848c9cbf 100644 --- a/ctl/inspect.go +++ b/ctl/inspect.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/inspect_test.go b/ctl/inspect_test.go index eca8192d1..94ed12937 100644 --- a/ctl/inspect_test.go +++ b/ctl/inspect_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/main_test.go b/ctl/main_test.go index 294e03d9a..e4c50bb9b 100644 --- a/ctl/main_test.go +++ b/ctl/main_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl_test import ( diff --git a/ctl/rbf_check.go b/ctl/rbf_check.go index 2474fab60..00594b861 100644 --- a/ctl/rbf_check.go +++ b/ctl/rbf_check.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/rbf_dump.go b/ctl/rbf_dump.go index 89710ba2a..992318de6 100644 --- a/ctl/rbf_dump.go +++ b/ctl/rbf_dump.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/rbf_page.go b/ctl/rbf_page.go index 5ba6054aa..1af1e9335 100644 --- a/ctl/rbf_page.go +++ b/ctl/rbf_page.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/rbf_pages.go b/ctl/rbf_pages.go index 4006536a8..2e831892a 100644 --- a/ctl/rbf_pages.go +++ b/ctl/rbf_pages.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/restore.go b/ctl/restore.go index 7d763be01..373581d5d 100644 --- a/ctl/restore.go +++ b/ctl/restore.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/server.go b/ctl/server.go index 06f7d1bb2..d15cd0dc2 100644 --- a/ctl/server.go +++ b/ctl/server.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/ctl/server_test.go b/ctl/server_test.go index bb0837423..18d8027e2 100644 --- a/ctl/server_test.go +++ b/ctl/server_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ctl import ( diff --git a/dbshard.go b/dbshard.go index e978609ff..df43273dd 100644 --- a/dbshard.go +++ b/dbshard.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/dbshard_internal_test.go b/dbshard_internal_test.go index 13c561810..e524ae7e7 100644 --- a/dbshard_internal_test.go +++ b/dbshard_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/dbshard_test.go b/dbshard_test.go index c53db8302..62945b1fb 100644 --- a/dbshard_test.go +++ b/dbshard_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/debugstats/stats.go b/debugstats/stats.go index edb9a3600..e2ffdfc03 100644 --- a/debugstats/stats.go +++ b/debugstats/stats.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package debugstats import ( diff --git a/debugstats/stats_test.go b/debugstats/stats_test.go index 3e801fd0e..d4bb14c62 100644 --- a/debugstats/stats_test.go +++ b/debugstats/stats_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package debugstats import ( diff --git a/delete_test.go b/delete_test.go index 886b71e81..e3e1a2aef 100644 --- a/delete_test.go +++ b/delete_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/diagnostics.go b/diagnostics.go index 705cc5b67..3742d6d88 100644 --- a/diagnostics.go +++ b/diagnostics.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/diagnostics_internal_test.go b/diagnostics_internal_test.go index 5ab532c7c..690fba1de 100644 --- a/diagnostics_internal_test.go +++ b/diagnostics_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/disco/disco.go b/disco/disco.go index 628fb7ded..7f4519f13 100644 --- a/disco/disco.go +++ b/disco/disco.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package disco import ( diff --git a/doc.go b/doc.go index 9afa1a532..540698958 100644 --- a/doc.go +++ b/doc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. /* Package pilosa implements the core of the Pilosa distributed bitmap index. It diff --git a/docker-compose-3.yml b/docker-compose-3.yml deleted file mode 100644 index ef31424d0..000000000 --- a/docker-compose-3.yml +++ /dev/null @@ -1,97 +0,0 @@ -version: "3" -services: - pilosa0: - image: build/pilosa - build: - context: . - dockerfile: Dockerfile.pilosa - environment: - PILOSA_ADVERTISE: pilosa0:10101 - PILOSA_ADVERTISE_GRPC: pilosa0:20101 - PILOSA_CLUSTER_REPLICAS: 1 - PILOSA_DATA_DIR: /data/pilosa0 - PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosa0:10201 - PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosa0:10301 - PILOSA_ETCD_INITIAL_CLUSTER: pilosa0=http://pilosa0:10301,pilosa1=http://pilosa1:10301,pilosa2=http://pilosa2:10301 - PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201 - PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301 - PILOSA_NAME: pilosa0 - PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf} - volumes: - - data:/data - healthcheck: - test: x=$$(curl -s localhost:10101/status | jq -r ".state") && [[ "$$x" == "NORMAL" ]] || $$(exit 1) - interval: 10s - timeout: 5s - retries: 5 - pilosa1: - image: build/pilosa - build: - context: . - dockerfile: Dockerfile.pilosa - environment: - PILOSA_ADVERTISE: pilosa1:10101 - PILOSA_ADVERTISE_GRPC: pilosa1:20101 - PILOSA_CLUSTER_REPLICAS: 1 - PILOSA_DATA_DIR: /data/pilosa1 - PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosa1:10201 - PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosa1:10301 - PILOSA_ETCD_INITIAL_CLUSTER: pilosa0=http://pilosa0:10301,pilosa1=http://pilosa1:10301,pilosa2=http://pilosa2:10301 - PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201 - PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301 - PILOSA_NAME: pilosa1 - PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf} - volumes: - - data:/data - pilosa2: - image: build/pilosa - build: - context: . - dockerfile: Dockerfile.pilosa - environment: - PILOSA_ADVERTISE: pilosa2:10101 - PILOSA_ADVERTISE_GRPC: pilosa2:20101 - PILOSA_CLUSTER_REPLICAS: 1 - PILOSA_DATA_DIR: /data/pilosa2 - PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosa2:10201 - PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosa2:10301 - PILOSA_ETCD_INITIAL_CLUSTER: pilosa0=http://pilosa0:10301,pilosa1=http://pilosa1:10301,pilosa2=http://pilosa2:10301 - PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201 - PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301 - PILOSA_NAME: pilosa2 - PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf} - volumes: - - data:/data - pilosax: - image: build/pilosa - build: - context: . - dockerfile: Dockerfile.pilosa - environment: - PILOSA_ADVERTISE: pilosax:10101 - PILOSA_ADVERTISE_GRPC: pilosax:20101 - PILOSA_CLUSTER_REPLICAS: 1 - PILOSA_DATA_DIR: /data/pilosax - PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosax:10201 - PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosax:10301 - PILOSA_ETCD_INITIAL_CLUSTER: pilosax=http://pilosax:10301 - PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201 - PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301 - PILOSA_NAME: pilosax - PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf} - volumes: - - data:/data - client1: - image: tgruben/bash - build: - context: . - dockerfile: Dockerfile.runner - environment: - - GO111MODULE=on - volumes: - - /var/run/docker.sock:/var/run/docker.sock - depends_on: - - pilosa0 - -volumes: - data: diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index b121de978..cb66619c3 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package proto import ( @@ -560,6 +547,9 @@ func (s Serializer) encodeQueryResponse(m *pilosa.QueryResponse) *pb.QueryRespon case []*pilosa.Row: resp.Results[i].Type = queryResultTypeRowMatrix resp.Results[i].RowMatrix = s.encodeRowMatrix(result) + case pilosa.DistinctTimestamp: + resp.Results[i].Type = queryResultTypeDistinctTimestamp + resp.Results[i].DistinctTimestamp = s.encodeDistinctTimestamp(result) case nil: resp.Results[i].Type = queryResultTypeNil default: @@ -1380,6 +1370,13 @@ func (s Serializer) decodeRowMatrix(pb *pb.RowMatrix) []*pilosa.Row { return rows } +func (s Serializer) decodeDistinctTimestamp(pb *pb.DistinctTimestamp) pilosa.DistinctTimestamp { + return pilosa.DistinctTimestamp{ + Values: pb.Values, + Name: pb.Name, + } +} + func decodeTransaction(pb *pb.Transaction, trns *pilosa.Transaction) { trns.ID = pb.ID trns.Active = pb.Active @@ -1407,6 +1404,7 @@ const ( queryResultTypeSignedRow queryResultTypeExtractedIDMatrix queryResultTypeExtractedTable + queryResultTypeDistinctTimestamp ) func (s Serializer) decodeQueryResult(pb *pb.QueryResult) interface{} { @@ -1443,6 +1441,8 @@ func (s Serializer) decodeQueryResult(pb *pb.QueryResult) interface{} { return s.decodeExtractedTable(pb.ExtractedTable) case queryResultTypeRowMatrix: return s.decodeRowMatrix(pb.RowMatrix) + case queryResultTypeDistinctTimestamp: + return s.decodeDistinctTimestamp(pb.DistinctTimestamp) } panic(fmt.Sprintf("unknown type: %d", pb.Type)) } @@ -1694,6 +1694,13 @@ func (s Serializer) encodeRowIdentifiers(r pilosa.RowIdentifiers) *pb.RowIdentif } } +func (s Serializer) encodeDistinctTimestamp(d pilosa.DistinctTimestamp) *pb.DistinctTimestamp { + return &pb.DistinctTimestamp{ + Values: d.Values, + Name: d.Name, + } +} + func (s Serializer) encodeGroupCounts(counts *pilosa.GroupCounts) *pb.GroupCounts { groups := counts.Groups() result := &pb.GroupCounts{ diff --git a/encoding/proto/proto_test.go b/encoding/proto/proto_test.go index 7ea635881..a011b6b41 100644 --- a/encoding/proto/proto_test.go +++ b/encoding/proto/proto_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package proto import ( @@ -19,8 +6,9 @@ import ( "reflect" "testing" - "github.com/molecula/featurebase/v2" + pilosa "github.com/molecula/featurebase/v2" "github.com/molecula/featurebase/v2/ingest" + "github.com/molecula/featurebase/v2/pb" ) func testOneRoundTrip(t *testing.T, s pilosa.Serializer, obj pilosa.Message, expectedMarshalErr error, expectedUnmarshalErr error, expectedMismatchErr error) { @@ -147,3 +135,42 @@ func TestIngestRoundTrip(t *testing.T) { testOneRoundTrip(t, DefaultSerializer, tc.req, nil, nil, tc.err) } } + +func TestEncodeDecodeDistinctTimestamp(t *testing.T) { + s := Serializer{} + pbTime := pb.DistinctTimestamp{ + Values: []string{"this", "is", "fake", "timestamp", "values"}, + Name: "pbtime", + } + piloTime := pilosa.DistinctTimestamp{ + Values: []string{"this", "is", "fake", "timestamp", "values"}, + Name: "pbtime", + } + decoded := s.decodeDistinctTimestamp(&pbTime) + if !reflect.DeepEqual(decoded, piloTime) { + t.Errorf("failed to decode DistinctTimestamp. expected %v got %v", piloTime, decoded) + } + encoded := s.encodeDistinctTimestamp(piloTime) + if !reflect.DeepEqual(encoded, &pbTime) { + t.Errorf("failed to encode DistinctTimestamp. expected %v got %v", &pbTime, encoded) + } +} + +func TestDecodeQueryResult(t *testing.T) { + t.Run("DistinctTimestamp", func(t *testing.T) { + pbTime := pb.DistinctTimestamp{ + Values: []string{"this", "is", "fake", "timestamp", "values"}, + Name: "pbtime", + } + piloTime := pilosa.DistinctTimestamp{ + Values: []string{"this", "is", "fake", "timestamp", "values"}, + Name: "pbtime", + } + q := &pb.QueryResult{Type: queryResultTypeDistinctTimestamp, DistinctTimestamp: &pbTime} + s := Serializer{} + decoded := s.decodeQueryResult(q) + if !reflect.DeepEqual(decoded, piloTime) { + t.Errorf("failed to decode DistinctTimestamp. expected %v got %v", piloTime, decoded) + } + }) +} diff --git a/etcd/embed.go b/etcd/embed.go index 6a939fb4a..49af533d4 100644 --- a/etcd/embed.go +++ b/etcd/embed.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package etcd import ( diff --git a/etcd/leasedkv.go b/etcd/leasedkv.go index 5d028316b..742bb51ad 100644 --- a/etcd/leasedkv.go +++ b/etcd/leasedkv.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package etcd import ( diff --git a/etcd/leasedkv_test.go b/etcd/leasedkv_test.go index 0312ebc1f..5d8a9444f 100644 --- a/etcd/leasedkv_test.go +++ b/etcd/leasedkv_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package etcd import ( diff --git a/event.go b/event.go index 3f555bcbb..83d2c3a03 100644 --- a/event.go +++ b/event.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import "github.com/molecula/featurebase/v2/topology" diff --git a/executor.go b/executor.go index 20af2da4a..226759b55 100644 --- a/executor.go +++ b/executor.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( @@ -5027,6 +5014,8 @@ func (e *executor) executeCount(ctx context.Context, qcx *Qcx, index string, c * return row.Count(), nil case SignedRow: return row.Pos.Count() + row.Neg.Count(), nil + case DistinctTimestamp: + return uint64(len(row.Values)), nil default: return 0, errors.Errorf("cannot count result of type %T from call %q", row, child.String()) } diff --git a/executor_internal_test.go b/executor_internal_test.go index 8337bb296..5c5ed9314 100644 --- a/executor_internal_test.go +++ b/executor_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/executor_test.go b/executor_test.go index ed4ffa735..432499511 100644 --- a/executor_test.go +++ b/executor_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( @@ -40,6 +27,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" pilosa "github.com/molecula/featurebase/v2" "github.com/molecula/featurebase/v2/boltdb" + "github.com/molecula/featurebase/v2/ctl" "github.com/molecula/featurebase/v2/disco" "github.com/molecula/featurebase/v2/http" "github.com/molecula/featurebase/v2/pql" @@ -6756,6 +6744,27 @@ func TestExecutor_Execute_CountDistinct(t *testing.T) { }) } +func variousQueriesCountDistinctTimestamp(t *testing.T, c *test.Cluster) { + index := "test_index" + field := "ts" + + // create an index and timestamp field + c.CreateField(t, index, pilosa.IndexOptions{TrackExistence: true}, field, pilosa.OptFieldTypeTimestamp(time.Unix(0, 0), "s")) + + // add some data + data := []string{"2010-01-02T12:32:00Z", "2010-04-20T12:32:00Z", "2011-04-20T12:32:00Z"} + for i, datum := range data { + c.Query(t, index, fmt.Sprintf("Set(%d, ts=\"%s\")", i+10, datum)) + } + + // query the Count of Distinct vals in field ts + count := c.Query(t, index, "Count(Distinct(field=ts))").Results[0] + if count != uint64(len(data)) { + t.Fatalf("expected %v got %v", len(data), count) + } + +} + // Ensure that a top-level, bare distinct on multiple nodes // is handled correctly. func TestExecutor_BareDistinct(t *testing.T) { @@ -7007,19 +7016,90 @@ func TestMissingKeyRegression(t *testing.T) { // (single and multi-node clusters, different endpoints for the // queries (HTTP, GRPC, Postgres), etc.). func TestVariousQueries(t *testing.T) { - for _, clusterSize := range []int{1, 3, 4, 7} { + for _, clusterSize := range []int{1, 3, 5} { clusterSize := clusterSize t.Run(fmt.Sprintf("%d-node", clusterSize), func(t *testing.T) { c := test.MustRunCluster(t, clusterSize) defer c.Close() + // put a variety of data into the cluster + populateTestData(t, c) + backupTest(t, c, usersIndex) + variousQueries(t, c) variousQueriesOnTimeFields(t, c) variousQueriesOnPercentiles(t, c) + variousQueriesCountDistinctTimestamp(t, c) + backupTest(t, c, "") // test backup/restore of all indexes }) } } +func backupTest(t *testing.T, c *test.Cluster, index string) { + // should this really be in executor? No. But all these + // integration-y query tests probably shouldn't be either. My goal + // putting this here is to take advantage of already-existing + // clusters and data. + + sum := chkSumCluster(t, c) + + backupDir := backupCluster(t, c, index) + + cnew := test.MustRunCluster(t, 3) // this way we test 1->3 3->3 5->3 + defer cnew.Close() + + restoreCluster(t, backupDir, cnew) + + sumNew := chkSumCluster(t, cnew) + + if sum != sumNew { + t.Fatalf("old/new checksum mismatch, old:\n%s\nnew:\n%s", sum, sumNew) + } +} + +func chkSumCluster(t *testing.T, c *test.Cluster) string { + buf := &bytes.Buffer{} + + chkSum := ctl.NewChkSumCommand(nil, buf, buf) + chkSum.Host = c.Nodes[len(c.Nodes)-1].URL() + if err := chkSum.Run(context.Background()); err != nil { + t.Fatalf("running checksum: %v", err) + } + + return buf.String() +} + +func backupCluster(t *testing.T, c *test.Cluster, index string) (backupDir string) { + td, err := testhook.TempDir(t, "backupTest") + if err != nil { + t.Fatalf("can't even get a temp dir, what a ripoff: %v", err) + } + td = td + "/backupTest" + + buf := &bytes.Buffer{} + backupCommand := ctl.NewBackupCommand(nil, buf, buf) + backupCommand.Host = c.Nodes[len(c.Nodes)-1].URL() // don't pick node 0 so we don't always get primary (better code coverage) + backupCommand.Index = index + backupCommand.OutputDir = td + + if err := backupCommand.Run(context.Background()); err != nil { + t.Log(buf.String()) + t.Fatalf("running backup: %v", err) + } + return td +} + +func restoreCluster(t *testing.T, backupDir string, c *test.Cluster) { + buf := &bytes.Buffer{} + + restore := ctl.NewRestoreCommand(nil, buf, buf) + restore.Host = c.Nodes[len(c.Nodes)-1].URL() + restore.Path = backupDir + if err := restore.Run(context.Background()); err != nil { + t.Fatalf("restoring: %v", err) + } +} + // tests for abbreviating time values in queries func variousQueriesOnPercentiles(t *testing.T, c *test.Cluster) { // todo, make rand more random, 42 isnt the answer to everything @@ -7324,10 +7404,12 @@ func variousQueriesOnTimeFields(t *testing.T, c *test.Cluster) { } } -func variousQueries(t *testing.T, c *test.Cluster) { +var usersIndex = "users" + +func populateTestData(t *testing.T, c *test.Cluster) { // Create and populate "likenums" similar to "likes", but without keys on the field. - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "likenums") - c.ImportIDKey(t, "users", "likenums", []test.KeyID{ + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "likenums") + c.ImportIDKey(t, usersIndex, "likenums", []test.KeyID{ {ID: 1, Key: "userA"}, {ID: 2, Key: "userB"}, {ID: 3, Key: "userC"}, @@ -7345,8 +7427,8 @@ func variousQueries(t *testing.T, c *test.Cluster) { }) // Create and populate "likes" field. - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "likes", pilosa.OptFieldKeys()) - c.ImportKeyKey(t, "users", "likes", [][2]string{ + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "likes", pilosa.OptFieldKeys()) + c.ImportKeyKey(t, usersIndex, "likes", [][2]string{ {"molecula", "userA"}, {"pilosa", "userB"}, {"pangolin", "userC"}, @@ -7362,8 +7444,8 @@ func variousQueries(t *testing.T, c *test.Cluster) { }) // Create and populate "dinner" field. - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "dinner", pilosa.OptFieldKeys()) - c.ImportKeyKey(t, "users", "dinner", [][2]string{ + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "dinner", pilosa.OptFieldKeys()) + c.ImportKeyKey(t, usersIndex, "dinner", [][2]string{ {"leftovers", "userB"}, {"pizza", "userA"}, {"pizza", "userB"}, @@ -7373,11 +7455,11 @@ func variousQueries(t *testing.T, c *test.Cluster) { }) // Create and populate "places_visited" time field. - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "places_visited", pilosa.OptFieldKeys(), pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YM"))) + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "places_visited", pilosa.OptFieldKeys(), pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YM"))) ts2019Jan01 := int64(1546300800) * 1e+9 // 2019 January 1st 0:00:00 ts2019Aug01 := int64(1564617600) * 1e+9 // 2019 August 1st 0:00:00 ts2020Jan01 := int64(1577836800) * 1e+9 // 2020 January 1st 0:00:00 - c.ImportTimeQuantumKey(t, "users", "places_visited", []test.TimeQuantumKey{ + c.ImportTimeQuantumKey(t, usersIndex, "places_visited", []test.TimeQuantumKey{ // 2019 January: nairobi, paris, austin, toronto {RowKey: "nairobi", ColKey: "userB", Ts: ts2019Jan01}, {RowKey: "paris", ColKey: "userC", Ts: ts2019Jan01}, @@ -7397,8 +7479,8 @@ func variousQueries(t *testing.T, c *test.Cluster) { }) // Create and populate "affinity" int field with negative, positive, zero and null values. - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "affinity", pilosa.OptFieldTypeInt(-1000, 1000)) - c.ImportIntKey(t, "users", "affinity", []test.IntKey{ + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "affinity", pilosa.OptFieldTypeInt(-1000, 1000)) + c.ImportIntKey(t, usersIndex, "affinity", []test.IntKey{ {Val: 10, Key: "userA"}, {Val: -10, Key: "userB"}, {Val: 5, Key: "userC"}, @@ -7407,8 +7489,8 @@ func variousQueries(t *testing.T, c *test.Cluster) { }) // Create and populate "net_worth" int field with positive values. - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "net_worth", pilosa.OptFieldTypeInt(-100000000, 100000000)) - c.ImportIntKey(t, "users", "net_worth", []test.IntKey{ + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "net_worth", pilosa.OptFieldTypeInt(-100000000, 100000000)) + c.ImportIntKey(t, usersIndex, "net_worth", []test.IntKey{ {Val: 1, Key: "userA"}, {Val: 10, Key: "userB"}, {Val: 100, Key: "userC"}, @@ -7417,8 +7499,8 @@ func variousQueries(t *testing.T, c *test.Cluster) { {Val: 100000, Key: "userF"}, }) - c.CreateField(t, "users", pilosa.IndexOptions{Keys: true, TrackExistence: true}, "zip_code", pilosa.OptFieldTypeInt(0, 100000)) - c.ImportIntKey(t, "users", "zip_code", []test.IntKey{ + c.CreateField(t, usersIndex, pilosa.IndexOptions{Keys: true, TrackExistence: true}, "zip_code", pilosa.OptFieldTypeInt(0, 100000)) + c.ImportIntKey(t, usersIndex, "zip_code", []test.IntKey{ {Val: 78739, Key: "userA"}, {Val: 78739, Key: "userB"}, {Val: 19707, Key: "userC"}, @@ -7426,7 +7508,12 @@ func variousQueries(t *testing.T, c *test.Cluster) { {Val: 86753, Key: "userE"}, {Val: 78739, Key: "userG"}, }) +} +func variousQueries(t *testing.T, c *test.Cluster) { + // NOTE: this relies on populateTestData being called first + + // define and run a bunch of tests tests := []struct { query string qrVerifier func(t *testing.T, resp pilosa.QueryResponse) @@ -7773,8 +7860,8 @@ leftovers,1 for i, tst := range tests { t.Run(fmt.Sprintf("%d-%s", i, tst.query), func(t *testing.T) { - resp := c.Query(t, "users", tst.query) - tr := c.QueryGRPC(t, "users", tst.query) + resp := c.Query(t, usersIndex, tst.query) + tr := c.QueryGRPC(t, usersIndex, tst.query) if tst.qrVerifier != nil { tst.qrVerifier(t, resp) } @@ -8344,7 +8431,7 @@ func MinMaxTimestampNodeTester(t *testing.T, numNodes int) { defer c.Close() // create an index and timestamp field - c.CreateField(t, index, pilosa.IndexOptions{}, field, pilosa.OptFieldTypeTimestamp(time.Unix(0, 0), "s")) + c.CreateField(t, index, pilosa.IndexOptions{TrackExistence: true}, field, pilosa.OptFieldTypeTimestamp(time.Unix(0, 0), "s")) // add some data expected := "2010-01-02T12:32:00Z" diff --git a/field.go b/field.go index e38626df4..2aa865a1f 100644 --- a/field.go +++ b/field.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( @@ -1897,7 +1884,7 @@ func applyDefaultOptions(o *FieldOptions) FieldOptions { // are included. func (o *FieldOptions) MarshalJSON() ([]byte, error) { switch o.Type { - case FieldTypeSet: + case FieldTypeSet, "": return json.Marshal(struct { Type string `json:"type"` CacheType string `json:"cacheType"` @@ -1988,7 +1975,7 @@ func (o *FieldOptions) MarshalJSON() ([]byte, error) { o.Type, }) } - return nil, errors.New("invalid field type") + return nil, errors.Errorf("invalid field type: '%s'", o.Type) } // MinTimestamp returns the minimum value for a timestamp field. diff --git a/field_internal_test.go b/field_internal_test.go index 080836baa..f1219f7e2 100644 --- a/field_internal_test.go +++ b/field_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/field_test.go b/field_test.go index 0bc3b60cb..739dc60a2 100644 --- a/field_test.go +++ b/field_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/filesystem.go b/filesystem.go index 62fc88d38..c2ed7f7ad 100644 --- a/filesystem.go +++ b/filesystem.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/fragment.go b/fragment.go index bc6bc33e1..83514edad 100644 --- a/fragment.go +++ b/fragment.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/fragment_internal_test.go b/fragment_internal_test.go index a878091b7..bc538227d 100644 --- a/fragment_internal_test.go +++ b/fragment_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/gc.go b/gc.go index e5e5d7031..83c5f4b8c 100644 --- a/gc.go +++ b/gc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa // Ensure nopGCNotifier implements interface. diff --git a/gcnotify/gcnotify.go b/gcnotify/gcnotify.go index 3e57a9f5f..fc9d90fa6 100644 --- a/gcnotify/gcnotify.go +++ b/gcnotify/gcnotify.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package gcnotify import ( diff --git a/gendebug_test.go b/gendebug_test.go index 00a8477a3..bc7fb488c 100644 --- a/gendebug_test.go +++ b/gendebug_test.go @@ -1,17 +1,6 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. // +//go:build generationdebug // +build generationdebug package pilosa diff --git a/generation.go b/generation.go index 8063e07dd..7c880c8c3 100644 --- a/generation.go +++ b/generation.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/generation_debug.go b/generation_debug.go index 91c878e26..03c384b28 100644 --- a/generation_debug.go +++ b/generation_debug.go @@ -1,17 +1,5 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build generationdebug // +build generationdebug package pilosa diff --git a/generation_nodebug.go b/generation_nodebug.go index 03ec5d5e3..c49d3f219 100644 --- a/generation_nodebug.go +++ b/generation_nodebug.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !generationdebug // +build !generationdebug diff --git a/generation_test.go b/generation_test.go index bc0a1854f..e30653301 100644 --- a/generation_test.go +++ b/generation_test.go @@ -1,17 +1,6 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. // +//go:build generationparanoia // +build generationparanoia package pilosa diff --git a/generator/slice.go b/generator/slice.go index 595f5a132..ae1d240b1 100644 --- a/generator/slice.go +++ b/generator/slice.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package generator import ( diff --git a/gopsutil/systeminfo.go b/gopsutil/systeminfo.go index 579de9b95..f95a08e86 100644 --- a/gopsutil/systeminfo.go +++ b/gopsutil/systeminfo.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package gopsutil import ( diff --git a/gopsutil/systeminfo_test.go b/gopsutil/systeminfo_test.go index a90fd35cc..f285f3a69 100644 --- a/gopsutil/systeminfo_test.go +++ b/gopsutil/systeminfo_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package gopsutil_test import ( diff --git a/hack.go b/hack.go index 2dff6139a..2fad99df2 100644 --- a/hack.go +++ b/hack.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/handler.go b/handler.go index a7630d3c6..ee18153ea 100644 --- a/handler.go +++ b/handler.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/hash/blake3.go b/hash/blake3.go index 9cc4ddd3a..23305f64f 100644 --- a/hash/blake3.go +++ b/hash/blake3.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package hash import ( diff --git a/hash/blake3_test.go b/hash/blake3_test.go index 9223ddeb8..d33df7b4b 100644 --- a/hash/blake3_test.go +++ b/hash/blake3_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package hash import ( diff --git a/holder.go b/holder.go index a1770adaf..ace7bb410 100644 --- a/holder.go +++ b/holder.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/holder_internal_test.go b/holder_internal_test.go index 7cd8ad630..e2724ac50 100644 --- a/holder_internal_test.go +++ b/holder_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/holder_test.go b/holder_test.go index 4807a997e..01b6db39f 100644 --- a/holder_test.go +++ b/holder_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/http/client.go b/http/client.go index 8f78dde4d..70c0639ec 100644 --- a/http/client.go +++ b/http/client.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http import ( diff --git a/http/client_test.go b/http/client_test.go index a87c776e9..0b05bc00f 100644 --- a/http/client_test.go +++ b/http/client_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http_test import ( diff --git a/http/error.go b/http/error.go index fdc341bae..733f3f655 100644 --- a/http/error.go +++ b/http/error.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http // Error defines a standard application error. diff --git a/http/handler.go b/http/handler.go index f000d3738..9e626babf 100644 --- a/http/handler.go +++ b/http/handler.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http import ( @@ -2339,6 +2326,12 @@ func (h *Handler) handleGetTranslateData(w http.ResponseWriter, r *http.Request) // Retrieve partition data from holder. p, err := h.api.TranslateData(r.Context(), q.Get("index"), int(partition)) + if redir, ok := err.(pilosa.RedirectError); ok { + newURL := *r.URL + newURL.Host = redir.HostPort + http.Redirect(w, r, newURL.String(), http.StatusSeeOther) + return + } if err != nil { http.Error(w, err.Error(), http.StatusNotFound) return diff --git a/http/handler_internal_test.go b/http/handler_internal_test.go index 38117fe94..e28924035 100644 --- a/http/handler_internal_test.go +++ b/http/handler_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http import ( diff --git a/http/handler_test.go b/http/handler_test.go index ca841268b..7dd2e6b00 100644 --- a/http/handler_test.go +++ b/http/handler_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http_test import ( diff --git a/http/translator.go b/http/translator.go index 67deebbc2..8bce04a67 100644 --- a/http/translator.go +++ b/http/translator.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http import ( diff --git a/http/translator_test.go b/http/translator_test.go index 065876553..2474da7f1 100644 --- a/http/translator_test.go +++ b/http/translator_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package http_test import ( diff --git a/idalloc.go b/idalloc.go index ffa07baf8..105db98cd 100644 --- a/idalloc.go +++ b/idalloc.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/idalloc_test.go b/idalloc_test.go index b28a56604..69d7e5e3e 100644 --- a/idalloc_test.go +++ b/idalloc_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/index.go b/index.go index 8506184f5..3426b3b5a 100644 --- a/index.go +++ b/index.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/index_internal_test.go b/index_internal_test.go index 0bf4f6909..161e7a2d3 100644 --- a/index_internal_test.go +++ b/index_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/index_test.go b/index_test.go index f1a12b55c..6d2a7a0c6 100644 --- a/index_test.go +++ b/index_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/ingest/codec.go b/ingest/codec.go index 91b63000f..bdf4eca86 100644 --- a/ingest/codec.go +++ b/ingest/codec.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/codec_test.go b/ingest/codec_test.go index 8605eef5a..04d81c558 100644 --- a/ingest/codec_test.go +++ b/ingest/codec_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/doc.go b/ingest/doc.go index c9e79bfe7..3415e590f 100644 --- a/ingest/doc.go +++ b/ingest/doc.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package ingest provides tooling for accepting record-oriented data updates // and converting them to data that can be efficiently merged into stored // data. Nia's original description: diff --git a/ingest/op.go b/ingest/op.go index a695b65fa..df5291a39 100644 --- a/ingest/op.go +++ b/ingest/op.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/op_test.go b/ingest/op_test.go index 1646e8993..dadf04d0f 100644 --- a/ingest/op_test.go +++ b/ingest/op_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/shard.go b/ingest/shard.go index 7ce7ea6dd..788623bdb 100644 --- a/ingest/shard.go +++ b/ingest/shard.go @@ -1,15 +1,2 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest diff --git a/ingest/sort.go b/ingest/sort.go index af7eaa6d2..7020c841f 100644 --- a/ingest/sort.go +++ b/ingest/sort.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest // "math/bits" diff --git a/ingest/sort_test.go b/ingest/sort_test.go index f777ede89..017ffa60f 100644 --- a/ingest/sort_test.go +++ b/ingest/sort_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/translate_test.go b/ingest/translate_test.go index 67daf73c3..f84265cba 100644 --- a/ingest/translate_test.go +++ b/ingest/translate_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/update.go b/ingest/update.go index 8101bb683..c27448eac 100644 --- a/ingest/update.go +++ b/ingest/update.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/vec.go b/ingest/vec.go index 14d62cbbc..94d6477f3 100644 --- a/ingest/vec.go +++ b/ingest/vec.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest/vec_test.go b/ingest/vec_test.go index 45a103645..9b5947272 100644 --- a/ingest/vec_test.go +++ b/ingest/vec_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package ingest import ( diff --git a/ingest_test.go b/ingest_test.go index 5cd4beac4..cca87e258 100644 --- a/ingest_test.go +++ b/ingest_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/internal/clustertests/cluster_test.go b/internal/clustertests/cluster_test.go index df8390fb4..2fca2f1ab 100644 --- a/internal/clustertests/cluster_test.go +++ b/internal/clustertests/cluster_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package clustertest import ( diff --git a/internal/clustertests/pause_node_test.go b/internal/clustertests/pause_node_test.go index 7558af214..1cfa81417 100644 --- a/internal/clustertests/pause_node_test.go +++ b/internal/clustertests/pause_node_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package clustertest import ( diff --git a/internal/test/querygenerator.go b/internal/test/querygenerator.go index baf3e1697..f85811ed7 100644 --- a/internal/test/querygenerator.go +++ b/internal/test/querygenerator.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/internal/test/querygenerator_test.go b/internal/test/querygenerator_test.go index bea598a2a..766e62a80 100644 --- a/internal/test/querygenerator_test.go +++ b/internal/test/querygenerator_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/iterator.go b/iterator.go index 8a2a671e5..b37c44062 100644 --- a/iterator.go +++ b/iterator.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/iterator_internal_test.go b/iterator_internal_test.go index 71869afb8..c9bdb277f 100644 --- a/iterator_internal_test.go +++ b/iterator_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/like.go b/like.go index 4ff44d1f3..dc7ccde60 100644 --- a/like.go +++ b/like.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/like_test.go b/like_test.go index 88ad51ee4..7cf0abda3 100644 --- a/like_test.go +++ b/like_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/logger/logger.go b/logger/logger.go index f1b4d0909..51c098c14 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package logger import ( diff --git a/main_test.go b/main_test.go index 73254f4e8..983b234ee 100644 --- a/main_test.go +++ b/main_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/metrics.go b/metrics.go index 95da4c7e7..139a93156 100644 --- a/metrics.go +++ b/metrics.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa const ( diff --git a/mmap_test.go b/mmap_test.go index 2a4ea14c7..669f8caf9 100644 --- a/mmap_test.go +++ b/mmap_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/mock/mock.go b/mock/mock.go index 60fdfd200..7fcb085d7 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package mock import "sync" diff --git a/mock/translator.go b/mock/translator.go index a482349c1..74ed4c42f 100644 --- a/mock/translator.go +++ b/mock/translator.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package mock import ( diff --git a/net/uri.go b/net/uri.go index c29850036..ea7e16e7e 100644 --- a/net/uri.go +++ b/net/uri.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package net import ( diff --git a/net/uri_internal_test.go b/net/uri_internal_test.go index 20e2449d3..fd24b9ad3 100644 --- a/net/uri_internal_test.go +++ b/net/uri_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package net import "testing" diff --git a/pb/pb.go b/pb/pb.go index b30055f3e..6f0777429 100644 --- a/pb/pb.go +++ b/pb/pb.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pb import ( diff --git a/pb/public.pb.go b/pb/public.pb.go index 34c78e3d5..a31efe263 100644 --- a/pb/public.pb.go +++ b/pb/public.pb.go @@ -1297,6 +1297,61 @@ func (m *Decimal) GetScale() int64 { return 0 } +type DistinctTimestamp struct { + Values []string `protobuf:"bytes,1,rep,name=Values,proto3" json:"Values,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DistinctTimestamp) Reset() { *m = DistinctTimestamp{} } +func (m *DistinctTimestamp) String() string { return proto.CompactTextString(m) } +func (*DistinctTimestamp) ProtoMessage() {} +func (*DistinctTimestamp) Descriptor() ([]byte, []int) { + return fileDescriptor_413a91106d7bcce8, []int{20} +} +func (m *DistinctTimestamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DistinctTimestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DistinctTimestamp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DistinctTimestamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DistinctTimestamp.Merge(m, src) +} +func (m *DistinctTimestamp) XXX_Size() int { + return m.Size() +} +func (m *DistinctTimestamp) XXX_DiscardUnknown() { + xxx_messageInfo_DistinctTimestamp.DiscardUnknown(m) +} + +var xxx_messageInfo_DistinctTimestamp proto.InternalMessageInfo + +func (m *DistinctTimestamp) GetValues() []string { + if m != nil { + return m.Values + } + return nil +} + +func (m *DistinctTimestamp) GetName() string { + if m != nil { + return m.Name + } + return "" +} + type QueryRequest struct { Query string `protobuf:"bytes,1,opt,name=Query,proto3" json:"Query,omitempty"` Shards []uint64 `protobuf:"varint,2,rep,packed,name=Shards,proto3" json:"Shards,omitempty"` @@ -1313,7 +1368,7 @@ func (m *QueryRequest) Reset() { *m = QueryRequest{} } func (m *QueryRequest) String() string { return proto.CompactTextString(m) } func (*QueryRequest) ProtoMessage() {} func (*QueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{20} + return fileDescriptor_413a91106d7bcce8, []int{21} } func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1396,7 +1451,7 @@ func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (m *QueryResponse) String() string { return proto.CompactTextString(m) } func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{21} + return fileDescriptor_413a91106d7bcce8, []int{22} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1462,6 +1517,7 @@ type QueryResult struct { ExtractedTable *ExtractedTable `protobuf:"bytes,14,opt,name=ExtractedTable,proto3" json:"ExtractedTable,omitempty"` RowMatrix *RowMatrix `protobuf:"bytes,15,opt,name=RowMatrix,proto3" json:"RowMatrix,omitempty"` GroupCounts *GroupCounts `protobuf:"bytes,16,opt,name=GroupCounts,proto3" json:"GroupCounts,omitempty"` + DistinctTimestamp *DistinctTimestamp `protobuf:"bytes,17,opt,name=DistinctTimestamp,proto3" json:"DistinctTimestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1471,7 +1527,7 @@ func (m *QueryResult) Reset() { *m = QueryResult{} } func (m *QueryResult) String() string { return proto.CompactTextString(m) } func (*QueryResult) ProtoMessage() {} func (*QueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{22} + return fileDescriptor_413a91106d7bcce8, []int{23} } func (m *QueryResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1612,6 +1668,13 @@ func (m *QueryResult) GetGroupCounts() *GroupCounts { return nil } +func (m *QueryResult) GetDistinctTimestamp() *DistinctTimestamp { + if m != nil { + return m.DistinctTimestamp + } + return nil +} + type ImportRequest struct { Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` @@ -1633,7 +1696,7 @@ func (m *ImportRequest) Reset() { *m = ImportRequest{} } func (m *ImportRequest) String() string { return proto.CompactTextString(m) } func (*ImportRequest) ProtoMessage() {} func (*ImportRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{23} + return fileDescriptor_413a91106d7bcce8, []int{24} } func (m *ImportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1760,7 +1823,7 @@ func (m *ImportValueRequest) Reset() { *m = ImportValueRequest{} } func (m *ImportValueRequest) String() string { return proto.CompactTextString(m) } func (*ImportValueRequest) ProtoMessage() {} func (*ImportValueRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{24} + return fileDescriptor_413a91106d7bcce8, []int{25} } func (m *ImportValueRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1880,7 +1943,7 @@ func (m *AtomicRecord) Reset() { *m = AtomicRecord{} } func (m *AtomicRecord) String() string { return proto.CompactTextString(m) } func (*AtomicRecord) ProtoMessage() {} func (*AtomicRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{25} + return fileDescriptor_413a91106d7bcce8, []int{26} } func (m *AtomicRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1948,7 +2011,7 @@ func (m *AtomicImportResponse) Reset() { *m = AtomicImportResponse{} } func (m *AtomicImportResponse) String() string { return proto.CompactTextString(m) } func (*AtomicImportResponse) ProtoMessage() {} func (*AtomicImportResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{26} + return fileDescriptor_413a91106d7bcce8, []int{27} } func (m *AtomicImportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1998,7 +2061,7 @@ func (m *TranslateKeysRequest) Reset() { *m = TranslateKeysRequest{} } func (m *TranslateKeysRequest) String() string { return proto.CompactTextString(m) } func (*TranslateKeysRequest) ProtoMessage() {} func (*TranslateKeysRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{27} + return fileDescriptor_413a91106d7bcce8, []int{28} } func (m *TranslateKeysRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2066,7 +2129,7 @@ func (m *TranslateKeysResponse) Reset() { *m = TranslateKeysResponse{} } func (m *TranslateKeysResponse) String() string { return proto.CompactTextString(m) } func (*TranslateKeysResponse) ProtoMessage() {} func (*TranslateKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{28} + return fileDescriptor_413a91106d7bcce8, []int{29} } func (m *TranslateKeysResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2115,7 +2178,7 @@ func (m *TranslateIDsRequest) Reset() { *m = TranslateIDsRequest{} } func (m *TranslateIDsRequest) String() string { return proto.CompactTextString(m) } func (*TranslateIDsRequest) ProtoMessage() {} func (*TranslateIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{29} + return fileDescriptor_413a91106d7bcce8, []int{30} } func (m *TranslateIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2176,7 +2239,7 @@ func (m *TranslateIDsResponse) Reset() { *m = TranslateIDsResponse{} } func (m *TranslateIDsResponse) String() string { return proto.CompactTextString(m) } func (*TranslateIDsResponse) ProtoMessage() {} func (*TranslateIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{30} + return fileDescriptor_413a91106d7bcce8, []int{31} } func (m *TranslateIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2224,7 +2287,7 @@ func (m *ImportRoaringRequestView) Reset() { *m = ImportRoaringRequestVi func (m *ImportRoaringRequestView) String() string { return proto.CompactTextString(m) } func (*ImportRoaringRequestView) ProtoMessage() {} func (*ImportRoaringRequestView) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{31} + return fileDescriptor_413a91106d7bcce8, []int{32} } func (m *ImportRoaringRequestView) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2284,7 +2347,7 @@ func (m *ImportRoaringRequest) Reset() { *m = ImportRoaringRequest{} } func (m *ImportRoaringRequest) String() string { return proto.CompactTextString(m) } func (*ImportRoaringRequest) ProtoMessage() {} func (*ImportRoaringRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{32} + return fileDescriptor_413a91106d7bcce8, []int{33} } func (m *ImportRoaringRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2374,7 +2437,7 @@ func (m *GroupCounts) Reset() { *m = GroupCounts{} } func (m *GroupCounts) String() string { return proto.CompactTextString(m) } func (*GroupCounts) ProtoMessage() {} func (*GroupCounts) Descriptor() ([]byte, []int) { - return fileDescriptor_413a91106d7bcce8, []int{33} + return fileDescriptor_413a91106d7bcce8, []int{34} } func (m *GroupCounts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2438,6 +2501,7 @@ func init() { proto.RegisterType((*GroupCount)(nil), "pb.GroupCount") proto.RegisterType((*ValCount)(nil), "pb.ValCount") proto.RegisterType((*Decimal)(nil), "pb.Decimal") + proto.RegisterType((*DistinctTimestamp)(nil), "pb.DistinctTimestamp") proto.RegisterType((*QueryRequest)(nil), "pb.QueryRequest") proto.RegisterType((*QueryResponse)(nil), "pb.QueryResponse") proto.RegisterType((*QueryResult)(nil), "pb.QueryResult") @@ -2457,106 +2521,109 @@ func init() { func init() { proto.RegisterFile("public.proto", fileDescriptor_413a91106d7bcce8) } var fileDescriptor_413a91106d7bcce8 = []byte{ - // 1582 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5f, 0x6f, 0x1b, 0xd5, - 0x12, 0xcf, 0xfe, 0xf1, 0xbf, 0xb1, 0xe3, 0xa4, 0xa7, 0x69, 0xef, 0xde, 0xde, 0xd4, 0xd7, 0x5d, - 0x5d, 0x55, 0xee, 0x0d, 0x4a, 0x85, 0x81, 0x0a, 0x55, 0x02, 0x14, 0xc7, 0x29, 0x59, 0xb5, 0x49, - 0xcb, 0x49, 0x08, 0x3c, 0xf0, 0xb2, 0xb1, 0x0f, 0xee, 0x8a, 0xb5, 0xd7, 0xac, 0xd7, 0x75, 0xfc, - 0x09, 0xe0, 0x23, 0xf0, 0xc6, 0x13, 0x1f, 0x05, 0xc1, 0x1b, 0x3c, 0xf2, 0x88, 0xca, 0x17, 0x41, - 0x33, 0xe7, 0xec, 0x5f, 0xbb, 0x55, 0x55, 0xf1, 0xb6, 0xf3, 0xe7, 0xcc, 0x99, 0xf9, 0xcd, 0x9c, - 0x99, 0xb1, 0xa1, 0x31, 0x9d, 0x5f, 0xfa, 0xde, 0x60, 0x7f, 0x1a, 0x06, 0x51, 0xc0, 0xf4, 0xe9, - 0xa5, 0xbd, 0x04, 0x83, 0x07, 0x0b, 0x66, 0x41, 0xe5, 0x30, 0xf0, 0xe7, 0xe3, 0xc9, 0xcc, 0xd2, - 0xda, 0x46, 0xc7, 0xe4, 0x31, 0xc9, 0x18, 0x98, 0x8f, 0xc5, 0x72, 0x66, 0x19, 0x6d, 0xa3, 0x53, - 0xe3, 0xf4, 0x8d, 0xda, 0x3c, 0x70, 0x43, 0x6f, 0x32, 0xb2, 0xcc, 0xb6, 0xd6, 0x69, 0xf0, 0x98, - 0x64, 0x3b, 0x50, 0x72, 0x26, 0x43, 0x71, 0x65, 0x95, 0xda, 0x5a, 0xa7, 0xc6, 0x25, 0x81, 0xdc, - 0x47, 0x9e, 0xf0, 0x87, 0x56, 0x59, 0x72, 0x89, 0xb0, 0x3b, 0x50, 0xe3, 0xc1, 0xe2, 0xc4, 0x8d, - 0x42, 0xef, 0x8a, 0xfd, 0x07, 0x4c, 0x1e, 0x2c, 0xe4, 0xed, 0xf5, 0x6e, 0x65, 0x7f, 0x7a, 0xb9, - 0xcf, 0x83, 0x05, 0x27, 0xa6, 0x7d, 0x00, 0xb5, 0x33, 0x6f, 0x34, 0x11, 0x43, 0x74, 0xf5, 0xdf, - 0x60, 0x3c, 0x0b, 0x50, 0x51, 0xcb, 0x2a, 0x22, 0x0f, 0x45, 0xa7, 0x62, 0x64, 0xe9, 0x05, 0xd1, - 0xa9, 0x18, 0xd9, 0x1f, 0x42, 0x93, 0x07, 0x0b, 0x67, 0x28, 0x26, 0x91, 0xf7, 0xb5, 0x27, 0x42, - 0x0a, 0x2c, 0xb9, 0xd1, 0x94, 0x17, 0x25, 0xc1, 0xea, 0x69, 0xb0, 0xf6, 0x2d, 0x28, 0x3b, 0xfd, - 0x27, 0xde, 0x2c, 0x62, 0xdb, 0x60, 0x38, 0xfd, 0xf8, 0x00, 0x7e, 0xda, 0x87, 0x70, 0xed, 0xe8, - 0x2a, 0x0a, 0xdd, 0x41, 0x24, 0x86, 0x4e, 0x5f, 0x42, 0xc6, 0x9a, 0xa0, 0x3b, 0x7d, 0xf2, 0xcf, - 0xe4, 0xba, 0xd3, 0x67, 0x2d, 0x30, 0x2f, 0x5c, 0x5f, 0x1a, 0xad, 0x77, 0x01, 0xdd, 0x92, 0x06, - 0x39, 0xf1, 0xed, 0xaf, 0x72, 0x46, 0x14, 0x1e, 0x37, 0xa1, 0x4c, 0x28, 0xc9, 0xeb, 0x6a, 0x5c, - 0x51, 0xec, 0x7e, 0x9a, 0x28, 0x69, 0xef, 0x06, 0xda, 0x5b, 0x71, 0x22, 0xc9, 0x9f, 0x7d, 0x1b, - 0x2a, 0x8f, 0xc5, 0x92, 0xfc, 0x8f, 0xa3, 0xd3, 0x32, 0xd1, 0xfd, 0xa6, 0xc1, 0xf5, 0xe4, 0xf4, - 0xb9, 0x7b, 0xe9, 0x8b, 0x0b, 0xd7, 0x9f, 0x0b, 0xd6, 0x8a, 0x63, 0xd5, 0xf2, 0x3e, 0x1f, 0x6f, - 0x50, 0xe4, 0xec, 0x4e, 0x82, 0x14, 0x2a, 0xd4, 0x51, 0x41, 0x5d, 0x73, 0xbc, 0xa1, 0xaa, 0x64, - 0x17, 0xaa, 0xbd, 0x33, 0x87, 0xcc, 0x59, 0x46, 0x5b, 0xeb, 0x18, 0xc7, 0x1b, 0x3c, 0xe1, 0xb0, - 0x5b, 0x50, 0x39, 0x99, 0x47, 0xe2, 0xca, 0xe9, 0x53, 0x0d, 0x99, 0xc7, 0x1b, 0x3c, 0x66, 0xe0, - 0x49, 0xfa, 0x7c, 0x2c, 0x96, 0xb2, 0x90, 0xf0, 0x64, 0xcc, 0x61, 0x3b, 0x60, 0xf6, 0x82, 0xc0, - 0xa7, 0x62, 0xaa, 0xe2, 0x6d, 0x48, 0xf5, 0x2a, 0x50, 0x22, 0xc3, 0xf6, 0x15, 0xec, 0xe4, 0x03, - 0x52, 0x69, 0x61, 0x60, 0xa0, 0x3d, 0x4d, 0xd9, 0x43, 0x82, 0x6d, 0x53, 0xaa, 0x74, 0x75, 0x3f, - 0x26, 0xeb, 0x3e, 0x94, 0xc9, 0x8c, 0x2c, 0xf8, 0x7a, 0xf7, 0x5f, 0x39, 0x78, 0x53, 0x80, 0xb8, - 0x52, 0xeb, 0xd5, 0x08, 0xdf, 0xa7, 0xa1, 0xd3, 0xb7, 0x3f, 0x2a, 0x42, 0x49, 0x39, 0x43, 0xd8, - 0x4f, 0xdd, 0xb1, 0x90, 0x37, 0x73, 0xfa, 0x46, 0xde, 0xf9, 0x72, 0x2a, 0xe8, 0xea, 0x1a, 0xa7, - 0x6f, 0x7b, 0x0e, 0xcd, 0xfc, 0x71, 0x74, 0x26, 0x53, 0x04, 0x6b, 0x9d, 0x21, 0x79, 0x52, 0x1d, - 0xdd, 0x62, 0x75, 0x58, 0xab, 0x27, 0x8a, 0x05, 0xf2, 0x31, 0x98, 0xcf, 0x5c, 0x2f, 0x5c, 0x29, - 0xdb, 0x6d, 0x89, 0x97, 0x41, 0x1e, 0x1a, 0x12, 0xf8, 0xd2, 0x61, 0x30, 0x9f, 0x44, 0x12, 0x30, - 0x2e, 0x09, 0xfb, 0x13, 0xa8, 0xe1, 0x79, 0x19, 0xeb, 0xae, 0x34, 0xa6, 0xea, 0xa6, 0x8a, 0xb7, - 0x23, 0xcd, 0xe5, 0x15, 0x49, 0x1f, 0xd0, 0xb3, 0x7d, 0xa0, 0x07, 0x80, 0xd2, 0x99, 0xb4, 0xd0, - 0x82, 0x12, 0x51, 0x2a, 0xe4, 0xd4, 0x84, 0x64, 0xbf, 0xc2, 0xc6, 0x6d, 0xec, 0x3b, 0xd1, 0x83, - 0xf7, 0x51, 0x2c, 0x2b, 0x0e, 0x3d, 0x30, 0xb8, 0xaa, 0x89, 0x00, 0xaa, 0x12, 0xa8, 0x60, 0x91, - 0x1a, 0xd0, 0x32, 0x06, 0x90, 0x8b, 0xfd, 0xa1, 0x1f, 0xc7, 0x46, 0x04, 0xbe, 0x42, 0x1e, 0x2c, - 0x52, 0x18, 0x14, 0xc5, 0xfe, 0x1b, 0xdf, 0x62, 0x52, 0x9c, 0x35, 0x7a, 0x1f, 0x78, 0x7f, 0x7c, - 0xe1, 0x97, 0x00, 0x9f, 0x86, 0xc1, 0x7c, 0x4a, 0x10, 0x31, 0x1b, 0x4a, 0x44, 0xa9, 0x98, 0x1a, - 0xa8, 0x1e, 0xfb, 0xc3, 0xa5, 0x68, 0x3d, 0xb8, 0x98, 0x84, 0x83, 0xd1, 0x48, 0x3e, 0x1f, 0x8e, - 0x9f, 0xf6, 0x8f, 0x1a, 0x54, 0x2f, 0x5c, 0x3f, 0x11, 0x5f, 0xb8, 0xbe, 0x8a, 0x15, 0x3f, 0xf3, - 0x66, 0x8c, 0xd8, 0xcc, 0x2d, 0xa8, 0x3e, 0xf2, 0x03, 0x37, 0x42, 0x65, 0xb4, 0xa5, 0xf1, 0x84, - 0x66, 0x7b, 0x00, 0x7d, 0x31, 0xf0, 0xc6, 0xae, 0x8f, 0x52, 0x33, 0x7d, 0xcf, 0x8a, 0xcb, 0x33, - 0x62, 0x66, 0x43, 0xe3, 0xdc, 0x1b, 0x8b, 0x59, 0xe4, 0x8e, 0xa7, 0xa8, 0x2e, 0xdb, 0x7c, 0x8e, - 0x67, 0x7f, 0x00, 0x15, 0x75, 0x62, 0x7d, 0x36, 0x90, 0x7b, 0x36, 0x70, 0x7d, 0x11, 0xfb, 0x48, - 0x84, 0xfd, 0xb3, 0x06, 0x8d, 0xcf, 0xe6, 0x22, 0x5c, 0x72, 0xf1, 0xed, 0x5c, 0xcc, 0x22, 0x54, - 0x23, 0x3a, 0x4e, 0x14, 0x11, 0x98, 0x92, 0xb3, 0xe7, 0x6e, 0x38, 0x94, 0x15, 0x6e, 0x72, 0x45, - 0x51, 0xaa, 0xc4, 0x38, 0x88, 0x04, 0xf9, 0x54, 0xe5, 0x8a, 0x62, 0x7b, 0xd0, 0x38, 0x1a, 0x5f, - 0x8a, 0xe1, 0x50, 0x0c, 0xfb, 0x6e, 0xe4, 0x5a, 0xd5, 0xfc, 0x80, 0xc9, 0x09, 0xd9, 0xff, 0x60, - 0xf3, 0x59, 0x28, 0xce, 0x43, 0x77, 0x32, 0xf3, 0xdd, 0x48, 0x0c, 0xad, 0x1a, 0xd9, 0xca, 0x33, - 0xd9, 0x2e, 0xd4, 0x4e, 0xdc, 0xab, 0x13, 0x31, 0x0e, 0xc2, 0xa5, 0x05, 0x14, 0x43, 0xca, 0xb0, - 0x9f, 0xc0, 0xa6, 0x0a, 0x63, 0x36, 0x0d, 0x26, 0x33, 0x81, 0x49, 0x3a, 0x0a, 0x43, 0x15, 0x05, - 0x7e, 0xb2, 0x7b, 0x50, 0xe1, 0x62, 0x36, 0xf7, 0xa3, 0xf8, 0x99, 0x6e, 0xa1, 0x3b, 0xf1, 0xa9, - 0xb9, 0x1f, 0xf1, 0x58, 0x6e, 0xff, 0x54, 0x82, 0x7a, 0x46, 0x90, 0x34, 0x0e, 0x6c, 0x7e, 0x9b, - 0xb2, 0x71, 0xe0, 0xd8, 0xe3, 0xc1, 0x62, 0x65, 0x22, 0x62, 0xb1, 0x37, 0x40, 0x3b, 0x55, 0x15, - 0xa5, 0x9d, 0xa6, 0x6f, 0xcb, 0x58, 0xff, 0xb6, 0x70, 0x0b, 0x78, 0xee, 0x4e, 0x46, 0x62, 0x48, - 0x75, 0x50, 0xe5, 0x31, 0xc9, 0x3a, 0x69, 0xd1, 0x11, 0xbe, 0xaa, 0x88, 0x63, 0x1e, 0x4f, 0x4b, - 0x52, 0x3e, 0x19, 0x9c, 0x1d, 0x15, 0x99, 0x1f, 0x49, 0xb1, 0x07, 0xd0, 0x7c, 0xea, 0x0f, 0xd3, - 0x47, 0x31, 0x53, 0x99, 0x68, 0xa2, 0x9d, 0x94, 0xcd, 0x0b, 0x5a, 0xec, 0x61, 0x71, 0x70, 0x53, - 0x4e, 0xea, 0x5d, 0xa6, 0xe2, 0xcc, 0x48, 0x78, 0x71, 0xc4, 0xef, 0x65, 0xf6, 0x06, 0x4a, 0x54, - 0xbd, 0xbb, 0x89, 0xc7, 0x12, 0x26, 0xcf, 0xec, 0x15, 0xfb, 0xd9, 0x36, 0x64, 0xd5, 0x49, 0xbb, - 0x19, 0x23, 0x24, 0xb9, 0x3c, 0xdb, 0xa8, 0xf6, 0x32, 0x7d, 0xcf, 0x6a, 0xa4, 0xc6, 0x13, 0x26, - 0xcf, 0xf4, 0xc5, 0xc3, 0x35, 0x33, 0xde, 0xda, 0xa4, 0x43, 0xc5, 0x01, 0x2e, 0x85, 0x7c, 0xcd, - 0x4e, 0xf0, 0xb0, 0x38, 0x20, 0xac, 0x66, 0x0a, 0x45, 0x5e, 0xc2, 0x8b, 0xa3, 0x64, 0x2f, 0xb3, - 0x6c, 0x59, 0x5b, 0xa9, 0xb7, 0x09, 0x93, 0x67, 0x96, 0xb1, 0x77, 0xa1, 0x9e, 0x4d, 0xd4, 0x36, - 0xa9, 0x6f, 0xe5, 0x13, 0x35, 0xe3, 0x59, 0x1d, 0xfb, 0x17, 0x1d, 0x36, 0x9d, 0xf1, 0x34, 0x08, - 0xa3, 0xcc, 0xf3, 0x95, 0xab, 0xa0, 0xb6, 0x76, 0x15, 0xd4, 0x0b, 0xdd, 0x97, 0x9e, 0x31, 0x35, - 0x27, 0x93, 0x4b, 0x22, 0x53, 0x4a, 0x66, 0xae, 0x94, 0x76, 0xa1, 0x26, 0x87, 0x17, 0x8a, 0x4a, - 0x24, 0x4a, 0x19, 0x72, 0x39, 0x5d, 0xd0, 0x72, 0x52, 0xa1, 0x45, 0x27, 0x26, 0x59, 0x0b, 0x40, - 0xaa, 0x91, 0xb0, 0x4a, 0xc2, 0x0c, 0x07, 0xe5, 0x49, 0x23, 0x9b, 0x59, 0xe5, 0xb6, 0xd1, 0x31, - 0x78, 0x86, 0xc3, 0xee, 0x42, 0x93, 0x82, 0x38, 0x0c, 0x05, 0xf6, 0x81, 0x83, 0x88, 0x4a, 0xd1, - 0xe0, 0x05, 0x2e, 0xea, 0x51, 0x58, 0xa9, 0x9e, 0x6c, 0x12, 0x05, 0x2e, 0xf5, 0x6a, 0x5f, 0xb8, - 0x21, 0x15, 0x5b, 0x95, 0x4b, 0xc2, 0xfe, 0x43, 0x07, 0x26, 0x91, 0x94, 0x8b, 0xc6, 0x3f, 0x06, - 0xe7, 0xeb, 0x61, 0xcb, 0x83, 0x53, 0x59, 0x01, 0xe7, 0x66, 0xb2, 0x18, 0x49, 0x60, 0x14, 0xc5, - 0xda, 0x50, 0x8f, 0x47, 0x09, 0x0a, 0x11, 0x55, 0x8d, 0x67, 0x59, 0x38, 0x33, 0xce, 0x22, 0xfc, - 0x75, 0xa0, 0x54, 0x6a, 0x64, 0x3b, 0xc7, 0x5b, 0x03, 0x2d, 0xbc, 0x21, 0xb4, 0xf5, 0xd7, 0x43, - 0xdb, 0xc8, 0x42, 0xfb, 0x9d, 0x06, 0x8d, 0x83, 0x28, 0x18, 0x7b, 0x03, 0x2e, 0x06, 0x41, 0x38, - 0x7c, 0x35, 0xa8, 0x12, 0x3e, 0x3d, 0x0b, 0x5f, 0x07, 0x0c, 0xe7, 0x45, 0xa8, 0x5a, 0xe7, 0x4d, - 0x9a, 0xf8, 0x2b, 0x59, 0xe2, 0xa8, 0xc2, 0xee, 0x80, 0xee, 0x84, 0x54, 0xb3, 0xf5, 0xee, 0xb5, - 0x54, 0x31, 0xd6, 0xd1, 0x9d, 0xd0, 0x7e, 0x07, 0x76, 0xa4, 0x23, 0xb1, 0x48, 0xcd, 0x8a, 0x1d, - 0x28, 0x1d, 0x85, 0x61, 0x10, 0x4f, 0x0b, 0x49, 0xe0, 0x4a, 0x9b, 0x8c, 0x1f, 0x4c, 0xc6, 0xdb, - 0xd4, 0xc4, 0xba, 0xdf, 0x71, 0x6d, 0xa8, 0x9f, 0x06, 0xd1, 0x17, 0xa1, 0x17, 0x51, 0x37, 0x91, - 0x3d, 0x3f, 0xcb, 0xb2, 0xef, 0xc1, 0x8d, 0xc2, 0xcd, 0xe9, 0x50, 0xc3, 0x32, 0x32, 0xd2, 0xdf, - 0x42, 0x67, 0x70, 0x3d, 0x51, 0x75, 0xfa, 0x6f, 0xe5, 0xe3, 0xaa, 0xd1, 0xff, 0x67, 0x22, 0x27, - 0xa3, 0xea, 0xfa, 0x35, 0xd1, 0xd8, 0x3d, 0xb0, 0x14, 0x9a, 0xf2, 0xc7, 0xa8, 0xf2, 0xe0, 0xc2, - 0x13, 0x8b, 0x57, 0xed, 0xe0, 0xb4, 0x11, 0xe8, 0xf4, 0x13, 0x96, 0xbe, 0xed, 0xef, 0x75, 0xd8, - 0x59, 0x67, 0x24, 0x2d, 0x28, 0x2d, 0x53, 0x50, 0xac, 0x0b, 0xa5, 0x17, 0x9e, 0x58, 0xc4, 0x63, - 0x7c, 0x37, 0x93, 0xec, 0x15, 0x1f, 0xb8, 0x54, 0xc5, 0x87, 0x74, 0x30, 0x88, 0xbc, 0x60, 0x12, - 0xef, 0x94, 0x92, 0xc2, 0x1b, 0x7a, 0x7e, 0x30, 0xf8, 0x46, 0xfe, 0x1c, 0xe2, 0x92, 0x58, 0xf3, - 0x30, 0x4a, 0x6f, 0xf8, 0x30, 0xca, 0x6b, 0x1f, 0x46, 0x07, 0xb6, 0x3e, 0x9f, 0x0e, 0xdd, 0x48, - 0x1c, 0x5d, 0x79, 0xb3, 0x48, 0x4c, 0x06, 0xc2, 0xaa, 0x50, 0x44, 0x45, 0xb6, 0x7d, 0x96, 0x1b, - 0x02, 0xd8, 0x3d, 0x0e, 0x46, 0xa3, 0x50, 0x8c, 0xdc, 0x28, 0x86, 0x31, 0x65, 0xb0, 0xbb, 0x50, - 0x26, 0xe5, 0x18, 0x89, 0xe2, 0x54, 0x57, 0xd2, 0xde, 0xf6, 0xaf, 0x2f, 0x5b, 0xda, 0xef, 0x2f, - 0x5b, 0xda, 0x9f, 0x2f, 0x5b, 0xda, 0x0f, 0x7f, 0xb5, 0x36, 0x2e, 0xcb, 0xf4, 0x5f, 0xc4, 0x7b, - 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x88, 0x20, 0x3d, 0x60, 0x9b, 0x10, 0x00, 0x00, + // 1618 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5d, 0x6f, 0x1b, 0x45, + 0x17, 0xce, 0xee, 0xfa, 0xf3, 0xd8, 0x71, 0x92, 0x69, 0xda, 0x77, 0xdf, 0xbe, 0xa9, 0x5f, 0x77, + 0x85, 0x2a, 0x97, 0xa0, 0x54, 0x18, 0xa8, 0x50, 0x25, 0xa8, 0xe2, 0x38, 0x25, 0x56, 0x9b, 0xb4, + 0x4c, 0x42, 0xe0, 0x82, 0x9b, 0x8d, 0x3d, 0xb8, 0x2b, 0xd6, 0x5e, 0xb3, 0x5e, 0xd7, 0xc9, 0x2f, + 0x80, 0x9f, 0xc0, 0x1d, 0xbf, 0x06, 0xc1, 0x1d, 0x5c, 0x72, 0x89, 0xca, 0x1d, 0xbf, 0x02, 0x9d, + 0x33, 0x33, 0xfb, 0x65, 0xb7, 0xaa, 0x2a, 0xee, 0xf6, 0x7c, 0xcc, 0x99, 0x39, 0xcf, 0xf9, 0xb4, + 0xa1, 0x3e, 0x9d, 0x5f, 0xf8, 0xde, 0x60, 0x6f, 0x1a, 0x06, 0x51, 0xc0, 0xcc, 0xe9, 0x85, 0x73, + 0x05, 0x16, 0x0f, 0x16, 0xcc, 0x86, 0xf2, 0x41, 0xe0, 0xcf, 0xc7, 0x93, 0x99, 0x6d, 0xb4, 0xac, + 0x76, 0x81, 0x6b, 0x92, 0x31, 0x28, 0x3c, 0x16, 0x57, 0x33, 0xdb, 0x6a, 0x59, 0xed, 0x2a, 0xa7, + 0x6f, 0xd4, 0xe6, 0x81, 0x1b, 0x7a, 0x93, 0x91, 0x5d, 0x68, 0x19, 0xed, 0x3a, 0xd7, 0x24, 0xdb, + 0x86, 0x62, 0x7f, 0x32, 0x14, 0x97, 0x76, 0xb1, 0x65, 0xb4, 0xab, 0x5c, 0x12, 0xc8, 0x7d, 0xe4, + 0x09, 0x7f, 0x68, 0x97, 0x24, 0x97, 0x08, 0xa7, 0x0d, 0x55, 0x1e, 0x2c, 0x8e, 0xdd, 0x28, 0xf4, + 0x2e, 0xd9, 0xff, 0xa0, 0xc0, 0x83, 0x85, 0xbc, 0xbd, 0xd6, 0x29, 0xef, 0x4d, 0x2f, 0xf6, 0x78, + 0xb0, 0xe0, 0xc4, 0x74, 0xf6, 0xa1, 0x7a, 0xea, 0x8d, 0x26, 0x62, 0x88, 0x4f, 0xfd, 0x2f, 0x58, + 0xcf, 0x02, 0x54, 0x34, 0xd2, 0x8a, 0xc8, 0x43, 0xd1, 0x89, 0x18, 0xd9, 0x66, 0x4e, 0x74, 0x22, + 0x46, 0xce, 0xc7, 0xd0, 0xe0, 0xc1, 0xa2, 0x3f, 0x14, 0x93, 0xc8, 0xfb, 0xc6, 0x13, 0x21, 0x39, + 0x16, 0xdf, 0x58, 0x90, 0x17, 0xc5, 0xce, 0x9a, 0x89, 0xb3, 0xce, 0x4d, 0x28, 0xf5, 0x7b, 0x4f, + 0xbc, 0x59, 0xc4, 0x36, 0xc1, 0xea, 0xf7, 0xf4, 0x01, 0xfc, 0x74, 0x0e, 0x60, 0xeb, 0xf0, 0x32, + 0x0a, 0xdd, 0x41, 0x24, 0x86, 0xfd, 0x9e, 0x84, 0x8c, 0x35, 0xc0, 0xec, 0xf7, 0xe8, 0x7d, 0x05, + 0x6e, 0xf6, 0x7b, 0xac, 0x09, 0x85, 0x73, 0xd7, 0x97, 0x46, 0x6b, 0x1d, 0xc0, 0x67, 0x49, 0x83, + 0x9c, 0xf8, 0xce, 0xd7, 0x19, 0x23, 0x0a, 0x8f, 0x1b, 0x50, 0x22, 0x94, 0xe4, 0x75, 0x55, 0xae, + 0x28, 0x76, 0x2f, 0x09, 0x94, 0xb4, 0x77, 0x1d, 0xed, 0x2d, 0x3d, 0x22, 0x8e, 0x9f, 0x73, 0x0b, + 0xca, 0x8f, 0xc5, 0x15, 0xbd, 0x5f, 0x7b, 0x67, 0xa4, 0xbc, 0xfb, 0xcd, 0x80, 0x6b, 0xf1, 0xe9, + 0x33, 0xf7, 0xc2, 0x17, 0xe7, 0xae, 0x3f, 0x17, 0xac, 0xa9, 0x7d, 0x35, 0xb2, 0x6f, 0x3e, 0x5a, + 0x23, 0xcf, 0xd9, 0xed, 0x18, 0x29, 0x54, 0xa8, 0xa1, 0x82, 0xba, 0xe6, 0x68, 0x4d, 0x65, 0xc9, + 0x0e, 0x54, 0xba, 0xa7, 0x7d, 0x32, 0x67, 0x5b, 0x2d, 0xa3, 0x6d, 0x1d, 0xad, 0xf1, 0x98, 0xc3, + 0x6e, 0x42, 0xf9, 0x78, 0x1e, 0x89, 0xcb, 0x7e, 0x8f, 0x72, 0xa8, 0x70, 0xb4, 0xc6, 0x35, 0x03, + 0x4f, 0xd2, 0xe7, 0x63, 0x71, 0x25, 0x13, 0x09, 0x4f, 0x6a, 0x0e, 0xdb, 0x86, 0x42, 0x37, 0x08, + 0x7c, 0x4a, 0xa6, 0x0a, 0xde, 0x86, 0x54, 0xb7, 0x0c, 0x45, 0x32, 0xec, 0x5c, 0xc2, 0x76, 0xd6, + 0x21, 0x15, 0x16, 0x06, 0x16, 0xda, 0x33, 0x94, 0x3d, 0x24, 0xd8, 0x26, 0x85, 0xca, 0x54, 0xf7, + 0x63, 0xb0, 0xee, 0x41, 0x89, 0xcc, 0xc8, 0x84, 0xaf, 0x75, 0xfe, 0x93, 0x81, 0x37, 0x01, 0x88, + 0x2b, 0xb5, 0x6e, 0x95, 0xf0, 0x7d, 0x1a, 0xf6, 0x7b, 0xce, 0x27, 0x79, 0x28, 0x29, 0x66, 0x08, + 0xfb, 0x89, 0x3b, 0x16, 0xf2, 0x66, 0x4e, 0xdf, 0xc8, 0x3b, 0xbb, 0x9a, 0x0a, 0xba, 0xba, 0xca, + 0xe9, 0xdb, 0x99, 0x43, 0x23, 0x7b, 0x1c, 0x1f, 0x93, 0x4a, 0x82, 0x95, 0x8f, 0x21, 0x79, 0x9c, + 0x1d, 0x9d, 0x7c, 0x76, 0xd8, 0xcb, 0x27, 0xf2, 0x09, 0xf2, 0x29, 0x14, 0x9e, 0xb9, 0x5e, 0xb8, + 0x94, 0xb6, 0x9b, 0x12, 0x2f, 0x8b, 0x5e, 0x68, 0x49, 0xe0, 0x8b, 0x07, 0xc1, 0x7c, 0x12, 0x49, + 0xc0, 0xb8, 0x24, 0x9c, 0x87, 0x50, 0xc5, 0xf3, 0xd2, 0xd7, 0x1d, 0x69, 0x4c, 0xe5, 0x4d, 0x05, + 0x6f, 0x47, 0x9a, 0xcb, 0x2b, 0xe2, 0x3e, 0x60, 0xa6, 0xfb, 0x40, 0x17, 0x00, 0xa5, 0x33, 0x69, + 0xa1, 0x09, 0x45, 0xa2, 0x94, 0xcb, 0x89, 0x09, 0xc9, 0x7e, 0x85, 0x8d, 0x5b, 0xd8, 0x77, 0xa2, + 0xfb, 0x1f, 0xa2, 0x58, 0x66, 0x1c, 0xbe, 0xc0, 0xe2, 0x2a, 0x27, 0x02, 0xa8, 0x48, 0xa0, 0x82, + 0x45, 0x62, 0xc0, 0x48, 0x19, 0x40, 0x2e, 0xf6, 0x87, 0x9e, 0xf6, 0x8d, 0x08, 0xac, 0x42, 0x1e, + 0x2c, 0x12, 0x18, 0x14, 0xc5, 0xfe, 0xaf, 0x6f, 0x29, 0x90, 0x9f, 0x55, 0xaa, 0x0f, 0xbc, 0x5f, + 0x5f, 0xf8, 0x15, 0xc0, 0x67, 0x61, 0x30, 0x9f, 0x12, 0x44, 0xcc, 0x81, 0x22, 0x51, 0xca, 0xa7, + 0x3a, 0xaa, 0xeb, 0xf7, 0x70, 0x29, 0x5a, 0x0d, 0x2e, 0x06, 0x61, 0x7f, 0x34, 0x92, 0xe5, 0xc3, + 0xf1, 0xd3, 0xf9, 0xc9, 0x80, 0xca, 0xb9, 0xeb, 0xc7, 0xe2, 0x73, 0xd7, 0x57, 0xbe, 0xe2, 0x67, + 0xd6, 0x8c, 0xa5, 0xcd, 0xdc, 0x84, 0xca, 0x23, 0x3f, 0x70, 0x23, 0x54, 0x46, 0x5b, 0x06, 0x8f, + 0x69, 0xb6, 0x0b, 0xd0, 0x13, 0x03, 0x6f, 0xec, 0xfa, 0x28, 0x2d, 0x24, 0xf5, 0xac, 0xb8, 0x3c, + 0x25, 0x66, 0x0e, 0xd4, 0xcf, 0xbc, 0xb1, 0x98, 0x45, 0xee, 0x78, 0x8a, 0xea, 0xb2, 0xcd, 0x67, + 0x78, 0xce, 0x47, 0x50, 0x56, 0x27, 0x56, 0x47, 0x03, 0xb9, 0xa7, 0x03, 0xd7, 0x17, 0xfa, 0x8d, + 0x44, 0x38, 0x0f, 0x61, 0xab, 0xe7, 0xcd, 0x22, 0x6f, 0x32, 0x88, 0x62, 0x73, 0x18, 0x00, 0x55, + 0x8e, 0xaa, 0x0d, 0x4a, 0x2a, 0xae, 0x29, 0x33, 0xa9, 0x29, 0xe7, 0x67, 0x03, 0xea, 0x9f, 0xcf, + 0x45, 0x78, 0xc5, 0xc5, 0x77, 0x73, 0x31, 0x8b, 0xf0, 0x1e, 0xa2, 0x75, 0xa4, 0x89, 0x40, 0x93, + 0xa7, 0xcf, 0xdd, 0x70, 0x28, 0x4b, 0xa4, 0xc0, 0x15, 0x45, 0xb1, 0x16, 0xe3, 0x20, 0x12, 0xe4, + 0x54, 0x85, 0x2b, 0x8a, 0xed, 0x42, 0xfd, 0x70, 0x7c, 0x21, 0x86, 0x43, 0x31, 0xec, 0xb9, 0x91, + 0x6b, 0x57, 0xb2, 0x13, 0x2a, 0x23, 0x64, 0xef, 0xc0, 0xfa, 0xb3, 0x50, 0x9c, 0x85, 0xee, 0x64, + 0xe6, 0xbb, 0x91, 0x18, 0xda, 0x55, 0xb2, 0x95, 0x65, 0xb2, 0x1d, 0xa8, 0x1e, 0xbb, 0x97, 0xc7, + 0x62, 0x1c, 0x84, 0x57, 0x36, 0x10, 0x08, 0x09, 0xc3, 0x79, 0x02, 0xeb, 0xca, 0x8d, 0xd9, 0x34, + 0x98, 0xcc, 0x04, 0x46, 0xf9, 0x30, 0x0c, 0x95, 0x17, 0xf8, 0xc9, 0xee, 0x42, 0x99, 0x8b, 0xd9, + 0xdc, 0x8f, 0x74, 0x9d, 0x6f, 0xe0, 0x73, 0xf4, 0xa9, 0xb9, 0x1f, 0x71, 0x2d, 0x77, 0xfe, 0x2e, + 0x42, 0x2d, 0x25, 0x88, 0x3b, 0x0f, 0x76, 0xcf, 0x75, 0xd9, 0x79, 0x70, 0x6e, 0xf2, 0x60, 0xb1, + 0x34, 0x52, 0xb1, 0x5a, 0xea, 0x60, 0x9c, 0xa8, 0x94, 0x34, 0x4e, 0x92, 0xe2, 0xb4, 0x56, 0x17, + 0x27, 0xae, 0x11, 0xcf, 0xdd, 0xc9, 0x48, 0x0c, 0x29, 0x91, 0x2a, 0x5c, 0x93, 0xac, 0x9d, 0x64, + 0x2d, 0xe1, 0xab, 0xaa, 0x40, 0xf3, 0x78, 0x92, 0xd3, 0xb2, 0xe6, 0x70, 0xf8, 0x94, 0x65, 0x7c, + 0x24, 0xc5, 0xee, 0x43, 0xe3, 0xa9, 0x3f, 0x4c, 0xaa, 0x6a, 0xa6, 0x22, 0xd1, 0x40, 0x3b, 0x09, + 0x9b, 0xe7, 0xb4, 0xd8, 0x83, 0xfc, 0xe4, 0xa7, 0x98, 0xd4, 0x3a, 0x4c, 0xf9, 0x99, 0x92, 0xf0, + 0xfc, 0x8e, 0xb0, 0x9b, 0x5a, 0x3c, 0x28, 0x50, 0xb5, 0xce, 0x3a, 0x1e, 0x8b, 0x99, 0x3c, 0xb5, + 0x98, 0xec, 0xa5, 0xfb, 0x98, 0x5d, 0x23, 0xed, 0x86, 0x46, 0x48, 0x72, 0x79, 0xba, 0xd3, 0xed, + 0xa6, 0x1a, 0xa7, 0x5d, 0x4f, 0x8c, 0xc7, 0x4c, 0x9e, 0x6a, 0xac, 0x07, 0x2b, 0x96, 0x04, 0x7b, + 0x9d, 0x0e, 0xe5, 0x37, 0x00, 0x29, 0xe4, 0x2b, 0x96, 0x8a, 0x07, 0xf9, 0x09, 0x63, 0x37, 0x12, + 0x28, 0xb2, 0x12, 0x9e, 0x9f, 0x45, 0xbb, 0xa9, 0x6d, 0xcd, 0xde, 0x48, 0x5e, 0x1b, 0x33, 0x79, + 0x6a, 0x9b, 0x7b, 0x1f, 0x6a, 0xe9, 0x40, 0x6d, 0x92, 0xfa, 0x46, 0x36, 0x50, 0x33, 0x9e, 0xd6, + 0x41, 0x07, 0x97, 0xca, 0xdf, 0xde, 0x4a, 0x1c, 0x5c, 0x12, 0xf2, 0x65, 0x7d, 0xe7, 0x17, 0x13, + 0xd6, 0xfb, 0xe3, 0x69, 0x10, 0x46, 0xa9, 0x1e, 0x20, 0x17, 0x52, 0x63, 0xe5, 0x42, 0x6a, 0xe6, + 0x66, 0x00, 0xf5, 0x02, 0x6a, 0x91, 0x05, 0x2e, 0x89, 0x54, 0x3e, 0x16, 0x32, 0xf9, 0xb8, 0x03, + 0x55, 0x39, 0x42, 0x51, 0x54, 0x24, 0x51, 0xc2, 0x90, 0x2b, 0xf2, 0x82, 0x56, 0xa4, 0x32, 0x75, + 0x2e, 0x4d, 0xb2, 0x26, 0x80, 0x54, 0x23, 0x61, 0x85, 0x84, 0x29, 0x0e, 0xca, 0x63, 0x87, 0x66, + 0x76, 0xa9, 0x65, 0xb5, 0x2d, 0x9e, 0xe2, 0xb0, 0x3b, 0xd0, 0x20, 0x27, 0x0e, 0x42, 0x81, 0xcd, + 0x64, 0x3f, 0xa2, 0x7c, 0xb6, 0x78, 0x8e, 0x8b, 0x7a, 0xe4, 0x56, 0xa2, 0x27, 0x3b, 0x4d, 0x8e, + 0x4b, 0x13, 0xc3, 0x17, 0x6e, 0x48, 0x19, 0x5b, 0xe1, 0x92, 0x70, 0xfe, 0x30, 0x81, 0x49, 0x24, + 0xe5, 0xba, 0xf3, 0xaf, 0xc1, 0xf9, 0x7a, 0xd8, 0xb2, 0xe0, 0x94, 0x97, 0xc0, 0x49, 0xe6, 0x81, + 0x04, 0x46, 0xcf, 0x83, 0x16, 0xd4, 0xf4, 0x40, 0x43, 0x21, 0xa2, 0x6a, 0xf0, 0x34, 0x0b, 0x27, + 0xd7, 0x69, 0x84, 0xbf, 0x51, 0x94, 0x4a, 0x95, 0x6c, 0x67, 0x78, 0x2b, 0xa0, 0x85, 0x37, 0x84, + 0xb6, 0xf6, 0x7a, 0x68, 0xeb, 0x69, 0x68, 0xbf, 0x37, 0xa0, 0xbe, 0x1f, 0x05, 0x63, 0x6f, 0xc0, + 0xc5, 0x20, 0x08, 0x87, 0xaf, 0x06, 0x55, 0xc2, 0x67, 0xa6, 0xe1, 0x6b, 0x83, 0xd5, 0x7f, 0x11, + 0xaa, 0xfe, 0x7b, 0x83, 0xf6, 0x8e, 0xa5, 0x28, 0x71, 0x54, 0x61, 0xb7, 0xc1, 0xec, 0x87, 0x94, + 0xb3, 0xb5, 0xce, 0x56, 0xa2, 0xa8, 0x75, 0xcc, 0x7e, 0xe8, 0xbc, 0x07, 0xdb, 0xf2, 0x21, 0x5a, + 0xa4, 0x06, 0xce, 0x36, 0x14, 0x0f, 0xc3, 0x30, 0xd0, 0x23, 0x47, 0x12, 0xb8, 0x58, 0xc7, 0x33, + 0x0c, 0x83, 0xf1, 0x36, 0x39, 0xb1, 0xea, 0xd7, 0x64, 0x0b, 0x6a, 0x27, 0x41, 0xf4, 0x65, 0xe8, + 0x45, 0xd4, 0x92, 0xe4, 0xe0, 0x48, 0xb3, 0x9c, 0xbb, 0x70, 0x3d, 0x77, 0x73, 0x32, 0x19, 0x31, + 0x8d, 0xac, 0xe4, 0x17, 0xd9, 0x29, 0x5c, 0x8b, 0x55, 0xfb, 0xbd, 0xb7, 0x7a, 0xe3, 0xb2, 0xd1, + 0x77, 0x53, 0x9e, 0x93, 0x51, 0x75, 0xfd, 0x0a, 0x6f, 0x9c, 0x2e, 0xd8, 0x0a, 0x4d, 0xf9, 0x93, + 0x58, 0xbd, 0xe0, 0xdc, 0x13, 0x8b, 0x57, 0xfd, 0x12, 0xa0, 0xb5, 0xc2, 0xa4, 0x1f, 0xd2, 0xf4, + 0xed, 0xfc, 0x60, 0xc2, 0xf6, 0x2a, 0x23, 0x49, 0x42, 0x19, 0xa9, 0x84, 0x62, 0x1d, 0x28, 0xbe, + 0xf0, 0xc4, 0x42, 0xef, 0x02, 0x3b, 0xa9, 0x60, 0x2f, 0xbd, 0x81, 0x4b, 0x55, 0x2c, 0xa4, 0xfd, + 0x41, 0xe4, 0x05, 0x13, 0xbd, 0xd9, 0x4a, 0x0a, 0x6f, 0xe8, 0xfa, 0xc1, 0xe0, 0x5b, 0xf9, 0xa3, + 0x8c, 0x4b, 0x62, 0x45, 0x61, 0x14, 0xdf, 0xb0, 0x30, 0x4a, 0x2b, 0x0b, 0xa3, 0x0d, 0x1b, 0x5f, + 0x4c, 0x87, 0x6e, 0x24, 0x0e, 0x2f, 0xbd, 0x59, 0x24, 0x26, 0x03, 0x61, 0x97, 0xc9, 0xa3, 0x3c, + 0xdb, 0x39, 0xcd, 0x4c, 0x12, 0xec, 0x1e, 0xfb, 0xa3, 0x51, 0x28, 0x46, 0x6e, 0xa4, 0x61, 0x4c, + 0x18, 0xec, 0x0e, 0x94, 0x48, 0x59, 0x23, 0x91, 0x5f, 0x0d, 0x94, 0xb4, 0xbb, 0xf9, 0xeb, 0xcb, + 0xa6, 0xf1, 0xfb, 0xcb, 0xa6, 0xf1, 0xe7, 0xcb, 0xa6, 0xf1, 0xe3, 0x5f, 0xcd, 0xb5, 0x8b, 0x12, + 0xfd, 0x23, 0xf2, 0xc1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xec, 0x75, 0x7f, 0x8e, 0x21, 0x11, + 0x00, 0x00, } func (m *Row) Marshal() (dAtA []byte, err error) { @@ -3640,6 +3707,49 @@ func (m *Decimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DistinctTimestamp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DistinctTimestamp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DistinctTimestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintPublic(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3803,6 +3913,20 @@ func (m *QueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.DistinctTimestamp != nil { + { + size, err := m.DistinctTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPublic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } if m.GroupCounts != nil { { size, err := m.GroupCounts.MarshalToSizedBuffer(dAtA[:i]) @@ -3916,20 +4040,20 @@ func (m *QueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } if len(m.RowIDs) > 0 { - dAtA25 := make([]byte, len(m.RowIDs)*10) - var j24 int + dAtA26 := make([]byte, len(m.RowIDs)*10) + var j25 int for _, num := range m.RowIDs { for num >= 1<<7 { - dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) + dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j24++ + j25++ } - dAtA25[j24] = uint8(num) - j24++ + dAtA26[j25] = uint8(num) + j25++ } - i -= j24 - copy(dAtA[i:], dAtA25[:j24]) - i = encodeVarintPublic(dAtA, i, uint64(j24)) + i -= j25 + copy(dAtA[i:], dAtA26[:j25]) + i = encodeVarintPublic(dAtA, i, uint64(j25)) i-- dAtA[i] = 0x3a } @@ -4057,57 +4181,57 @@ func (m *ImportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } if len(m.Timestamps) > 0 { - dAtA29 := make([]byte, len(m.Timestamps)*10) - var j28 int + dAtA30 := make([]byte, len(m.Timestamps)*10) + var j29 int for _, num1 := range m.Timestamps { num := uint64(num1) for num >= 1<<7 { - dAtA29[j28] = uint8(uint64(num)&0x7f | 0x80) + dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j28++ + j29++ } - dAtA29[j28] = uint8(num) - j28++ + dAtA30[j29] = uint8(num) + j29++ } - i -= j28 - copy(dAtA[i:], dAtA29[:j28]) - i = encodeVarintPublic(dAtA, i, uint64(j28)) + i -= j29 + copy(dAtA[i:], dAtA30[:j29]) + i = encodeVarintPublic(dAtA, i, uint64(j29)) i-- dAtA[i] = 0x32 } if len(m.ColumnIDs) > 0 { - dAtA31 := make([]byte, len(m.ColumnIDs)*10) - var j30 int + dAtA32 := make([]byte, len(m.ColumnIDs)*10) + var j31 int for _, num := range m.ColumnIDs { for num >= 1<<7 { - dAtA31[j30] = uint8(uint64(num)&0x7f | 0x80) + dAtA32[j31] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j30++ + j31++ } - dAtA31[j30] = uint8(num) - j30++ + dAtA32[j31] = uint8(num) + j31++ } - i -= j30 - copy(dAtA[i:], dAtA31[:j30]) - i = encodeVarintPublic(dAtA, i, uint64(j30)) + i -= j31 + copy(dAtA[i:], dAtA32[:j31]) + i = encodeVarintPublic(dAtA, i, uint64(j31)) i-- dAtA[i] = 0x2a } if len(m.RowIDs) > 0 { - dAtA33 := make([]byte, len(m.RowIDs)*10) - var j32 int + dAtA34 := make([]byte, len(m.RowIDs)*10) + var j33 int for _, num := range m.RowIDs { for num >= 1<<7 { - dAtA33[j32] = uint8(uint64(num)&0x7f | 0x80) + dAtA34[j33] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j32++ + j33++ } - dAtA33[j32] = uint8(num) - j32++ + dAtA34[j33] = uint8(num) + j33++ } - i -= j32 - copy(dAtA[i:], dAtA33[:j32]) - i = encodeVarintPublic(dAtA, i, uint64(j32)) + i -= j33 + copy(dAtA[i:], dAtA34[:j33]) + i = encodeVarintPublic(dAtA, i, uint64(j33)) i-- dAtA[i] = 0x22 } @@ -4188,9 +4312,9 @@ func (m *ImportValueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { } if len(m.FloatValues) > 0 { for iNdEx := len(m.FloatValues) - 1; iNdEx >= 0; iNdEx-- { - f34 := math.Float64bits(float64(m.FloatValues[iNdEx])) + f35 := math.Float64bits(float64(m.FloatValues[iNdEx])) i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f34)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f35)) } i = encodeVarintPublic(dAtA, i, uint64(len(m.FloatValues)*8)) i-- @@ -4206,39 +4330,39 @@ func (m *ImportValueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } if len(m.Values) > 0 { - dAtA36 := make([]byte, len(m.Values)*10) - var j35 int + dAtA37 := make([]byte, len(m.Values)*10) + var j36 int for _, num1 := range m.Values { num := uint64(num1) for num >= 1<<7 { - dAtA36[j35] = uint8(uint64(num)&0x7f | 0x80) + dAtA37[j36] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j35++ + j36++ } - dAtA36[j35] = uint8(num) - j35++ + dAtA37[j36] = uint8(num) + j36++ } - i -= j35 - copy(dAtA[i:], dAtA36[:j35]) - i = encodeVarintPublic(dAtA, i, uint64(j35)) + i -= j36 + copy(dAtA[i:], dAtA37[:j36]) + i = encodeVarintPublic(dAtA, i, uint64(j36)) i-- dAtA[i] = 0x32 } if len(m.ColumnIDs) > 0 { - dAtA38 := make([]byte, len(m.ColumnIDs)*10) - var j37 int + dAtA39 := make([]byte, len(m.ColumnIDs)*10) + var j38 int for _, num := range m.ColumnIDs { for num >= 1<<7 { - dAtA38[j37] = uint8(uint64(num)&0x7f | 0x80) + dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j37++ + j38++ } - dAtA38[j37] = uint8(num) - j37++ + dAtA39[j38] = uint8(num) + j38++ } - i -= j37 - copy(dAtA[i:], dAtA38[:j37]) - i = encodeVarintPublic(dAtA, i, uint64(j37)) + i -= j38 + copy(dAtA[i:], dAtA39[:j38]) + i = encodeVarintPublic(dAtA, i, uint64(j38)) i-- dAtA[i] = 0x2a } @@ -4450,20 +4574,20 @@ func (m *TranslateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if len(m.IDs) > 0 { - dAtA40 := make([]byte, len(m.IDs)*10) - var j39 int + dAtA41 := make([]byte, len(m.IDs)*10) + var j40 int for _, num := range m.IDs { for num >= 1<<7 { - dAtA40[j39] = uint8(uint64(num)&0x7f | 0x80) + dAtA41[j40] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j39++ + j40++ } - dAtA40[j39] = uint8(num) - j39++ + dAtA41[j40] = uint8(num) + j40++ } - i -= j39 - copy(dAtA[i:], dAtA40[:j39]) - i = encodeVarintPublic(dAtA, i, uint64(j39)) + i -= j40 + copy(dAtA[i:], dAtA41[:j40]) + i = encodeVarintPublic(dAtA, i, uint64(j40)) i-- dAtA[i] = 0x1a } @@ -4495,20 +4619,20 @@ func (m *TranslateIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if len(m.IDs) > 0 { - dAtA42 := make([]byte, len(m.IDs)*10) - var j41 int + dAtA43 := make([]byte, len(m.IDs)*10) + var j42 int for _, num := range m.IDs { for num >= 1<<7 { - dAtA42[j41] = uint8(uint64(num)&0x7f | 0x80) + dAtA43[j42] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j41++ + j42++ } - dAtA42[j41] = uint8(num) - j41++ + dAtA43[j42] = uint8(num) + j42++ } - i -= j41 - copy(dAtA[i:], dAtA42[:j41]) - i = encodeVarintPublic(dAtA, i, uint64(j41)) + i -= j42 + copy(dAtA[i:], dAtA43[:j42]) + i = encodeVarintPublic(dAtA, i, uint64(j42)) i-- dAtA[i] = 0x1a } @@ -5267,6 +5391,28 @@ func (m *Decimal) Size() (n int) { return n } +func (m *DistinctTimestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovPublic(uint64(l)) + } + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovPublic(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *QueryRequest) Size() (n int) { if m == nil { return 0 @@ -5401,6 +5547,10 @@ func (m *QueryResult) Size() (n int) { l = m.GroupCounts.Size() n += 2 + l + sovPublic(uint64(l)) } + if m.DistinctTimestamp != nil { + l = m.DistinctTimestamp.Size() + n += 2 + l + sovPublic(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -8375,6 +8525,121 @@ func (m *Decimal) Unmarshal(dAtA []byte) error { } return nil } +func (m *DistinctTimestamp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DistinctTimestamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DistinctTimestamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPublic + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPublic + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPublic + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPublic(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPublic + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -9335,6 +9600,42 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DistinctTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPublic + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPublic + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DistinctTimestamp == nil { + m.DistinctTimestamp = &DistinctTimestamp{} + } + if err := m.DistinctTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPublic(dAtA[iNdEx:]) diff --git a/pb/public.proto b/pb/public.proto index d86a80d5d..3f60413c3 100644 --- a/pb/public.proto +++ b/pb/public.proto @@ -117,6 +117,12 @@ message Decimal { int64 Scale = 2; } +message DistinctTimestamp { + repeated string Values = 1; + string Name = 2; +} + + message QueryRequest { string Query = 1; repeated uint64 Shards = 2; @@ -154,6 +160,7 @@ message QueryResult { ExtractedTable ExtractedTable = 14; RowMatrix RowMatrix = 15; GroupCounts GroupCounts = 16; + DistinctTimestamp DistinctTimestamp = 17; } message ImportRequest { diff --git a/pg/cancel.go b/pg/cancel.go index 7e2073df3..f7760af33 100644 --- a/pg/cancel.go +++ b/pg/cancel.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import ( diff --git a/pg/cancel_test.go b/pg/cancel_test.go index 7512109ac..1f4a43a82 100644 --- a/pg/cancel_test.go +++ b/pg/cancel_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import ( diff --git a/pg/io.go b/pg/io.go index 80ae8cd24..9c0b7106c 100644 --- a/pg/io.go +++ b/pg/io.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import ( diff --git a/pg/message/io.go b/pg/message/io.go index e09150b9d..fa82b1193 100644 --- a/pg/message/io.go +++ b/pg/message/io.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package message import ( diff --git a/pg/message/message.go b/pg/message/message.go index 9fb6871ee..add012760 100644 --- a/pg/message/message.go +++ b/pg/message/message.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package message import ( diff --git a/pg/pgtest/handler.go b/pg/pgtest/handler.go index 845aedf19..592485547 100644 --- a/pg/pgtest/handler.go +++ b/pg/pgtest/handler.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pgtest import ( diff --git a/pg/pgtest/memnet.go b/pg/pgtest/memnet.go index 0ba85565c..0a7758d6c 100644 --- a/pg/pgtest/memnet.go +++ b/pg/pgtest/memnet.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pgtest import ( diff --git a/pg/pgtest/server.go b/pg/pgtest/server.go index c5687f5e5..95e11a86c 100644 --- a/pg/pgtest/server.go +++ b/pg/pgtest/server.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pgtest import ( diff --git a/pg/pgtest/tls.go b/pg/pgtest/tls.go index a8a4b46ee..c188c7d4d 100644 --- a/pg/pgtest/tls.go +++ b/pg/pgtest/tls.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pgtest import ( diff --git a/pg/protocol.go b/pg/protocol.go index ec1084a23..8a0044323 100644 --- a/pg/protocol.go +++ b/pg/protocol.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import ( diff --git a/pg/query.go b/pg/query.go index ebf48e84e..773562929 100644 --- a/pg/query.go +++ b/pg/query.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import ( diff --git a/pg/server.go b/pg/server.go index 28aa6ca24..8e6841a32 100644 --- a/pg/server.go +++ b/pg/server.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import ( diff --git a/pg/server_test.go b/pg/server_test.go index 6a4693855..a7b719f2f 100644 --- a/pg/server_test.go +++ b/pg/server_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg_test import ( diff --git a/pg/type.go b/pg/type.go index 98ea4348f..9fa0451f8 100644 --- a/pg/type.go +++ b/pg/type.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pg import "github.com/molecula/featurebase/v2/pg/message" diff --git a/pilosa.go b/pilosa.go index fec834603..1757f7de3 100644 --- a/pilosa.go +++ b/pilosa.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/pilosa_internal_test.go b/pilosa_internal_test.go index 9b0ae010f..d2891199e 100644 --- a/pilosa_internal_test.go +++ b/pilosa_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/pilosa_test.go b/pilosa_test.go index 4218acfe4..a9fd29826 100644 --- a/pilosa_test.go +++ b/pilosa_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/planner.go b/planner.go index 7942b32b4..6ecedb179 100644 --- a/planner.go +++ b/planner.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/planner_test.go b/planner_test.go index 8694b724c..668e8a9c5 100644 --- a/planner_test.go +++ b/planner_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/pprof.go b/pprof.go index ff34a7544..9d601da6a 100644 --- a/pprof.go +++ b/pprof.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/pql/ast.go b/pql/ast.go index 4e9dc1f2a..538810c2c 100644 --- a/pql/ast.go +++ b/pql/ast.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql import ( diff --git a/pql/ast_test.go b/pql/ast_test.go index 694cdf955..3d7153bfb 100644 --- a/pql/ast_test.go +++ b/pql/ast_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql_test import ( diff --git a/pql/decimal.go b/pql/decimal.go index 61843f580..19837d893 100644 --- a/pql/decimal.go +++ b/pql/decimal.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql import ( diff --git a/pql/decimal_test.go b/pql/decimal_test.go index e1a020658..e5efca481 100644 --- a/pql/decimal_test.go +++ b/pql/decimal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql_test import ( diff --git a/pql/doc.go b/pql/doc.go index 6150f4012..c02fa330f 100644 --- a/pql/doc.go +++ b/pql/doc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. /* Package pql defines the Pilosa Query Language. */ diff --git a/pql/parser.go b/pql/parser.go index 48c1fc430..514870503 100644 --- a/pql/parser.go +++ b/pql/parser.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql import ( diff --git a/pql/parser_test.go b/pql/parser_test.go index dc3f5c92e..fad097bf1 100644 --- a/pql/parser_test.go +++ b/pql/parser_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql_test import ( diff --git a/pql/pqlpeg_test.go b/pql/pqlpeg_test.go index ebe878a73..41d053633 100644 --- a/pql/pqlpeg_test.go +++ b/pql/pqlpeg_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql import ( diff --git a/pql/token.go b/pql/token.go index b44ea4637..09e302714 100644 --- a/pql/token.go +++ b/pql/token.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pql // Token is a lexical token of the PQL language. diff --git a/prometheus/prometheus.go b/prometheus/prometheus.go index d07d03bb7..1bd92af8a 100644 --- a/prometheus/prometheus.go +++ b/prometheus/prometheus.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package prometheus import ( diff --git a/prometheus/prometheus_test.go b/prometheus/prometheus_test.go index cdfebac83..07ee4c1ac 100644 --- a/prometheus/prometheus_test.go +++ b/prometheus/prometheus_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package prometheus_test import ( diff --git a/proto/interface.go b/proto/interface.go index 77ba3fd8d..9248a9d78 100644 --- a/proto/interface.go +++ b/proto/interface.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package proto import ( diff --git a/qa/simulacraData/simulacra_data.go b/qa/simulacraData/simulacra_data.go index e94c619d8..5ec269780 100644 --- a/qa/simulacraData/simulacra_data.go +++ b/qa/simulacraData/simulacra_data.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // PURPOSE: Generate data for Samsung unique workflow/use case, as described in Jira Ticket FB-971 // INPUT: none // OUTPUT: 6 csv files, containing approx 1 billion lines of data associated to 200 million unique records (approx 28BGB of data) diff --git a/qa/simulacraData/simulacra_data_test.go b/qa/simulacraData/simulacra_data_test.go index 38462f5e5..ae16de547 100644 --- a/qa/simulacraData/simulacra_data_test.go +++ b/qa/simulacraData/simulacra_data_test.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/rbf.go b/rbf.go index b75efa331..298c717d7 100644 --- a/rbf.go +++ b/rbf.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/rbf/array.go b/rbf/array.go index 6d8e628b2..d8d008a32 100644 --- a/rbf/array.go +++ b/rbf/array.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/cfg/cfg.go b/rbf/cfg/cfg.go index 5f8cd9345..cc2cf7a8a 100644 --- a/rbf/cfg/cfg.go +++ b/rbf/cfg/cfg.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cfg import ( diff --git a/rbf/cfg/os.go b/rbf/cfg/os.go index 88bb68891..5ca1f60d9 100644 --- a/rbf/cfg/os.go +++ b/rbf/cfg/os.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !386 // +build !386 diff --git a/rbf/cfg/os_386.go b/rbf/cfg/os_386.go index 7db730f97..d8d9a0373 100644 --- a/rbf/cfg/os_386.go +++ b/rbf/cfg/os_386.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package cfg // DefaultMaxSize is the default mmap size and therefore the maximum allowed diff --git a/rbf/cursor.go b/rbf/cursor.go index eb488f1ea..68c165d94 100644 --- a/rbf/cursor.go +++ b/rbf/cursor.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/cursor_internal_test.go b/rbf/cursor_internal_test.go index e426dda5b..8f2bf6a1f 100644 --- a/rbf/cursor_internal_test.go +++ b/rbf/cursor_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/cursor_test.go b/rbf/cursor_test.go index 6694cd026..4f7464bd1 100644 --- a/rbf/cursor_test.go +++ b/rbf/cursor_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf_test import ( diff --git a/rbf/cursorx.go b/rbf/cursorx.go index 5fcd2ae7c..08156b141 100644 --- a/rbf/cursorx.go +++ b/rbf/cursorx.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/db.go b/rbf/db.go index 68a41ac08..cc4b65700 100644 --- a/rbf/db.go +++ b/rbf/db.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/db_test.go b/rbf/db_test.go index 44fe5a1fc..56170d6eb 100644 --- a/rbf/db_test.go +++ b/rbf/db_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf_test import ( diff --git a/rbf/dot.go b/rbf/dot.go index 69ef11961..a6f66a542 100644 --- a/rbf/dot.go +++ b/rbf/dot.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/helpers_test.go b/rbf/helpers_test.go index 91711aec2..31cbdaab2 100644 --- a/rbf/helpers_test.go +++ b/rbf/helpers_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package rbf implements the roaring b-tree file format. package rbf_test diff --git a/rbf/ingest_test.go b/rbf/ingest_test.go index 40176783c..e4a7532af 100644 --- a/rbf/ingest_test.go +++ b/rbf/ingest_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/rbf.go b/rbf/rbf.go index 8cba59f4d..74a5135eb 100644 --- a/rbf/rbf.go +++ b/rbf/rbf.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package rbf implements the roaring b-tree file format. package rbf diff --git a/rbf/rbf_test.go b/rbf/rbf_test.go index 5626e67cd..48f16335a 100644 --- a/rbf/rbf_test.go +++ b/rbf/rbf_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf_test import ( diff --git a/rbf/tx.go b/rbf/tx.go index 301987320..37c76a351 100644 --- a/rbf/tx.go +++ b/rbf/tx.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/tx_test.go b/rbf/tx_test.go index 8a354a916..1004437a3 100644 --- a/rbf/tx_test.go +++ b/rbf/tx_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package rbf_test import ( diff --git a/rbf/util.go b/rbf/util.go index 429ec15f3..626b97738 100644 --- a/rbf/util.go +++ b/rbf/util.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/rbf/util_test.go b/rbf/util_test.go index 93cd7f8f4..e13cc6acf 100644 --- a/rbf/util_test.go +++ b/rbf/util_test.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package rbf import ( diff --git a/roaring/add.go b/roaring/add.go index db15eee47..b74d89181 100644 --- a/roaring/add.go +++ b/roaring/add.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/add_test.go b/roaring/add_test.go index 46e1e0d62..034705cc6 100644 --- a/roaring/add_test.go +++ b/roaring/add_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !race // +build !race diff --git a/roaring/benchpretty/main.go b/roaring/benchpretty/main.go index f178ea056..20c790f6c 100644 --- a/roaring/benchpretty/main.go +++ b/roaring/benchpretty/main.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package main import ( diff --git a/roaring/container_archetypes.go b/roaring/container_archetypes.go index 2da817d99..3993b8e79 100644 --- a/roaring/container_archetypes.go +++ b/roaring/container_archetypes.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/container_stash.go b/roaring/container_stash.go index 7dd6eae83..e7e0f7cd3 100644 --- a/roaring/container_stash.go +++ b/roaring/container_stash.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/containers_btree.go b/roaring/containers_btree.go index 8c967743b..bb5a81aee 100644 --- a/roaring/containers_btree.go +++ b/roaring/containers_btree.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/containers_slice.go b/roaring/containers_slice.go index 8597b0f8d..8c9095db0 100644 --- a/roaring/containers_slice.go +++ b/roaring/containers_slice.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring type sliceContainers struct { diff --git a/roaring/containers_test.go b/roaring/containers_test.go index 1c4b8fa12..e5d9fc2c4 100644 --- a/roaring/containers_test.go +++ b/roaring/containers_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/filter.go b/roaring/filter.go index 9e254c5d1..600de65da 100644 --- a/roaring/filter.go +++ b/roaring/filter.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/filter_internal_test.go b/roaring/filter_internal_test.go index a46c891b0..c390741d6 100644 --- a/roaring/filter_internal_test.go +++ b/roaring/filter_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/fuzz_test.go b/roaring/fuzz_test.go index 86f99faa0..618b8ec40 100644 --- a/roaring/fuzz_test.go +++ b/roaring/fuzz_test.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/fuzzer.go b/roaring/fuzzer.go index e76ea397e..c297b3571 100644 --- a/roaring/fuzzer.go +++ b/roaring/fuzzer.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build gofuzz // +build gofuzz package roaring diff --git a/roaring/generation_debug.go b/roaring/generation_debug.go index e5ac9f7b8..ecbcae70a 100644 --- a/roaring/generation_debug.go +++ b/roaring/generation_debug.go @@ -1,17 +1,5 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build generationdebug // +build generationdebug package roaring diff --git a/roaring/generation_nodebug.go b/roaring/generation_nodebug.go index 7b507dcbe..05fb122f7 100644 --- a/roaring/generation_nodebug.go +++ b/roaring/generation_nodebug.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !generationdebug // +build !generationdebug diff --git a/roaring/inst.go b/roaring/inst.go index f9eaf2831..f79600b58 100644 --- a/roaring/inst.go +++ b/roaring/inst.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build btreeInstrumentation // +build btreeInstrumentation package roaring diff --git a/roaring/naive.go b/roaring/naive.go index 14b6cfe43..af79906f3 100644 --- a/roaring/naive.go +++ b/roaring/naive.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/naive_test.go b/roaring/naive_test.go index c1accfb5e..9f6f45b6a 100644 --- a/roaring/naive_test.go +++ b/roaring/naive_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/nop_inst.go b/roaring/nop_inst.go index 73a8bd99e..abb68642e 100644 --- a/roaring/nop_inst.go +++ b/roaring/nop_inst.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !btreeInstrumentation // +build !btreeInstrumentation diff --git a/roaring/printutil.go b/roaring/printutil.go index b68568a1c..c18a59c23 100644 --- a/roaring/printutil.go +++ b/roaring/printutil.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/printutil_test.go b/roaring/printutil_test.go index 79575986d..44cbb6acc 100644 --- a/roaring/printutil_test.go +++ b/roaring/printutil_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/roaring.go b/roaring/roaring.go index bc4c57214..fe416b50b 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package roaring implements roaring bitmaps with support for incremental changes. package roaring diff --git a/roaring/roaring_container_test.go b/roaring/roaring_container_test.go index 9fbf4b214..824bac3ab 100644 --- a/roaring/roaring_container_test.go +++ b/roaring/roaring_container_test.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/roaring_helpers_test.go b/roaring/roaring_helpers_test.go index 2e9e713f3..4f3762a3b 100644 --- a/roaring/roaring_helpers_test.go +++ b/roaring/roaring_helpers_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import "sync" diff --git a/roaring/roaring_internal_test.go b/roaring/roaring_internal_test.go index da65e2306..ba59b7ce4 100644 --- a/roaring/roaring_internal_test.go +++ b/roaring/roaring_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/roaring_nop_paranoia.go b/roaring/roaring_nop_paranoia.go index c37e6b9ec..1b74d30b0 100644 --- a/roaring/roaring_nop_paranoia.go +++ b/roaring/roaring_nop_paranoia.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !roaringparanoia // +build !roaringparanoia diff --git a/roaring/roaring_nop_sentinel.go b/roaring/roaring_nop_sentinel.go index cba2ec106..4b022ed6b 100644 --- a/roaring/roaring_nop_sentinel.go +++ b/roaring/roaring_nop_sentinel.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !roaringsentinel // +build !roaringsentinel diff --git a/roaring/roaring_nop_stats.go b/roaring/roaring_nop_stats.go index c25ab553b..9f54feade 100644 --- a/roaring/roaring_nop_stats.go +++ b/roaring/roaring_nop_stats.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !roaringstats // +build !roaringstats diff --git a/roaring/roaring_paranoia.go b/roaring/roaring_paranoia.go index 1ba98ae29..f499f9669 100644 --- a/roaring/roaring_paranoia.go +++ b/roaring/roaring_paranoia.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build roaringparanoia // +build roaringparanoia package roaring diff --git a/roaring/roaring_sentinel.go b/roaring/roaring_sentinel.go index 47cbf21f1..c63d0e83b 100644 --- a/roaring/roaring_sentinel.go +++ b/roaring/roaring_sentinel.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build roaringsentinel // +build roaringsentinel package roaring diff --git a/roaring/roaring_stats.go b/roaring/roaring_stats.go index bf3742857..eac3909f1 100644 --- a/roaring/roaring_stats.go +++ b/roaring/roaring_stats.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build roaringstats // +build roaringstats package roaring diff --git a/roaring/roaring_test.go b/roaring/roaring_test.go index 57f4297cf..86e9ea516 100644 --- a/roaring/roaring_test.go +++ b/roaring/roaring_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring_test import ( diff --git a/roaring/source.go b/roaring/source.go index 4cd7ae244..e2be583e2 100644 --- a/roaring/source.go +++ b/roaring/source.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/roaring/unmarshal_binary.go b/roaring/unmarshal_binary.go index 7d8061a99..0c3a420af 100644 --- a/roaring/unmarshal_binary.go +++ b/roaring/unmarshal_binary.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package roaring import ( diff --git a/row.go b/row.go index 89bec66b1..60c14566f 100644 --- a/row.go +++ b/row.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/row_test.go b/row_test.go index b18ccfc93..c4199a452 100644 --- a/row_test.go +++ b/row_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/rrtx.go b/rrtx.go index e34080451..be55f1893 100644 --- a/rrtx.go +++ b/rrtx.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/rrtx_internal_test.go b/rrtx_internal_test.go index 7dc84e609..eb3907cd1 100644 --- a/rrtx_internal_test.go +++ b/rrtx_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/serializer.go b/serializer.go index 15956739c..1f4231c4f 100644 --- a/serializer.go +++ b/serializer.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/server.go b/server.go index bcb86f119..8858ab122 100644 --- a/server.go +++ b/server.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/server/cluster_test.go b/server/cluster_test.go index 51b8c8ebf..07ab7ea04 100644 --- a/server/cluster_test.go +++ b/server/cluster_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server_test import ( diff --git a/server/config.go b/server/config.go index 6f74d4f25..52f798abf 100644 --- a/server/config.go +++ b/server/config.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server import ( @@ -626,14 +613,14 @@ func (c *Config) ValidateAuth() ([]error, error) { errors := make([]error, 0) for name, value := range authConfig { if value == "" { - errors = append(errors, fmt.Errorf("Empty string for auth config %s", name)) + errors = append(errors, fmt.Errorf("empty string for auth config %s", name)) continue } if strings.Contains(name, "URL") { _, err := url.ParseRequestURI(value) if err != nil { - errors = append(errors, fmt.Errorf("Invalid URL for auth config %s: %s", name, err)) + errors = append(errors, fmt.Errorf("invalid URL for auth config %s: %s", name, err)) continue } } diff --git a/server/config_internal_test.go b/server/config_internal_test.go index 8d5e1fea0..7c762b23e 100644 --- a/server/config_internal_test.go +++ b/server/config_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server import ( @@ -292,8 +279,8 @@ func TestConfig_validateAddrsGRPC(t *testing.T) { } func TestConfig_validateAuth(t *testing.T) { - errorMesgEmpty := "Empty string" - errorMesgURL := "Invalid URL" + errorMesgEmpty := "empty string" + errorMesgURL := "invalid URL" validTestURL := "https://url.com/" validClientID := "clientid" validClientSecret := "clientSecret" diff --git a/server/config_test.go b/server/config_test.go index 8cf05f253..ce336ba59 100644 --- a/server/config_test.go +++ b/server/config_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server_test import ( diff --git a/server/dup.go b/server/dup.go index d6b2fe32c..60e6ab534 100644 --- a/server/dup.go +++ b/server/dup.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build darwin || (linux && !arm64) // +build darwin linux,!arm64 diff --git a/server/dup_arm64.go b/server/dup_arm64.go index bdcc249f0..e2d433958 100644 --- a/server/dup_arm64.go +++ b/server/dup_arm64.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build linux && arm64 // +build linux,arm64 package server diff --git a/server/grpc.go b/server/grpc.go index 270a5dd47..0dc6e909a 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server import ( diff --git a/server/grpc_test.go b/server/grpc_test.go index 5bb39902a..b7f8bb465 100644 --- a/server/grpc_test.go +++ b/server/grpc_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server_test import ( diff --git a/server/handler_test.go b/server/handler_test.go index 0e76255c3..283f102be 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server_test import ( diff --git a/server/pg.go b/server/pg.go index 169f2e747..42b95d987 100644 --- a/server/pg.go +++ b/server/pg.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server import ( diff --git a/server/pg_internal_test.go b/server/pg_internal_test.go index 75024d509..83ed1780f 100644 --- a/server/pg_internal_test.go +++ b/server/pg_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server import ( @@ -31,16 +18,12 @@ type TestQueryResultWriter struct { } func (t *TestQueryResultWriter) WriteHeader(headers ...pg.ColumnInfo) error { - for _, header := range headers { - t.Header = append(t.Header, header) - } + t.Header = append(t.Header, headers...) return nil } func (t *TestQueryResultWriter) WriteRowText(rowTexts ...string) error { - for _, rowText := range rowTexts { - t.RowText = append(t.RowText, rowText) - } + t.RowText = append(t.RowText, rowTexts...) return nil } diff --git a/server/pg_test.go b/server/pg_test.go index bd8a88521..8cfb21035 100644 --- a/server/pg_test.go +++ b/server/pg_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server_test import ( diff --git a/server/server.go b/server/server.go index 943813b07..a6d0049ae 100644 --- a/server/server.go +++ b/server/server.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. // // Package server contains the `pilosa server` subcommand which runs Pilosa // itself. The purpose of this package is to define an easily tested Command @@ -234,7 +222,7 @@ func (m *Command) Start() (err error) { return errors.Wrap(err, "setting resource limits") } - if m.Config.Auth.Enable == true { + if m.Config.Auth.Enable { m.Config.MustValidateAuth() } diff --git a/server/server_test.go b/server/server_test.go index a449d5838..014e2035e 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server_test import ( diff --git a/server/sql.go b/server/sql.go index e1179ebbb..b936f89c6 100644 --- a/server/sql.go +++ b/server/sql.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package server import ( diff --git a/server/tlsconfig.go b/server/tlsconfig.go index 3bbcf8b9a..82bed6693 100644 --- a/server/tlsconfig.go +++ b/server/tlsconfig.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. // // This file contains source code from bridge // (https://github.com/robustirc/bridge); which is governed by the following diff --git a/server/trial.go b/server/trial.go index 273e40873..057a786d1 100644 --- a/server/trial.go +++ b/server/trial.go @@ -1,16 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. // // Package server contains the `pilosa server` subcommand which runs Pilosa // itself. The purpose of this package is to define an easily tested Command diff --git a/server_internal_test.go b/server_internal_test.go index 7a1b7b121..763f2dc6a 100644 --- a/server_internal_test.go +++ b/server_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/shardwidth/16.go b/shardwidth/16.go index 6334bf254..068ffe4a6 100644 --- a/shardwidth/16.go +++ b/shardwidth/16.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth16 // +build shardwidth16 package shardwidth diff --git a/shardwidth/17.go b/shardwidth/17.go index b6ba8d907..bfc06a6ef 100644 --- a/shardwidth/17.go +++ b/shardwidth/17.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth17 // +build shardwidth17 package shardwidth diff --git a/shardwidth/18.go b/shardwidth/18.go index f69647681..b4955bfad 100644 --- a/shardwidth/18.go +++ b/shardwidth/18.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth18 // +build shardwidth18 package shardwidth diff --git a/shardwidth/19.go b/shardwidth/19.go index e9920326b..6a61f5735 100644 --- a/shardwidth/19.go +++ b/shardwidth/19.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth19 // +build shardwidth19 package shardwidth diff --git a/shardwidth/20.go b/shardwidth/20.go index f5e6ad968..dc23b05bf 100644 --- a/shardwidth/20.go +++ b/shardwidth/20.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build !shardwidth16 && !shardwidth17 && !shardwidth18 && !shardwidth19 && !shardwidth21 && !shardwidth22 && !shardwidth23 && !shardwidth24 && !shardwidth25 && !shardwidth26 && !shardwidth27 && !shardwidth28 && !shardwidth29 && !shardwidth30 && !shardwidth31 && !shardwidth32 // +build !shardwidth16,!shardwidth17,!shardwidth18,!shardwidth19,!shardwidth21,!shardwidth22,!shardwidth23,!shardwidth24,!shardwidth25,!shardwidth26,!shardwidth27,!shardwidth28,!shardwidth29,!shardwidth30,!shardwidth31,!shardwidth32 diff --git a/shardwidth/21.go b/shardwidth/21.go index 0ab1be104..41c10b18e 100644 --- a/shardwidth/21.go +++ b/shardwidth/21.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth21 // +build shardwidth21 package shardwidth diff --git a/shardwidth/22.go b/shardwidth/22.go index 9b07fff50..e790f61c8 100644 --- a/shardwidth/22.go +++ b/shardwidth/22.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth22 // +build shardwidth22 package shardwidth diff --git a/shardwidth/23.go b/shardwidth/23.go index 03c5cd91c..f2aa5171c 100644 --- a/shardwidth/23.go +++ b/shardwidth/23.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth23 // +build shardwidth23 package shardwidth diff --git a/shardwidth/24.go b/shardwidth/24.go index 7e175b1bc..e636c8f8e 100644 --- a/shardwidth/24.go +++ b/shardwidth/24.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth24 // +build shardwidth24 package shardwidth diff --git a/shardwidth/25.go b/shardwidth/25.go index 776655580..28785111d 100644 --- a/shardwidth/25.go +++ b/shardwidth/25.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth25 // +build shardwidth25 package shardwidth diff --git a/shardwidth/26.go b/shardwidth/26.go index 1459686bc..8837d5c2d 100644 --- a/shardwidth/26.go +++ b/shardwidth/26.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth26 // +build shardwidth26 package shardwidth diff --git a/shardwidth/27.go b/shardwidth/27.go index 9eb7ff830..53d1dcd41 100644 --- a/shardwidth/27.go +++ b/shardwidth/27.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth27 // +build shardwidth27 package shardwidth diff --git a/shardwidth/28.go b/shardwidth/28.go index b3c38c944..73e3594bf 100644 --- a/shardwidth/28.go +++ b/shardwidth/28.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth28 // +build shardwidth28 package shardwidth diff --git a/shardwidth/29.go b/shardwidth/29.go index e2b29faf1..217515578 100644 --- a/shardwidth/29.go +++ b/shardwidth/29.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth29 // +build shardwidth29 package shardwidth diff --git a/shardwidth/30.go b/shardwidth/30.go index a8684c236..11bf1a1f8 100644 --- a/shardwidth/30.go +++ b/shardwidth/30.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth30 // +build shardwidth30 package shardwidth diff --git a/shardwidth/31.go b/shardwidth/31.go index 1dcd40ebb..b060ffd93 100644 --- a/shardwidth/31.go +++ b/shardwidth/31.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth31 // +build shardwidth31 package shardwidth diff --git a/shardwidth/32.go b/shardwidth/32.go index d9408285b..0e38a7529 100644 --- a/shardwidth/32.go +++ b/shardwidth/32.go @@ -1,17 +1,5 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build shardwidth32 // +build shardwidth32 package shardwidth diff --git a/shardwidth/helper.go b/shardwidth/helper.go index c04e2e72b..380529584 100644 --- a/shardwidth/helper.go +++ b/shardwidth/helper.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package shardwidth import ( diff --git a/shardwidth/helper_test.go b/shardwidth/helper_test.go index cd1806cd8..8966d5aad 100644 --- a/shardwidth/helper_test.go +++ b/shardwidth/helper_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Molecula Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package shardwidth_test import ( diff --git a/short_txkey/txkey.go b/short_txkey/txkey.go index 7b4cd82af..d5d7345ec 100644 --- a/short_txkey/txkey.go +++ b/short_txkey/txkey.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package txkey consolidates in one place the use of keys to index into our // various storage/txn back-ends. The short_txkey version omits the // index and shard, since these are implicitly part of our database-per-shard diff --git a/short_txkey/txkey_test.go b/short_txkey/txkey_test.go index 69e24d8fb..6fbeca361 100644 --- a/short_txkey/txkey_test.go +++ b/short_txkey/txkey_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package short_txkey import ( diff --git a/snapshotqueue.go b/snapshotqueue.go index 08c2b2537..a33f90bce 100644 --- a/snapshotqueue.go +++ b/snapshotqueue.go @@ -1,17 +1,4 @@ -// Copyright 2019 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/sql/column.go b/sql/column.go index 1bf8f8885..49fef8dd2 100644 --- a/sql/column.go +++ b/sql/column.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/ddl.go b/sql/ddl.go index 1f7cb5f7b..9390e3c06 100644 --- a/sql/ddl.go +++ b/sql/ddl.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/extract.go b/sql/extract.go index 4f85f38a4..0165f5f40 100644 --- a/sql/extract.go +++ b/sql/extract.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/handler_test.go b/sql/handler_test.go index e07b67f1e..4f2e263bb 100644 --- a/sql/handler_test.go +++ b/sql/handler_test.go @@ -1,16 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package sql_test import ( diff --git a/sql/mapper.go b/sql/mapper.go index 80ce64b6c..4e271bdbe 100644 --- a/sql/mapper.go +++ b/sql/mapper.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/mapper_test.go b/sql/mapper_test.go index 216ffda4f..ce562222f 100644 --- a/sql/mapper_test.go +++ b/sql/mapper_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/mask.go b/sql/mask.go index e1f859dff..8161eacb7 100644 --- a/sql/mask.go +++ b/sql/mask.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/model.go b/sql/model.go index 671c6adde..5d87aa47a 100644 --- a/sql/model.go +++ b/sql/model.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/query.go b/sql/query.go index 9996110a9..0f4db98b7 100644 --- a/sql/query.go +++ b/sql/query.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/reduce.go b/sql/reduce.go index a7a18f1f7..a4cf4211d 100644 --- a/sql/reduce.go +++ b/sql/reduce.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/reduce_test.go b/sql/reduce_test.go index 3af2b5c36..dcddba726 100644 --- a/sql/reduce_test.go +++ b/sql/reduce_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/router.go b/sql/router.go index 4c15cb975..8c6035dee 100644 --- a/sql/router.go +++ b/sql/router.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql type router struct { diff --git a/sql/select.go b/sql/select.go index 1a3a829f9..07385d80d 100644 --- a/sql/select.go +++ b/sql/select.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql/show.go b/sql/show.go index 420095b61..2848a77d7 100644 --- a/sql/show.go +++ b/sql/show.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql import ( diff --git a/sql2/ast.go b/sql2/ast.go index 9d2e1a4db..5279793bb 100644 --- a/sql2/ast.go +++ b/sql2/ast.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2 import ( diff --git a/sql2/ast_test.go b/sql2/ast_test.go index 25cf95ac9..7523fe77d 100644 --- a/sql2/ast_test.go +++ b/sql2/ast_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2_test import ( diff --git a/sql2/parser.go b/sql2/parser.go index c0b2f4ac9..b8bfe32eb 100644 --- a/sql2/parser.go +++ b/sql2/parser.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2 import ( diff --git a/sql2/parser_test.go b/sql2/parser_test.go index 0d371954f..2a7be9f90 100644 --- a/sql2/parser_test.go +++ b/sql2/parser_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2_test import ( diff --git a/sql2/scanner.go b/sql2/scanner.go index 105f321b1..0b97f75e0 100644 --- a/sql2/scanner.go +++ b/sql2/scanner.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2 import ( diff --git a/sql2/scanner_test.go b/sql2/scanner_test.go index f4a25a0aa..63763195d 100644 --- a/sql2/scanner_test.go +++ b/sql2/scanner_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2_test import ( diff --git a/sql2/token.go b/sql2/token.go index 79e49568d..83a6ae0ba 100644 --- a/sql2/token.go +++ b/sql2/token.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2 import ( diff --git a/sql2/token_test.go b/sql2/token_test.go index 111d24237..03e583600 100644 --- a/sql2/token_test.go +++ b/sql2/token_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2_test import ( diff --git a/sql2/walk.go b/sql2/walk.go index 855103987..20e3d9433 100644 --- a/sql2/walk.go +++ b/sql2/walk.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package sql2 // A Visitor's Visit method is invoked for each node encountered by Walk. diff --git a/statik/filesystem.go b/statik/filesystem.go index 0b6a268fc..333a92c0a 100644 --- a/statik/filesystem.go +++ b/statik/filesystem.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. // //go:generate statik -src=../lattice/build -dest=../ // diff --git a/stats/stats.go b/stats/stats.go index 0bbe8cacd..7ec018479 100644 --- a/stats/stats.go +++ b/stats/stats.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package stats import ( diff --git a/stats/stats_test.go b/stats/stats_test.go index ef414d257..11e99c5ef 100644 --- a/stats/stats_test.go +++ b/stats/stats_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package stats_test import ( diff --git a/statsd/statsd.go b/statsd/statsd.go index e1ea378a0..a21ada41d 100644 --- a/statsd/statsd.go +++ b/statsd/statsd.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package statsd import ( diff --git a/statsd/statsd_test.go b/statsd/statsd_test.go index 530ac746d..c466798bb 100644 --- a/statsd/statsd_test.go +++ b/statsd/statsd_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package statsd_test import ( diff --git a/stattx.go b/stattx.go index 2e979f596..16b4d658a 100644 --- a/stattx.go +++ b/stattx.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/storage/cache.go b/storage/cache.go index fe65a90f3..6d934b69b 100644 --- a/storage/cache.go +++ b/storage/cache.go @@ -1,16 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2021 Molecula Corp. All rights reserved. package storage import ( diff --git a/storage/config.go b/storage/config.go index e578ab9b9..f1307943e 100644 --- a/storage/config.go +++ b/storage/config.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package storage // public strings that pilosa/server/config.go can reference diff --git a/syswrap/mmap.go b/syswrap/mmap.go index 2858183b2..effc2674a 100644 --- a/syswrap/mmap.go +++ b/syswrap/mmap.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package syswrap wraps syscalls (just mmap right now) in order to impose a // global in-process limit on the maximum number of active mmaps. package syswrap diff --git a/syswrap/os.go b/syswrap/os.go index 61715f5bb..4868d3abd 100644 --- a/syswrap/os.go +++ b/syswrap/os.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package syswrap import ( diff --git a/test/cluster.go b/test/cluster.go index 137aa6c83..58c27a4d6 100644 --- a/test/cluster.go +++ b/test/cluster.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/disco.go b/test/disco.go index d00c06a31..847d78258 100644 --- a/test/disco.go +++ b/test/disco.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/field.go b/test/field.go index 4559b2aa2..8554f88df 100644 --- a/test/field.go +++ b/test/field.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/handler.go b/test/handler.go index 375ae8c3f..8709c88a4 100644 --- a/test/handler.go +++ b/test/handler.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/holder.go b/test/holder.go index 547d3ad47..8418d95a5 100644 --- a/test/holder.go +++ b/test/holder.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/index.go b/test/index.go index 46bc7399b..7b3edf42f 100644 --- a/test/index.go +++ b/test/index.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/pilosa.go b/test/pilosa.go index 48659587f..56747309e 100644 --- a/test/pilosa.go +++ b/test/pilosa.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/test/pilosa_test.go b/test/pilosa_test.go index 6ab2008eb..4feea2d92 100644 --- a/test/pilosa_test.go +++ b/test/pilosa_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test_test import ( diff --git a/test/transaction.go b/test/transaction.go index 6a46540af..3ca524db4 100644 --- a/test/transaction.go +++ b/test/transaction.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package test import ( diff --git a/testBackupRestore.sh b/testBackupRestore.sh deleted file mode 100755 index 7bcbe3894..000000000 --- a/testBackupRestore.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -set -eux - -declare STATUS="NORMAL" -declare TIMEOUT=30 -sleep 4 -STATUS=$STATUS timeout -s TERM $TIMEOUT bash -c \ - 'while [[ ${STATUS_RECEIVED} != ${STATUS} ]];\ - do STATUS_RECEIVED=$(curl --connect-timeout 1 -s pilosa0:10101/status | jq -r ".state") && \ - echo "received status: $STATUS_RECEIVED" && \ - sleep 1;\ - done;' -echo "NOW DO STUFF" -datagen --source kitchensink_keyed -e 9999 --pilosa.index sink --pilosa.batch-size 10000 --pilosa.hosts pilosa0:10101 -before=$(/featurebase chksum --host pilosa0:10101) -/featurebase backup -o backupdir --host pilosa0:10101 -curl -X DELETE -s pilosa0:10101/index/sink -/featurebase restore -s backupdir --host pilosa0:10101 -after=$(/featurebase chksum --host pilosa0:10101) -if [ "$before" = "$after" ]; then - echo "PASS Cluster" -else - echo "FAIL Single" - exit 1 -fi -/featurebase restore -s backupdir --host pilosax:10101 -single=$(/featurebase chksum --host pilosax:10101) -if [ "$before" = "$single" ]; then - echo "PASS Single" - exit 0 -else - echo "FAIL Single" - exit 1 -fi - -datagen --source texas_health -e 9999 --pilosa.index newsink --pilosa.batch-size 10000 --pilosa.hosts pilosa0:10101 -before=$(/featurebase chksum --host pilosa0:10101) -/featurebase backup -o newbackupdir --host pilosa0:10101 --index newsink -curl -X DELETE -s pilosa0:10101/index/newsink -/featurebase restore -s newbackupdir --host pilosa0:10101 -after=$(/featurebase chksum --host pilosa0:10101) -if [ "$before" = "$after" ]; then - echo "PASS Cluster Table" -else - echo "FAIL Single Table" - exit 1 -fi -/featurebase restore -s newbackupdir --host pilosax:10101 -single=$(/featurebase chksum --host pilosax:10101) -if [ "$before" = "$single" ]; then - echo "PASS Single Table" - exit 0 -else - echo "FAIL Single Table" - exit 1 -fi diff --git a/testhook/auditor.go b/testhook/auditor.go index 8dcf87aa4..e2f030c35 100644 --- a/testhook/auditor.go +++ b/testhook/auditor.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package testhook //TODO: Check() and FinalCheck() should return error as the last argument diff --git a/testhook/auditor_test.go b/testhook/auditor_test.go index c7aacaff7..f6dad6157 100644 --- a/testhook/auditor_test.go +++ b/testhook/auditor_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package testhook_test import ( diff --git a/testhook/cleanup1.13.go b/testhook/cleanup1.13.go index 05aeb48e7..100562c2e 100644 --- a/testhook/cleanup1.13.go +++ b/testhook/cleanup1.13.go @@ -1,17 +1,5 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. +//go:build !go1.14 // +build !go1.14 package testhook diff --git a/testhook/cleanup1.14.go b/testhook/cleanup1.14.go index a88c91eae..5613b3499 100644 --- a/testhook/cleanup1.14.go +++ b/testhook/cleanup1.14.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. //go:build go1.14 // +build go1.14 diff --git a/testhook/hook.go b/testhook/hook.go index afa036f84..72d4b54ae 100644 --- a/testhook/hook.go +++ b/testhook/hook.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package testhook import ( diff --git a/testhook/registry.go b/testhook/registry.go index 31bde6d5b..aa0a180d0 100644 --- a/testhook/registry.go +++ b/testhook/registry.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package testhook import ( diff --git a/time.go b/time.go index 403f00da6..1c479c996 100644 --- a/time.go +++ b/time.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/time_internal_test.go b/time_internal_test.go index 2627ec65d..967b9fc59 100644 --- a/time_internal_test.go +++ b/time_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/toml/toml.go b/toml/toml.go index acfb93079..96142bd72 100644 --- a/toml/toml.go +++ b/toml/toml.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package toml import "time" diff --git a/topology/hasher.go b/topology/hasher.go index 41cd36b95..4f718c6bb 100644 --- a/topology/hasher.go +++ b/topology/hasher.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package topology // Hasher represents an interface to hash integers into buckets. diff --git a/topology/node.go b/topology/node.go index 9eb9df613..73b424413 100644 --- a/topology/node.go +++ b/topology/node.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package topology import ( diff --git a/topology/noder.go b/topology/noder.go index 63067e199..63c8c5e69 100644 --- a/topology/noder.go +++ b/topology/noder.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package topology import ( diff --git a/topology/snapshot.go b/topology/snapshot.go index a11dd8d87..1c6c01ff6 100644 --- a/topology/snapshot.go +++ b/topology/snapshot.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package topology import ( diff --git a/tracing/opentracing/opentracing.go b/tracing/opentracing/opentracing.go index ae336a5d0..b6ed1034c 100644 --- a/tracing/opentracing/opentracing.go +++ b/tracing/opentracing/opentracing.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package opentracing import ( diff --git a/tracing/tracing.go b/tracing/tracing.go index a7d58a251..a08c8e0f4 100644 --- a/tracing/tracing.go +++ b/tracing/tracing.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package tracing import ( diff --git a/tracker.go b/tracker.go index 280e6c366..6616dc53f 100644 --- a/tracker.go +++ b/tracker.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/tracker_test.go b/tracker_test.go index 569a7b609..ea38814e0 100644 --- a/tracker_test.go +++ b/tracker_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/transaction.go b/transaction.go index 764c1e67e..ca09f81f8 100644 --- a/transaction.go +++ b/transaction.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/transaction_test.go b/transaction_test.go index 557726340..f9ed5884b 100644 --- a/transaction_test.go +++ b/transaction_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/translate.go b/translate.go index 256dae341..be1c47306 100644 --- a/translate.go +++ b/translate.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( @@ -581,6 +568,8 @@ func (s *InMemTranslateStore) WriteTo(w io.Writer) (int64, error) { // don't expect to use InMemTranslateStore much, it's mostly there to // avoid disk load during testing. func (s *InMemTranslateStore) ReadFrom(r io.Reader) (count int64, err error) { + s.mu.Lock() + defer s.mu.Unlock() var bytes []byte bytes, err = ioutil.ReadAll(r) count = int64(len(bytes)) diff --git a/translator_test.go b/translator_test.go index 7d8b09a42..b9b4a08ff 100644 --- a/translator_test.go +++ b/translator_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/tx.go b/tx.go index 767969671..e8628c0e5 100644 --- a/tx.go +++ b/tx.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/tx_internal_test.go b/tx_internal_test.go index 66d36db19..8ffa2bd45 100644 --- a/tx_internal_test.go +++ b/tx_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/tx_test.go b/tx_test.go index e383a86b1..f82a3f321 100644 --- a/tx_test.go +++ b/tx_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa_test import ( diff --git a/txfactory.go b/txfactory.go index fc83e9bf5..62f527653 100644 --- a/txfactory.go +++ b/txfactory.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/txfactory_internal_test.go b/txfactory_internal_test.go index 9cfa9badb..46f8c918b 100644 --- a/txfactory_internal_test.go +++ b/txfactory_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/txkey/txkey.go b/txkey/txkey.go index 3df52a8eb..db42d0330 100644 --- a/txkey/txkey.go +++ b/txkey/txkey.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. // Package txkey consolidates in one place the use of keys to index into our // various storage/txn back-ends. Databases LMDB and rbfDB both use it, // so that debug Dumps are comparable. diff --git a/txkey/txkey_test.go b/txkey/txkey_test.go index 1741c8ad0..46809bd94 100644 --- a/txkey/txkey_test.go +++ b/txkey/txkey_test.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package txkey import ( diff --git a/util.go b/util.go index 1db0c74fc..7b81e9363 100644 --- a/util.go +++ b/util.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa // util.go: a place for generic, reusable utilities. diff --git a/util_test.go b/util_test.go index 14ed78c36..870625ad8 100644 --- a/util_test.go +++ b/util_test.go @@ -1,17 +1,4 @@ -// Copyright 2021 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa // util_test.go has unit tests for utility functions from util.go diff --git a/utils_internal_test.go b/utils_internal_test.go index fa9b666a8..30f675134 100644 --- a/utils_internal_test.go +++ b/utils_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/version.go b/version.go index 02e0da99c..4aa0bd514 100644 --- a/version.go +++ b/version.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/view.go b/view.go index 26b9e2262..f3bd27b3a 100644 --- a/view.go +++ b/view.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/view_internal_test.go b/view_internal_test.go index e7d2036d8..98afe9487 100644 --- a/view_internal_test.go +++ b/view_internal_test.go @@ -1,17 +1,4 @@ -// Copyright 2017 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package pilosa import ( diff --git a/vprint/vprint.go b/vprint/vprint.go index 9100da991..3d3ccf5e6 100644 --- a/vprint/vprint.go +++ b/vprint/vprint.go @@ -1,17 +1,4 @@ -// Copyright 2020 Pilosa Corp. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +// Copyright 2021 Molecula Corp. All rights reserved. package vprint import (