This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #734 from Netflix/externalize_large_payloads
store large payloads in external storage - part 1
- Loading branch information
Showing
87 changed files
with
4,475 additions
and
1,195 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
client/src/main/java/com/netflix/conductor/client/config/ConductorClientConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2018 Netflix, Inc. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.conductor.client.config; | ||
|
||
public interface ConductorClientConfiguration { | ||
|
||
/** | ||
* @return the workflow input payload size threshold in KB, | ||
* beyond which the payload will be processed based on {@link ConductorClientConfiguration#isExternalPayloadStorageEnabled()}. | ||
*/ | ||
int getWorkflowInputPayloadThresholdKB(); | ||
|
||
/** | ||
* @return the max value of workflow input payload size threshold in KB, | ||
* beyond which the payload will be rejected regardless external payload storage is enabled. | ||
*/ | ||
int getWorkflowInputMaxPayloadThresholdKB(); | ||
|
||
/** | ||
* @return the task output payload size threshold in KB, | ||
* beyond which the payload will be processed based on {@link ConductorClientConfiguration#isExternalPayloadStorageEnabled()}. | ||
*/ | ||
int getTaskOutputPayloadThresholdKB(); | ||
|
||
/** | ||
* @return the max value of task output payload size threshold in KB, | ||
* beyond which the payload will be rejected regardless external payload storage is enabled. | ||
*/ | ||
int getTaskOutputMaxPayloadThresholdKB(); | ||
|
||
/** | ||
* @return the flag which controls the use of external storage for storing workflow/task | ||
* input and output JSON payloads with size greater than threshold. | ||
* If it is set to true, the payload is stored in external location. | ||
* If it is set to false, the payload is rejected and the task/workflow execution fails. | ||
*/ | ||
boolean isExternalPayloadStorageEnabled(); | ||
} |
49 changes: 49 additions & 0 deletions
49
...rc/main/java/com/netflix/conductor/client/config/DefaultConductorClientConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2018 Netflix, Inc. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.conductor.client.config; | ||
|
||
/** | ||
* A default implementation of {@link ConductorClientConfiguration} | ||
* where external payload storage is disabled. | ||
*/ | ||
public class DefaultConductorClientConfiguration implements ConductorClientConfiguration { | ||
|
||
@Override | ||
public int getWorkflowInputPayloadThresholdKB() { | ||
return 5120; | ||
} | ||
|
||
@Override | ||
public int getWorkflowInputMaxPayloadThresholdKB() { | ||
return 10240; | ||
} | ||
|
||
@Override | ||
public int getTaskOutputPayloadThresholdKB() { | ||
return 3072; | ||
} | ||
|
||
@Override | ||
public int getTaskOutputMaxPayloadThresholdKB() { | ||
return 10240; | ||
} | ||
|
||
@Override | ||
public boolean isExternalPayloadStorageEnabled() { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.