featurebase/idk
Matthew Jaffee 3693b9950a
Expose translation mvcc (#2381)
* expose Transaction on TranslateStore for DAX Snapshotting

* try to fix ramdisk nonsense

apparently, we were running in either a shell env or docker env
randomly, so this could sometimes pass and sometimes fail since the
shell env had the ramdisk set up and docker didn't.

Now we force to run in docker always and set up ramdisk explicitly.

* ramdisk mount should be defined on gitlab runner config now

* debug ramdisk issue?

* fix tests... and a buncha other stuff

Took retry out of CI config because I think it's doing more harm than
good at this point.

The executor test I modified failed when I changed DefaultPartitionN
to 8, but just because stuff was out of order so I made it more
robust.

I edited some data gen stuff to make shorter lines because it was
making grep results unusable.

the actual fix is in translate_boltdb_test.go

* clean up, fix code review feedback
2022-12-20 07:45:32 -06:00
..
api Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
bankgen FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
cmd Re-allowed concurrency for molecula-consumer-csv when not using '--auto-generate' (#2294) 2022-11-15 15:55:57 -05:00
common staticcheck fixes (#2278) 2022-11-07 10:51:55 -06:00
csv staticcheck fixes (#2278) 2022-11-07 10:51:55 -06:00
datagen Expose translation mvcc (#2381) 2022-12-20 07:45:32 -06:00
docker-sasl FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
fakeidp Distinguish between three copies of fakeidp service (#2192) 2022-08-16 09:13:11 -05:00
idktest Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
internal staticcheck fixes (#2278) 2022-11-07 10:51:55 -06:00
kafka Dataframe (#2241) 2022-11-21 17:38:48 -06:00
kafka_sasl drop invalid UTF8 encoding from encoding tests 2022-11-16 15:31:06 -06:00
kafka_static drop invalid UTF8 encoding from encoding tests 2022-11-16 15:31:06 -06:00
kafkagen staticcheck fixes (#2278) 2022-11-07 10:51:55 -06:00
kinesis [CLOUD-934] Optionally broadcast IDK Kinesis errors/panics to externa… (#2185) 2022-08-12 17:59:56 -05:00
mds Make interfaces more specific than "MDS" (#2352) 2022-12-12 13:14:17 -06:00
sql FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
testdata Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
.cloud-env.template FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
docker-compose.yml Convert SchemaAPI interface to use dax.Table instead of pilosa.IndexInfo (#2336) 2022-12-08 11:35:17 -06:00
Dockerfile Make SOURCE_DATE_EPOCH changes for idk 2022-12-02 09:48:12 -07:00
Dockerfile-fakeIDP Upgrade Go to 1.19 (#2204) 2022-08-25 14:54:14 -06:00
Dockerfile-test Upgrade Go to 1.19 (#2204) 2022-08-25 14:54:14 -06:00
Dockerfile-wait FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
dup.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
dup_arm64.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
file_with_line_delimited_values FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
header.go staticcheck fixes (#2278) 2022-11-07 10:51:55 -06:00
header_test.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
idallocator.go drop ioutil 2022-09-23 16:56:27 -05:00
idallocator_test.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
ingest.go remove in mem translate store 2022-12-17 13:10:46 -06:00
ingest_test.go Make interfaces more specific than "MDS" (#2352) 2022-12-12 13:14:17 -06:00
interfaces.go Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
interfaces_test.go changes to add bool support in idk (#2240) 2022-10-19 12:16:38 -05:00
Makefile Introduce ServiceManager and Refactor DAX Integration tests (#2320) 2022-12-05 14:49:17 -06:00
metrics.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
pilosa-sec-test.conf FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
postgres.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
progress.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
README.md Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
reingest_test.sh FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
sample.csv FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
test_postgres.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
tls.go drop ioutil 2022-09-23 16:56:27 -05:00
util.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
util_test.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
version.go FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00
wait.sh FB-1597: unifying idk and featurebase (#2160) 2022-07-28 17:23:16 -05:00

idk: Ingest Development Kit

Integration tests

To run the tests, you will need to install the following dependencies:

  1. Docker
  2. Docker Compose
  3. Certstrap

In addition to these dependancies, you will need to be added to the moleculacorp Dockerhub account.

First start the test environment. This is a docker-compose environment that includes pilosa and a confluent kafka stack. Run the following to start those services:

make startup

To build and run the integration tests, run:

make test-run

An alternative command to use, if you're running tests locally and want human-friendly output, is:

make test-run-local

With that command you can also specify individual tests to run like this:

make test-run-local TCMD='-run=TestJustThisOne .'

Then to shut down the test environment, run:

make shutdown

You can run all of the previous commands by calling test-all:

make test-all

The previous command is equivalent to running the following:

make startup
sleep 30 # wait for services to come up
make test-run
make shutdown

To run an individual test, you can run the command directly using docker-compose. Note that you must run docker-compose build idk-test for docker to run the latest code. Modify the following as needed:

make startup
docker-compose build idk-test
docker-compose run idk-test /usr/local/go/bin/go test -count=1 -mod=vendor -run=TestCmdMainOne ./kafka

To shutdown and reset the environment:

make clean

Running dependencies locally (rather than in docker) "make test-local"

This is for running the tests locally and not in Docker... so you have to be running a bunch of stuff natively on your machine.

Run Pilosa with default config:

pilosa server

Run another pilosa like

pilosa server --config=pilosa-sec-test.conf

which will run Pilosa with TLS using certs in testenv. (make testenv first if you haven't).

You also need to be running the Confluent stack which, after you've installed it from Confluent's site might look something like:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
confluent local destroy && confluent local start schema-registry

Or it might not! You may not need the first line, but if you have the wrong Java version by default, that's how you set it. The second line may change depending on what version of the confluent stack you get. According to

confluent version

I'm running:

Version:     v0.212.0
Git Ref:     2b04985

Use the test-local make target:

make test-local

This sets a number of environment variables (which it prints when you run it), and should set them correctly if you follow the instructions above, but if you're running things on non-default ports you may need to tweak them.

CSV Ingester

  1. make sure you're running Pilosa (localhost:10101 for these instructions)

molecula-consumer-csv --primary-key-fields=asset_tag -i sample-index --files sample.csv

asset_tag__String,fan_time__RecordTime_2006-01-02,fan_val__String_F_YMD
ABCD,2019-01-02,70%
ABCD,2019-01-03,20%
ABCD,2019-01-04,30%
BEDF,2019-01-02,70%
BEDF,2019-01-05,90%
BEDF,2019-01-08,10%
BEDF,2019-01-08,20%
ABCD,2019-01-30,40%

Datagen

Datagen is an internal command-line tool to generate various application-specific datasets, and ingest them directly into Pilosa. After running make install, run datagen with no arguments to see a list of available "sources".

When running Datagen with local Docker stacks, make sure to add individual docker stacks to the /etc/hosts file:

127.0.0.1 kafka
127.0.0.1 pilosa
127.0.0.1 <docker stack>

ODBC Support

By default, the SQL ingester is not built with ODBC support. This is because it uses CGO with extra dependencies, and the resulting binaries are not portable. In order to build with ODBC support, it is necessary to install unixODBC to the system. Then run:

make bin/molecula-consumer-sql-odbc

Different Linux distros will store certain libraries in different locations. ODBC uses dynamic library loading to handle drivers, so full static linking of dependencies is not possible. It is therefore necessary to build on a system with the same distro and the same software versions as the target machine.