[
https://issues.apache.org/jira/browse/GOBBLIN-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099111#comment-17099111
]
Chen Guo commented on GOBBLIN-1140:
-----------------------------------
The stack trace for this bug when it happens at around 70% of the chance.
{code:java}
Caused by: java.lang.RuntimeException: Cannot add Spec to Spec store:
gobblin-flow:/ingestion-salesforce/customer1/
at
org.apache.gobblin.runtime.spec_catalog.FlowCatalog.put(FlowCatalog.java:318)
at
org.apache.gobblin.service.FlowConfigV2ResourceLocalHandler.createFlowConfig(FlowConfigV2ResourceLocalHandler.java:69)
at
org.apache.gobblin.service.FlowConfigV2ResourceLocalHandler.createFlowConfig(FlowConfigV2ResourceLocalHandler.java:35)
at
org.apache.gobblin.service.FlowConfigResourceLocalHandler.createFlowConfig(FlowConfigResourceLocalHandler.java:156)
at
org.apache.gobblin.service.modules.restli.GobblinServiceFlowConfigResourceHandler.createFlowConfig(GobblinServiceFlowConfigResourceHandler.java:125)
at
org.apache.gobblin.service.FlowConfigsV2Resource.create(FlowConfigsV2Resource.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
com.linkedin.restli.internal.server.RestLiMethodInvoker.doInvoke(RestLiMethodInvoker.java:138)
... 156 more
Caused by: org.apache.hadoop.util.Shell$ExitCodeException: chmod:
/export/content/lid/data/k2-gobblin-service-deployable/gaas-manager/GobblinServiceManager/flowSpecs/ingestion-salesforce/customer1:
No such file or directory
at org.apache.hadoop.util.Shell.runCommand(Shell.java:505)
at org.apache.hadoop.util.Shell.run(Shell.java:418)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:650)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:739)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:722)
at
org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:631)
at
org.apache.hadoop.fs.FilterFileSystem.setPermission(FilterFileSystem.java:468)
at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:456)
at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:424)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:907)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:888)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:785)
at
org.apache.gobblin.runtime.spec_store.FSSpecStore.writeSpecToFile(FSSpecStore.java:325)
at
org.apache.gobblin.runtime.spec_store.FSSpecStore.addSpec(FSSpecStore.java:157)
at
org.apache.gobblin.runtime.spec_catalog.FlowCatalog.put(FlowCatalog.java:315)
... 166 more
",
"message": "INTERNAL SERVER ERROR",
"status": 500
}
{code}
> Listeners monitoring added FlowSpecs are fired before Specs are successfully
> added
> ----------------------------------------------------------------------------------
>
> Key: GOBBLIN-1140
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1140
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Chen Guo
> Priority: Critical
>
> This bug was introduced in the commit for [GOBBLIN-1082] "compile a flow
> before storing it in spec catalog" on 3/12/2020.
> Previously, the listeners were triggered after spec has been added to
> specStore.
> {code:java}
> specStore.addSpec(spec);
> metrics.updatePutSpecTime(startTime);
> if (triggerListener) {
>
> AddSpecResponse<CallbacksDispatcher.CallbackResults<SpecCatalogListener,
> AddSpecResponse>> response = this.listeners.onAddSpec(spec);
> for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>>
> entry: response.getValue().getSuccesses().entrySet()) {
> responseMap.put(entry.getKey().getName(),
> entry.getValue().getResult());
> }
> }
> {code}
> After the change, the order becomes
> {code:java}
> if (triggerListener) {
>
> AddSpecResponse<CallbacksDispatcher.CallbackResults<SpecCatalogListener,
> AddSpecResponse>> response = this.listeners.onAddSpec(spec);
> for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>>
> entry: response.getValue().getSuccesses().entrySet()) {
> responseMap.put(entry.getKey().getName(),
> entry.getValue().getResult());
> }
> }
> boolean compileSuccess = isCompileSuccessful(responseMap);
> if (compileSuccess) {
> long startTime = System.currentTimeMillis();
> metrics.updatePutSpecTime(startTime);
> try {
> specStore.addSpec(spec);
> } catch (IOException e) {
> throw new RuntimeException("Cannot add Spec to Spec store: " + spec,
> e);
> }
> responseMap.put(ServiceConfigKeys.COMPILATION_SUCCESSFUL, new
> AddSpecResponse<>("true"));
> }
> {code}
> Due to this bug, the flow spec for the on-demand triggering cannot be
> deleted. One of the listener is GobblinServiceJobScheduler, which will delete
> the flowSpec file. Now the deletion operation is performed before the
> flowSpec file is created.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)