Skip to content

Commit

Permalink
Update folder names (#166)
Browse files Browse the repository at this point in the history
Signed-off-by: sruti1312 <[email protected]>
  • Loading branch information
sruti1312 authored Apr 15, 2022
1 parent 5373ddb commit c020cc9
Show file tree
Hide file tree
Showing 19 changed files with 18 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/.settings/
/build
/.project
/bin/
/coverage-error.log
gradle.properties
/src/test/resources/tmp/file_gc/
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This document walks you through the process of building and deploying the RCA fr
This will not currently enforce client authentication. This feature, including full support for TLS is
planned for an upcoming release.

a. Open pa_config/performance-analyzer.properties
a. Open config/performance-analyzer.properties

b. Modify the certificate-file-path, private-key-file-path, and https-enabled entries

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ __Metrics__: Metrics are typically served as continuous datastreams to downstrea

### Components

__Framework__: The RCA runtime operates on an `AnalysisGraph`. You can extend this class and override the `construct` method to build your own RCAs. You should specify the path to the class in the `analysis-graph-implementor` section of `pa_config/rca.conf`. The `addLeaf` and `addAllUpstreams` helper methods are useful when you define the dependencies between nodes of the graph.
__Framework__: The RCA runtime operates on an `AnalysisGraph`. You can extend this class and override the `construct` method to build your own RCAs. You should specify the path to the class in the `analysis-graph-implementor` section of `config/rca.conf`. The `addLeaf` and `addAllUpstreams` helper methods are useful when you define the dependencies between nodes of the graph.

__Scheduler__: The scheduler invokes the `operate` method on each graph node in topological order as defined in the `AnalysisGraph`. Nodes with no dependencies can be executed in parallel. Use flow-units to share data between RCA nodes instead of shared objects to avoid data races and performance bottlenecks.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ echo "Using JAVA_HOME: $JAVA_HOME"
export JAVA_HOME=$JAVA_HOME

if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then
export JAVA_OPTS=-Dopensearch.path.home=$OPENSEARCH_HOME\ -Dlog4j.configurationFile=$OPENSEARCH_HOME/performance-analyzer-rca/pa_config/log4j2.xml\ -XX:+ExitOnOutOfMemoryError
export JAVA_OPTS=-Dopensearch.path.home=$OPENSEARCH_HOME\ -Dlog4j.configurationFile=$OPENSEARCH_HOME/performance-analyzer-rca/config/log4j2.xml\ -XX:+ExitOnOutOfMemoryError
exec $OPENSEARCH_HOME/performance-analyzer-rca/bin/performance-analyzer-rca
else
echo 'Starting deamon'
export JAVA_OPTS=-Dopensearch.path.home=$OPENSEARCH_HOME\ -Dlog4j.configurationFile=$OPENSEARCH_HOME/performance-analyzer-rca/pa_config/log4j2.xml\ -XX:+ExitOnOutOfMemoryError
export JAVA_OPTS=-Dopensearch.path.home=$OPENSEARCH_HOME\ -Dlog4j.configurationFile=$OPENSEARCH_HOME/performance-analyzer-rca/config/log4j2.xml\ -XX:+ExitOnOutOfMemoryError
exec $OPENSEARCH_HOME/performance-analyzer-rca/bin/performance-analyzer-rca &

pid=$!
Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ application {
'-XX:MaxRAM=400m']
}

// Include pa_config folder in the distribution.
// Include PA related folder in the distribution.
applicationDistribution.from(".") {
include 'pa_config/*'
include 'pa_bin/*'
include 'config/*'
include 'bin/*'
}

distributions {
Expand Down Expand Up @@ -214,6 +214,8 @@ test {
excludeTestsMatching 'org.opensearch.performanceanalyzer.rca.integTests.*'
// TODO: Fix this test as it causes OutOfMemoryError: Java heap space error and runs forever
excludeTestsMatching 'org.opensearch.performanceanalyzer.reader.OSMetricsSnapshotTests'
// TODO: Fix flaky test: https://github.com/opensearch-project/performance-analyzer-rca/issues/167
excludeTestsMatching 'org.opensearch.performanceanalyzer.PerformanceAnalyzerWebServerTest'
}
}
else {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ grant codeBase "jrt:/jdk.attach" {
grant codeBase "jrt:/jdk.internal.jvmstat" {
permission java.security.AllPermission;
};

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pa_config/supervisord.conf → config/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ serverurl=/usr/share/supervisord.sock
files = /etc/supervisor/conf.d/*.conf

[program:performance_analyzer]
command=/usr/share/opensearch/performance-analyzer-rca/pa_bin/performance-analyzer-agent /usr/share/opensearch
command=/usr/share/opensearch/performance-analyzer-rca/bin/performance-analyzer-agent /usr/share/opensearch
user=1000
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RUN chown -R opensearch:0 . && \
RUN unzip config/performance-analyzer-rca-2.0.0.0-rc1-SNAPSHOT.zip

RUN cp -r performance-analyzer-rca/* plugins/opensearch-performance-analyzer/
RUN chmod 755 /usr/share/opensearch/plugins/opensearch-performance-analyzer/pa_bin/performance-analyzer-agent
RUN chmod 755 /usr/share/opensearch/plugins/opensearch-performance-analyzer/bin/performance-analyzer-agent
RUN chmod -R 755 /dev/shm
################################################################################
# Build stage 1 (the actual OpenSearch image):
Expand Down Expand Up @@ -118,7 +118,7 @@ RUN chgrp 0 /usr/local/bin/docker-entrypoint.sh && \
chmod 0775 /usr/local/bin/docker-entrypoint.sh

# Bind to all interfaces so that the docker container is accessible from the host machine
RUN sed -i "s|#webservice-bind-host =|webservice-bind-host = 0.0.0.0|g" /usr/share/opensearch/plugins/opensearch-performance-analyzer/pa_config/performance-analyzer.properties
RUN sed -i "s|#webservice-bind-host =|webservice-bind-host = 0.0.0.0|g" /usr/share/opensearch/plugins/opensearch-performance-analyzer/config/performance-analyzer.properties

EXPOSE 9200 9300 9600 9650

Expand Down
4 changes: 2 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ fi
if [[ -d "/usr/share/opensearch/plugins/opensearch-performance-analyzer" ]]; then
CLK_TCK=`/usr/bin/getconf CLK_TCK`
DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
OPENSEARCH_JAVA_OPTS="-Djava.security.policy=file:///usr/share/opensearch/performance-analyzer-rca/pa_config/opensearch_security.policy -Dclk.tck=$CLK_TCK -Djdk.attach.allowAttachSelf=true $OPENSEARCH_JAVA_OPTS"
/usr/bin/supervisord -c /usr/share/opensearch/performance-analyzer-rca/pa_config/supervisord.conf
OPENSEARCH_JAVA_OPTS="-Djava.security.policy=file:///usr/share/opensearch/performance-analyzer-rca/config/opensearch_security.policy -Dclk.tck=$CLK_TCK -Djdk.attach.allowAttachSelf=true $OPENSEARCH_JAVA_OPTS"
/usr/bin/supervisord -c /usr/share/opensearch/performance-analyzer-rca/config/supervisord.conf
fi

run_as_other_user_if_needed /usr/share/opensearch/bin/opensearch "${open_search_opts[@]}"
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public class PluginSettings {
private static final Logger LOG = LogManager.getLogger(PluginSettings.class);

private static PluginSettings instance;
public static final String CONFIG_FILES_PATH = "pa_config/";
public static final String CONFIG_FILES_PATH = "config/";
private static final String DEFAULT_CONFIG_FILE_PATH =
Util.PLUGIN_LOCATION + "pa_config/performance-analyzer.properties";
Util.PLUGIN_LOCATION + "config/performance-analyzer.properties";
private static final String METRICS_LOCATION_KEY = "metrics-location";
private static final String METRICS_LOCATION_DEFAULT = "/dev/shm/performanceanalyzer/";
private static final String DELETION_INTERVAL_KEY = "metrics-deletion-interval";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public static ThreadState getThreadState(long threadId) {

// Attach to pid and perform a thread dump
private static void runAttachDump(String pid, String[] args) {

VirtualMachine vm = null;
try {
vm = VirtualMachine.attach(pid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class RcaConsts {
private static final String RCA_CONF_IDLE_MASTER_FILENAME = "rca_idle_master.conf";
private static final String THRESHOLDS_DIR_NAME = "thresholds";
public static final String CONFIG_DIR_PATH =
Paths.get(Util.READER_LOCATION, "pa_config").toString();
Paths.get(Util.READER_LOCATION, "config").toString();
public static final String RCA_CONF_PATH =
Paths.get(CONFIG_DIR_PATH, RCA_CONF_FILENAME).toString();
public static final String RCA_CONF_MASTER_PATH =
Expand Down

0 comments on commit c020cc9

Please sign in to comment.