Adding changes for prod deployment #1
Open
sivatarunp wants to merge 4 commits intoHAYS_kinesis_otel_integrationfrom
Open
Adding changes for prod deployment #1sivatarunp wants to merge 4 commits intoHAYS_kinesis_otel_integrationfrom
sivatarunp wants to merge 4 commits intoHAYS_kinesis_otel_integrationfrom
Conversation
added 2 commits
June 28, 2021 22:37
…soark configurations, changing @ in tag keys to .
RashmiRam
suggested changes
Jun 29, 2021
RashmiRam
left a comment
There was a problem hiding this comment.
Let's discuss this on how to make this main more readable.
| String region = Regions.getCurrentRegion()!=null ? Regions.getCurrentRegion().getName() | ||
| : getPropOrEnv("AWS_REGION", Regions.US_EAST_1.getName()); | ||
|
|
||
| String service_endpoint = getPropOrEnv("KINESIS_ENDPOINT", "https://kinesis.us-east-1.amazonaws.com"); |
There was a problem hiding this comment.
throw error if not provided. We can't try to read from other region and all right.
| * @throws IOException | ||
| */ | ||
| public static void main(String[] args) throws InterruptedException, IOException { | ||
| PropertyConfigurator.configure("/data/log4j.properties"); // can make it configurable |
There was a problem hiding this comment.
Why do we have to do like this? Log4j2 will look for config file specified in a pre defined env var by default. We can set that env var to our log4j2.xml or log4j2.yml file when we run this jar.
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.14.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.14.1</version>
</dependency>https://logging.apache.org/log4j/2.x/manual/configuration.html
| .setAppName("Trace DSL") | ||
| .setMaster(getPropOrEnv("SPARK_MASTER", "local[*]")) | ||
| .set("spark.testing.memory", getPropOrEnv("SPARK_MEMORY", "471859200")); | ||
| .set("spark.testing.memory", getPropOrEnv("SPARK_MEMORY", "4073741824")) |
There was a problem hiding this comment.
Move all defaults to constant and use it.
added 2 commits
June 29, 2021 23:02
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.