오닉스를 사용하는 프리즘 스키마에 대한 유효성 검사가 실패하는 이유 (ExceptionInfo 값이 스키마와 일치하지 않음)는 무엇입니까?

ZeroGraviti

누군가 여기서 무슨 일이 일어나고 있는지에 대해 조명을 던질 수 있습니까? 비 오닉스 클라이언트를 사용하여 dynamodb-local 동작을 두 번 확인 했으며 Faraday를 사용하여 간단한 작업이 작동 합니다. 실행하려는 코드가 여기에 있으며 여기 에 문제를 기록 했지만 응답이 없습니다.

REPL의 출력은 다음과 같습니다.

$ lein repl
WARNING: cat already refers to: #'clojure.core/cat in namespace: clj-uuid.bitmop, being replaced by: #'clojure.core.reducers/cat
nREPL server started on port 44195 on host 127.0.0.1 - nrepl://127.0.0.1:44195
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.7.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_25-b18
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

cqrs-server.core=> (start)
ExceptionInfo Value does not match schema: {:onyx/consumption missing-required-key, :onyx/batch-size missing-required-key, :onyx/medium missing-required-key}  schema.core/validate (core.clj:161)

cqrs-server.core=>

사용하는 전체 스택 추적 *e은 다음과 같습니다.

cqrs-server.core=> *e
#error {
 :cause "Value does not match schema: {:onyx/consumption missing-required-key, :onyx/batch-size missing-
required-key, :onyx/medium missing-required-key}"
 :data {:type :schema.core/error, :schema (conditional #object[onyx.validation$fn__16409 0x6ba7a7e4 "ony
x.validation$fn__16409@6ba7a7e4"] {:onyx/name Keyword, :onyx/type (enum :output :function :input), :onyx
/consumption (enum :concurrent :sequential), :onyx/batch-size (pred pos?), Keyword Any, :onyx/medium Key
word} #object[clojure.core$constantly$fn__4383 0x5a6f89f1 "clojure.core$constantly$fn__4383@5a6f89f1"] {
:onyx/name Keyword, :onyx/type (enum :output :function :input), :onyx/consumption (enum :concurrent :seq
uential), :onyx/batch-size (pred pos?), Keyword Any, :onyx/fn Keyword}), :value {:onyx/name :event/aggre
gate-out, :onyx/type :output}, :error {:onyx/consumption missing-required-key, :onyx/batch-size missing-
required-key, :onyx/medium missing-required-key}}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message "Value does not match schema: {:onyx/consumption missing-required-key, :onyx/batch-size miss
ing-required-key, :onyx/medium missing-required-key}"
   :data {:type :schema.core/error, :schema (conditional #object[onyx.validation$fn__16409 0x6ba7a7e4 "o
nyx.validation$fn__16409@6ba7a7e4"] {:onyx/name Keyword, :onyx/type (enum :output :function :input), :on
yx/consumption (enum :concurrent :sequential), :onyx/batch-size (pred pos?), Keyword Any, :onyx/medium K
eyword} #object[clojure.core$constantly$fn__4383 0x5a6f89f1 "clojure.core$constantly$fn__4383@5a6f89f1"]
 {:onyx/name Keyword, :onyx/type (enum :output :function :input), :onyx/consumption (enum :concurrent :s
equential), :onyx/batch-size (pred pos?), Keyword Any, :onyx/fn Keyword}), :value {:onyx/name :event/agg
regate-out, :onyx/type :output}, :error {:onyx/consumption missing-required-key, :onyx/batch-size missin
g-required-key, :onyx/medium missing-required-key}}
   :at [schema.core$validate invoke "core.clj" 161]}]
 :trace
 [[schema.core$validate invoke "core.clj" 161]
  [onyx.validation$validate_catalog invoke "validation.clj" 48]
  [onyx.validation$validate_job invoke "validation.clj" 122]
  [onyx.api$submit_job invoke "api.clj" 90]
  [cqrs_server.core$start invoke "core.clj" 207]
  [cqrs_server.core$eval19231 invoke "form-init17061160983479843.clj" 1]
  [clojure.lang.Compiler eval "Compiler.java" 6782]
  [clojure.lang.Compiler eval "Compiler.java" 6745]
  [clojure.core$eval invoke "core.clj" 3081]
  [clojure.main$repl$read_eval_print__7099$fn__7102 invoke "main.clj" 240]
  [clojure.main$repl$read_eval_print__7099 invoke "main.clj" 240]
  [clojure.main$repl$fn__7108 invoke "main.clj" 258]
  [clojure.main$repl doInvoke "main.clj" 258]
  [clojure.lang.RestFn invoke "RestFn.java" 1523]
  [clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__18624 invoke "interruptible_eval.clj"
87]
  [clojure.lang.AFn applyToHelper "AFn.java" 152]
  [clojure.lang.AFn applyTo "AFn.java" 144]
  [clojure.core$apply invoke "core.clj" 630]
  [clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1868]
  [clojure.lang.RestFn invoke "RestFn.java" 425]
  [clojure.tools.nrepl.middleware.interruptible_eval$evaluate invoke "interruptible_eval.clj" 85]
  [clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__18669$fn__18672 invoke "inte
rruptible_eval.clj" 222]
  [clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__18664 invoke "interruptible_eval.clj"
190]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1142]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 617]
  [java.lang.Thread run "Thread.java" 745]]}
cqrs-server.core=>
cqrs-server.core=>

my-ns로컬에서 실행되는 동일한 dynamodb에 연결 되는 Faraday 클라이언트 REPL ( 테스트 용 로컬 네임 스페이스) 의 출력 은 다음과 같습니다.

my-ns=> (far/list-tables client-opts)
(:events)

my-ns=> (far/describe-table client-opts :events)
{:lsindexes nil, :gsindexes [{:name :event-idx, :size 0, :item-count 0, :key-schema [{:name :type, :type :hash} {:name :date, :type :range}], :projection {:projection-type "ALL", :non-key-attributes nil}, :throughput {:read 1, :write 1, :last-decrease nil, :last-increase nil, :num-decreases-today nil}}], :name :events, :throughput {:read 1, :write 1, :last-decrease #inst "1970-01-01T00:00:00.000-00:00", :last-increase #inst "1970-01-01T00:00:00.000-00:00", :num-decreases-today 0}, :prim-keys {:id {:key-type :hash, :data-type :s}, :date {:key-type :range, :data-type :n}, :type {:data-type :s}}, :size 0, :status :active, :item-count 0, :creation-date #inst "2016-03-10T22:53:33.601-00:00", :indexes nil}
my-ns=>

my-ns=> (far/scan client-opts :events)
[]

core.clj 여기검토를 위해 cqrs.clj 여기에 대한 공개 요점을 만들었습니다 . project.clj모습은 이렇게 .

누군가이 문제를 해결하도록 도와 주시겠습니까?
TIA

피오 트렉 비즈 딜

귀하가 제공 한 정보와 채팅을 바탕으로 귀하의 질문에 대한 답은 :catalog구성 벡터 에있는 마지막 항목에 스키마 유효성 검사 오류로 표시된 키가 누락되어 있다는 것입니다.

{:onyx/consumption missing-required-key, :onyx/batch-size missing-required-key, :onyx/medium missing-required-key}

문제가되는 항목 (벡터의 마지막 항목)은 다음과 같습니다.

{:onyx/name :event/aggregate-out, :onyx/type :output}

그리고 누락 된 키를 포함하도록 수정해야합니다.

{:onyx/name :event/aggregate-out,
 :onyx/type :output,
 :onyx/consumption <some value here>,
 :onyx/batch-size <some value here>,
 :onyx/medium <some value here>}

그러나 일반적으로 나는 당신의 일반적인 접근 방식을 다시 생각할 것입니다. 달성하려는 목표는 무엇입니까?

제 생각에는 깨진 상태의 코드를 포함하는 것처럼 보이는 "무작위로"선택된 오래된 커밋을 기반으로 프레임 워크를 작업하는 데 어려움을 겪을 가치가 없습니다. cqrs-server에서 버그를 발견 한 경우 애플리케이션을 어떻게 지원 하시겠습니까? 사용자 정의 커밋에서 시작하여 포크하고 직접 지원 하시겠습니까?

오히려 문제에 대한 요구 사항으로 시작한 다음 더 안정적이고 더 잘 지원되는 라이브러리 / 프레임 워크를 사용하여 솔루션을 평가하여 프로젝트를 더 잘 지원할 수 있도록합니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관