-
Notifications
You must be signed in to change notification settings - Fork 0
Adding changes for prod deployment #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: HAYS_kinesis_otel_integration
Are you sure you want to change the base?
Conversation
…soark configurations, changing @ in tag keys to .
RashmiRam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move all defaults to constant and use it.
Uh oh!
There was an error while loading. Please reload this page.