onyx

FYI: alternative Onyx :onyx: chat is at <https://gitter.im/onyx-platform/onyx> ; log can be found at <https://clojurians-log.clojureverse.org/onyx/index.html>
lucasbradstreet 2018-07-06T02:29:01.000145Z

@j0ni that’s odd. Is that purely with with-test-env, no external zookeeper?

lucasbradstreet 2018-07-06T02:29:30.000035Z

hmm, doesn’t look like an incompatibility issue

lucasbradstreet 2018-07-06T02:30:22.000200Z

I wonder if you’re starting up two of them, or getting some bad gc weirdness or something else like that. It’s a strange one to get from purely with-test-env + a job

sreekanth 2018-07-06T06:59:57.000072Z

@lucasbradstreet Onyx dashboard docker images are being pushed to https://hub.docker.com/r/onyx/onyx-dashboard/

sreekanth 2018-07-06T07:00:21.000206Z

But official docker repo seems to be this. https://hub.docker.com/u/onyxplatform/

sreekanth 2018-07-06T07:00:26.000178Z

is this intentional?

j0ni 2018-07-06T14:07:05.000451Z

@lucasbradstreet I have an external zookeeper with a configuration tweaked accordingly. Config:

dev&gt; (clojure.pprint/pprint (read-config (io/resource "config.edn") {:profile :local}))
{:env-config
 {:onyx/tenancy-id "2",
  :zookeeper/address "localhost:2181",
  :zookeeper/server? false,
  :zookeeper.server/port 2188,
  :onyx.log/config {:level :debug}},
 :peer-config
 {:onyx.peer/storage.zk.insanely-allow-windowing? true,
  :onyx/tenancy-id "2",
  :onyx.messaging/allow-short-circuit? false,
  :onyx.messaging/impl :aeron,
  :onyx.log/config {:level :debug},
  :onyx.messaging/peer-port 40200,
  :zookeeper/address "localhost:2181",
  :onyx.peer/job-scheduler :onyx.job-scheduler/balanced,
  :onyx.messaging.aeron/embedded-driver? true,
  :onyx.peer/zookeeper-timeout 60000,
  :onyx.messaging/bind-addr "localhost"}}
=&gt; nil

j0ni 2018-07-06T14:07:27.000407Z

and my test code:

(defn run-test
  "Requires (a) peer(s) to be up and running"
  []
  (init-queue)
  (let [{:keys [env-config peer-config]}
        (aero.core/read-config (io/resource "config.edn") {:profile :local})

        job (inspect (as/action-service-job {:onyx/batch-size 10
                                             :onyx/batch-timeout 1000}))

        {:keys [out]} (get-core-async-channels job)
        in-segments (take 100 (test-data-gen))]

    (with-test-env [alpha [5 env-config peer-config]]
      (validate-enough-peers! (inspect alpha) job)

      (let [job (inspect (api/submit-job (inspect peer-config) job))]
        (assert (:success? job))
        (send-data in-segments)

        ;; wait for the job to finish
        (feedback-exception! peer-config (:job-id job))))

    (assert (= (set (take-segments! out 100))
               (set in-segments)))))

j0ni 2018-07-06T14:08:24.000395Z

(`send-data` is code which pushes data into a sqs queue, which I've confirmed gets the data, though it is never removed by the onyx sqs plugin)

j0ni 2018-07-06T14:12:31.000377Z

The code hangs in the call to feedback-exception! and then starts throwing the BadVersion error after about a minute

lucasbradstreet 2018-07-06T15:47:39.000415Z

at a high level that seems fine. I’m not sure how much data you’re sending through, but maybe reduce it to a single message and check whether it ends up processing it.

j0ni 2018-07-06T15:49:17.000098Z

I had some progress actually - I'm now seeing data arriving at my function from the sqs input task - which is awesome. Now I'm trying to figure out how to make the job end after all the data is through

j0ni 2018-07-06T15:49:35.000217Z

I suspect in the test that I used as a template for this, the closing of the input channel has that effect

j0ni 2018-07-06T15:49:59.000222Z

I see the test you guys have in the sqs plugin seems to wait for some value (`:epoch`) to change and then kills the job

j0ni 2018-07-06T15:50:07.000297Z

is that the best approach?