incubator-eagle git commit: [EAGLE-834] Update Daily Job Summery Report
Repository: incubator-eagle Updated Branches: refs/heads/master 229d7b907 -> a89275bfc [EAGLE-834] Update Daily Job Summery Report https://issues.apache.org/jira/browse/EAGLE-834 * update mail subject & title * adjust mail template and enrich the summary data * fix a query bug in the mr job list API (GET /mrJobs) Author: Zhao, QingwenCloses #749 from qingwen220/EAGLE-834. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a89275bf Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a89275bf Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a89275bf Branch: refs/heads/master Commit: a89275bfc86c4db63688e28ff12196ee97a78207 Parents: 229d7b9 Author: Zhao, Qingwen Authored: Fri Dec 16 15:04:00 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Dec 16 15:04:00 2016 +0800 -- .../mr/history/MRHistoryJobDailyReporter.java | 169 +-- .../src/main/resources/JobReportTemplate.vm | 118 +++-- .../history/MRHistoryJobDailyReporterTest.java | 43 ++--- .../service/jpm/MRJobExecutionResource.java | 26 +-- 4 files changed, 177 insertions(+), 179 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a89275bf/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java index 6b38244..0dc6c5f 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java +++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java @@ -39,19 +39,20 @@ import java.io.IOException; import java.util.*; import java.util.concurrent.TimeUnit; +import static org.apache.eagle.common.config.EagleConfigConstants.EAGLE_TIME_ZONE; import static org.apache.eagle.common.config.EagleConfigConstants.SERVICE_HOST; import static org.apache.eagle.common.config.EagleConfigConstants.SERVICE_PORT; public class MRHistoryJobDailyReporter extends AbstractScheduledService { private static final Logger LOG = LoggerFactory.getLogger(MRHistoryJobDailyReporter.class); -private static final String TIMEZONE_PATH = "service.timezone"; + private static final String DAILY_SENT_HOUROFDAY = "application.dailyJobReport.reportHourTime"; private static final String DAILY_SENT_PERIOD = "application.dailyJobReport.reportPeriodInHour"; private static final String NUM_TOP_USERS = "application.dailyJobReport.numTopUsers"; private static final String JOB_OVERTIME_LIMIT_HOUR = "application.dailyJobReport.jobOvertimeLimitInHour"; public static final String SERVICE_PATH = "application.dailyJobReport"; -public static final String APP_TYPE = "MR_HISTORY_JOB_APP"; +protected static final String APP_TYPE = "MR_HISTORY_JOB_APP"; // alert context keys protected static final String NUM_TOP_USERS_KEY = "numTopUsers"; @@ -64,6 +65,12 @@ public class MRHistoryJobDailyReporter extends AbstractScheduledService { protected static final String FINISHED_JOB_USERS_KEY = "finishedJobUsers"; protected static final String EAGLE_JOB_LINK_KEY = "eagleJobLink"; +// queries +private static final String STATUS_QUERY = "%s[@site=\"%s\" and @endTime<=%s]<@currentState>{count}.{count desc}"; +private static final String FAILED_JOBS_QUERY = "%s[@site=\"%s\" and @currentState=\"FAILED\" and @endTime<=%s]<@user>{count}.{count desc}"; +private static final String SUCCEEDED_JOB_QUERY = "%s[@site=\"%s\" and @currentState=\"SUCCEEDED\" and @durationTime>%s and @endTime<=%s]<@user>{count}.{count desc}"; +private static final String FINISHED_JOB_QUERY = "%s[@site=\"%s\" and @endTime<=%s]<@user>{count}.{count desc}"; + private Config config; private IEagleServiceClient client; private ApplicationEntityService applicationResource; @@ -77,13 +84,13 @@ public class MRHistoryJobDailyReporter extends AbstractScheduledService { private int jobOvertimeLimit = 6; // scheduler -private int initialDelayMin = 10; +private int initialDelayMin = 5; private int periodInMin = 60; private TimeZone timeZone; @Inject public MRHistoryJobDailyReporter(Config config, ApplicationEntityService applicationEntityService) { -this.timeZone = TimeZone.getTimeZone(config.getString(TIMEZONE_PATH)); +this.timeZone =
incubator-eagle git commit: [EAGLE-834] Improve and beautify JobReportTemplate
Repository: incubator-eagle Updated Branches: refs/heads/master f430f521f -> 3082b5e62 [EAGLE-834] Improve and beautify JobReportTemplate * Improve and beautify JobReportTemplate.vm * Fix ratio as `double` instead of `String` http://issues.apache.org/jira/browse/EAGLE-834 Author: Hao ChenCloses #745 from haoch/ImproveJobReportTmpl. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3082b5e6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3082b5e6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3082b5e6 Branch: refs/heads/master Commit: 3082b5e6264eb0051a60e7929cc5a78390cb7ac4 Parents: f430f52 Author: Hao Chen Authored: Thu Dec 15 15:38:53 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Dec 15 15:38:53 2016 +0800 -- .../eagle/common/mail/AlertEmailConstants.java | 1 + .../eagle/common/mail/AlertEmailSender.java | 3 +- .../mr/history/MRHistoryJobDailyReporter.java | 9 +- .../src/main/resources/JobReportTemplate.vm | 587 +++ .../src/main/resources/JobReportTemplatePure.vm | 141 + .../history/MRHistoryJobDailyReporterTest.java | 10 +- .../src/test/resources/JobReportTemplate.vm | 141 - 7 files changed, 628 insertions(+), 264 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3082b5e6/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailConstants.java -- diff --git a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailConstants.java b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailConstants.java index 140d306..4a90c45 100644 --- a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailConstants.java +++ b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailConstants.java @@ -41,6 +41,7 @@ public class AlertEmailConstants { public static final String ALERT_EMAIL_COUNT_PROPERTY = "count"; public static final String ALERT_EMAIL_ALERTLIST_PROPERTY = "alertList"; public static final String ALERT_EMAIL_ORIGIN_PROPERTY = "alertEmailOrigin"; +public static final String VERSION = "version"; public static final String EAGLE_APPLICATION_EMAIL_SERVICE = "application.mailService"; public static final String EAGLE_COORDINATOR_EMAIL_SERVICE = "coordinator.mailService"; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3082b5e6/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailSender.java -- diff --git a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailSender.java b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailSender.java index ffc249d..7cf2ebd 100644 --- a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailSender.java +++ b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/mail/AlertEmailSender.java @@ -17,6 +17,7 @@ package org.apache.eagle.common.mail; import org.apache.eagle.common.DateTimeUtil; +import org.apache.eagle.common.Version; import org.apache.velocity.VelocityContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -106,6 +107,6 @@ public class AlertEmailSender { context.put(AlertEmailConstants.ALERT_EMAIL_COUNT_PROPERTY, alertContexts.size()); context.put(AlertEmailConstants.ALERT_EMAIL_ALERTLIST_PROPERTY, alertContexts); context.put(AlertEmailConstants.ALERT_EMAIL_ORIGIN_PROPERTY, origin); +context.put(AlertEmailConstants.VERSION, Version.version); } - } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3082b5e6/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java index 42f2b29..6b38244 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java +++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobDailyReporter.java @@ -32,7 +32,6 @@ import org.apache.eagle.metadata.service.ApplicationEntityService; import org.apache.eagle.service.client.EagleServiceClientException; import
incubator-eagle git commit: [EAGLE-834] Add Daily Job Summary Report
Repository: incubator-eagle Updated Branches: refs/heads/master 67c915127 -> f430f521f [EAGLE-834] Add Daily Job Summary Report https://issues.apache.org/jira/browse/EAGLE-834 Author: Zhao, QingwenAuthor: Qingwen Zhao Closes #742 from qingwen220/EAGLE-834. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f430f521 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f430f521 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f430f521 Branch: refs/heads/master Commit: f430f521faea959491208c199b59244386cef438 Parents: 67c9151 Author: Zhao, Qingwen Authored: Thu Dec 15 11:49:13 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Dec 15 11:49:13 2016 +0800 -- .../engine/coordinator/AlertDefinition.java | 12 +- .../publisher/impl/AlertEmailPublisher.java | 30 +- .../src/test/resources/application-test.conf| 18 +- .../app/service/ApplicationEmailService.java| 104 ++ .../eagle/common/mail/AbstractEmailService.java | 82 + .../eagle/common/mail/AlertEmailConstants.java | 57 .../eagle/common/mail/AlertEmailContext.java| 68 .../eagle/common/mail/AlertEmailSender.java | 111 +++ .../eagle/common/mail/EagleMailClient.java | 229 ++ eagle-jpm/eagle-jpm-mr-history/pom.xml | 6 + .../mr/history/MRHistoryJobDailyReporter.java | 317 +++ .../src/main/resources/JobReportTemplate.vm | 141 + .../history/MRHistoryJobDailyReporterTest.java | 109 +++ .../src/test/resources/JobReportTemplate.vm | 141 + .../src/test/resources/application-test.conf| 58 .../src/test/resources/log4j.properties | 34 ++ eagle-server-assembly/src/main/conf/eagle.conf | 25 +- .../apache/eagle/server/ServerApplication.java | 11 + .../src/main/resources/application.conf | 27 +- 19 files changed, 1537 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f430f521/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java index 66a9bce..e94d6fa 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java @@ -18,6 +18,8 @@ package org.apache.eagle.alert.engine.coordinator; import org.apache.commons.lang3.builder.HashCodeBuilder; +import java.util.Objects; + public class AlertDefinition { private TemplateType templateType = TemplateType.TEXT; private String subject; @@ -92,11 +94,11 @@ public class AlertDefinition { return false; } AlertDefinition another = (AlertDefinition) that; -if (another.templateType.equals(this.templateType) -&& another.body.equals(this.body) -&& another.category.equals(this.category) -&& another.severity.equals(this.severity) -&& another.subject.equals(this.subject)) { +if (Objects.equals(another.templateType, this.templateType) +&& Objects.equals(another.body, this.body) +&& Objects.equals(another.category, this.category) +&& Objects.equals(another.severity, this.severity) +&& Objects.equals(another.subject, this.subject)) { return true; } return false; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f430f521/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java index d81ec2a..d08d114 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java +++
incubator-eagle git commit: [EAGLE-821] clear useless queue when build schedule context
Repository: incubator-eagle Updated Branches: refs/heads/master 269ff147f -> 162aac84f [EAGLE-821] clear useless queue when build schedule context https://issues.apache.org/jira/browse/EAGLE-821 Author: Zhao, QingwenCloses #722 from qingwen220/EAGLE-821. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/162aac84 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/162aac84 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/162aac84 Branch: refs/heads/master Commit: 162aac84f1d1e01d232c8a43b98d5f06280ddaa3 Parents: 269ff14 Author: Zhao, Qingwen Authored: Thu Dec 8 15:53:02 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Dec 8 15:53:02 2016 +0800 -- .../engine/coordinator/AlertDefinition.java | 32 + .../engine/coordinator/PolicyDefinition.java| 34 ++--- .../model/internal/AlertDefinitionTest.java | 50 .../coordinator/impl/GreedyPolicyScheduler.java | 2 +- .../coordinator/impl/WorkQueueBuilder.java | 2 +- .../provider/ScheduleContextBuilder.java| 10 ++-- .../extractor/mr/MRTopologyEntityParser.java| 37 +-- .../topology/storm/TopologyDataPersistBolt.java | 2 +- 8 files changed, 132 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/162aac84/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java index 66579bb..66a9bce 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/AlertDefinition.java @@ -16,6 +16,8 @@ */ package org.apache.eagle.alert.engine.coordinator; +import org.apache.commons.lang3.builder.HashCodeBuilder; + public class AlertDefinition { private TemplateType templateType = TemplateType.TEXT; private String subject; @@ -69,4 +71,34 @@ public class AlertDefinition { // FILE, // HTTP } + +@Override +public int hashCode() { +return new HashCodeBuilder() +.append(templateType) +.append(this.body) +.append(this.category) +.append(this.severity) +.append(this.subject) +.build(); +} + +@Override +public boolean equals(Object that) { +if (that == this) { +return true; +} +if (!(that instanceof AlertDefinition)) { +return false; +} +AlertDefinition another = (AlertDefinition) that; +if (another.templateType.equals(this.templateType) +&& another.body.equals(this.body) +&& another.category.equals(this.category) +&& another.severity.equals(this.severity) +&& another.subject.equals(this.subject)) { +return true; +} +return false; +} } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/162aac84/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java index 3663670..02072ad 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java @@ -135,14 +135,15 @@ public class PolicyDefinition implements Serializable { @Override public int hashCode() { return new HashCodeBuilder() -.append(name) -.append(inputStreams) -.append(outputStreams) -.append(definition) -.append(partitionSpec) -.append(policyStatus) -
incubator-eagle git commit: [EAGLE-829] refactor publishmentType to align with PolicyDefinition
Repository: incubator-eagle Updated Branches: refs/heads/master 5ef6c183f -> 6a7842fc5 [EAGLE-829] refactor publishmentType to align with PolicyDefinition https://issues.apache.org/jira/browse/EAGLE-829 Author: Zhao, QingwenCloses #717 from qingwen220/minor. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/6a7842fc Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/6a7842fc Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/6a7842fc Branch: refs/heads/master Commit: 6a7842fc554862fb2e2bf53a2133ac7804876cf0 Parents: 5ef6c18 Author: Zhao, Qingwen Authored: Wed Dec 7 11:34:22 2016 +0800 Committer: Zhao, Qingwen Committed: Wed Dec 7 11:34:22 2016 +0800 -- ...e.alert.app.AlertUnitTopologyAppProvider.xml | 6 + .../engine/coordinator/PublishmentType.java | 24 +--- .../engine/coordinator/PublishmentTypeTest.java | 8 +++ .../metadata/resource/MetadataResource.java | 6 ++--- .../eagle/alert/metadata/MetadataUtils.java | 3 --- .../metadata/impl/JdbcMetadataDaoImpl.java | 4 ++-- .../metadata/impl/MongoMetadataDaoImpl.java | 10 +--- .../eagle/alert/metadata/impl/JdbcImplTest.java | 4 ++-- .../alert/metadata/impl/MongoImplTest.java | 2 +- .../src/main/bin/createTables.sql | 8 +++ .../impl/IPMaskTopologyRackResolver.java| 4 ++-- .../topology/storm/TopologyDataPersistBolt.java | 20 +--- 12 files changed, 48 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/6a7842fc/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml index 8ecbe8c..b6ad59b 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml @@ -96,6 +96,12 @@ false +spout.stormKafkaTransactionZkQuorum +Spout Transaction Zookeeper Quorum +Required if reuse broker zookeeper is false +false + + spout.stormKafkaTransactionZkPath Spout Transaction Zookeeper Path /consumers http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/6a7842fc/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PublishmentType.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PublishmentType.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PublishmentType.java index 2718cfe..5bd15bc 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PublishmentType.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PublishmentType.java @@ -27,27 +27,25 @@ import java.util.Objects; @JsonIgnoreProperties(ignoreUnknown = true) public class PublishmentType { - +private String name; private String type; -private String className; private String description; - private List
incubator-eagle git commit: [EAGLE-819] Fix yarn node duplication in topology health check app
Repository: incubator-eagle Updated Branches: refs/heads/master f899ca1c2 -> 0d1dcc408 [EAGLE-819] Fix yarn node duplication in topology health check app https://issues.apache.org/jira/browse/EAGLE-819 Author: Zhao, QingwenCloses #712 from qingwen220/EAGLE-819. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/0d1dcc40 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/0d1dcc40 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/0d1dcc40 Branch: refs/heads/master Commit: 0d1dcc408ddf499a09e3868480494062e45cb736 Parents: f899ca1 Author: Zhao, Qingwen Authored: Mon Dec 5 18:07:50 2016 +0800 Committer: Zhao, Qingwen Committed: Mon Dec 5 18:07:50 2016 +0800 -- ...e.alert.app.AlertUnitTopologyAppProvider.xml | 2 +- .../eagle/alert/engine/topology/TestBolt.java | 4 - .../app/utils/connection/InputStreamUtils.java | 5 +- .../connection/ServiceNotResponseException.java | 61 + .../utils/connection/URLResourceFetcher.java| 62 ++ .../src/main/bin/createTables.sql | 6 +- .../eagle/topology/TopologyCheckAppConfig.java | 2 +- .../extractor/TopologyEntityParser.java | 2 +- .../extractor/TopologyEntityParserResult.java | 4 + .../extractor/hbase/HbaseTopologyCrawler.java | 13 +- .../hbase/HbaseTopologyEntityParser.java| 29 +++-- .../extractor/hdfs/HdfsTopologyCrawler.java | 10 +- .../hdfs/HdfsTopologyEntityParser.java | 64 +- .../extractor/mr/MRTopologyCrawler.java | 2 +- .../extractor/mr/MRTopologyEntityParser.java| 124 +-- .../topology/extractor/mr/YarnNodeInfo.java | 6 +- .../impl/IPMaskTopologyRackResolver.java| 5 +- .../topology/storm/TopologyDataPersistBolt.java | 53 .../topology/utils/EntityBuilderHelper.java | 11 +- .../eagle/topology/utils/JMXQueryHelper.java| 21 ++-- .../utils/ServiceNotResponseException.java | 61 - .../eagle/topology/utils/StringUtils.java | 45 --- .../eagle/topology/TopologyConstants.java | 1 + .../entity/MRServiceTopologyAPIEntity.java | 11 ++ 24 files changed, 314 insertions(+), 290 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0d1dcc40/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml index 74e97d3..8ecbe8c 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml @@ -90,7 +90,7 @@ spout.stormKafkaUseSameZkQuorumWithKafkaBroker -Spout Transaction Zookeeper to Reuse Broker Zookeeper +Reuse Broker Zookeeper true Use same zookeeper for kafka server and kafka consumer(Storm-Kafka) false http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0d1dcc40/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/topology/TestBolt.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/topology/TestBolt.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/topology/TestBolt.java index 1c375fa..dc9c9b3 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/topology/TestBolt.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/topology/TestBolt.java @@ -19,7 +19,6 @@ package org.apache.eagle.alert.engine.topology; - import backtype.storm.task.OutputCollector; import backtype.storm.task.TopologyContext; import backtype.storm.topology.OutputFieldsDeclarer; @@ -31,9 +30,6 @@ import org.slf4j.LoggerFactory; import java.util.Map; -/** - * Created by yonzhang on 4/7/16. - */ @Ignore @SuppressWarnings( {"rawtypes", "serial"}) public class TestBolt extends
incubator-eagle git commit: [EAGLE-818] implement CEPFunction
Repository: incubator-eagle Updated Branches: refs/heads/master 1c81c0865 -> f899ca1c2 [EAGLE-818] implement CEPFunction https://issues.apache.org/jira/browse/EAGLE-818 Author: Qingwen ZhaoAuthor: Zhao, Qingwen Closes #709 from qingwen220/EAGLE-818. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f899ca1c Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f899ca1c Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f899ca1c Branch: refs/heads/master Commit: f899ca1c29533f571e1d2abcfa93e164519937c6 Parents: 1c81c08 Author: Qingwen Zhao Authored: Mon Dec 5 17:38:24 2016 +0800 Committer: Zhao, Qingwen Committed: Mon Dec 5 17:38:24 2016 +0800 -- .../app/environment/builder/CEPFunction.java| 69 ++-- .../eagle/app/stream/CEPFunctionTest.java | 20 -- 2 files changed, 78 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f899ca1c/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/builder/CEPFunction.java -- diff --git a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/builder/CEPFunction.java b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/builder/CEPFunction.java index dd3b214..1c85b58 100644 --- a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/builder/CEPFunction.java +++ b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/builder/CEPFunction.java @@ -16,13 +16,27 @@ */ package org.apache.eagle.app.environment.builder; +import org.apache.eagle.alert.engine.coordinator.StreamColumn; +import org.apache.eagle.alert.engine.coordinator.StreamDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.wso2.siddhi.core.ExecutionPlanRuntime; +import org.wso2.siddhi.core.SiddhiManager; +import org.wso2.siddhi.core.event.Event; +import org.wso2.siddhi.core.stream.input.InputHandler; +import org.wso2.siddhi.core.stream.output.StreamCallback; + +import java.util.HashMap; import java.util.Map; -/** - * TODO: Not implemented yet. - */ +import static org.apache.eagle.alert.engine.evaluator.impl.SiddhiDefinitionAdapter.convertFromSiddiDefinition; + public class CEPFunction implements TransformFunction { +private static final Logger LOG = LoggerFactory.getLogger(CEPFunction.class); + +private ExecutionPlanRuntime runtime; +private SiddhiManager siddhiManager; private final CEPDefinition cepDefinition; private Collector collector; @@ -41,17 +55,60 @@ public class CEPFunction implements TransformFunction { @Override public void open(Collector collector) { -throw new IllegalStateException("TODO: Not implemented yet"); +this.collector = collector; +this.siddhiManager = new SiddhiManager(); +this.runtime = siddhiManager.createExecutionPlanRuntime(cepDefinition.getSiddhiQuery()); +if (runtime.getStreamDefinitionMap().containsKey(cepDefinition.outputStreamId)) { +runtime.addCallback(cepDefinition.outputStreamId, new StreamCallback() { +@Override +public void receive(Event[] events) { +for (Event e : events) { +StreamDefinition schema = convertFromSiddiDefinition(runtime.getStreamDefinitionMap().get(cepDefinition.outputStreamId)); +Map event = new HashMap<>(); +for (StreamColumn column : schema.getColumns()) { +Object obj = e.getData()[schema.getColumnIndex(column.getName())]; +if (obj == null) { +event.put(column.getName(), null); +continue; +} +event.put(column.getName(), obj); +} +collector.collect(event.toString(), event); +} +} +}); +} else { +throw new IllegalStateException("Undefined output stream " + cepDefinition.outputStreamId); +} +runtime.start(); } @Override public void transform(Map event) { -throw new IllegalStateException("TODO: Not implemented yet"); +String streamId = cepDefinition.getInputStreamId(); +InputHandler inputHandler = runtime.getInputHandler(streamId); + +if (inputHandler != null) { +try { +
[2/2] incubator-eagle git commit: [EAGLE-811] Refactor jdbcMetadataDaoImpl of alert engine metadata
[EAGLE-811] Refactor jdbcMetadataDaoImpl of alert engine metadata * Tickets https://issues.apache.org/jira/browse/EAGLE-811 https://issues.apache.org/jira/browse/EAGLE-808 * fix a bug 'alertId is null' in email publisher * improve UnitAlertApplication config Author: Zhao, QingwenCloses #705 from qingwen220/EAGLE-811. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/30e35de6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/30e35de6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/30e35de6 Branch: refs/heads/master Commit: 30e35de60c532502731ef5b51360df15c0026397 Parents: aef7ea3 Author: Zhao, Qingwen Authored: Fri Dec 2 18:36:14 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Dec 2 18:36:14 2016 +0800 -- ...e.alert.app.AlertUnitTopologyAppProvider.xml | 47 +- .../src/test/resource/application.conf | 9 +- .../alert/engine/model/AlertStreamEvent.java| 1 + .../eagle/alert/utils/AlertConstants.java | 2 + .../src/test/resources/application.conf | 9 +- .../eagle/alert/engine/StreamContext.java | 16 + .../publisher/email/AlertEmailGenerator.java| 7 +- .../email/AlertEmailGeneratorBuilder.java | 4 +- .../publisher/email/AlertEmailSender.java | 44 +- .../publisher/impl/AlertEmailPublisher.java | 47 +- .../src/main/resources/application.conf | 9 +- .../publisher/AlertEmailPublisherTest.java | 4 +- .../src/test/resources/application-test.conf| 31 +- .../metadata/resource/MetadataResource.java | 76 +-- .../eagle/alert/metadata/IMetadataDao.java | 77 ++- .../metadata/impl/InMemMetadataDaoImpl.java | 2 +- .../metadata/impl/JdbcDatabaseHandler.java | 399 --- .../metadata/impl/JdbcMetadataDaoImpl.java | 61 ++- .../metadata/impl/JdbcMetadataHandler.java | 506 +++ .../metadata/impl/MongoMetadataDaoImpl.java | 2 +- .../eagle/alert/metadata/impl/InMemoryTest.java | 2 +- .../eagle/alert/metadata/impl/JdbcImplTest.java | 103 +++- .../alert-metadata/src/test/resources/init.sql | 79 +-- .../src/main/resources/application.conf | 9 +- .../eagle/app/service/ApplicationAction.java| 13 +- .../app/service/ApplicationActionTest.java | 9 +- .../src/test/resources/application.conf | 9 +- .../eagle/common/TestSerializableUtils.java | 6 +- .../eagle/metadata/model/AlertEntity.java | 1 - .../src/test/resources/application-test.xml | 1 + .../src/main/bin/createTables.sql | 78 ++- eagle-server-assembly/src/main/conf/eagle.conf | 7 + .../src/main/resources/application.conf | 9 +- .../app/dev/public/js/services/policySrv.js | 4 +- 34 files changed, 1022 insertions(+), 661 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/30e35de6/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml index 8ee8b6b..74e97d3 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml @@ -76,76 +76,39 @@ spout.kafkaBrokerZkQuorum -Kafka Zookeeper Quorum +Kafka Spout Broker Zookeeper Quorum localhost:2181 Zookeeper quorum of kafka broker for spout to consume data true spout.kafkaBrokerZkBasePath -Kafka Zookeeper Root +Kafka Spout Broker Zookeeper Root /brokers Zookeeper znode path for kafka brokers false spout.stormKafkaUseSameZkQuorumWithKafkaBroker -Reuse Kafka Zookeeper +Spout Transaction Zookeeper to Reuse Broker Zookeeper true Use same zookeeper for kafka server and kafka consumer(Storm-Kafka) false spout.stormKafkaTransactionZkPath -Kafka Transaction ZkPath +Spout Transaction
incubator-eagle git commit: [EAGLE-799] Can not get hbase info by service api when the master becomes not available
Repository: incubator-eagle Updated Branches: refs/heads/master 8042f9e44 -> de061d599 [EAGLE-799] Can not get hbase info by service api when the master becomes not available Can not get hbase info by service api when the master becomes not available Author: yupuCloses #680 from puyulu/EAGLE-799. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/de061d59 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/de061d59 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/de061d59 Branch: refs/heads/master Commit: de061d599c35735abd6b9447d37949289827e1e3 Parents: 8042f9e Author: yupu Authored: Thu Nov 24 21:14:43 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Nov 24 21:14:43 2016 +0800 -- .../extractor/hbase/HbaseTopologyEntityParser.java | 5 +++-- .../extractor/hdfs/HdfsTopologyEntityParser.java | 13 + .../topology/extractor/mr/MRTopologyEntityParser.java | 9 + .../eagle/topology/storm/TopologyDataPersistBolt.java | 2 +- .../topology/entity/HdfsServiceTopologyAPIEntity.java | 13 + 5 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/de061d59/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hbase/HbaseTopologyEntityParser.java -- diff --git a/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hbase/HbaseTopologyEntityParser.java b/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hbase/HbaseTopologyEntityParser.java index 77781a3..f3eac23 100644 --- a/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hbase/HbaseTopologyEntityParser.java +++ b/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hbase/HbaseTopologyEntityParser.java @@ -46,7 +46,7 @@ public class HbaseTopologyEntityParser implements TopologyEntityParser { private Boolean kerberosEnable = false; private TopologyRackResolver rackResolver; -public HbaseTopologyEntityParser(String site, TopologyCheckAppConfig.HBaseConfig hBaseConfig, TopologyRackResolver resolver) { +public HbaseTopologyEntityParser(String site, TopologyCheckAppConfig.HBaseConfig hBaseConfig, TopologyRackResolver resolver) { this.site = site; this.rackResolver = resolver; this.hBaseConfiguration = HBaseConfiguration.create(); @@ -56,7 +56,7 @@ public class HbaseTopologyEntityParser implements TopologyEntityParser { this.hBaseConfiguration.set("hbase.client.retries.number", hBaseConfig.zkRetryTimes); // kerberos authentication if (hBaseConfig.eaglePrincipal != null && hBaseConfig.eagleKeytab != null -&& !hBaseConfig.eaglePrincipal.isEmpty() && !hBaseConfig.eagleKeytab.isEmpty()) { +&& !hBaseConfig.eaglePrincipal.isEmpty() && !hBaseConfig.eagleKeytab.isEmpty()) { this.hBaseConfiguration.set(HadoopSecurityUtil.EAGLE_PRINCIPAL_KEY, hBaseConfig.eaglePrincipal); this.hBaseConfiguration.set(HadoopSecurityUtil.EAGLE_KEYTAB_FILE_KEY, hBaseConfig.eagleKeytab); this.kerberosEnable = true; @@ -103,6 +103,7 @@ public class HbaseTopologyEntityParser implements TopologyEntityParser { } double liveRatio = liveServers * 1d / (liveServers + deadServers); result.getMetrics().add(EntityBuilderHelper.generateMetric(TopologyConstants.REGIONSERVER_ROLE, liveRatio, site, timestamp)); + result.getMetrics().add(EntityBuilderHelper.generateMetric(TopologyConstants.HMASTER_ROLE, 1d, site, timestamp)); return result; } catch (RuntimeException e) { e.printStackTrace(); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/de061d59/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java -- diff --git a/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java b/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java index 627584a..72dce80 100644 --- a/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java +++
incubator-eagle git commit: [EAGLE-789] Add a new publisher to write alerts into a local file
Repository: incubator-eagle Updated Branches: refs/heads/master 30b127b8d -> dacb86f31 [EAGLE-789] Add a new publisher to write alerts into a local file https://issues.apache.org/jira/browse/EAGLE-789 Author: Zhao, QingwenAuthor: Qingwen Zhao Closes #669 from qingwen220/EAGLE-789. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/dacb86f3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/dacb86f3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/dacb86f3 Branch: refs/heads/master Commit: dacb86f3178bff034dbc7efea17f555bf453d390 Parents: 30b127b Author: Zhao, Qingwen Authored: Tue Nov 22 19:15:59 2016 +0800 Committer: Zhao, Qingwen Committed: Tue Nov 22 19:15:59 2016 +0800 -- .../alert/engine/model/AlertPublishEvent.java | 11 ++ .../engine/publisher/PublishConstants.java | 5 + .../publisher/impl/AlertEagleStorePlugin.java | 8 +- .../publisher/impl/AlertFilePublisher.java | 103 +++ .../publisher/AlertFilePublisherTest.java | 62 +++ .../metadata/impl/InMemMetadataDaoImpl.java | 6 +- .../metadata/impl/JdbcMetadataDaoImpl.java | 6 +- .../metadata/impl/MongoMetadataDaoImpl.java | 6 +- .../app/dev/public/js/services/policySrv.js | 5 + .../hdfs/HdfsTopologyEntityParser.java | 1 + .../extractor/mr/MRTopologyEntityParser.java| 1 + 11 files changed, 198 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/dacb86f3/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java index 6230731..462e0fb 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java @@ -19,6 +19,7 @@ package org.apache.eagle.alert.engine.model; import com.google.common.base.Preconditions; +import org.apache.eagle.common.DateTimeUtil; import java.util.List; import java.util.Map; @@ -107,4 +108,14 @@ public class AlertPublishEvent { alertEvent.setAlertData(event.getDataMap()); return alertEvent; } + +public String toString() { +return String.format("%s %s alertId=%s, siteId=%s, policyId=%s, alertData=%s", +DateTimeUtil.millisecondsToHumanDateWithSeconds(alertTimestamp), +DateTimeUtil.CURRENT_TIME_ZONE.getID(), +alertId, +siteId, +policyId, +alertData.toString()); +} } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/dacb86f3/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/PublishConstants.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/PublishConstants.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/PublishConstants.java index f2168bc..46cce29 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/PublishConstants.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/PublishConstants.java @@ -35,6 +35,11 @@ public class PublishConstants { public static final String BROKER_LIST = "kafka_broker"; public static final String WRITE_MODE = "kafka_write_mode"; +// local rotated file constants +public static final String FILE_NAME = "fileName"; +public static final String ROTATE_EVERY_KB = "rotate_every_kb"; +public static final String NUMBER_OF_FILES = "number_of_files"; + // slack specific constants public static final String TOKEN = "token"; public static final String CHANNELS = "channels"; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/dacb86f3/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEagleStorePlugin.java
incubator-eagle git commit: [MINOR] add jobConf.additional.info in spark history job app
Repository: incubator-eagle Updated Branches: refs/heads/master ce8e1c508 -> 4874433a5 [MINOR] add jobConf.additional.info in spark history job app A quick fixed bug Author: Zhao, QingwenCloses #662 from qingwen220/minor. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/4874433a Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/4874433a Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/4874433a Branch: refs/heads/master Commit: 4874433a59c59e599b73a1235819db92e3248ce1 Parents: ce8e1c5 Author: Zhao, Qingwen Authored: Thu Nov 17 13:18:55 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Nov 17 13:18:55 2016 +0800 -- .../eagle/jpm/spark/history/crawl/JHFSparkEventReader.java| 7 ++- ...che.eagle.jpm.spark.history.SparkHistoryJobAppProvider.xml | 6 ++ .../src/main/resources/application.conf | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4874433a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/crawl/JHFSparkEventReader.java -- diff --git a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/crawl/JHFSparkEventReader.java b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/crawl/JHFSparkEventReader.java index a4ac77e..82e8a41 100644 --- a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/crawl/JHFSparkEventReader.java +++ b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/crawl/JHFSparkEventReader.java @@ -115,10 +115,15 @@ public class JHFSparkEventReader { app.setConfig(new JobConfig()); JSONObject sparkProps = (JSONObject) event.get("Spark Properties"); -String[] additionalJobConf = conf.getString("basic.jobConf.additional.info").split(",\\s*"); String[] props = {"spark.yarn.app.id", "spark.executor.memory", "spark.driver.host", "spark.driver.port", "spark.driver.memory", "spark.scheduler.pool", "spark.executor.cores", "spark.yarn.am.memory", "spark.yarn.am.cores", "spark.yarn.executor.memoryOverhead", "spark.yarn.driver.memoryOverhead", "spark.yarn.am.memoryOverhead", "spark.master"}; + +String[] additionalJobConf = null; +if (conf.hasPath("spark.jobConf.additional.info")) { +additionalJobConf = conf.getString("spark.jobConf.additional.info").split(",\\s*"); +} + String[] jobConf = (String[]) ArrayUtils.addAll(additionalJobConf, props); for (String prop : jobConf) { if (sparkProps.containsKey(prop)) { http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4874433a/eagle-jpm/eagle-jpm-spark-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.spark.history.SparkHistoryJobAppProvider.xml -- diff --git a/eagle-jpm/eagle-jpm-spark-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.spark.history.SparkHistoryJobAppProvider.xml b/eagle-jpm/eagle-jpm-spark-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.spark.history.SparkHistoryJobAppProvider.xml index c68d4e8..17a3a4a 100644 --- a/eagle-jpm/eagle-jpm-spark-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.spark.history.SparkHistoryJobAppProvider.xml +++ b/eagle-jpm/eagle-jpm-spark-history/src/main/resources/META-INF/providers/org.apache.eagle.jpm.spark.history.SparkHistoryJobAppProvider.xml @@ -90,6 +90,12 @@ +spark.jobConf.additional.info +additional spark job config info +additional job config list + + + spark.defaultVal.spark.executor.memory spark.executor.memory 1g http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4874433a/eagle-jpm/eagle-jpm-spark-history/src/main/resources/application.conf -- diff --git a/eagle-jpm/eagle-jpm-spark-history/src/main/resources/application.conf b/eagle-jpm/eagle-jpm-spark-history/src/main/resources/application.conf index a51abc9..2839915 100644 --- a/eagle-jpm/eagle-jpm-spark-history/src/main/resources/application.conf +++ b/eagle-jpm/eagle-jpm-spark-history/src/main/resources/application.conf @@ -57,6 +57,7 @@ numOfParserBoltTasks: 4 }, "spark":{ +jobConf.additional.info: "", "defaultVal": { spark.executor.memory:"1g", spark.driver.memory:
incubator-eagle git commit: [MINOR] add settings for case: ldap authentication over ssl
Repository: incubator-eagle Updated Branches: refs/heads/master 18f74d448 -> ce8e1c508 [MINOR] add settings for case: ldap authentication over ssl To make it fit for ldap authentication over ssl protocol, add: 1. one config-attribute to indicate certificate absolute path. 2. checking code for verifying certificate's existence. 3. add unit test cases to cover the logic branches. Author: anyway1021Closes #661 from anyway1021/ldap-auth-improve. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/ce8e1c50 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/ce8e1c50 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/ce8e1c50 Branch: refs/heads/master Commit: ce8e1c5080c0f9a8fae9010cbd29dc3c138f13d8 Parents: 18f74d4 Author: anyway1021 Authored: Thu Nov 17 13:18:27 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Nov 17 13:18:27 2016 +0800 -- eagle-server-assembly/src/main/conf/server.yml | 57 +- .../authenticator/LdapBasicAuthenticator.java | 20 .../authentication/config/LdapSettings.java | 12 ++ .../src/main/resources/configuration.yml| 4 + .../LdapBasicAuthenticatorTest.java | 110 --- .../src/test/resources/configuration.yml| 4 + 6 files changed, 192 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ce8e1c50/eagle-server-assembly/src/main/conf/server.yml -- diff --git a/eagle-server-assembly/src/main/conf/server.yml b/eagle-server-assembly/src/main/conf/server.yml index 5ea8b31..501d941 100644 --- a/eagle-server-assembly/src/main/conf/server.yml +++ b/eagle-server-assembly/src/main/conf/server.yml @@ -42,4 +42,59 @@ logging: archive: true archivedLogFilenamePattern: log/eagle-server-%d.log archivedFileCount: 5 - timeZone: UTC \ No newline at end of file + timeZone: UTC + +# - +# Eagle Authentication Configuration +# - +auth: + # indicating if authentication is enabled, true for enabled, false for disabled + enabled: false + + # indicating authentication mode, "simple" or "ldap" + mode: simple + + # indicating whether to use cache: cache is usually used for authentications that may + # not handle high throughput (an RDBMS or LDAP server, for example) + caching: false + + # indicating the cache policy, containing maximumSize and expireAfterWrite, e.g. maximumSize=1, expireAfterWrite=10m + cachePolicy: maximumSize=1, expireAfterWrite=1m + + # indicating whether authorization is needed + authorization: false + + # indicating whether @Auth annotation on parameters is needed + annotated: true + + # for basic authentication, effective only when auth.mode=simple + simple: +# username for basic authentication, effective only when auth.mode=simple +username: admin +# password for basic authentication, effective only when auth.mode=simple +password: secret + + # for ldap authentication, effective only when auth.mode=ldap + ldap: +# url providing ldap service. By convention, the port for typical ldap service is 389, and ldap service over ssl +# uses port 636 with protocol "ldaps", which requires certificates pre-installed. +providerUrl: ldap://server.address.or.domain:port + +# template string containing ${USERNAME} placeholder. This is designed for some orgs who don't use plain usernames +# to authenticate, e.g. they may use its members' email address as the username: ${USERNAME}@some.org. When username +# is supposed to be recognized originally, just configure this parameter as ${USERNAME} +principalTemplate: ${USERNAME}@maybe.email.suffix + +# string of strategy used by ldap service. "simple" is usually supported in most circumstances, we can use it by +# default or leave it a blank string. +strategy: simple + +# the absolute path of ssl certificate file. This attribute is required conditional only when the auth -> mode is set +# as "ldap" and providerUrl starting with "ldaps://". +certificateAbsolutePath: /certificate/absolute/path + +# timeout expression for connecting to ldap service endpoint +connectingTimeout: 500ms + +# timeout expression for reading from ldap service +readingTimeout: 500ms http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ce8e1c50/eagle-server/src/main/java/org/apache/eagle/server/authentication/authenticator/LdapBasicAuthenticator.java -- diff --git
incubator-eagle git commit: [MINOR] add back policy scheduler
Repository: incubator-eagle Updated Branches: refs/heads/master aa7b0254d -> 45af18e7f [MINOR] add back policy scheduler Author: Zhao, QingwenCloses #646 from qingwen220/minor. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/45af18e7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/45af18e7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/45af18e7 Branch: refs/heads/master Commit: 45af18e7faac26eb564ae247cb702f89f9e886d2 Parents: aa7b025 Author: Zhao, Qingwen Authored: Fri Nov 11 16:37:16 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Nov 11 16:37:16 2016 +0800 -- .../eagle/alert/coordinator/Coordinator.java| 33 +++- 1 file changed, 32 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/45af18e7/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/Coordinator.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/Coordinator.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/Coordinator.java index 95698e8..2a0abce 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/Coordinator.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/Coordinator.java @@ -26,6 +26,10 @@ import org.apache.eagle.alert.config.ZKConfigBuilder; import org.apache.eagle.alert.coordination.model.ScheduleState; import org.apache.eagle.alert.coordinator.impl.MetadataValdiator; import org.apache.eagle.alert.coordinator.provider.ScheduleContextBuilder; +import org.apache.eagle.alert.coordinator.trigger.CoordinatorTrigger; +import org.apache.eagle.alert.coordinator.trigger.DynamicPolicyLoader; +import org.apache.eagle.alert.coordinator.trigger.PolicyChangeListener; +import org.apache.eagle.alert.engine.coordinator.PolicyDefinition; import org.apache.eagle.alert.service.IMetadataServiceClient; import org.apache.eagle.alert.service.MetadataServiceClientImpl; import org.slf4j.Logger; @@ -33,6 +37,8 @@ import org.slf4j.LoggerFactory; import java.io.IOException; import java.text.MessageFormat; +import java.util.Collection; +import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @@ -192,6 +198,29 @@ public class Coordinator { } } +private static class PolicyChangeHandler implements PolicyChangeListener { +private static final Logger LOG = LoggerFactory.getLogger(PolicyChangeHandler.class); +private Config config; +private IMetadataServiceClient client; + +public PolicyChangeHandler(Config config, IMetadataServiceClient client) { +this.config = config; +this.client = client; +} + +@Override +public void onPolicyChange(List allPolicies, Collection addedPolicies, + Collection removedPolicies, Collection modifiedPolicies) { +LOG.info("policy changed ... "); +LOG.info("allPolicies: " + allPolicies + ", addedPolicies: " + addedPolicies + ", removedPolicies: " ++ removedPolicies + ", modifiedPolicies: " + modifiedPolicies); + +CoordinatorTrigger trigger = new CoordinatorTrigger(config, client); +trigger.run(); + +} +} + public static void startSchedule() { Config config = ConfigFactory.load().getConfig(COORDINATOR); String host = config.getString(METADATA_SERVICE_HOST); @@ -208,7 +237,9 @@ public class Coordinator { return t; }); -// scheduleSrv.scheduleAtFixedRate(new CoordinatorTrigger(config, client), initDelayMillis, delayMillis, TimeUnit.MILLISECONDS); +DynamicPolicyLoader loader = new DynamicPolicyLoader(client); +loader.addPolicyChangeListener(new PolicyChangeHandler(config, client)); +scheduleSrv.scheduleAtFixedRate(loader, initDelayMillis, delayMillis, TimeUnit.MILLISECONDS); Runtime.getRuntime().addShutdownHook(new Thread(new CoordinatorShutdownHook(scheduleSrv))); LOG.info("Eagle Coordinator started ...");
incubator-eagle git commit: [EAGLE-760] add size limit in the alert list APIs
Repository: incubator-eagle Updated Branches: refs/heads/master 8f8fe57e6 -> 0a0d1f6ee [EAGLE-760] add size limit in the alert list APIs https://issues.apache.org/jira/browse/EAGLE-760 Author: Zhao, QingwenCloses #644 from qingwen220/EAGLE-760. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/0a0d1f6e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/0a0d1f6e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/0a0d1f6e Branch: refs/heads/master Commit: 0a0d1f6ee9dcb36ca96721a90392a676b2652d28 Parents: 8f8fe57 Author: Zhao, Qingwen Authored: Thu Nov 10 16:14:56 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Nov 10 16:14:56 2016 +0800 -- .../metadata/resource/MetadataResource.java| 5 +++-- .../apache/eagle/alert/metadata/IMetadataDao.java | 2 +- .../alert/metadata/impl/InMemMetadataDaoImpl.java | 9 ++--- .../alert/metadata/impl/JdbcMetadataDaoImpl.java | 15 +-- .../alert/metadata/impl/MongoMetadataDaoImpl.java | 17 - 5 files changed, 31 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0a0d1f6e/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata-service/src/main/java/org/apache/eagle/service/metadata/resource/MetadataResource.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata-service/src/main/java/org/apache/eagle/service/metadata/resource/MetadataResource.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata-service/src/main/java/org/apache/eagle/service/metadata/resource/MetadataResource.java index a658933..fc4a2bd 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata-service/src/main/java/org/apache/eagle/service/metadata/resource/MetadataResource.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata-service/src/main/java/org/apache/eagle/service/metadata/resource/MetadataResource.java @@ -244,8 +244,9 @@ public class MetadataResource { @Path("/policies/{policyId}/alerts") @GET -public List getAlertPublishEventByPolicyId(@PathParam("policyId") String policyId) { -return dao.getAlertPublishEventByPolicyId(policyId); +public List getAlertPublishEventByPolicyId(@PathParam("policyId") String policyId, + @QueryParam("size") int size) { +return dao.getAlertPublishEventByPolicyId(policyId, size); } @Path("/policies/{policyId}/publishments") http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0a0d1f6e/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/IMetadataDao.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/IMetadataDao.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/IMetadataDao.java index 4321796..19d2b31 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/IMetadataDao.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/IMetadataDao.java @@ -82,7 +82,7 @@ public interface IMetadataDao extends Closeable { AlertPublishEvent getAlertPublishEvent(String alertId); -List getAlertPublishEventByPolicyId(String policyId); +List getAlertPublishEventByPolicyId(String policyId, int size); OpResult addAlertPublishEvent(AlertPublishEvent event); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0a0d1f6e/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/impl/InMemMetadataDaoImpl.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/impl/InMemMetadataDaoImpl.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/impl/InMemMetadataDaoImpl.java index 03dad05..96cb20e 100644 ---
incubator-eagle git commit: [EAGLE-761] remove partition key in kafkaStreamSink
Repository: incubator-eagle Updated Branches: refs/heads/master ad8cc9c99 -> 8f8fe57e6 [EAGLE-761] remove partition key in kafkaStreamSink https://issues.apache.org/jira/browse/EAGLE-761 Author: Zhao, QingwenCloses #643 from qingwen220/EAGLE-761. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8f8fe57e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8f8fe57e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8f8fe57e Branch: refs/heads/master Commit: 8f8fe57e6ab7484f400333d3369bb849cb2c0e6e Parents: ad8cc9c Author: Zhao, Qingwen Authored: Thu Nov 10 15:55:13 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Nov 10 15:55:13 2016 +0800 -- .../main/java/org/apache/eagle/app/sink/KafkaStreamSink.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8f8fe57e/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/sink/KafkaStreamSink.java -- diff --git a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/sink/KafkaStreamSink.java b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/sink/KafkaStreamSink.java index 2207c8c..12acb81 100644 --- a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/sink/KafkaStreamSink.java +++ b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/sink/KafkaStreamSink.java @@ -18,13 +18,11 @@ package org.apache.eagle.app.sink; import backtype.storm.task.OutputCollector; import backtype.storm.task.TopologyContext; -import backtype.storm.topology.BasicOutputCollector; import com.fasterxml.jackson.databind.ObjectMapper; import com.typesafe.config.Config; import kafka.javaapi.producer.Producer; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; -import org.apache.eagle.metadata.utils.StreamIdConversions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,7 +62,9 @@ public class KafkaStreamSink extends StormStreamSink { protected void execute(Object key, Map event, OutputCollector collector) throws Exception { try { String output = new ObjectMapper().writeValueAsString(event); -producer.send(new KeyedMessage(this.topicId, key, output)); +// partition key may cause data skew +//producer.send(new KeyedMessage(this.topicId, key, output)); +producer.send(new KeyedMessage(this.topicId, output)); } catch (Exception ex) { LOG.error(ex.getMessage(), ex); throw ex;
incubator-eagle git commit: [EAGLE-751] update policyDefinition#equal
Repository: incubator-eagle Updated Branches: refs/heads/master f21145635 -> 02cbdb68d [EAGLE-751] update policyDefinition#equal https://issues.apache.org/jira/browse/EAGLE-751 Author: Zhao, QingwenCloses #622 from qingwen220/EAGEL-751. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/02cbdb68 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/02cbdb68 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/02cbdb68 Branch: refs/heads/master Commit: 02cbdb68d677e1d286149caad8ca7efcb64489ee Parents: f211456 Author: Zhao, Qingwen Authored: Tue Nov 8 21:16:53 2016 +0800 Committer: Zhao, Qingwen Committed: Tue Nov 8 21:16:53 2016 +0800 -- ...e.alert.app.AlertUnitTopologyAppProvider.xml | 8 ++-- .../engine/coordinator/PolicyDefinition.java| 16 --- .../eagle/alert/model/TestPolicyDefinition.java | 45 .../engine/spout/KafkaMessageIdWrapper.java | 10 - .../spout/SpoutOutputCollectorWrapper.java | 1 + .../org/apache/eagle/common/DateTimeUtil.java | 2 +- 6 files changed, 68 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02cbdb68/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml index 06ccaea..3c8d58e 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml @@ -66,10 +66,10 @@ false -topology.messageTimeoutSecs -Message Timeout Seconds -3600 -Number of tuple timeout in seconds +topology.message.timeout.secs +topology message timeout (secs) +default timeout is 30s +30 false http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02cbdb68/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java index cfd7fef..c131e12 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/coordinator/PolicyDefinition.java @@ -125,12 +125,13 @@ public class PolicyDefinition implements Serializable { @Override public int hashCode() { return new HashCodeBuilder() -.append(name) -.append(inputStreams) -.append(outputStreams) -.append(definition) -.append(partitionSpec) -// .append(parallelismHint) +.append(name) +.append(inputStreams) +.append(outputStreams) +.append(definition) +.append(partitionSpec) +.append(policyStatus) +.append(parallelismHint) .build(); } @@ -153,7 +154,8 @@ public class PolicyDefinition implements Serializable { && (another.definition != null && another.definition.equals(this.definition)) && Objects.equals(this.definition, another.definition) && CollectionUtils.isEqualCollection(another.partitionSpec, this.partitionSpec) - && another.parallelismHint == this.parallelismHint +&& another.policyStatus.equals(this.policyStatus) +&& another.parallelismHint == this.parallelismHint ) { return true; }
[3/3] incubator-eagle git commit: [EAGLE-724] Fix eagle-common checkstyle problem
[EAGLE-724] Fix eagle-common checkstyle problem Fix eagle-common checkstyle problem https://issues.apache.org/jira/browse/EAGLE-724 --- Author: kooneCloses #610 from koone/EAGLE-724. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/ca0fae40 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/ca0fae40 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/ca0fae40 Branch: refs/heads/master Commit: ca0fae40712fe5bb6962554b5fe17e7ff360763f Parents: 38f2926 Author: koone Authored: Fri Nov 4 18:50:43 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Nov 4 18:50:43 2016 +0800 -- eagle-core/eagle-common/pom.xml | 13 + .../java/org/apache/eagle/common/Base64.java| 34 +- .../java/org/apache/eagle/common/ByteUtil.java | 292 +- .../apache/eagle/common/CircularArrayList.java | 64 +-- .../common/CircularArrayListSortedSet.java | 106 ++-- .../org/apache/eagle/common/DateTimeUtil.java | 9 +- .../apache/eagle/common/EagleBase64Wrapper.java | 16 +- .../eagle/common/EagleExceptionWrapper.java | 2 +- .../org/apache/eagle/common/Environment.java| 6 +- .../main/java/org/apache/eagle/common/OS.java | 30 +- .../apache/eagle/common/SerializableUtils.java | 168 +++--- .../eagle/common/agg/AggregateResult.java | 11 +- .../eagle/common/agg/SiddhiAggregator.java | 36 +- .../eagle/common/agg/StreamAggregator.java | 37 +- .../eagle/common/authentication/User.java | 3 +- .../config/AbstractConfigOptionParser.java | 20 +- .../eagle/common/config/ConfigOptionParser.java | 30 +- .../apache/eagle/common/config/EagleConfig.java | 2 +- .../common/config/EagleConfigConstants.java | 2 +- .../eagle/common/config/EagleConfigFactory.java | 17 +- .../eagle/common/config/EagleConfigHelper.java | 8 +- .../common/function/ThrowableConsumer2.java | 4 +- .../common/function/ThrowableFunction.java | 2 - .../eagle/common/metric/AlertContext.java | 119 ++-- .../eagle/common/module/CommonGuiceModule.java | 2 +- .../apache/eagle/common/module/GlobalScope.java | 5 +- .../eagle/common/module/GuiceJUnitRunner.java | 9 +- .../eagle/common/module/ModuleRegistry.java | 26 +- .../eagle/common/module/ModuleRegistryImpl.java | 12 +- .../apache/eagle/common/module/ModuleScope.java | 6 +- .../org/apache/eagle/common/module/Modules.java | 7 +- .../common/service/HadoopAccountService.java| 2 +- .../apache/eagle/common/service/HadoopUser.java | 29 +- .../eagle/common/service/LdapService.java | 134 +++-- .../common/service/POSTResultEntityBase.java| 32 +- .../service/TrustAllSSLSocketFactory.java | 9 +- .../eagle-common/src/main/resources/footer.vm | 6 +- .../eagle-common/src/main/resources/header.vm | 553 ++- .../src/main/resources/templates/tec_alert.vm | 159 +++--- .../org/apache/eagle/common/TestByteUtil.java | 170 +++--- .../eagle/common/TestCircularArrayList.java | 100 ++-- .../common/TestCircularArrayListSortedSet.java | 68 +-- .../apache/eagle/common/TestDateTimeUtil.java | 126 ++--- .../eagle/common/TestEagleBase64Wrapper.java| 32 +- .../eagle/common/TestSerializableUtils.java | 13 +- .../eagle/common/TestSiddhiAggregator.java | 75 +-- .../eagle/common/agg/TestSiddhiAggregator.java | 24 +- .../common/agg/TestSiddhiExternalTimeBatch.java | 77 ++- .../eagle/common/agg/TestStreamAggregator.java | 58 +- .../eagle/common/config/TestEagleConfig.java| 18 +- .../eagle/common/metric/TestAlertContext.java | 2 +- .../eagle/common/module/ModuleRegistryTest.java | 15 +- .../eagle-common/src/test/resources/footer.vm | 6 +- .../eagle-common/src/test/resources/header.vm | 545 +- .../src/test/resources/log4j.properties | 4 - .../src/test/resources/templates/tec_alert.vm | 159 +++--- .../resources/templates/test_anomaly_alert.vm | 198 +++ 57 files changed, 1888 insertions(+), 1824 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ca0fae40/eagle-core/eagle-common/pom.xml -- diff --git a/eagle-core/eagle-common/pom.xml b/eagle-core/eagle-common/pom.xml index 639d4d5..26b8f8f 100644 --- a/eagle-core/eagle-common/pom.xml +++ b/eagle-core/eagle-common/pom.xml @@ -98,5 +98,18 @@ ${guice.version} + + + + +org.apache.maven.plugins +maven-checkstyle-plugin + +true +true + + +
[2/3] incubator-eagle git commit: [EAGLE-724] Fix eagle-common checkstyle problem
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ca0fae40/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java -- diff --git a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java index 31f1d01..eb2b0a0 100644 --- a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java +++ b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java @@ -29,62 +29,66 @@ import javax.naming.directory.*; import java.util.*; /** + * Ldap Service. * @since : 7/11/14,2014 */ public class LdapService { -private final static Logger LOG = LoggerFactory.getLogger(LdapService.class); +private static final Logger LOG = LoggerFactory.getLogger(LdapService.class); private final List ldapSrvs; private String ldapCerts; private final String securityPrincipal; private final String securityCredentials; -public final static String SECURITY_PRINCIPAL_CONFIG_NAME = "eagle.ldap.security-principal"; -public final static String SECURITY_CREDENTIALS_CONFIG_NAME = "eagle.ldap.security-credentials"; -public final static String LDAP_SERVER_CONFIG_NAME = "eagle.ldap.server"; -public final static String LDAP_CERTS_CONFIG_NAME = "eagle.ldap.certs"; -public final static String DEFAULT_LDAP_CERTS_FILE_NAME = "jssecacerts"; +public static final String SECURITY_PRINCIPAL_CONFIG_NAME = "eagle.ldap.security-principal"; +public static final String SECURITY_CREDENTIALS_CONFIG_NAME = "eagle.ldap.security-credentials"; +public static final String LDAP_SERVER_CONFIG_NAME = "eagle.ldap.server"; +public static final String LDAP_CERTS_CONFIG_NAME = "eagle.ldap.certs"; +public static final String DEFAULT_LDAP_CERTS_FILE_NAME = "jssecacerts"; -private LdapService(){ +private LdapService() { EagleConfig manager = EagleConfigFactory.load(); securityPrincipal = manager.getConfig().getString(SECURITY_PRINCIPAL_CONFIG_NAME); securityCredentials = manager.getConfig().getString(SECURITY_CREDENTIALS_CONFIG_NAME); String ldapServer = manager.getConfig().getString(LDAP_SERVER_CONFIG_NAME); -if(LOG.isDebugEnabled()) -LOG.debug(SECURITY_PRINCIPAL_CONFIG_NAME+":"+securityPrincipal); -if(securityCredentials!=null){ -if(LOG.isDebugEnabled()) -LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME+": (hidden for security, length: "+securityCredentials.length()+")"); -}else{ -LOG.warn(SECURITY_CREDENTIALS_CONFIG_NAME+":"+null); +if (LOG.isDebugEnabled()) { +LOG.debug(SECURITY_PRINCIPAL_CONFIG_NAME + ":" + securityPrincipal); +} +if (securityCredentials != null) { +if (LOG.isDebugEnabled()) { +LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME + ": (hidden for security, length: " + securityCredentials.length() + ")"); +} +} else { +LOG.warn(SECURITY_CREDENTIALS_CONFIG_NAME + ":" + null); +} +if (LOG.isDebugEnabled()) { +LOG.debug(LDAP_SERVER_CONFIG_NAME + ":" + ldapServer); } -if(LOG.isDebugEnabled()) -LOG.debug(LDAP_SERVER_CONFIG_NAME+":"+ldapServer); ldapSrvs = Arrays.asList(ldapServer.split(",")); ldapCerts = manager.getConfig().getString(LDAP_CERTS_CONFIG_NAME); -if(ldapCerts == null) { +if (ldapCerts == null) { ldapCerts = LdapService.class.getClassLoader().getResource(DEFAULT_LDAP_CERTS_FILE_NAME).getPath(); -}else if(!ldapCerts.startsWith("/") && !ldapCerts.matches("[a-zA-Z]+:.*")) { +} else if (!ldapCerts.startsWith("/") && !ldapCerts.matches("[a-zA-Z]+:.*")) { ldapCerts = LdapService.class.getClassLoader().getResource(ldapCerts).getPath(); } -if(LOG.isDebugEnabled()) { -LOG.debug(SECURITY_PRINCIPAL_CONFIG_NAME +": "+securityPrincipal); -if(securityCredentials == null){ -LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME +": null"); -}else{ -LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME +": (hidden, length: "+securityCredentials .length()+")"); +if (LOG.isDebugEnabled()) { +LOG.debug(SECURITY_PRINCIPAL_CONFIG_NAME + ": " + securityPrincipal); +if (securityCredentials == null) { +LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME + ": null"); +} else { +LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME + ": (hidden, length: " + securityCredentials.length() + ")"); } -LOG.debug(LDAP_SERVER_CONFIG_NAME +": "+ldapSrvs); -LOG.debug(LDAP_CERTS_CONFIG_NAME +": "+ldapCerts); +
[1/3] incubator-eagle git commit: [EAGLE-724] Fix eagle-common checkstyle problem
Repository: incubator-eagle Updated Branches: refs/heads/master 38f292644 -> ca0fae407 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ca0fae40/eagle-core/eagle-common/src/test/java/org/apache/eagle/common/module/ModuleRegistryTest.java -- diff --git a/eagle-core/eagle-common/src/test/java/org/apache/eagle/common/module/ModuleRegistryTest.java b/eagle-core/eagle-common/src/test/java/org/apache/eagle/common/module/ModuleRegistryTest.java index a7236bb..2de57f2 100644 --- a/eagle-core/eagle-common/src/test/java/org/apache/eagle/common/module/ModuleRegistryTest.java +++ b/eagle-core/eagle-common/src/test/java/org/apache/eagle/common/module/ModuleRegistryTest.java @@ -22,7 +22,7 @@ import org.junit.Test; public class ModuleRegistryTest { @Test -public void testPutAndGet(){ +public void testPutAndGet() { ModuleRegistry registry = new ModuleRegistryImpl(); registry.register(TestModuleScope_1.class, new AbstractModule() { @Override @@ -42,11 +42,14 @@ public class ModuleRegistryTest { } }); - Assert.assertEquals(2,registry.getModules(TestModuleScope_1.class).size()); - Assert.assertEquals(1,registry.getModules(TestModuleScope_2.class).size()); -Assert.assertEquals(3,registry.getModules().size()); +Assert.assertEquals(2, registry.getModules(TestModuleScope_1.class).size()); +Assert.assertEquals(1, registry.getModules(TestModuleScope_2.class).size()); +Assert.assertEquals(3, registry.getModules().size()); } -private class TestModuleScope_1 implements ModuleScope {} -private class TestModuleScope_2 implements ModuleScope {} +private class TestModuleScope_1 implements ModuleScope { +} + +private class TestModuleScope_2 implements ModuleScope { +} } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ca0fae40/eagle-core/eagle-common/src/test/resources/footer.vm -- diff --git a/eagle-core/eagle-common/src/test/resources/footer.vm b/eagle-core/eagle-common/src/test/resources/footer.vm index 8df4b06..d255988 100755 --- a/eagle-core/eagle-common/src/test/resources/footer.vm +++ b/eagle-core/eagle-common/src/test/resources/footer.vm @@ -16,9 +16,9 @@ * * @version 0.3.0 *# - - - + + + http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ca0fae40/eagle-core/eagle-common/src/test/resources/header.vm -- diff --git a/eagle-core/eagle-common/src/test/resources/header.vm b/eagle-core/eagle-common/src/test/resources/header.vm index 8bd4388..c91890f 100755 --- a/eagle-core/eagle-common/src/test/resources/header.vm +++ b/eagle-core/eagle-common/src/test/resources/header.vm @@ -19,281 +19,282 @@ http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;> http://www.w3.org/1999/xhtml;> - - - - -/* Based on The MailChimp Reset INLINE: Yes. */ -/* Client-specific Styles */ -.outlook a { - color: #091D42; - padding: 0; - text-decoration: none; -} - -/* Force Outlook to provide a "view in browser" menu link. */ -body { - width: 100% !important; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - margin: 0; - padding: 0; -} - -/* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/ -.ExternalClass { - width: 100%; -} - -/* Force Hotmail to display emails at full width */ -.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { - line-height: 100%; -} - -/* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */ -#backgroundTable { - margin: 0; - padding: 0; - width: 100% !important; - line-height: 100% !important; -} - -/* End reset */ - -/* Some sensible defaults for images -Bring inline: Yes. */ -img { - outline: none; - text-decoration: none; - -ms-interpolation-mode: bicubic; -} - -a img { - border: none; -} - -.image_fix { - display: block; -} - -/* Yahoo paragraph fix -Bring inline: Yes. */ -p { - margin: 1em 0; -} - -/* Hotmail header color reset -Bring inline: Yes. */ -h1, h2, h3, h4, h5, h6 { - color: black !important; -} - -h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { - color: blue !important; -} - -h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active { - color: red !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this
incubator-eagle git commit: [MINOR] Exclude jetty & old servlet-api
Repository: incubator-eagle Updated Branches: refs/heads/master 82b1c2249 -> 38f292644 [MINOR] Exclude jetty & old servlet-api Dropwizard, hadoop and Jetty (included by eagle-common module) depends on different version servlet-api, it causes jar conflicts issue. Author: Xiancheng LiCloses #611 from garrettlish/master. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/38f29264 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/38f29264 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/38f29264 Branch: refs/heads/master Commit: 38f2926448f1227761edafa367080d95ade9d255 Parents: 82b1c22 Author: Xiancheng Li Authored: Fri Nov 4 18:41:22 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Nov 4 18:41:22 2016 +0800 -- .../eagle-alert-parent/eagle-alert/alert-service/pom.xml | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/38f29264/eagle-core/eagle-alert-parent/eagle-alert/alert-service/pom.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-service/pom.xml b/eagle-core/eagle-alert-parent/eagle-alert/alert-service/pom.xml index e3d3c4c..cc970e8 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-service/pom.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-service/pom.xml @@ -37,6 +37,14 @@ storm-core org.apache.storm + +servlet-api +javax.servlet + + +jetty +org.mortbay.jetty +
incubator-eagle git commit: MINOR: change timeZone in Eagle to UTC
Repository: incubator-eagle Updated Branches: refs/heads/master 725786cdb -> 3e09327bb MINOR: change timeZone in Eagle to UTC change timeZone in Eagle to UTC Author: Zhao, QingwenCloses #605 from qingwen220/minor. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3e09327b Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3e09327b Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3e09327b Branch: refs/heads/master Commit: 3e09327bbd881b0d08d7943490c6f0bc705681c0 Parents: 725786c Author: Zhao, Qingwen Authored: Thu Nov 3 18:46:25 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Nov 3 18:46:25 2016 +0800 -- .../eagle-alert/alert-common/pom.xml | 14 ++ .../java/org/apache/eagle/common/DateTimeUtil.java| 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3e09327b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/pom.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/pom.xml b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/pom.xml index f64e64c..7edd01b 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/pom.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/pom.xml @@ -29,6 +29,20 @@ org.apache.eagle eagle-common ${project.version} + + +org.wso2.orbit.com.lmax +disruptor + + +org.slf4j +slf4j-log4j12 + + +org.slf4j +slf4j-simple + + com.typesafe http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3e09327b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java -- diff --git a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java index c25a434..bd97aa8 100644 --- a/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java +++ b/eagle-core/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java @@ -33,8 +33,8 @@ public class DateTimeUtil { public static final long ONEMINUTE = 1L * 60L * 1000L; public static final long ONEHOUR = 1L * 60L * 60L * 1000L; public static final long ONEDAY = 24L * 60L * 60L * 1000L; -//private static TimeZone CURRENT_TIME_ZONE = EagleConfigFactory.load().getTimeZone(); -private static TimeZone CURRENT_TIME_ZONE = TimeZone.getDefault(); +private static TimeZone CURRENT_TIME_ZONE = EagleConfigFactory.load().getTimeZone(); +//private static TimeZone CURRENT_TIME_ZONE = TimeZone.getDefault(); public static Date humanDateToDate(String date) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("-MM-dd HH:mm:ss");
incubator-eagle git commit: [EAGLE-704] Update spark history config to integrate with the new application framework
Repository: incubator-eagle Updated Branches: refs/heads/master 9954b4e11 -> 6b0ed3d0d [EAGLE-704] Update spark history config to integrate with the new application framework https://issues.apache.org/jira/browse/EAGLE-704 Author: Zhao, QingwenCloses #591 from qingwen220/EAGLE-704. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/6b0ed3d0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/6b0ed3d0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/6b0ed3d0 Branch: refs/heads/master Commit: 6b0ed3d0de8fb7302d412f3a190e4793ea0c7977 Parents: 9954b4e Author: Zhao, Qingwen Authored: Tue Nov 1 14:21:06 2016 +0800 Committer: Zhao, Qingwen Committed: Tue Nov 1 14:21:06 2016 +0800 -- .../alert/engine/model/AlertStreamEvent.java| 7 +- .../jpm/spark/history/SparkHistoryJobApp.java | 11 +- .../spark/history/SparkHistoryJobAppConfig.java | 62 +++--- .../SparkFilesystemInputStreamReaderImpl.java | 2 +- .../status/JobHistoryZKStateManager.java| 2 +- .../history/storm/SparkHistoryJobParseBolt.java | 6 - ...spark.history.SparkHistoryJobAppProvider.xml | 205 ++- .../src/main/resources/application.conf | 45 ++-- eagle-server/pom.xml| 5 + ...org.apache.eagle.app.spi.ApplicationProvider | 3 +- pom.xml | 2 +- 11 files changed, 128 insertions(+), 222 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/6b0ed3d0/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertStreamEvent.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertStreamEvent.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertStreamEvent.java index 442c885..600643b 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertStreamEvent.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertStreamEvent.java @@ -108,12 +108,7 @@ public class AlertStreamEvent extends StreamEvent { event.put(column.getName(), null); continue; } -if (column.getName().equalsIgnoreCase("timestamp") && obj instanceof Long) { -String eventTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(((Long) obj).longValue()); -event.put(column.getName(), eventTime); -} else { -event.put(column.getName(), obj.toString()); -} +event.put(column.getName(), obj.toString()); } return event; } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/6b0ed3d0/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApp.java -- diff --git a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApp.java b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApp.java index 446eb4e..8a3097d 100644 --- a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApp.java +++ b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApp.java @@ -36,18 +36,17 @@ public class SparkHistoryJobApp extends StormApplication { // 2. Config topology. TopologyBuilder topologyBuilder = new TopologyBuilder(); -config = sparkHistoryJobAppConfig.getConfig(); + topologyBuilder.setSpout( jobFetchSpoutName, -new SparkHistoryJobSpout(sparkHistoryJobAppConfig), -config.getInt("storm.parallelismConfig." + jobFetchSpoutName) -).setNumTasks(config.getInt("storm.tasks." + jobFetchSpoutName)); +new SparkHistoryJobSpout(sparkHistoryJobAppConfig), sparkHistoryJobAppConfig.stormConfig.numOfSpoutExecutors +).setNumTasks(sparkHistoryJobAppConfig.stormConfig.numOfSpoutTasks); topologyBuilder.setBolt( jobParseBoltName, new SparkHistoryJobParseBolt(sparkHistoryJobAppConfig), -config.getInt("storm.parallelismConfig." + jobParseBoltName) -).setNumTasks(config.getInt("storm.tasks." +
incubator-eagle git commit: [EAGLE-681] Add new publisher AlertEagleStorePlugin
Repository: incubator-eagle Updated Branches: refs/heads/master 1add6d96f -> f0706 [EAGLE-681] Add new publisher AlertEagleStorePlugin https://issues.apache.org/jira/browse/EAGLE-681 Author: Zhao, QingwenCloses #573 from qingwen220/EAGLE-681. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f070 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f070 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f070 Branch: refs/heads/master Commit: f07066c6bdc53bbe3004555ff3f24953ed25 Parents: 1add6d9 Author: Zhao, Qingwen Authored: Thu Oct 27 18:31:04 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Oct 27 18:31:04 2016 +0800 -- .../alert/engine/model/AlertPublishEvent.java | 107 +++ .../alert/engine/model/AlertStreamEvent.java| 32 ++ .../alert/service/IMetadataServiceClient.java | 10 ++ .../service/MetadataServiceClientImpl.java | 20 .../mock/InMemMetadataServiceClient.java| 17 +++ .../AbstractMetadataChangeNotifyService.java| 5 + .../impl/ZKMetadataChangeNotifyService.java | 6 ++ .../publisher/AlertPublishSpecListener.java | 3 + .../publisher/impl/AbstractPublishPlugin.java | 2 + .../publisher/impl/AlertEagleStorePlugin.java | 81 ++ .../alert/engine/runner/AlertPublisherBolt.java | 37 ++- .../integration/MockMetadataServiceClient.java | 16 +++ .../metadata/resource/MetadataResource.java | 25 + .../eagle/alert/metadata/IMetadataDao.java | 5 + .../metadata/impl/InMemMetadataDaoImpl.java | 18 .../metadata/impl/JdbcMetadataDaoImpl.java | 11 ++ .../alert/metadata/impl/JdbcSchemaManager.java | 2 + .../metadata/impl/MongoMetadataDaoImpl.java | 12 +++ 18 files changed, 404 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f070/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java new file mode 100644 index 000..9d73c2d --- /dev/null +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/engine/model/AlertPublishEvent.java @@ -0,0 +1,107 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.alert.engine.model; + +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public class AlertPublishEvent { +private String alertId; +private String siteId; +private List appIds; +private String policyId; +private String policyValue; +private long alertTimestamp; +private Map alertData; + +public static final String SITE_ID_KEY = "siteId"; +public static final String APP_IDS_KEY = "appIds"; +public static final String POLICY_VALUE_KEY = "policyValue"; + +public String getAlertId() { +return alertId; +} + +public void setAlertId(String alertId) { +this.alertId = alertId; +} + +public List getAppIds() { +return appIds; +} + +public void setAppIds(List appIds) { +this.appIds = appIds; +} + +public String getPolicyValue() { +return policyValue; +} + +public void setPolicyValue(String policyValue) { +this.policyValue = policyValue; +} + +public long getAlertTimestamp() { +return alertTimestamp; +} + +public void setAlertTimestamp(long alertTimestamp) { +this.alertTimestamp = alertTimestamp; +} + +public String getSiteId() { +
incubator-eagle git commit: [EAGLE-646] AlertUnitTopology does not rebuild the scheduler state after restarting
Repository: incubator-eagle Updated Branches: refs/heads/master d76fa311b -> 823c66dae [EAGLE-646] AlertUnitTopology does not rebuild the scheduler state after restarting https://issues.apache.org/jira/browse/EAGLE-646 1. Fix a bug that alertUnitTopology does not rebuild the scheduler state after restarting 2. Fix topology assembly dependency bug Author: Zhao, QingwenCloses #538 from qingwen220/EAGLE-646. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/823c66da Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/823c66da Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/823c66da Branch: refs/heads/master Commit: 823c66dae5accefa9631b03bb6e3ab607a12bd55 Parents: d76fa31 Author: Zhao, Qingwen Authored: Thu Oct 20 19:13:09 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Oct 20 19:13:09 2016 +0800 -- .../eagle-alert-parent/eagle-alert-app/pom.xml | 5 .../alert/app/AlertUnitTopologyAppListener.java | 7 + .../impl/storm/kafka/KafkaSpoutProvider.java| 4 ++- eagle-topology-assembly/pom.xml | 29 +++- ...org.apache.eagle.app.spi.ApplicationProvider | 7 - 5 files changed, 25 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/823c66da/eagle-core/eagle-alert-parent/eagle-alert-app/pom.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/pom.xml b/eagle-core/eagle-alert-parent/eagle-alert-app/pom.xml index 768709f..74f82d0 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/pom.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/pom.xml @@ -31,5 +31,10 @@ eagle-app-base ${project.version} + + org.apache.eagle + alert-coordinator + ${project.version} + http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/823c66da/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/java/org/apache/eagle/alert/app/AlertUnitTopologyAppListener.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/java/org/apache/eagle/alert/app/AlertUnitTopologyAppListener.java b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/java/org/apache/eagle/alert/app/AlertUnitTopologyAppListener.java index fd3f9d2..0b19424 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/java/org/apache/eagle/alert/app/AlertUnitTopologyAppListener.java +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/java/org/apache/eagle/alert/app/AlertUnitTopologyAppListener.java @@ -18,6 +18,7 @@ package org.apache.eagle.alert.app; import org.apache.eagle.alert.coordination.model.internal.Topology; +import org.apache.eagle.alert.coordinator.resource.CoordinatorResource; import org.apache.eagle.alert.engine.runner.UnitTopologyRunner; import org.apache.eagle.alert.metadata.IMetadataDao; import org.apache.eagle.alert.metadata.resource.OpResult; @@ -33,6 +34,7 @@ class AlertUnitTopologyAppListener implements ApplicationListener { private static final Logger LOG = LoggerFactory.getLogger(AlertUnitTopologyAppListener.class); @Inject private IMetadataDao metadataDao; +@Inject private CoordinatorResource coordinatorResource; private ApplicationEntity applicationEntity; @@ -73,6 +75,11 @@ class AlertUnitTopologyAppListener implements ApplicationListener { LOG.error(result.message); throw new IllegalStateException(result.message); } +try { +coordinatorResource.build(); +} catch (Exception e) { +LOG.error(e.getMessage(), e); +} } private void removeTopologyMetadata() { http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/823c66da/eagle-core/eagle-data-process/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSpoutProvider.java -- diff --git a/eagle-core/eagle-data-process/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSpoutProvider.java b/eagle-core/eagle-data-process/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSpoutProvider.java index 7454cc2..e8c40ae 100644 --- a/eagle-core/eagle-data-process/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSpoutProvider.java +++ b/eagle-core/eagle-data-process/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSpoutProvider.java @@ -60,7 +60,7 @@ public class KafkaSpoutProvider implements StormSpoutProvider { // Kafka broker zk connection
incubator-eagle git commit: [EAGLE-637] set task number of UnitTopologyRunner
Repository: incubator-eagle Updated Branches: refs/heads/master 71a4bb013 -> 855b86ef3 [EAGLE-637] set task number of UnitTopologyRunner https://issues.apache.org/jira/browse/EAGLE-637 Author: Zhao, QingwenCloses #531 from qingwen220/quickFix. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/855b86ef Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/855b86ef Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/855b86ef Branch: refs/heads/master Commit: 855b86ef3820cbe7405d43576995e5876c551887 Parents: 71a4bb0 Author: Zhao, Qingwen Authored: Wed Oct 19 12:47:10 2016 +0800 Committer: Zhao, Qingwen Committed: Wed Oct 19 12:47:10 2016 +0800 -- .../org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/855b86ef/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java index ec129fe..88cfb9b 100755 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java @@ -185,13 +185,13 @@ public class UnitTopologyRunner { * TODO potentially one route bolt may have multiple tasks, so that is field grouping by groupby fields * that means we need a separate field to become groupby field */ -builder.setBolt(boltName, routerBolts[i]).fieldsGrouping(spoutName, streamId, new Fields()); +builder.setBolt(boltName, routerBolts[i]).fieldsGrouping(spoutName, streamId, new Fields()).setNumTasks(1); } // connect router bolt and alert bolt, also define output streams for downstreaming alert publish bolt for (int i = 0; i < numOfAlertBolts; i++) { String boltName = alertBoltNamePrefix + i; -BoltDeclarer boltDeclarer = builder.setBolt(boltName, alertBolts[i]); +BoltDeclarer boltDeclarer = builder.setBolt(boltName, alertBolts[i]).setNumTasks(1); for (int j = 0; j < numOfRouterBolts; j++) { String streamId = StreamIdConversion.generateStreamIdBetween(streamRouterBoltNamePrefix + j, boltName); boltDeclarer.fieldsGrouping(streamRouterBoltNamePrefix + j, streamId, new Fields());
[14/28] incubator-eagle git commit: EAGLE-339: Automatically create hbase table when initializing
EAGLE-339: Automatically create hbase table when initializing https://github.com/apache/incubator-eagle/pull/240 Author: Zhao, QingwenReviewer: Edward, Zhang Closes #240 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/b49bda14 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/b49bda14 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/b49bda14 Branch: refs/heads/master Commit: b49bda14cec0c92ff7224f18476fc4456faa93bd Parents: 3553528 Author: Zhao, Qingwen Authored: Fri Jun 17 14:08:25 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Jun 17 14:08:25 2016 +0800 -- .../src/main/bin/eagle-create-table.rb | 47 - .../src/main/bin/eagle-drop-tables.sh | 26 - eagle-assembly/src/main/bin/eagle-env.sh| 4 - .../src/main/bin/eagle-service-init.sh | 35 --- .../apache/eagle/common/config/EagleConfig.java | 3 + .../eagle/common/config/EagleConfigFactory.java | 5 + .../storage/hbase/HBaseEntitySchemaManager.java | 102 +++ .../eagle/storage/hbase/HBaseStorage.java | 1 + 8 files changed, 111 insertions(+), 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-create-table.rb -- diff --git a/eagle-assembly/src/main/bin/eagle-create-table.rb b/eagle-assembly/src/main/bin/eagle-create-table.rb deleted file mode 100755 index b1b790c..000 --- a/eagle-assembly/src/main/bin/eagle-create-table.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Create HBase tables for Eagle - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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 -# -#http://www.apache.org/licenses/LICENSE-2.0 -# -# 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. - -include Java -import org.apache.hadoop.hbase.HBaseConfiguration -import org.apache.hadoop.hbase.client.HBaseAdmin - -def createEagleTable(admin, tableName) - if !admin.tableExists(tableName) -# create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'GZ'} -create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'} -puts "Create Table #{tableName} successfully" - elsif admin.isTableDisabled(tableName) -admin.enableTable(tableName) -puts "Table #{tableName} already exists" - else -puts "Table #{tableName} already exists" - end -end - -conf = HBaseConfiguration.new -admin = HBaseAdmin.new(conf) - -if ARGV.empty? - puts "Table list is empty, please go back to bin/eagle-env.sh and export EAGLE_TABLE_LIST" - exit 1 -end - -tableListVal=ARGV.first - -tableListVal.split(' ').map { |i| createEagleTable(admin, i) } - -exit 0 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-drop-tables.sh -- diff --git a/eagle-assembly/src/main/bin/eagle-drop-tables.sh b/eagle-assembly/src/main/bin/eagle-drop-tables.sh deleted file mode 100755 index 37fb540..000 --- a/eagle-assembly/src/main/bin/eagle-drop-tables.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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 -# -#http://www.apache.org/licenses/LICENSE-2.0 -# -# 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. - -source $(dirname $0)/eagle-env.sh - -commands='' -for i in $EAGLE_TABLE_LIST; do -
[08/28] incubator-eagle git commit: EAGLE-301 fix the bug of breaking mysql row size when creating tables fix the bug of breaking mysql row size when creating tables
EAGLE-301 fix the bug of breaking mysql row size when creating tables fix the bug of breaking mysql row size when creating tables Author: @anyway1021Reviewer: @yonzhang Closes: #238 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8f12f826 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8f12f826 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8f12f826 Branch: refs/heads/master Commit: 8f12f82620b13d69f89ddc8057cd72337920ea31 Parents: cbf3c76 Author: yonzhang Authored: Wed Jun 15 17:29:11 2016 -0700 Committer: yonzhang Committed: Wed Jun 15 17:29:11 2016 -0700 -- .../main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java | 4 +++- .../eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8f12f826/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java -- diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java index a6d0c93..f7f261c 100644 --- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java +++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java @@ -28,7 +28,9 @@ public class JdbcConstants { public static final String ROW_KEY_COLUMN_NAME = "uuid"; public static final int DEFAULT_TYPE_FOR_COMPLEX_TYPE = Types.BLOB; -public static final int DEFAULT_VARCHAR_SIZE =3; +public static final int DEFAULT_TAG_VARCHAR_SIZE =1024; +//public static final int DEFAULT_VARCHAR_SIZE =3; +public static final int DEFAULT_VARCHAR_SIZE =7168; // Eagle JDBC Storage Configuration public final static String EAGLE_DB_USERNAME = "eagle.service.storage-username"; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8f12f826/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java -- diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java index 4cd1967..808c1d0 100644 --- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java +++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntitySchemaManager.java @@ -155,7 +155,7 @@ public class JdbcEntitySchemaManager implements IJdbcEntityDDLManager { tagColumn.setTypeCode(Types.VARCHAR); tagColumn.setJavaName(tagName); //tagColumn.setScale(1024); -tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE)); + tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_TAG_VARCHAR_SIZE)); tagColumn.setDefaultValue(null); tagColumn.setDescription("eagle entity tag column for "+tagName); return tagColumn; @@ -196,7 +196,7 @@ public class JdbcEntitySchemaManager implements IJdbcEntityDDLManager { //Index index = new UniqueIndex(); for (String tag : entityDefinition.getInternal().getTags()) { Column tagColumn = createTagColumn(tag); - tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_VARCHAR_SIZE)); +// tagColumn.setSize(String.valueOf(JdbcConstants.DEFAULT_TAG_VARCHAR_SIZE)); table.addColumn(tagColumn); //IndexColumn indexColumn = new IndexColumn(); //indexColumn.setName(tag);
[06/28] incubator-eagle git commit: EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException
EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException https://issues.apache.org/jira/browse/EAGLE-327 Author: Zhao, QingwenReviewer: Wu, Michael Closes #218 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f51474de Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f51474de Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f51474de Branch: refs/heads/master Commit: f51474dee0c6ab40b4df965871b5d723c06f84a3 Parents: 5a5a17c Author: Zhao, Qingwen Authored: Mon Jun 6 10:25:05 2016 +0800 Committer: Zhao, Qingwen Committed: Mon Jun 6 10:25:05 2016 +0800 -- .../apache/eagle/alert/executor/AlertExecutorCreationUtils.java | 2 +- .../eagle/datastream/core/StreamParallelismConfigExpansion.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java index 8ab290e..8377267 100644 --- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java +++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java @@ -81,7 +81,7 @@ public class AlertExecutorCreationUtils { if(alertExecutorConfigs !=null && alertExecutorConfigs.containsKey(alertExecutorId)) { Map alertExecutorConfig = (Map ) alertExecutorConfigs.get(alertExecutorId).unwrapped(); int parts = 0; -if(alertExecutorConfig.containsKey("parallelism")) parts = (int) (alertExecutorConfig.get("parallelism")); +if(alertExecutorConfig.containsKey("parallelism")) parts = Integer.parseInt(alertExecutorConfig.get("parallelism").toString()); numPartitions = parts == 0 ? 1 : parts; if(alertExecutorConfig.containsKey("partitioner")) partitionerCls = (String) alertExecutorConfig.get("partitioner"); } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala -- diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala index 8699da6..7ac9ff5 100644 --- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala +++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala @@ -19,7 +19,7 @@ package org.apache.eagle.datastream.core import java.util.regex.Pattern -import com.typesafe.config.{Config, ConfigObject, ConfigValue} +import com.typesafe.config.{Config, ConfigObject} import org.jgrapht.experimental.dag.DirectedAcyclicGraph import org.slf4j.LoggerFactory @@ -48,7 +48,7 @@ case class StreamParallelismConfigExpansion(config: Config) extends StreamDAGExp if(config.hasPath("envContextConfig.parallelismConfig")) { val parallelismConfig: ConfigObject = config.getObject("envContextConfig.parallelismConfig") parallelismConfig.asScala.toMap map { -case (name, value) => (Pattern.compile(name), value.asInstanceOf[ConfigValue].unwrapped().asInstanceOf[Int]) +case (name, value) => (Pattern.compile(name), Integer.parseInt(value.unwrapped().toString)) } }else{ Map[Pattern,Int]()
[11/28] incubator-eagle git commit: EAGLE-333 Fix hive.ql.Parser cant parse complex SQL fix hive parser issues
EAGLE-333 Fix hive.ql.Parser cant parse complex SQL fix hive parser issues Author: @wangyumReviewer: @yonzhang Closes: #230 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/11d4be76 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/11d4be76 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/11d4be76 Branch: refs/heads/master Commit: 11d4be769b9cc1decd97f9d18f96236afbf153bf Parents: 4627eb0 Author: yonzhang Authored: Thu Jun 16 15:17:51 2016 -0700 Committer: yonzhang Committed: Thu Jun 16 15:17:51 2016 -0700 -- .../apache/eagle/security/hive/ql/Parser.java | 6 ++-- .../eagle/security/hive/ql/TestParser.java | 34 2 files changed, 37 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/11d4be76/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java -- diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java index 19ce003..f812d1e 100644 --- a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java +++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/ql/Parser.java @@ -303,7 +303,7 @@ public class Parser { } break; - case HiveParser.TOK_FUNCTION: + case HiveParser.TOK_FUNCTION: case HiveParser.TOK_FUNCTIONDI: // Traverse children to get TOK_TABLE_OR_COL Set tempSet = new HashSet<>(); parseTokFunction(asn, tempSet); @@ -337,14 +337,14 @@ public class Parser { String colRealName = convAliasToReal(columnAliasMap, ast.getChild(0).getText()); set.add(colRealName); break; - case HiveParser.TOK_FUNCTION: + // Not only HiveParser.TOK_FUNCTION, but also HiveParser.KW_ADD, HiveParser.KW_WHEN ... + default: for (int i = 0; i < ast.getChildCount(); i++) { ASTNode n = (ASTNode)ast.getChild(i); if (n != null) { parseTokFunction(n, set); } } -break; } } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/11d4be76/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java -- diff --git a/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java b/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java index 0bd994f..fd2296d 100644 --- a/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java +++ b/eagle-security/eagle-security-hive/src/test/java/org/apache/eagle/security/hive/ql/TestParser.java @@ -235,6 +235,40 @@ public class TestParser { } @Test +public void testCountDistinct() throws Exception { +String query = "SELECT count(distinct id) FROM db.table1"; +String expectedOperation = "SELECT"; +Map expectedTableColumn = new HashMap (); +Set set = new HashSet(); +set.add("id"); +expectedTableColumn.put("db.table1", set); +_testParsingQuery(query, expectedOperation, null, expectedTableColumn); +} + +@Test +public void testComplextQuery() throws Exception { +String query = "SELECT id, \n" + +" SUM(CASE WHEN(type=1 AND ds < '2016-05-12' AND category IN ('1', '2')) " + +"THEN 1 ELSE 0 end) / COUNT(DISTINCT id) AS col1, \n" + +" CASE WHEN SUM(CASE WHEN type=1 THEN 1 ELSE 0 END)=0 THEN 0 " + +"ELSE SUM(CASE WHEN type=1 AND DATEDIFF('2016-05-21', ds)=1 " + +"THEN 1 ELSE 0 END) * DATEDIFF('2016-05-21', '2016-04-21') / " + +"SUM(CASE WHEN type=1 THEN 1 ELSE 0 END) END AS col2 \n" + +"FROM db.table1 \n" + +"WHERE ds < '2016-05-21' \n" + +"GROUP BY id"; +String expectedOperation = "SELECT"; +Map expectedTableColumn = new HashMap (); +Set set = new HashSet(); +set.add("id"); +set.add("ds"); +set.add("type"); +set.add("category"); +expectedTableColumn.put("db.table1", set); +_testParsingQuery(query, expectedOperation, null, expectedTableColumn); +} + +@Test public void
[22/28] incubator-eagle git commit: EAGLE-365 delete .jar files to fix the issue found in voting of 0.4.0-incubating-rc2
EAGLE-365 delete .jar files to fix the issue found in voting of 0.4.0-incubating-rc2 https://issues.apache.org/jira/browse/EAGLE-365 - delete eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar - delete eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar - delete eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar author: anyway1021Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9cd75b18 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9cd75b18 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9cd75b18 Branch: refs/heads/master Commit: 9cd75b188941bf476878a2210984546e4e257c7a Parents: 2f90188 Author: anyway1021 Authored: Mon Jul 11 14:53:01 2016 +0800 Committer: anyway1021 Committed: Mon Jul 11 16:54:52 2016 +0800 -- .../src/main/lib/tomcat/bin/bootstrap.jar | Bin 28052 -> 0 bytes .../src/main/lib/tomcat/bin/commons-daemon.jar | Bin 24283 -> 0 bytes .../src/main/lib/tomcat/bin/tomcat-juli.jar| Bin 38222 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9cd75b18/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar -- diff --git a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar deleted file mode 100644 index 8f43864..000 Binary files a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9cd75b18/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar -- diff --git a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar deleted file mode 100644 index 2b6b9c6..000 Binary files a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9cd75b18/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar -- diff --git a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar deleted file mode 100644 index e1b80ad..000 Binary files a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar and /dev/null differ
[12/28] incubator-eagle git commit: EAGLE-326 fix a typo fix a typo in documentation for application management configuration
EAGLE-326 fix a typo fix a typo in documentation for application management configuration Author: Michael Reviwer: Edward Closes: #220 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f5b31023 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f5b31023 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f5b31023 Branch: refs/heads/master Commit: f5b3102319591f6aabfc74b072919a7e9a05dea1 Parents: 11d4be7 Author: yonzhangAuthored: Thu Jun 16 15:23:11 2016 -0700 Committer: yonzhang Committed: Thu Jun 16 15:23:11 2016 -0700 -- eagle-docs/tutorial/application_manager_tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f5b31023/eagle-docs/tutorial/application_manager_tutorial.md -- diff --git a/eagle-docs/tutorial/application_manager_tutorial.md b/eagle-docs/tutorial/application_manager_tutorial.md index 4eccfa4..0e342c5 100644 --- a/eagle-docs/tutorial/application_manager_tutorial.md +++ b/eagle-docs/tutorial/application_manager_tutorial.md @@ -43,7 +43,7 @@ The configuration file `eagle-scheduler.conf` defines scheduler parameters, exec Some default topology properties are defined here. -Note: these configurations can be overridden in the topology configurations, which is shown below. The only difference is to add a prefix `.app`. For example, 'app.envContextConfig.jarFile' is to override 'envContextConfig.jarFile' in eagle-schedule.conf +Note: these configurations can be overridden in the topology configurations, which is shown below. The only difference is to add a prefix `app.`. For example, 'app.envContextConfig.jarFile' is to override 'envContextConfig.jarFile' in eagle-schedule.conf Manual @@ -114,4 +114,4 @@ Note: these configurations can be overridden in the topology configurations, whi ![stop-topology-2](/images/appManager/stop-topology-2.png) ![stop-topology-3](/images/appManager/stop-topology-3.png) - \ No newline at end of file +
[28/28] incubator-eagle git commit: Daniel Zhou: Test PR to Apache repo
Daniel Zhou: Test PR to Apache repo Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/0474d591 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/0474d591 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/0474d591 Branch: refs/heads/master Commit: 0474d59169d7cbf35c7354d4a3704a6bd4ac26ea Parents: 14684dd Author: DadanielZAuthored: Wed Aug 10 16:14:30 2016 -0700 Committer: DadanielZ Committed: Wed Aug 10 16:14:30 2016 -0700 -- .../src/main/resources/maprFSAuditLog-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0474d591/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh -- diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh index 19eed8d..0c1c9c1 100644 --- a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh +++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# EAGLE_SERVICE_HOST, default is `hostname -f` +# EAGLE_SERVICE_HOST, default is `hostname -f` export EAGLE_SERVICE_HOST=localhost # EAGLE_SERVICE_PORT, default is 9099 export EAGLE_SERVICE_PORT=9099
[27/28] incubator-eagle git commit: [EAGLE-406] modify README.md by adding Status section for build status
[EAGLE-406] modify README.md by adding Status section for build status https://issues.apache.org/jira/browse/EAGLE-406 Author: anyway1021Close #292 from anyway1021/EAGLE-406-master. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/14684dd8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/14684dd8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/14684dd8 Branch: refs/heads/master Commit: 14684dd88ca78dbc5c32fa81bdc40fd9c0033d97 Parents: a6ac616 Author: anyway1021 Authored: Thu Aug 4 11:32:17 2016 +0800 Committer: anyway1021 Committed: Thu Aug 4 11:32:17 2016 +0800 -- README.md | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/14684dd8/README.md -- diff --git a/README.md b/README.md index cac233f..487c72b 100755 --- a/README.md +++ b/README.md @@ -17,14 +17,32 @@ limitations under the License. {% endcomment %} --> -# Apache Eagle [![Build Status](https://builds.apache.org/buildStatus/icon?job=incubator-eagle-main)](https://builds.apache.org/job/incubator-eagle-main/) +# Apache Eagle > Secure Hadoop Data in Real Time -Apache Eagle is an open source monitoring solution to instantly identify access to sensitive data, recognize attacks, malicious activities in Hadoop and take actions in real time. +## Overview + +Apache Eagle is an open source analytics solution for identifying security and performance issues instantly on big data platforms e.g. Apache Hadoop, Apache Spark, NoSQL etc. It analyzes data activities, yarn applications, jmx metrics, and daemon logs etc., provides state-of-the-art alert engine to identify security breach, performance issues and shows insights. For more details, please visit [https://eagle.incubator.apache.org](https://eagle.incubator.apache.org) +## Status + +### Branches +| name | status | version | description | +| :---:| :---: | :---: | :--- | +| **master** | [![Build Status](https://builds.apache.org/buildStatus/icon?job=incubator-eagle-main)](https://builds.apache.org/job/incubator-eagle-main/) | 0.4.0-incubating | stable code base aligned with latest release | +| **develop** | [![Build Status](https://builds.apache.org/buildStatus/icon?job=incubator-eagle-develop)](https://builds.apache.org/job/incubator-eagle-develop/) | 0.5.0-incubating-SNAPSHOT | code base for continuous development | + +### Latest Release + +| release date | version | release notes | artifacts | md5 checksum | sha1 checksum | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | +| 2016/07/21 | [[0.4.0-incubating]](https://github.com/apache/incubator-eagle/releases/tag/v0.4.0-incubating) | [[Release Notes]](https://git-wip-us.apache.org/repos/asf?p=incubator-eagle.git;a=blob_plain;f=CHANGELOG.txt;hb=refs/tags/v0.4.0-incubating) | [[Artifacts]](http://www.apache.org/dyn/closer.cgi?path=/incubator/eagle/apache-eagle-0.4.0-incubating) | [[MD5]](https://dist.apache.org/repos/dist/release/incubator/eagle/apache-eagle-0.4.0-incubating/apache-eagle-0.4.0-incubating-src.tar.gz.md5) | [[SHA1]](https://dist.apache.org/repos/dist/release/incubator/eagle/apache-eagle-0.4.0-incubating/apache-eagle-0.4.0-incubating-src.tar.gz.sha1) | + +[More Release Versions](http://archive.apache.org/dist/incubator/eagle/) + ## Documentation You can find the latest Eagle documentation on [https://eagle.incubator.apache.org](https://eagle.incubator.apache.org/docs). This [README](README.md) file only contains basic setup instructions.
[24/28] incubator-eagle git commit: Merge branch 'branch-0.4.0'
Merge branch 'branch-0.4.0' Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a0443561 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a0443561 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a0443561 Branch: refs/heads/master Commit: a04435619023843cb33fda74092b9830df5141bc Parents: 982a6b7 eac0f27 Author: anyway1021Authored: Mon Jul 25 17:21:31 2016 +0800 Committer: anyway1021 Committed: Mon Jul 25 17:21:31 2016 +0800 -- CHANGELOG.txt | 327 + README.md | 10 +- eagle-assembly/pom.xml | 4 +- eagle-assembly/src/assembly/eagle-bin.xml | 7 +- .../src/main/bin/eagle-create-table.rb | 47 -- .../src/main/bin/eagle-drop-tables.sh | 26 - eagle-assembly/src/main/bin/eagle-env.sh| 4 - .../src/main/bin/eagle-service-init.sh | 35 -- eagle-assembly/src/main/bin/eagle-service.sh| 7 + .../src/main/bin/eagle-topology-init.sh | 33 +- .../src/main/conf/eagle-scheduler.conf | 42 ++ eagle-assembly/src/main/conf/eagle-service.conf | 4 +- .../sandbox-hbaseSecurityLog-application.conf | 2 +- .../src/main/docs/logstash-kafka-conf.md| 76 ++- .../src/main/examples/eagle-sandbox-starter.sh | 61 +-- .../sample-sensitivity-resource-create.sh | 2 + .../src/main/lib/tomcat/bin/bootstrap.jar | Bin 28052 -> 0 bytes .../src/main/lib/tomcat/bin/commons-daemon.jar | Bin 24283 -> 0 bytes .../src/main/lib/tomcat/bin/tomcat-juli.jar | Bin 38222 -> 0 bytes eagle-core/eagle-alert/eagle-alert-base/pom.xml | 2 +- .../eagle-alert-notification-plugin/pom.xml | 8 +- .../notification/email/AlertEmailGenerator.java | 31 +- .../notification/email/AlertEmailSender.java| 60 ++- .../src/main/resources/ALERT_DEFAULT.vm | 488 ++- .../eagle-alert/eagle-alert-process/pom.xml | 2 +- .../eagle/alert/config/DeduplicatorConfig.java | 17 +- .../dedup/AlertDeduplicationExecutorBase.java | 22 +- .../eagle/alert/dedup/DefaultDeduplicator.java | 50 +- .../eagle/alert/dedup/EntityDedupKey.java | 62 +++ .../eagle/alert/dedup/EntityDeduplicator.java | 9 +- .../executor/AlertExecutorCreationUtils.java| 2 +- .../siddhi/SiddhiAlertAPIEntityRender.java | 18 +- .../eagle/alert/config/TestAlertDedup.java | 6 +- .../TestSiddhiStateSnapshotAndRestore.java | 7 +- .../eagle-alert/eagle-alert-service/pom.xml | 2 +- .../service/alert/SiteApplicationObject.java| 62 +++ .../service/alert/SiteApplicationResource.java | 189 +++ .../alert/resolver/SiteApplicationObject.java | 62 --- .../alert/resolver/SiteApplicationResource.java | 189 --- eagle-core/eagle-alert/pom.xml | 2 +- .../eagle-application-service/pom.xml | 56 +++ .../application/AppManagerConstants.java| 43 ++ .../ApplicationManagementResource.java | 109 + .../application/dao/ApplicationManagerDAO.java | 33 ++ .../dao/ApplicationManagerDaoImpl.java | 91 .../entity/ApplicationEntityRepo.java | 30 ++ .../entity/TopologyDescriptionEntity.java | 104 .../entity/TopologyExecutionEntity.java | 132 + .../entity/TopologyExecutionStatus.java | 38 ++ .../entity/TopologyOperationEntity.java | 105 .../eagle-stream-application-manager/pom.xml| 144 ++ .../stream/application/TopologyException.java | 26 + .../stream/application/TopologyExecutable.java | 27 + .../stream/application/TopologyFactory.java | 55 +++ .../AbstractDynamicApplication.scala| 32 ++ .../stream/application/ApplicationManager.scala | 126 + .../application/ApplicationManagerUtils.scala | 38 ++ .../ApplicationSchedulerAsyncDAO.scala | 179 +++ .../stream/application/ExecutionPlatform.scala | 30 ++ .../application/ExecutionPlatformFactory.scala | 49 ++ .../eagle/stream/application/TaskExecutor.scala | 41 ++ .../application/impl/StormDynamicTopology.scala | 44 ++ .../impl/StormExecutionPlatform.scala | 197 .../scheduler/AppCommandExecutor.scala | 170 +++ .../scheduler/AppCommandLoader.scala| 78 +++ .../scheduler/ApplicationScheduler.scala| 81 +++ .../scheduler/StreamAppCoordinator.scala| 54 ++ .../src/test/resources/application.conf | 42 ++ .../src/test/resources/log4j.properties | 35 ++ .../application/scheduler/MockTopology.scala| 30 ++ .../scheduler/StormApplicationManagerSpec.scala | 40 ++ .../application/scheduler/TestScheduler.scala | 61 +++
[02/28] incubator-eagle git commit: [EAGLE-279] Create Documentation for Sandbox Quick starter and JMX monitring
[EAGLE-279] Create Documentation for Sandbox Quick starter and JMX monitring Create Documentation for Sandbox Quick starter and JMX monitring Author: hdendukuriCloses #159 from hdendukuri/master. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/df576452 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/df576452 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/df576452 Branch: refs/heads/master Commit: df576452f174166407dfaa7a705b7f263f932f33 Parents: 9849303 Author: hdendukuri Authored: Fri May 27 19:36:26 2016 +0800 Committer: Hao Chen Committed: Fri May 27 19:36:26 2016 +0800 -- eagle-docs/images/eagle-service.png | Bin 0 -> 449283 bytes eagle-docs/images/hbase-superuser.png | Bin 0 -> 147292 bytes eagle-docs/images/hdfs-env-conf.png | Bin 0 -> 460829 bytes eagle-docs/images/hdfs-env-conf2.png | Bin 0 -> 265131 bytes eagle-docs/images/hdfs-log4j-conf.png | Bin 0 -> 359551 bytes eagle-docs/images/new-site.png| Bin 0 -> 61032 bytes eagle-docs/images/nn-restart.png | Bin 0 -> 79477 bytes eagle-docs/images/start-storm.png | Bin 0 -> 500714 bytes eagle-docs/userguide/jmx-metric-monitoring.md | 77 eagle-docs/userguide/sandbox-quick-start.md | 140 + 10 files changed, 217 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/eagle-service.png -- diff --git a/eagle-docs/images/eagle-service.png b/eagle-docs/images/eagle-service.png new file mode 100644 index 000..c649e36 Binary files /dev/null and b/eagle-docs/images/eagle-service.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/hbase-superuser.png -- diff --git a/eagle-docs/images/hbase-superuser.png b/eagle-docs/images/hbase-superuser.png new file mode 100644 index 000..71b4a04 Binary files /dev/null and b/eagle-docs/images/hbase-superuser.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/hdfs-env-conf.png -- diff --git a/eagle-docs/images/hdfs-env-conf.png b/eagle-docs/images/hdfs-env-conf.png new file mode 100644 index 000..b1ba80e Binary files /dev/null and b/eagle-docs/images/hdfs-env-conf.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/hdfs-env-conf2.png -- diff --git a/eagle-docs/images/hdfs-env-conf2.png b/eagle-docs/images/hdfs-env-conf2.png new file mode 100644 index 000..069acee Binary files /dev/null and b/eagle-docs/images/hdfs-env-conf2.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/hdfs-log4j-conf.png -- diff --git a/eagle-docs/images/hdfs-log4j-conf.png b/eagle-docs/images/hdfs-log4j-conf.png new file mode 100644 index 000..0eade68 Binary files /dev/null and b/eagle-docs/images/hdfs-log4j-conf.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/new-site.png -- diff --git a/eagle-docs/images/new-site.png b/eagle-docs/images/new-site.png new file mode 100644 index 000..793aa18 Binary files /dev/null and b/eagle-docs/images/new-site.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/nn-restart.png -- diff --git a/eagle-docs/images/nn-restart.png b/eagle-docs/images/nn-restart.png new file mode 100644 index 000..562641f Binary files /dev/null and b/eagle-docs/images/nn-restart.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/images/start-storm.png -- diff --git a/eagle-docs/images/start-storm.png b/eagle-docs/images/start-storm.png new file mode 100644 index 000..705b60e Binary files /dev/null and b/eagle-docs/images/start-storm.png differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/df576452/eagle-docs/userguide/jmx-metric-monitoring.md -- diff --git a/eagle-docs/userguide/jmx-metric-monitoring.md b/eagle-docs/userguide/jmx-metric-monitoring.md new file
[10/28] incubator-eagle git commit: EAGLE-307 Update "logstash-kafka-conf.md" Update "logstash-kafka-conf.md"
EAGLE-307 Update "logstash-kafka-conf.md" Update "logstash-kafka-conf.md" Author: @DadanielZ Reviewer: @yonzhangCloses: #234 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/4627eb0b Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/4627eb0b Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/4627eb0b Branch: refs/heads/master Commit: 4627eb0b576dec25c8c97d57410a044dcbd6af05 Parents: 36422ea Author: yonzhang Authored: Thu Jun 16 15:06:36 2016 -0700 Committer: yonzhang Committed: Thu Jun 16 15:06:36 2016 -0700 -- .../src/main/docs/logstash-kafka-conf.md| 19 - .../src/main/resources/maprFSAuditLog-init.sh | 2 +- .../security/hdfs/MAPRFSResourceConstants.java | 24 +++ .../hdfs/rest/MAPRFSResourceWebResource.java| 73 4 files changed, 115 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4627eb0b/eagle-assembly/src/main/docs/logstash-kafka-conf.md -- diff --git a/eagle-assembly/src/main/docs/logstash-kafka-conf.md b/eagle-assembly/src/main/docs/logstash-kafka-conf.md index 9003fb4..342302b 100644 --- a/eagle-assembly/src/main/docs/logstash-kafka-conf.md +++ b/eagle-assembly/src/main/docs/logstash-kafka-conf.md @@ -120,7 +120,7 @@ The 2.0 release of Logstash includes a new version of the Kafka output plugin wi type => "hdp-nn-audit" path => "/path/to/audit.log" start_position => end -sincedb_path => "/var/log/logstash/" +sincedb_path => "/opt/logstash/sincedb.txt" } } @@ -163,7 +163,7 @@ The 2.0 release of Logstash includes a new version of the Kafka output plugin wi type => "hdp-nn-audit" path => "/path/to/audit.log" start_position => end - sincedb_path => "/var/log/logstash/" + sincedb_path => "/opt/logstash/sincedb.txt" } } @@ -196,6 +196,21 @@ The 2.0 release of Logstash includes a new version of the Kafka output plugin wi } } + +Notice: + `path => "/path/to/audit.log"` : + Here `path` can be configured to be a single string or an array. For example: +`path => [ "var/msg/example.out", /var/message/*.out", "/var/log/*.log"]` +`path => "/var/log/hadoop/hdfs/hdfs-audit.log.*"` +As you can see, we can apply regex pattern to match mutiple files. + + +`sincedb_path => "/opt/logstash/sincedb.txt"`: +`sincedb_path` must be a file writable by logstash. This file will be used by Logstash to keep track of the current position in each file. + + + + grok pattern testing We have 3 typical patterns for ugi field as follows 2015-02-11 15:00:00,000 INFO FSNamesystem.audit: allowed=true ugi=us...@xyz.com (auth:TOKEN) ip=/10.115.44.55cmd=open src=/apps/hdmi-technology/b_pulsar_coe/schema/avroschema/Session.avsc dst=nullperm=null http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4627eb0b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh -- diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh index 5f99190..19eed8d 100644 --- a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh +++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh @@ -48,7 +48,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a "alias":"MapRFSAuditLogMonitor", "groupName":"MapR", "features":["common","metadata", "classification"], - "config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"hdfsResource\"\n\t}\n}" + "config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"maprfsResource\"\n\t}\n}" } ] '
[15/28] incubator-eagle git commit: EAGLE-303. Split event fields into table in email for clearly reading. prettify alert email
EAGLE-303. Split event fields into table in email for clearly reading. prettify alert email Author: @HuizhiReviewer: @yonzhang Closes: #242 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/2eb5d538 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/2eb5d538 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/2eb5d538 Branch: refs/heads/master Commit: 2eb5d5387bb253d28259cdb714d4c68ad6f88269 Parents: b49bda1 Author: yonzhang Authored: Fri Jun 17 10:54:03 2016 -0700 Committer: yonzhang Committed: Fri Jun 17 10:54:03 2016 -0700 -- .../notification/email/AlertEmailGenerator.java | 31 +- .../notification/email/AlertEmailSender.java| 16 +- .../src/main/resources/ALERT_DEFAULT.vm | 488 ++- .../siddhi/SiddhiAlertAPIEntityRender.java | 18 +- .../src/main/resources/application.conf | 13 +- .../apache/eagle/policy/common/Constants.java | 1 + 6 files changed, 311 insertions(+), 256 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2eb5d538/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java index fd6b794..db24390 100644 --- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java +++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java @@ -41,7 +41,9 @@ public class AlertEmailGenerator{ private final static Logger LOG = LoggerFactory.getLogger(AlertEmailGenerator.class); -private final static long MAX_TIMEOUT_MS =6; +private final static long MAX_TIMEOUT_MS = 6; + +private final static String EVENT_FIELDS_SPLITTER = ","; public boolean sendAlertEmail(AlertAPIEntity entity) { return sendAlertEmail(entity, recipients, null); @@ -56,15 +58,21 @@ public class AlertEmailGenerator{ AlertEmailContext email = new AlertEmailContext(); AlertEmailComponent component = new AlertEmailComponent(); -AlertContext context = AlertContext.fromJsonString(entity.getAlertContext()); +AlertContext context = AlertContext.fromJsonString(entity.getAlertContext()); component.setAlertContext(context); +AlertEmailComponent eventComponent = getEventComponent(context); List components = new ArrayList(); components.add(component); +components.add(eventComponent); email.setComponents(components); + if (context.getProperty(Constants.SUBJECT) != null) { email.setSubject(context.getProperty(Constants.SUBJECT)); } -else email.setSubject(subject); +else { +email.setSubject(subject); +} + email.setVelocityTplFile(tplFile); email.setRecipients(recipients); email.setCc(cc); @@ -76,7 +84,7 @@ public class AlertEmailGenerator{ if(this.executorPool == null) throw new IllegalStateException("Invoking thread executor pool but it's is not set yet"); -LOG.info("Sending email in asynchronous to: "+recipients+", cc: "+cc); +LOG.info("Sending email in asynchronous to: "+ recipients +", cc: " + cc); Future future = this.executorPool.submit(thread); try { future.get(MAX_TIMEOUT_MS, TimeUnit.MILLISECONDS); @@ -135,4 +143,19 @@ public class AlertEmailGenerator{ public void setExecutorPool(ThreadPoolExecutor executorPool) { this.executorPool = executorPool; } + +private AlertEmailComponent getEventComponent(AlertContext context) { +AlertContext eventFieldsContext = new AlertContext(); +String eventFields = context.getProperty(Constants.ALERT_EVENT_FIELDS); +String[] fields = eventFields.split(EVENT_FIELDS_SPLITTER); + +for (String key : fields) { +eventFieldsContext.addProperty(key, context.getProperty(key)); +} + +AlertEmailComponent component = new AlertEmailComponent(); +component.setAlertContext(eventFieldsContext); + +return component; +} } \ No newline at end of file
[25/28] incubator-eagle git commit: add files back to make build pass
add files back to make build pass Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9d9c30cc Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9d9c30cc Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9d9c30cc Branch: refs/heads/master Commit: 9d9c30cc8198f46d4e96167cb13f0fdb1a1ef27e Parents: a044356 Author: anyway1021Authored: Mon Jul 25 17:34:55 2016 +0800 Committer: anyway1021 Committed: Mon Jul 25 17:34:55 2016 +0800 -- .../src/main/lib/tomcat/bin/bootstrap.jar | Bin 0 -> 28052 bytes .../src/main/lib/tomcat/bin/commons-daemon.jar | Bin 0 -> 24283 bytes .../src/main/lib/tomcat/bin/tomcat-juli.jar| Bin 0 -> 38222 bytes 3 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d9c30cc/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar -- diff --git a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar new file mode 100644 index 000..8f43864 Binary files /dev/null and b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d9c30cc/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar -- diff --git a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar new file mode 100644 index 000..2b6b9c6 Binary files /dev/null and b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar differ http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d9c30cc/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar -- diff --git a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar new file mode 100644 index 000..e1b80ad Binary files /dev/null and b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar differ
[01/28] incubator-eagle git commit: [EAGLE-273][EAGLE-269] Fix exceeding the maximum row size of 65, 535 bytes in mysql and comparisons between LONG_VARCHAR not supported [Forced Update!]
Repository: incubator-eagle Updated Branches: refs/heads/master 668aea0cb -> 0474d5916 (forced update) [EAGLE-273][EAGLE-269] Fix exceeding the maximum row size of 65,535 bytes in mysql and comparisons between LONG_VARCHAR not supported https://issues.apache.org/jira/browse/EAGLE-273 https://issues.apache.org/jira/browse/EAGLE-269 The problem is cause the limitation of maximum row size in mysql innodb engine, so need to keep the column size relatively small, but it will cause it can't store large field, it's a little tricky, so may have following possible solutions: * Solution One: Fix mysql innodb size to resolve the limitation. * Solution Two: Keep the field relatively small to avoid exceeding maximum row size and make sure creating table successfully, and modify field size according to actual usage (Which is the approach we take for this problem) Author: Hao ChenCloses #158 from haoch/EAGLE-273-LATEST. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9849303e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9849303e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9849303e Branch: refs/heads/master Commit: 9849303ebf8a63e4f54f0eb035c8060c43e50611 Parents: f90a0a4 Author: Hao Chen Authored: Fri May 27 19:34:32 2016 +0800 Committer: Hao Chen Committed: Fri May 27 19:34:32 2016 +0800 -- .../eagle/storage/jdbc/JdbcConstants.java | 5 ++- .../schema/JdbcEntityDefinitionManager.java | 3 +- .../jdbc/schema/JdbcEntitySchemaManager.java| 6 +-- .../eagle/storage/jdbc/TestJdbcStorage.java | 19 + .../bin/quick-start-with-external-webservice.sh | 45 .../resources/safemodecheck-policy-import.sh| 2 +- 6 files changed, 73 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9849303e/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java -- diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java index a6d0c93..ecf2845 100644 --- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java +++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java @@ -28,7 +28,10 @@ public class JdbcConstants { public static final String ROW_KEY_COLUMN_NAME = "uuid"; public static final int DEFAULT_TYPE_FOR_COMPLEX_TYPE = Types.BLOB; -public static final int DEFAULT_VARCHAR_SIZE =3; + +//MySQL Max Row Size: 21485 +public static final int DEFAULT_FIELD_VARCHAR_SIZE =1000; +public static final int DEFAULT_TAG_VARCHAR_SIZE =254; // Eagle JDBC Storage Configuration public final static String EAGLE_DB_USERNAME = "eagle.service.storage-username"; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9849303e/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java -- diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java index 15810b2..afcb31c 100644 --- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java +++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java @@ -43,7 +43,6 @@ public class JdbcEntityDefinitionManager { public static JdbcEntityDefinition getJdbcEntityDefinition(EntityDefinition entityDefinition){ checkInit(); - Class entityClass = entityDefinition.getEntityClass(); JdbcEntityDefinition jdbcEntityDefinition = sqlEntityDefinitionCache.get(entityClass); if(jdbcEntityDefinition == null){ @@ -150,7 +149,7 @@ public class JdbcEntityDefinitionManager { // Intially bind basic java types with SQL types // static { -registerJdbcType(String.class, Types.LONGVARCHAR); +registerJdbcType(String.class, Types.VARCHAR); registerJdbcType(Integer.class, Types.INTEGER); registerJdbcType(Double.class, Types.DOUBLE);
[18/28] incubator-eagle git commit: Eagle 352 make necessary changes for preparing 0.4.0 release candidate 2 Change for 0.4.0 rc2
Eagle 352 make necessary changes for preparing 0.4.0 release candidate 2 Change for 0.4.0 rc2 Author: Michael, WuReviewer: Edward Zhang Closes: #249 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/23d3ca60 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/23d3ca60 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/23d3ca60 Branch: refs/heads/master Commit: 23d3ca604a37ccb89d7a95e5c75cfba651673b2a Parents: 73c8e02 Author: yonzhang Authored: Tue Jul 5 13:57:45 2016 -0700 Committer: yonzhang Committed: Tue Jul 5 13:57:45 2016 -0700 -- CHANGELOG.txt | 215 +++- README.md | 10 +- eagle-docs/images/asf_logo.svg | 16 ++ eagle-webservice/src/main/webapp/README.md | 19 +++ pom.xml| 114 ++--- 5 files changed, 312 insertions(+), 62 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/23d3ca60/CHANGELOG.txt -- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a2d84fc..657e31d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ -Release Notes - Eagle - Version v0.4.0 +Release Notes - Apache Eagle 0.4.0 (incubating) ** Highlights ** * JBDC Metadata Storage Extension @@ -111,4 +111,215 @@ Release Notes - Eagle - Version v0.4.0 * [EAGLE-309] - Add code formatter template ** Sub-task -* [EAGLE-219] - Use PUT method for updating request when possible in front-end. \ No newline at end of file +* [EAGLE-219] - Use PUT method for updating request when possible in front-end. + + + +Release Notes - Apache Eagle 0.3.1 (incubating) + +** Highlights ** +* Hadoop JMX metric monitoring. +* NameNode log monitoring for GC alerts. +* Eagle UI Modularization (With new customizable UI options). +* Generic Notification Plugin Framework for integrating alerts with various third parties. +* Docker Image for Eagle. +* Provide analytic DSL support. + +** New Feature +* [EAGLE-15] - HBase auditlog integration for HBase security monitoring +* [EAGLE-17] - HDFS security log integration for HDFS security monitoring +* [EAGLE-46] - track the work before moving code to apache site +* [EAGLE-47] - Ability to audit who made changes to Eagle policies +* [EAGLE-53] - Docker Image for Eagle +* [EAGLE-79] - Provide analytic DSL support +* [EAGLE-81] - Notification Plugin Framework +* [EAGLE-100] - provide tools to collect hadoop jmx metrics +* [EAGLE-122] - Create a generic notification plugin for integrating alerts + +** Bug +* [EAGLE-4] - configure parallelism with bolt/spout friendly name +* [EAGLE-6] - group-by user between bolts and spouts for hdfs/hive audit log monitoring +* [EAGLE-10] - Bad way to check kafka installation in eagle-check-env.sh +* [EAGLE-28] - Znode root should be configurable. +* [EAGLE-30] - Topology run in storm local mode should not terminate after Integer.MAX_VALUE milliseconds +* [EAGLE-41] - Eagle policy engine supports customizable ExceptionHandler instead of using FetalExceptionHandler +* [EAGLE-48] - Alert message time is wrong in some cases +* [EAGLE-56] - Building failed for artifact jdk.tools:jdk.tools:jar:1.7 not found +* [EAGLE-69] - http 404 bug in accessing http://localhost:9099/eagle-service +* [EAGLE-70] - Fix Goovy into Groovy in pom +* [EAGLE-74] - in sandbox setup, change package name from eagle. to org.apache.eagle +* [EAGLE-76] - Disable creating newStream for common user role +* [EAGLE-85] - Fix unit test failure. +* [EAGLE-94] - fix the bug of eagle docker in Mac +* [EAGLE-95] - DAM HDFS topology fails to start, if there is invalid policy. +* [EAGLE-104] - Fix the unit test TestHDFSSecuritylogParser +* [EAGLE-118] - Siddhi contains is neither a function extension nor an aggregated attribute extension +* [EAGLE-119] - fix unit testing bugs +* [EAGLE-125] - Add LICENSE in eagle external +* [EAGLE-128] - Fix unit test failure +* [EAGLE-141] - fix some unit testing exception which is thrown within annoymous class +* [EAGLE-142] - Replace AlertDefinitionDAOImpl with PolicyDefinitionDAOImpl +* [EAGLE-148] - Master build failure due to siddhi ql test +* [EAGLE-163] - HDFS topology not working. + +** Improvement +* [EAGLE-7] - expose storm config as individual eagle topology config +* [EAGLE-13] - Eagle machine learning no longer needs hourly aggregation +* [EAGLE-14] - Re-assemble high level hdfs commands for
[04/28] incubator-eagle git commit: EAGLE-309: Add code formatter template
EAGLE-309: Add code formatter template Author: ralphsu Reviewer: ralphsu Committer: ralphsu Closes #199 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/5a5a17c3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/5a5a17c3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/5a5a17c3 Branch: refs/heads/master Commit: 5a5a17c3dff1e15bf72df267f8b2fc0739b95114 Parents: 750b4c9 Author: Ralph, SuAuthored: Wed May 25 18:07:20 2016 +0800 Committer: Ralph, Su Committed: Tue May 31 15:34:38 2016 +0800 -- eagle-dev/eclipse-java-formatter.xml | 311 ++ 1 file changed, 311 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5a5a17c3/eagle-dev/eclipse-java-formatter.xml -- diff --git a/eagle-dev/eclipse-java-formatter.xml b/eagle-dev/eclipse-java-formatter.xml new file mode 100755 index 000..2ca80f2 --- /dev/null +++ b/eagle-dev/eclipse-java-formatter.xml @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[23/28] incubator-eagle git commit: [EAGLE-367] update CHANGELOG.txt appending bug-info of: EAGLE-355, EAGLE-356
[EAGLE-367] update CHANGELOG.txt appending bug-info of: EAGLE-355, EAGLE-356 Author: anyway1021Closes #259 from anyway1021/EAGLE-367. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/eac0f279 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/eac0f279 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/eac0f279 Branch: refs/heads/master Commit: eac0f27958f2ed8c6842938dad0a995a87fd0715 Parents: 9cd75b1 Author: anyway1021 Authored: Mon Jul 11 15:21:16 2016 +0800 Committer: anyway1021 Committed: Mon Jul 11 16:54:52 2016 +0800 -- CHANGELOG.txt | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/eac0f279/CHANGELOG.txt -- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 657e31d..42072bb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -102,6 +102,8 @@ Release Notes - Apache Eagle 0.4.0 (incubating) * [EAGLE-330] - Hive ql.Parser can't parser a hive query sql with keywords * [EAGLE-338] - fix topology-assembly build issue because of module name change * [EAGLE-346] - ClassNotFoundException thrown out when topology is executing +* [EAGLE-355] - UI advanced policy expression can't parse +* [EAGLE-356] - Fix Authentication problem to query resource manager web service ** Task * [EAGLE-73] - Put docker steps to site tutorial
[16/28] incubator-eagle git commit: EAGLE-346: ClassNotFoundException ClassNotFoundException thrown out when topology is executing
EAGLE-346: ClassNotFoundException ClassNotFoundException thrown out when topology is executing Author: @qingwen Reviewer: @yonzhang Closes: #244 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3823c019 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3823c019 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3823c019 Branch: refs/heads/master Commit: 3823c019c8993608085989b27edbd67539ba4acb Parents: 2eb5d53 Author: yonzhangAuthored: Fri Jun 17 11:04:08 2016 -0700 Committer: yonzhang Committed: Fri Jun 17 11:04:08 2016 -0700 -- eagle-assembly/src/assembly/eagle-bin.xml | 1 + eagle-security/eagle-security-oozie-web/pom.xml | 2 +- pom.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3823c019/eagle-assembly/src/assembly/eagle-bin.xml -- diff --git a/eagle-assembly/src/assembly/eagle-bin.xml b/eagle-assembly/src/assembly/eagle-bin.xml index c4a8e10..aecc327 100644 --- a/eagle-assembly/src/assembly/eagle-bin.xml +++ b/eagle-assembly/src/assembly/eagle-bin.xml @@ -174,6 +174,7 @@ WEB-INF/lib/jsp-api-*.jar +WEB-INF/lib/slf4j-simple-*.jar WEB-INF/lib/slf4j-log4j12-*.jar WEB-INF/lib/*-tests.jar WEB-INF/lib/hadoop-mapreduce-*.jar http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3823c019/eagle-security/eagle-security-oozie-web/pom.xml -- diff --git a/eagle-security/eagle-security-oozie-web/pom.xml b/eagle-security/eagle-security-oozie-web/pom.xml index ac11b7c..3cbac74 100644 --- a/eagle-security/eagle-security-oozie-web/pom.xml +++ b/eagle-security/eagle-security-oozie-web/pom.xml @@ -67,7 +67,7 @@ org.apache.oozie oozie-client -4.1.0 +${oozie.version} org.powermock http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3823c019/pom.xml -- diff --git a/pom.xml b/pom.xml index 49c2971..4f967f0 100755 --- a/pom.xml +++ b/pom.xml @@ -164,6 +164,7 @@ 2.6.0.2.2.5.1-3 0.98.4.2.2.5.1-3-hadoop2 1.2.1 +4.1.0 1.2.0-mapr-1510 2.7.0-mapr-1506
[09/28] incubator-eagle git commit: EAGLE-340 refactor bin/eagle-sandbox-starter.sh to make it easier to use refactor bin/eagle-sandbox-starter.sh to make it easier to use
EAGLE-340 refactor bin/eagle-sandbox-starter.sh to make it easier to use refactor bin/eagle-sandbox-starter.sh to make it easier to use Author: @qingwen220Reviewer: @yonzhang Closes: #237 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/36422ea8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/36422ea8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/36422ea8 Branch: refs/heads/master Commit: 36422ea81da6e4c158fcac1e02d3cb9798bf6486 Parents: 8f12f82 Author: yonzhang Authored: Thu Jun 16 14:55:59 2016 -0700 Committer: yonzhang Committed: Thu Jun 16 14:55:59 2016 -0700 -- .../src/main/examples/eagle-sandbox-starter.sh | 61 ++-- .../sample-sensitivity-resource-create.sh | 2 + .../src/main/resources/application.conf | 23 3 files changed, 19 insertions(+), 67 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/36422ea8/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh -- diff --git a/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh b/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh index 286bc87..4a05a77 100644 --- a/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh +++ b/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh @@ -15,6 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This script will start Eagle service with storage Derby, +# and a sample application HiveQueryLog monitoring + source $(dirname $0)/../bin/eagle-env.sh eagle_bin=$EAGLE_HOME/bin @@ -29,41 +32,6 @@ $eagle_bin/eagle-check-env.sh pid_dir=/var/run -# Check HBase if it has been started -hbase_master_pid=${pid_dir}/hbase/hbase-hbase-master.pid -hbase_regionserver_pid=${pid_dir}/hbase/hbase-hbase-regionserver.pid -echo "Checking if hbase is running ..." - -if [ -f $hbase_master_pid ] && \ - ps aux | grep -v grep | grep $(cat $hbase_master_pid) > /dev/null -then - echo "HBase Master is running as process `cat $hbase_master_pid`." -else - echo "Error: HBase Master is not running. Please start it via Ambari." - exit 1 -fi - -if [ -f $hbase_regionserver_pid ] && \ - ps aux | grep -v grep | grep $(cat $hbase_regionserver_pid) > /dev/null -then - echo "HBase RegionServer is running as process `cat $hbase_regionserver_pid`." -else - echo "Error: HBase RegionServer is not running. Please start it via Ambari." - exit 1 -fi - -# Check kafka if it has been started -kafka_pid=$pid_dir/kafka/kafka.pid -echo "Checking if kafka is running ..." - -if [ -f $kafka_pid ] && ps aux | grep -v grep | grep $(cat $kafka_pid) > /dev/null -then - echo "Kafka is running as process `cat $kafka_pid`." -else - echo "Error: Kafka is not running. Please start it via Ambari." - exit 1 -fi - # Check storm if it has been started nimbus_pid=$pid_dir/storm/nimbus.pid supervisor_pid=$pid_dir/storm/supervisor.pid @@ -104,33 +72,14 @@ $eagle_bin/eagle-service.sh start ### echo "STEP [3/3]: start eagle topology" -$eagle_bin/eagle-service-init.sh -[ $? != 0 ] && exit 1 -echo "Creating kafka topics for eagle ... " -KAFKA_HOME=/usr/hdp/current/kafka-broker -EAGLE_ZOOKEEPER_QUORUM=localhost:2181 -topic=`${KAFKA_HOME}/bin/kafka-topics.sh --list --zookeeper $EAGLE_ZOOKEEPER_QUORUM --topic sandbox_hdfs_audit_log` -if [ -z $topic ]; then - $KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $EAGLE_ZOOKEEPER_QUORUM --replication-factor 1 --partitions 1 --topic sandbox_hdfs_audit_log -fi - -if [ $? = 0 ]; then -echo "==> Create kafka topic successfully for eagle" -else -echo "==> Failed, exiting" -exit 1 -fi $eagle_bin/eagle-topology-init.sh [ $? != 0 ] && exit 1 ${EAGLE_HOME}/examples/sample-sensitivity-resource-create.sh [ $? != 0 ] && exit 1 ${EAGLE_HOME}/examples/sample-policy-create.sh [ $? != 0 ] && exit 1 -$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.auditlog.HdfsAuditLogProcessorMain --config ${EAGLE_HOME}/conf/sandbox-hdfsAuditLog-application.conf start -[ $? != 0 ] && exit 1 + $eagle_bin/eagle-topology.sh --main org.apache.eagle.security.hive.jobrunning.HiveJobRunningMonitoringMain --config ${EAGLE_HOME}/conf/sandbox-hiveQueryLog-application.conf start -[ $? != 0 ] && exit 1 -$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.userprofile.UserProfileDetectionMain --config ${EAGLE_HOME}/conf/sandbox-userprofile-topology.conf start -[ $? != 0 ] && exit 1 +
[03/28] incubator-eagle git commit: EAGLE 304: Enable Advanced dedup configuration in policy definition
EAGLE 304: Enable Advanced dedup configuration in policy definition Author: Zhao, Qingwen & Jiang, jilin Reviewer: Chen, Hao Date: Thu May 26 20:12:12 2016 +0800 Closes #209 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/750b4c9a Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/750b4c9a Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/750b4c9a Branch: refs/heads/master Commit: 750b4c9a87732b9f69a83e908a819d174554745d Parents: ffd5fdd Author: Zhao, QingwenAuthored: Mon May 30 15:49:48 2016 +0800 Committer: Zhao, Qingwen Committed: Mon May 30 15:49:48 2016 +0800 -- .../eagle/alert/config/DeduplicatorConfig.java | 17 -- .../dedup/AlertDeduplicationExecutorBase.java | 22 +++ .../eagle/alert/dedup/DefaultDeduplicator.java | 50 ++-- .../eagle/alert/dedup/EntityDedupKey.java | 62 .../eagle/alert/dedup/EntityDeduplicator.java | 9 ++- .../eagle/alert/config/TestAlertDedup.java | 6 +- .../TestSiddhiStateSnapshotAndRestore.java | 2 +- .../src/main/resources/application.conf | 1 - .../app/public/feature/common/controller.js | 12 +++- 9 files changed, 132 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java index 584abc7..1e65408 100644 --- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java +++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java @@ -17,21 +17,26 @@ package org.apache.eagle.alert.config; import java.io.Serializable; +import java.util.List; public class DeduplicatorConfig implements Serializable{ private static final long serialVersionUID = 1L; + + private int alertDedupIntervalMin; + private List fields; + public int getAlertDedupIntervalMin() { return alertDedupIntervalMin; } + public void setAlertDedupIntervalMin(int alertDedupIntervalMin) { this.alertDedupIntervalMin = alertDedupIntervalMin; } - public int getEmailDedupIntervalMin() { - return emailDedupIntervalMin; + public List getFields() { + return fields; } - public void setEmailDedupIntervalMin(int emailDedupIntervalMin) { - this.emailDedupIntervalMin = emailDedupIntervalMin; + + public void setFields(List fields) { + this.fields = fields; } - private int alertDedupIntervalMin; - private int emailDedupIntervalMin; } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/750b4c9a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java index 051df33..25e5cff 100644 --- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java +++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java @@ -46,7 +46,7 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec protected DEDUP_TYPE dedupType; private List alertExecutorIdList; - private volatile CopyOnWriteHashMap alertDedups; + private volatile CopyOnWriteHashMap alertDedups; private PolicyDefinitionDAO dao; public enum DEDUP_TYPE { @@ -65,21 +65,17 @@ public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExec this.config = config; } - public DefaultDeduplicator createAlertDedup(AlertDefinitionAPIEntity alertDef) { + public DefaultDeduplicator createAlertDedup(AlertDefinitionAPIEntity alertDef) { DeduplicatorConfig dedupConfig = null; try {
[26/28] incubator-eagle git commit: fix typo in files
fix typo in files Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a6ac616e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a6ac616e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a6ac616e Branch: refs/heads/master Commit: a6ac616e40d8cfec817d30bb7097277fb29ed84f Parents: 9d9c30c Author: anyway1021Authored: Thu Jul 28 09:56:43 2016 +0800 Committer: anyway1021 Committed: Thu Jul 28 09:56:43 2016 +0800 -- .../eagle-stream-pipeline/src/test/resources/pipeline_3.conf | 2 +- eagle-docs/tutorial/application_manager_tutorial.md| 2 +- .../security/hdfs/test/HDFSResourceAccessConfigTest.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a6ac616e/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf -- diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf index b1c1955..9dc7ce3 100644 --- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf +++ b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf @@ -34,7 +34,7 @@ "site" : "sandbox" "application": "HADOOP" "dataJoinPollIntervalSec" : 30 - "mailHost" : "atom.corp.ebay.com" + "mailHost" : "some.mail.server" "mailSmtpPort":"25" "mailDebug" : "true" "eagleService": { http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a6ac616e/eagle-docs/tutorial/application_manager_tutorial.md -- diff --git a/eagle-docs/tutorial/application_manager_tutorial.md b/eagle-docs/tutorial/application_manager_tutorial.md index 0e342c5..d2a5eba 100644 --- a/eagle-docs/tutorial/application_manager_tutorial.md +++ b/eagle-docs/tutorial/application_manager_tutorial.md @@ -95,7 +95,7 @@ Note: these configurations can be overridden in the topology configurations, whi app.eagleProps.site=sandbox app.eagleProps.application=hbaseSecurityLog app.eagleProps.dataJoinPollIntervalSec=30 - app.eagleProps.mailHost=atom.corp.ebay.com + app.eagleProps.mailHost=some.mail.server app.eagleProps.mailSmtpPort=25 app.eagleProps.mailDebug=true app.eagleProps.eagleService.host=localhost http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a6ac616e/eagle-security/eagle-security-hdfs-web/src/test/java/org/apache/eagle/service/security/hdfs/test/HDFSResourceAccessConfigTest.java -- diff --git a/eagle-security/eagle-security-hdfs-web/src/test/java/org/apache/eagle/service/security/hdfs/test/HDFSResourceAccessConfigTest.java b/eagle-security/eagle-security-hdfs-web/src/test/java/org/apache/eagle/service/security/hdfs/test/HDFSResourceAccessConfigTest.java index f046d0a..a5cfa03 100644 --- a/eagle-security/eagle-security-hdfs-web/src/test/java/org/apache/eagle/service/security/hdfs/test/HDFSResourceAccessConfigTest.java +++ b/eagle-security/eagle-security-hdfs-web/src/test/java/org/apache/eagle/service/security/hdfs/test/HDFSResourceAccessConfigTest.java @@ -26,15 +26,15 @@ public class HDFSResourceAccessConfigTest { @Test public void testHDFSResourceAccessConfig() throws Exception { - String configStr = "{\"fs.defaultFS\":\"hdfs://sandbox-nn-ha\",\"dfs.nameservices\":\"sandbox-nn-ha\",\"dfs.ha.namenodes.sandbox-nn-ha\":\"nn1,nn2\",\"dfs.namenode.rpc-address.sandbox-nn-ha.nn1\":\"sandbox-nn.vip.ebay.com:8020\",\"dfs.namenode.rpc-address.sandbox-nn-ha.nn2\":\"sandbox-nn-2.vip.ebay.com:8020\",\"dfs.client.failover.proxy.provider.sandbox-nn-ha\":\"org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider\",\"hadoop.security.authentication\":\"kerberos\",\"dfs.namenode.kerberos.principal\":\"hadoop/_h...@example.com\"}"; + String configStr =
[21/28] incubator-eagle git commit: [EAGLE-355] fix advanced sql parse logic
[EAGLE-355] fix advanced sql parse logic Adjust the logic of expression parse Author: jiljiangCloses #251 from zombieJ/branch-0.4. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/2f901888 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/2f901888 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/2f901888 Branch: refs/heads/master Commit: 2f9018881fc29a6cefd557352d8d436770bfa1fb Parents: 6a3f152 Author: jiljiang Authored: Mon Jul 11 16:43:57 2016 +0800 Committer: anyway1021 Committed: Mon Jul 11 16:43:57 2016 +0800 -- .../main/webapp/app/public/feature/common/controller.js | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2f901888/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js -- diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js index b23d53b..e926e36 100644 --- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js +++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js @@ -644,15 +644,16 @@ // >> Parse expression $scope.policy.__.conditions = {}; var _condition = _policyUnit.expression.match(/from\s+(\w+)(\[(.*)])?(#window[^\)]*\))?\s+(select (\w+, )?(\w+)\((\w+)\) as [\w\d_]+ (group by (\w+) )?having ([\w\d_]+) ([<>=]+) ([^\s]+))?/); + var _cond_stream, _cond_query, _cond_window, _cond_group, _cond_groupUnit; if(!_condition) { $scope.policy.__.advanced = true; } else { - var _cond_stream = _condition[1]; - var _cond_query = _condition[3] || ""; - var _cond_window = _condition[4]; - var _cond_group = _condition[5]; - var _cond_groupUnit = _condition.slice(7,14); + _cond_stream = _condition[1]; + _cond_query = _condition[3] || ""; + _cond_window = _condition[4]; + _cond_group = _condition[5]; + _cond_groupUnit = _condition.slice(7,14); // > StreamName var _streamName = _cond_stream;
[13/28] incubator-eagle git commit: EAGLE-319 modify java to jdbc data type modify java to jdbc data type mapping to be compatible with derby DB
EAGLE-319 modify java to jdbc data type modify java to jdbc data type mapping to be compatible with derby DB Author: Michael Reviewer: Edward Closes: #222 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/35535289 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/35535289 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/35535289 Branch: refs/heads/master Commit: 3553528990c7df136ca1fc24806e58e081e66138 Parents: f5b3102 Author: yonzhangAuthored: Thu Jun 16 15:24:26 2016 -0700 Committer: yonzhang Committed: Thu Jun 16 15:24:26 2016 -0700 -- .../eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/35535289/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java -- diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java index b98d881..d9b29aa 100644 --- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java +++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java @@ -150,7 +150,7 @@ public class JdbcEntityDefinitionManager { // Initially bind basic java types with SQL types // static { -registerJdbcType(String.class, Types.LONGVARCHAR); +registerJdbcType(String.class, Types.VARCHAR); registerJdbcType(Integer.class, Types.INTEGER); registerJdbcType(Double.class, Types.DOUBLE); registerJdbcType(Float.class, Types.FLOAT);
[20/28] incubator-eagle git commit: [EAGLE-355] fix advanced sql parse logic
[EAGLE-355] fix advanced sql parse logic Adjust the logic of expression parse Author: jiljiangCloses #251 from zombieJ/branch-0.4. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/6a3f152b Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/6a3f152b Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/6a3f152b Branch: refs/heads/master Commit: 6a3f152b3a5e44803f19592da6ce7f284232b37a Parents: f76a972 Author: jiljiang Authored: Thu Jul 7 15:21:10 2016 +0800 Committer: Hao Chen Committed: Thu Jul 7 15:21:10 2016 +0800 -- .../main/webapp/app/public/feature/common/controller.js | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/6a3f152b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js -- diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js index 72af7eb..b23d53b 100644 --- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js +++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js @@ -644,15 +644,16 @@ // >> Parse expression $scope.policy.__.conditions = {}; var _condition = _policyUnit.expression.match(/from\s+(\w+)(\[(.*)])?(#window[^\)]*\))?\s+(select (\w+, )?(\w+)\((\w+)\) as [\w\d_]+ (group by (\w+) )?having ([\w\d_]+) ([<>=]+) ([^\s]+))?/); - var _cond_stream = _condition[1]; - var _cond_query = _condition[3] || ""; - var _cond_window = _condition[4]; - var _cond_group = _condition[5]; - var _cond_groupUnit = _condition.slice(7,14); if(!_condition) { $scope.policy.__.advanced = true; } else { + var _cond_stream = _condition[1]; + var _cond_query = _condition[3] || ""; + var _cond_window = _condition[4]; + var _cond_group = _condition[5]; + var _cond_groupUnit = _condition.slice(7,14); + // > StreamName var _streamName = _cond_stream; var _cond = _cond_query;
[19/28] incubator-eagle git commit: [EAGLE-356] Fix Authentication problem to query resource manager web service
[EAGLE-356] Fix Authentication problem to query resource manager web service Author: Hao ChenCloses #252 from haoch/patch-1. (cherry picked from commit d750501242df6be408ace4baa50286ae948bfea4) Signed-off-by: Hao Chen Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f76a9724 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f76a9724 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f76a9724 Branch: refs/heads/master Commit: f76a972481075417d0511d126124021ae316821d Parents: 23d3ca6 Author: Hao Chen Authored: Thu Jul 7 15:18:40 2016 +0800 Committer: Hao Chen Committed: Thu Jul 7 15:19:19 2016 +0800 -- eagle-external/hadoop_jmx_collector/metric_collector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f76a9724/eagle-external/hadoop_jmx_collector/metric_collector.py -- diff --git a/eagle-external/hadoop_jmx_collector/metric_collector.py b/eagle-external/hadoop_jmx_collector/metric_collector.py index 939b811..39920b3 100644 --- a/eagle-external/hadoop_jmx_collector/metric_collector.py +++ b/eagle-external/hadoop_jmx_collector/metric_collector.py @@ -162,7 +162,7 @@ class YarnWSReader: self.https = https def read_cluster_info(self): -cluster_info = Helper.http_get(self.host, self.port, self.https, "/ws/v1/cluster/info") +cluster_info = Helper.http_get(self.host, self.port, self.https, "/ws/v1/cluster/info?anonymous=true") logging.debug(cluster_info) return json.loads(cluster_info) @@ -351,4 +351,4 @@ class JmxMetricListener: pass def on_metric(self, metric): -pass \ No newline at end of file +pass
incubator-eagle git commit: Minor: set task number of UnitTopologyRunner
Repository: incubator-eagle Updated Branches: refs/heads/master 6dbdb4f72 -> 668aea0cb Minor: set task number of UnitTopologyRunner Author: Zhao, QingwenCloses #527 from qingwen220/quickFix. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/668aea0c Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/668aea0c Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/668aea0c Branch: refs/heads/master Commit: 668aea0cb6f8cea6d102faa95b2f5af9cbea791f Parents: 6dbdb4f Author: Zhao, Qingwen Authored: Wed Oct 19 10:29:50 2016 +0800 Committer: Zhao, Qingwen Committed: Wed Oct 19 10:29:50 2016 +0800 -- .../org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/668aea0c/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java index ec129fe..88cfb9b 100755 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/UnitTopologyRunner.java @@ -185,13 +185,13 @@ public class UnitTopologyRunner { * TODO potentially one route bolt may have multiple tasks, so that is field grouping by groupby fields * that means we need a separate field to become groupby field */ -builder.setBolt(boltName, routerBolts[i]).fieldsGrouping(spoutName, streamId, new Fields()); +builder.setBolt(boltName, routerBolts[i]).fieldsGrouping(spoutName, streamId, new Fields()).setNumTasks(1); } // connect router bolt and alert bolt, also define output streams for downstreaming alert publish bolt for (int i = 0; i < numOfAlertBolts; i++) { String boltName = alertBoltNamePrefix + i; -BoltDeclarer boltDeclarer = builder.setBolt(boltName, alertBolts[i]); +BoltDeclarer boltDeclarer = builder.setBolt(boltName, alertBolts[i]).setNumTasks(1); for (int j = 0; j < numOfRouterBolts; j++) { String streamId = StreamIdConversion.generateStreamIdBetween(streamRouterBoltNamePrefix + j, boltName); boltDeclarer.fieldsGrouping(streamRouterBoltNamePrefix + j, streamId, new Fields());
incubator-eagle git commit: [MINOR] Set task number of each bolt in HdfsAuditLog Application
Repository: incubator-eagle Updated Branches: refs/heads/master 473496747 -> 3d6a29ec2 [MINOR] Set task number of each bolt in HdfsAuditLog Application If not set, the task number of all bolts are 8 Author: Zhao, QingwenCloses #521 from qingwen220/quickFix. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3d6a29ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3d6a29ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3d6a29ec Branch: refs/heads/master Commit: 3d6a29ec2e67a83742158a08d378cfc5cad59814 Parents: 4734967 Author: Zhao, Qingwen Authored: Mon Oct 17 22:45:19 2016 +0800 Committer: Zhao, Qingwen Committed: Mon Oct 17 22:45:19 2016 +0800 -- .../auditlog/AbstractHdfsAuditLogApplication.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3d6a29ec/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/AbstractHdfsAuditLogApplication.java -- diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/AbstractHdfsAuditLogApplication.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/AbstractHdfsAuditLogApplication.java index b985daf..b9f480b 100644 --- a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/AbstractHdfsAuditLogApplication.java +++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/AbstractHdfsAuditLogApplication.java @@ -59,11 +59,11 @@ public abstract class AbstractHdfsAuditLogApplication extends StormApplication { int numOfIPZoneJoinTasks = config.getInt(IPZONE_JOIN_TASK_NUM); int numOfSinkTasks = config.getInt(SINK_TASK_NUM); -builder.setSpout("ingest", spout, numOfSpoutTasks); +builder.setSpout("ingest", spout, numOfSpoutTasks).setNumTasks(numOfSpoutTasks); BaseRichBolt parserBolt = getParserBolt(); -BoltDeclarer boltDeclarer = builder.setBolt("parserBolt", parserBolt, numOfParserTasks); +BoltDeclarer boltDeclarer = builder.setBolt("parserBolt", parserBolt, numOfParserTasks).setNumTasks(numOfParserTasks); Boolean useDefaultPartition = !config.hasPath("eagleProps.useDefaultPartition") || config.getBoolean("eagleProps.useDefaultPartition"); if(useDefaultPartition){ @@ -73,15 +73,15 @@ public abstract class AbstractHdfsAuditLogApplication extends StormApplication { } HdfsSensitivityDataEnrichBolt sensitivityDataJoinBolt = new HdfsSensitivityDataEnrichBolt(config); -BoltDeclarer sensitivityDataJoinBoltDeclarer = builder.setBolt("sensitivityJoin", sensitivityDataJoinBolt, numOfSensitivityJoinTasks); +BoltDeclarer sensitivityDataJoinBoltDeclarer = builder.setBolt("sensitivityJoin", sensitivityDataJoinBolt, numOfSensitivityJoinTasks).setNumTasks(numOfSensitivityJoinTasks); sensitivityDataJoinBoltDeclarer.fieldsGrouping("parserBolt", new Fields("f1")); IPZoneDataEnrichBolt ipZoneDataJoinBolt = new IPZoneDataEnrichBolt(config); -BoltDeclarer ipZoneDataJoinBoltDeclarer = builder.setBolt("ipZoneJoin", ipZoneDataJoinBolt, numOfIPZoneJoinTasks); +BoltDeclarer ipZoneDataJoinBoltDeclarer = builder.setBolt("ipZoneJoin", ipZoneDataJoinBolt, numOfIPZoneJoinTasks).setNumTasks(numOfIPZoneJoinTasks); ipZoneDataJoinBoltDeclarer.fieldsGrouping("sensitivityJoin", new Fields("user")); StormStreamSink sinkBolt = environment.getStreamSink("hdfs_audit_log_stream",config); -BoltDeclarer kafkaBoltDeclarer = builder.setBolt("kafkaSink", sinkBolt, numOfSinkTasks); +BoltDeclarer kafkaBoltDeclarer = builder.setBolt("kafkaSink", sinkBolt, numOfSinkTasks).setNumTasks(numOfSinkTasks); kafkaBoltDeclarer.fieldsGrouping("ipZoneJoin", new Fields("user")); return builder.createTopology();
incubator-eagle git commit: [MINOR] update AlertUnitTopologyAppProvider.xml
Repository: incubator-eagle Updated Branches: refs/heads/master f3204bcaf -> e6f9d1bbd [MINOR] update AlertUnitTopologyAppProvider.xml Author: Zhao, QingwenCloses #507 from qingwen220/quickFix. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/e6f9d1bb Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/e6f9d1bb Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/e6f9d1bb Branch: refs/heads/master Commit: e6f9d1bbd6894c31b60bec4d23f42da07e6fe713 Parents: f3204bc Author: Zhao, Qingwen Authored: Fri Oct 14 15:36:28 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Oct 14 15:36:28 2016 +0800 -- ...g.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e6f9d1bb/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml index bf22123..8e386be 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-app/src/main/resources/META-INF/providers/org.apache.eagle.alert.app.AlertUnitTopologyAppProvider.xml @@ -25,10 +25,10 @@ -topology.numOfTotalWorkers -topology.numOfTotalWorkers -2 -number of total storm workers +workers +workers +1 +number of topology workers topology.numOfSpoutTasks
[1/3] incubator-eagle git commit: [EAGLE-545] hdfs/bhase/yarn topology health check
Repository: incubator-eagle Updated Branches: refs/heads/master 8ba1b844c -> 9e8737705 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9e873770/eagle-topology-check/eagle-topology-app/src/test/java/org/apache/eagle/topology/TestJsonParser.java -- diff --git a/eagle-topology-check/eagle-topology-app/src/test/java/org/apache/eagle/topology/TestJsonParser.java b/eagle-topology-check/eagle-topology-app/src/test/java/org/apache/eagle/topology/TestJsonParser.java new file mode 100644 index 000..a708a2d --- /dev/null +++ b/eagle-topology-check/eagle-topology-app/src/test/java/org/apache/eagle/topology/TestJsonParser.java @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.topology; + +import org.apache.eagle.topology.entity.JournalNodeServiceAPIEntity; +import org.apache.eagle.topology.utils.EntityBuilderHelper; +import org.json.JSONArray; +import org.json.JSONObject; +import org.junit.Assert; +import org.junit.Test; + +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class TestJsonParser { + +@Test +public void test1() { +String jnInfoString = "{\"LastAppliedOrWrittenTxId\":\"71349818863\",\"MostRecentCheckpointTxId\":\"71337509096\"}"; +JSONObject jsonObject = new JSONObject(jnInfoString); +String lastTxId = jsonObject.getString("LastAppliedOrWrittenTxId"); +Assert.assertTrue(lastTxId.equals("71349818863")); +} + +@Test +public void test2() throws UnknownHostException { +String journalnodeString = "[{\"stream\":\"Writing segment beginning at txid 71349604348. \\n192.168.201.0:8485 (Written txid 71349818862), 192.168.201.1:8485 (Written txid 71349818862), 192.168.201.2:8485 (Written txid 71349818862), 192.168.201.3:8485 (Written txid 71349818862), 192.168.201.4:8485 (Written txid 71349818862)\",\"manager\":\"QJM to [192.168.201.0:8485, 192.168.201.1:8485, 192.168.201.3:8485, 192.168.201.4:8485, 192.168.201.5:8485]\",\"required\":\"true\",\"disabled\":\"false\"},{\"stream\":\"EditLogFileOutputStream(/hadoop/nn1/1/current/edits_inprogress_71349604348)\",\"manager\":\"FileJournalManager(root=/hadoop/nn1/1)\",\"required\":\"false\",\"disabled\":\"false\"}]"; +JSONArray jsonArray = new JSONArray(journalnodeString); +Assert.assertTrue(jsonArray.length() == 2); + +JSONObject jsonMap = (JSONObject) jsonArray.get(0); +String QJM = jsonMap.getString("manager"); +Assert.assertTrue(QJM.equals("QJM to [192.168.201.0:8485, 192.168.201.1:8485, 192.168.201.3:8485, 192.168.201.4:8485, 192.168.201.5:8485]")); + +String STATUS_pattern = "([\\d\\.]+):\\d+\\s+\\([\\D]+(\\d+)\\)"; +String QJM_pattern = "([\\d\\.]+):\\d+"; + +String stream = jsonMap.getString("stream"); + +Pattern status = Pattern.compile(STATUS_pattern); +Matcher statusMatcher = status.matcher(stream); +List entities = new ArrayList<>(); +while (statusMatcher.find()) { +JournalNodeServiceAPIEntity entity = new JournalNodeServiceAPIEntity(); +entity.setTags(new HashMap<>()); +entity.getTags().put(TopologyConstants.HOSTNAME_TAG, statusMatcher.group(1)); +entity.setWrittenTxidDiff(Long.parseLong(statusMatcher.group(2))); +entities.add(entity); +} +Assert.assertTrue(entities.size() == 5); + +Pattern qjm = Pattern.compile(QJM_pattern); +Matcher jpmMatcher = qjm.matcher(QJM); +List hosts = new ArrayList<>(); +while (jpmMatcher.find()) { + hosts.add(EntityBuilderHelper.resolveHostByIp(jpmMatcher.group(1))); +} + +} +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9e873770/eagle-topology-check/eagle-topology-app/src/test/java/org/apache/eagle/topology/TestMRTopologyCrawler.java -- diff --git
incubator-eagle git commit: [EAGLE-592] add MessageJsonScheme which extracts audit log from a json formatted …
Repository: incubator-eagle Updated Branches: refs/heads/master c629ca1eb -> 91643e84d [EAGLE-592] add MessageJsonScheme which extracts audit log from a json formatted … https://issues.apache.org/jira/browse/EAGLE-592 Author: Zhao, QingwenCloses #477 from qingwen220/EAGLE-592. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/91643e84 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/91643e84 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/91643e84 Branch: refs/heads/master Commit: 91643e84dab0f21916b47a552c0e02b277ee05f8 Parents: c629ca1 Author: Zhao, Qingwen Authored: Sat Oct 8 15:53:36 2016 +0800 Committer: Zhao, Qingwen Committed: Sat Oct 8 15:53:36 2016 +0800 -- .../auditlog/kafka/MessageJsonScheme.java | 68 1 file changed, 68 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/91643e84/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/kafka/MessageJsonScheme.java -- diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/kafka/MessageJsonScheme.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/kafka/MessageJsonScheme.java new file mode 100644 index 000..9ffcaf9 --- /dev/null +++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/kafka/MessageJsonScheme.java @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.security.auditlog.kafka; + +import backtype.storm.spout.Scheme; +import backtype.storm.tuple.Fields; +import backtype.storm.tuple.Values; +import org.codehaus.jackson.map.ObjectMapper; +import org.slf4j.Logger; +import storm.kafka.StringScheme; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +public class MessageJsonScheme implements Scheme { + +private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(MessageJsonScheme.class); +private static final ObjectMapper mapper = new ObjectMapper(); + +public static final String MESSAGE_SCHEME_KEY = "message"; + +@Override +public Fields getOutputFields() { +return new Fields(StringScheme.STRING_SCHEME_KEY); +} + +@Override +@SuppressWarnings("rawtypes") +public List deserialize(byte[] ser) { +try { +if (ser != null) { +Map map = mapper.readValue(ser, Map.class); +Object message = map.get(MESSAGE_SCHEME_KEY); +if (message != null) { +return new Values(map.get(MESSAGE_SCHEME_KEY)); +} +} else { +if (LOG.isDebugEnabled()) { +LOG.debug("Content is null, ignore"); +} +} +} catch (IOException e) { +try { +LOG.error("Failed to deserialize as JSON: {}", new String(ser, "UTF-8"), e); +} catch (Exception ex) { +LOG.error(ex.getMessage(), ex); +} +} +return null; +} +} \ No newline at end of file
incubator-eagle git commit: [EAGLE-565] Because of the "type" field when has subqueue ,response of RM REST API doesn‘t match the SchedulerWrapper object
Repository: incubator-eagle Updated Branches: refs/heads/master 50ddd604c -> d61d34698 [EAGLE-565] Because of the "type" field when has subqueue ,response of RM REST API doesn‘t match the SchedulerWrapper object EAGLE-565 Because of the "type" field when has subqueue ,response of RM REST API doesn‘t match the SchedulerWrapper object - Ignore and add comments on the "type" field in class Queue, in order to workaround YARN-4785 https://issues.apache.org/jira/browse/EAGLE-565 Author: chitinCloses #455 from chitin/master565. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/d61d3469 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/d61d3469 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/d61d3469 Branch: refs/heads/master Commit: d61d3469822dfae3a85d6b796d135f68d58dd0ba Parents: 50ddd60 Author: chitin Authored: Wed Sep 28 18:01:47 2016 +0800 Committer: Zhao, Qingwen Committed: Wed Sep 28 18:01:47 2016 +0800 -- .../eagle/hadoop/queue/model/scheduler/Queue.java | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d61d3469/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queue.java -- diff --git a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queue.java b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queue.java index 550c9d5..8fa57e4 100644 --- a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queue.java +++ b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queue.java @@ -24,7 +24,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize; @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Queue { -private String type; +//private String type; workaround the YARN-4785,the field's value is based on the "type" field of SchedulerInfo.java, then its getter and setter function is never used. private double capacity; private double usedCapacity; private double maxCapacity; @@ -122,13 +122,13 @@ public class Queue { } -public String getType() { -return type; -} - -public void setType(String type) { -this.type = type; -} +//public String getType() { +//return type; +//} +// +//public void setType(String type) { +//this.type = type; +//} public ResourcesUsed getResourcesUsed() { return resourcesUsed;
[1/2] incubator-eagle git commit: [EAGLE-538] Add Mapreduce task level apis
Repository: incubator-eagle Updated Branches: refs/heads/master 020a5b3cf -> cfd5c7f82 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cfd5c7f8/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapInputFunc.java -- diff --git a/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapInputFunc.java b/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapInputFunc.java new file mode 100644 index 000..1a92600 --- /dev/null +++ b/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapInputFunc.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.service.jpm.suggestion; + +import org.apache.eagle.jpm.util.Constants; +import org.apache.eagle.jpm.util.jobcounter.JobCounters; +import org.apache.eagle.service.jpm.MRTaskExecutionResponse; + +public class MapInputFunc extends AbstractInputFunc { + +public MapInputFunc() { +super(JobCounters.CounterName.HDFS_BYTES_READ, Constants.SuggestionType.MapInput); +} + +public MapInputFunc(double threshold) { +super(JobCounters.CounterName.HDFS_BYTES_READ, Constants.SuggestionType.MapInput, threshold); +} + +@Override +protected MRTaskExecutionResponse.TaskGroup getTasks(MRTaskExecutionResponse.TaskGroupResponse tasks) { +return tasks.tasksGroupByType.get(Constants.TaskType.MAP.toString()); +} + +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cfd5c7f8/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapSpillFunc.java -- diff --git a/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapSpillFunc.java b/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapSpillFunc.java new file mode 100644 index 000..e30f860 --- /dev/null +++ b/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/suggestion/MapSpillFunc.java @@ -0,0 +1,90 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.service.jpm.suggestion; + +import org.apache.eagle.jpm.mr.historyentity.TaskExecutionAPIEntity; +import org.apache.eagle.jpm.util.Constants; +import org.apache.eagle.jpm.util.jobcounter.JobCounters; +import org.apache.eagle.service.jpm.MRTaskExecutionResponse; +import org.apache.eagle.service.jpm.MRTaskExecutionResponse.JobSuggestionResponse; +import org.apache.eagle.service.jpm.MRTaskExecutionResponse.TaskGroupResponse; + +import java.util.ArrayList; +import java.util.List; + +public class MapSpillFunc implements SuggestionFunc { + +private static final double SPILL_DEVIATION_THRESHOLD = 2; + +private static final String SPILL_RATIO_NAME_FORMAT = "average %s deviation"; +private static final String SPILL_SUGGESTION_FORMAT = "map spill deviation exceeds threshold %.2f, where the deviation is %.2f / %.2f"; + +private double threshold; + +public MapSpillFunc() { +this.threshold = SPILL_DEVIATION_THRESHOLD; +} + +public MapSpillFunc(double threshold) { +this.threshold = threshold > 0 ? threshold : SPILL_DEVIATION_THRESHOLD; +} + +private MRTaskExecutionResponse.TaskGroup
[2/2] incubator-eagle git commit: [EAGLE-538] Add Mapreduce task level apis
[EAGLE-538] Add Mapreduce task level apis https://issues.apache.org/jira/browse/EAGLE-538 https://issues.apache.org/jira/browse/EAGLE-554 Author: Qingwen ZhaoAuthor: Zhao, Qingwen Closes #432 from qingwen220/dataSkew. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/cfd5c7f8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/cfd5c7f8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/cfd5c7f8 Branch: refs/heads/master Commit: cfd5c7f826a2816bd5bf8db194932d2b3ec9ff4c Parents: 020a5b3 Author: Qingwen Zhao Authored: Thu Sep 22 15:59:49 2016 +0800 Committer: Zhao, Qingwen Committed: Thu Sep 22 15:59:49 2016 +0800 -- .../eagle/service/app/TestServiceAppWithZk.java | 8 +- .../client/impl/EagleServiceBaseClient.java | 2 +- .../client/impl/EagleServiceClientImpl.java | 4 + .../eagle/service/jpm/MRJobCountHelper.java | 140 --- .../service/jpm/MRJobExecutionResource.java | 133 +++--- .../service/jpm/MRJobTaskCountResponse.java | 12 +- .../service/jpm/MRTaskExecutionResource.java| 241 +++ .../service/jpm/MRTaskExecutionResponse.java| 85 +++ .../apache/eagle/service/jpm/ResourceUtils.java | 87 +++ .../service/jpm/TaskCountByDurationHelper.java | 106 .../eagle/service/jpm/count/MRJobCountImpl.java | 146 +++ .../service/jpm/count/MRTaskCountImpl.java | 124 ++ .../service/jpm/suggestion/AbstractGCFunc.java | 104 .../jpm/suggestion/AbstractInputFunc.java | 86 +++ .../eagle/service/jpm/suggestion/MapGCFunc.java | 38 +++ .../service/jpm/suggestion/MapInputFunc.java| 40 +++ .../service/jpm/suggestion/MapSpillFunc.java| 90 +++ .../service/jpm/suggestion/ReduceGCFunc.java| 38 +++ .../service/jpm/suggestion/ReduceInputFunc.java | 39 +++ .../service/jpm/suggestion/SuggestionFunc.java | 27 +++ .../jpm/TestJobCountPerBucketHelper.java| 90 --- .../service/jpm/TestTaskCountPerJobHelper.java | 96 .../service/jpm/count/TestMRJobCountImpl.java | 92 +++ .../service/jpm/count/TestMRTaskCountImpl.java | 129 ++ .../jpm/suggestion/TestDataSkewFunc.java| 89 +++ .../jpm/suggestion/TestTaskCounterFunc.java | 88 +++ .../spark/history/SparkHistoryJobAppConfig.java | 8 +- .../history/crawl/JHFSparkEventReader.java | 1 + .../jpm/spark/history/crawl/JHFSparkParser.java | 7 +- .../status/JobHistoryZKStateManager.java| 8 +- .../history/storm/SparkHistoryJobParseBolt.java | 4 +- .../history/storm/SparkHistoryJobSpout.java | 17 +- ...spark.history.SparkHistoryJobAppProvider.xml | 6 - .../src/main/resources/application.conf | 3 +- .../org/apache/eagle/jpm/util/Constants.java| 4 + .../eagle/jpm/util/jobcounter/JobCounters.java | 78 ++ eagle-server/pom.xml| 11 +- 37 files changed, 1701 insertions(+), 580 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cfd5c7f8/eagle-core/eagle-alert-parent/eagle-alert/alert-service/src/test/java/com/apache/eagle/service/app/TestServiceAppWithZk.java -- diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-service/src/test/java/com/apache/eagle/service/app/TestServiceAppWithZk.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-service/src/test/java/com/apache/eagle/service/app/TestServiceAppWithZk.java index a19889b..f7f6c57 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert/alert-service/src/test/java/com/apache/eagle/service/app/TestServiceAppWithZk.java +++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-service/src/test/java/com/apache/eagle/service/app/TestServiceAppWithZk.java @@ -31,18 +31,12 @@ import org.apache.eagle.alert.service.IMetadataServiceClient; import org.apache.eagle.alert.service.MetadataServiceClientImpl; import org.apache.eagle.alert.utils.ZookeeperEmbedded; import org.apache.eagle.service.app.ServiceApp; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.*; import com.google.common.base.Joiner; import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -/** - * @author xiancli - */ public class TestServiceAppWithZk { ZookeeperEmbedded zkEmbed; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cfd5c7f8/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceBaseClient.java -- diff
incubator-eagle git commit: [EAGLE-551] fix some bugs and improvement of mr history feeder
Repository: incubator-eagle Updated Branches: refs/heads/master 158a1524b -> d100d03ed [EAGLE-551] fix some bugs and improvement of mr history feeder https://issues.apache.org/jira/browse/EAGLE-551 1. bug fix: 1.1 mr running feeder does not set internalState to FINISHED when job finished. 1.2 JHFSparkEventReader should not reload config, it should use config that inited by framework 1.3 JHFSparkEventReader flushed entities failed, but it marks the application succeed 2. improvement: move hdfs ha configuration from (core-site.xml/hdfs-site.xml) to application.conf Author: wujinhuCloses #444 from wujinhu/EAGLE-551. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/d100d03e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/d100d03e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/d100d03e Branch: refs/heads/master Commit: d100d03ed0cadcb6f9a024147868e601a8383b85 Parents: 158a152 Author: wujinhu Authored: Tue Sep 20 18:29:03 2016 +0800 Committer: Qingwen Zhao Committed: Tue Sep 20 18:29:03 2016 +0800 -- .../running/entities/JPMEntityRepository.java | 1 - .../running/entities/JobConfigSerDeser.java | 49 .../jpm/mr/history/MRHistoryJobConfig.java | 44 +- .../mr/history/crawler/JobHistoryDAOImpl.java | 16 +++ .../src/main/resources/application.conf | 28 +++ .../jpm/mr/running/parser/MRJobParser.java | 1 + .../spark/history/SparkHistoryJobAppConfig.java | 38 --- .../history/crawl/JHFSparkEventReader.java | 18 +++ .../SparkFilesystemInputStreamReaderImpl.java | 14 +++--- .../history/storm/SparkHistoryJobParseBolt.java | 11 +++-- .../src/main/resources/application.conf | 15 -- .../spark/running/SparkRunningJobAppConfig.java | 28 +-- .../running/parser/SparkApplicationParser.java | 7 +-- .../src/main/resources/application.conf | 15 -- 14 files changed, 177 insertions(+), 108 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d100d03e/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JPMEntityRepository.java -- diff --git a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JPMEntityRepository.java b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JPMEntityRepository.java index 81f266b..5494573 100644 --- a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JPMEntityRepository.java +++ b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JPMEntityRepository.java @@ -18,7 +18,6 @@ package org.apache.eagle.jpm.spark.running.entities; -import org.apache.eagle.jpm.mr.runningentity.JobConfigSerDeser; import org.apache.eagle.log.entity.repo.EntityRepository; public class JPMEntityRepository extends EntityRepository { http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d100d03e/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JobConfigSerDeser.java -- diff --git a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JobConfigSerDeser.java b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JobConfigSerDeser.java new file mode 100644 index 000..64b48d5 --- /dev/null +++ b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/JobConfigSerDeser.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.jpm.spark.running.entities; + +import org.apache.eagle.log.entity.meta.EntitySerDeser; +import org.apache.eagle.log.entity.meta.MapSerDeser; +
incubator-eagle git commit: add jobTypes list in response
Repository: incubator-eagle Updated Branches: refs/heads/develop 3110c72e4 -> fce6ae3f0 add jobTypes list in response Author: Qingwen ZhaoCloses #421 from qingwen220/jobAPIUpdate. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/fce6ae3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/fce6ae3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/fce6ae3f Branch: refs/heads/develop Commit: fce6ae3f0c33ded811e78ca4bf8ff4c0a7ff3935 Parents: 3110c72 Author: Qingwen Zhao Authored: Wed Sep 7 11:07:17 2016 +0800 Committer: Qingwen Zhao Committed: Wed Sep 7 11:07:17 2016 +0800 -- .../eagle/service/jpm/MRJobCountHelper.java | 31 .../service/jpm/MRJobExecutionResource.java | 16 +++--- .../service/jpm/MRJobTaskCountResponse.java | 1 + .../jpm/TestJobCountPerBucketHelper.java| 7 +++-- 4 files changed, 43 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/fce6ae3f/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/MRJobCountHelper.java -- diff --git a/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/MRJobCountHelper.java b/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/MRJobCountHelper.java index 93c6c00..2fa5c04 100644 --- a/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/MRJobCountHelper.java +++ b/eagle-jpm/eagle-jpm-service/src/main/java/org/apache/eagle/service/jpm/MRJobCountHelper.java @@ -20,45 +20,61 @@ package org.apache.eagle.service.jpm; import org.apache.eagle.common.DateTimeUtil; import org.apache.eagle.jpm.mr.historyentity.JobExecutionAPIEntity; +import org.apache.eagle.jpm.util.Constants; import org.apache.eagle.jpm.util.MRJobTagName; import org.apache.eagle.service.jpm.MRJobTaskCountResponse.JobCountResponse; import org.apache.eagle.service.jpm.MRJobTaskCountResponse.UnitJobCount; import java.text.ParseException; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; public class MRJobCountHelper { public void initJobCountList(List jobCounts, long startTime, long endTime, long intervalInSecs) { for (long i = startTime / intervalInSecs; i * intervalInSecs <= endTime; i++) { -jobCounts.add(new UnitJobCount(i * intervalInSecs)); +jobCounts.add(new UnitJobCount(i * intervalInSecs * DateTimeUtil.ONESECOND)); } } -public String moveTimeforwardOneDay(String startTime) throws ParseException { +public String moveTimeForwardOneDay(String startTime) throws ParseException { long timeInSecs = DateTimeUtil.humanDateToSeconds(startTime); timeInSecs -= 24L * 60L * 60L; return DateTimeUtil.secondsToHumanDate(timeInSecs); } public JobCountResponse getRunningJobCount(List jobDurations, + List runningJobs, long startTimeInSecs, long endTimeInSecs, long intervalInSecs) { -JobCountResponse response = new JobCountResponse(); List jobCounts = new ArrayList<>(); +Set jobTypes = new HashSet<>(); initJobCountList(jobCounts, startTimeInSecs, endTimeInSecs, intervalInSecs); for (JobExecutionAPIEntity jobDuration: jobDurations) { -countJob(jobCounts, jobDuration.getStartTime() / 1000, jobDuration.getEndTime() / 1000, intervalInSecs, jobDuration.getTags().get(MRJobTagName.JOB_TYPE.toString())); +String jobType = jobDuration.getTags().get(MRJobTagName.JOB_TYPE.toString()); +jobTypes.add(jobType); +countJob(jobCounts, jobDuration.getStartTime() / 1000, jobDuration.getEndTime() / 1000, intervalInSecs, jobType); +} +for (org.apache.eagle.jpm.mr.runningentity.JobExecutionAPIEntity job : runningJobs) { +if (job.getInternalState() != null && !job.getInternalState().equalsIgnoreCase(Constants.JobState.FINISHED.toString())) { +String jobType = job.getTags().get(MRJobTagName.JOB_TYPE.toString()); +jobTypes.add(jobType); +countJob(jobCounts, job.getStartTime() / 1000, endTimeInSecs, intervalInSecs, jobType); +} } +JobCountResponse response = new JobCountResponse(); response.jobCounts = jobCounts; +response.jobTypes = jobTypes; return response; } public JobCountResponse
[3/3] incubator-eagle git commit: Update spark history job feeder config & refactor the code
Update spark history job feeder config & refactor the code Author: Qingwen ZhaoCloses #416 from qingwen220/sparkHist. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3110c72e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3110c72e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3110c72e Branch: refs/heads/develop Commit: 3110c72e47f697f5c59b5f7d6559d527cf25db3a Parents: 8774b85 Author: Qingwen Zhao Authored: Wed Sep 7 10:36:24 2016 +0800 Committer: Qingwen Zhao Committed: Wed Sep 7 10:36:24 2016 +0800 -- .../environment/impl/StormExecutionRuntime.java | 32 +- .../apache/eagle/jpm/spark/crawl/EventType.java | 24 - .../jpm/spark/crawl/JHFInputStreamReader.java | 24 - .../eagle/jpm/spark/crawl/JHFParserBase.java| 29 - .../jpm/spark/crawl/JHFSparkEventReader.java| 713 --- .../eagle/jpm/spark/crawl/JHFSparkParser.java | 73 -- .../jpm/spark/crawl/SparkApplicationInfo.java | 69 -- .../SparkFilesystemInputStreamReaderImpl.java | 53 -- .../running/entities/JPMEntityRepository.java | 33 + .../jpm/spark/running/entities/JobConfig.java | 26 + .../spark/running/entities/SparkAppEntity.java | 476 + .../running/entities/SparkExecutorEntity.java | 233 ++ .../spark/running/entities/SparkJobEntity.java | 191 + .../running/entities/SparkStageEntity.java | 299 .../spark/running/entities/SparkTaskEntity.java | 290 .../spark/history/SparkHistoryJobAppConfig.java | 4 - .../history/crawl/JHFInputStreamReader.java | 24 + .../jpm/spark/history/crawl/JHFParserBase.java | 29 + .../history/crawl/JHFSparkEventReader.java | 713 +++ .../jpm/spark/history/crawl/JHFSparkParser.java | 73 ++ .../history/crawl/SparkApplicationInfo.java | 69 ++ .../SparkFilesystemInputStreamReaderImpl.java | 53 ++ .../status/JobHistoryZKStateManager.java| 7 +- .../history/storm/SparkHistoryJobParseBolt.java | 13 +- .../history/storm/SparkHistoryJobSpout.java | 5 +- ...spark.history.SparkHistoryJobAppProvider.xml | 18 - .../src/main/resources/application.conf | 9 +- .../running/entities/JPMEntityRepository.java | 30 - .../jpm/spark/running/entities/JobConfig.java | 25 - .../spark/running/entities/SparkAppEntity.java | 475 .../running/entities/SparkExecutorEntity.java | 232 -- .../spark/running/entities/SparkJobEntity.java | 190 - .../running/entities/SparkStageEntity.java | 298 .../spark/running/entities/SparkTaskEntity.java | 289 .../running/parser/SparkApplicationParser.java | 8 +- .../src/main/resources/application.conf | 6 +- .../apache/eagle/jpm/util/SparkEventType.java | 25 + .../util/resourcefetch/RMResourceFetcher.java | 2 +- 38 files changed, 2575 insertions(+), 2587 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3110c72e/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java -- diff --git a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java index 04cc19b..e37e8f2 100644 --- a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java +++ b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java @@ -34,13 +34,13 @@ import scala.Int; import storm.trident.spout.RichSpoutBatchExecutor; public class StormExecutionRuntime implements ExecutionRuntime { -private final static Logger LOG = LoggerFactory.getLogger(StormExecutionRuntime.class); +private static final Logger LOG = LoggerFactory.getLogger(StormExecutionRuntime.class); private static LocalCluster _localCluster; private StormEnvironment environment; -private static LocalCluster getLocalCluster(){ -if(_localCluster == null){ +private static LocalCluster getLocalCluster() { +if (_localCluster == null) { _localCluster = new LocalCluster(); } return _localCluster; @@ -56,13 +56,13 @@ public class StormExecutionRuntime implements ExecutionRuntime
[2/3] incubator-eagle git commit: Update spark history job feeder config & refactor the code
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3110c72e/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkJobEntity.java -- diff --git a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkJobEntity.java b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkJobEntity.java new file mode 100644 index 000..211d6b7 --- /dev/null +++ b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkJobEntity.java @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.jpm.spark.running.entities; + +import org.apache.eagle.jpm.util.Constants; +import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity; +import org.apache.eagle.log.entity.meta.*; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; + +import java.util.List; + +@Table("eagleSparkRunningJobs") +@ColumnFamily("f") +@Prefix("sparkJob") +@Service(Constants.RUNNING_SPARK_JOB_SERVICE_ENDPOINT_NAME) +@JsonIgnoreProperties(ignoreUnknown = true) +@TimeSeries(true) +@Tags({"site","sparkAppId", "sparkAppAttemptId", "sparkAppName", "jobId","user", "queue"}) +@Partition({"site"}) +public class SparkJobEntity extends TaggedLogAPIEntity { +@Column("a") +private long submissionTime; +@Column("b") +private long completionTime; +@Column("c") +private int numStages = 0; +@Column("d") +private String status; +@Column("e") +private int numTask = 0; +@Column("f") +private int numActiveTasks = 0; +@Column("g") +private int numCompletedTasks = 0; +@Column("h") +private int numSkippedTasks = 0; +@Column("i") +private int numFailedTasks = 0; +@Column("j") +private int numActiveStages = 0; +@Column("k") +private int numCompletedStages = 0; +@Column("l") +private int numSkippedStages = 0; +@Column("m") +private int numFailedStages = 0; +@Column("n") +private List stages; + +public List getStages() { +return stages; +} + +public void setStages(List stages) { +this.stages = stages; +this.valueChanged("stages"); +} + +public long getSubmissionTime() { +return submissionTime; +} + +public long getCompletionTime() { +return completionTime; +} + +public int getNumStages() { +return numStages; +} + +public String getStatus() { +return status; +} + +public int getNumTask() { +return numTask; +} + +public int getNumActiveTasks() { +return numActiveTasks; +} + +public int getNumCompletedTasks() { +return numCompletedTasks; +} + +public int getNumSkippedTasks() { +return numSkippedTasks; +} + +public int getNumFailedTasks() { +return numFailedTasks; +} + +public int getNumActiveStages() { +return numActiveStages; +} + +public int getNumCompletedStages() { +return numCompletedStages; +} + +public int getNumSkippedStages() { +return numSkippedStages; +} + +public int getNumFailedStages() { +return numFailedStages; +} + +public void setSubmissionTime(long submissionTime) { +this.submissionTime = submissionTime; +this.valueChanged("submissionTime"); +} + +public void setCompletionTime(long completionTime) { +this.completionTime = completionTime; +this.valueChanged("completionTime"); +} + +public void setNumStages(int numStages) { +this.numStages = numStages; +this.valueChanged("numStages"); +} + +public void setStatus(String status) { +this.status = status; +this.valueChanged("status"); +} + +public void setNumTask(int numTask) { +this.numTask = numTask; +this.valueChanged("numTask"); +} + +public void setNumActiveTasks(int numActiveTasks) { +this.numActiveTasks = numActiveTasks; +this.valueChanged("numActiveTasks"); +} + +public void
[1/3] incubator-eagle git commit: Update spark history job feeder config & refactor the code
Repository: incubator-eagle Updated Branches: refs/heads/develop 8774b85cd -> 3110c72e4 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3110c72e/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkAppEntity.java -- diff --git a/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkAppEntity.java b/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkAppEntity.java deleted file mode 100644 index 7de1530..000 --- a/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/entities/SparkAppEntity.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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 - * - *http://www.apache.org/licenses/LICENSE-2.0 - * - * 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 org.apache.eagle.jpm.spark.running.entities; - -import org.apache.eagle.jpm.util.Constants; -import org.apache.eagle.jpm.util.resourcefetch.model.AppInfo; -import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity; -import org.apache.eagle.log.entity.meta.*; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; - -@Table("eagleSparkRunningApps") -@ColumnFamily("f") -@Prefix("sparkApp") -@Service(Constants.RUNNING_SPARK_APP_SERVICE_ENDPOINT_NAME) -@JsonIgnoreProperties(ignoreUnknown = true) -@TimeSeries(true) -@Tags({"site","sparkAppId", "sparkAppAttemptId", "sparkAppName", "user", "queue"}) -@Partition({"site"}) -public class SparkAppEntity extends TaggedLogAPIEntity { -@Column("a") -private long startTime; -@Column("b") -private long endTime; -@Column("c") -private String yarnState; -@Column("d") -private String yarnStatus; -@Column("e") -private JobConfig config; -@Column("f") -private int numJobs; -@Column("g") -private int totalStages; -@Column("h") -private int skippedStages; -@Column("i") -private int failedStages; -@Column("j") -private int totalTasks; -@Column("k") -private int skippedTasks; -@Column("l") -private int failedTasks; -@Column("m") -private int executors; -@Column("n") -private long inputBytes; -@Column("o") -private long inputRecords; -@Column("p") -private long outputBytes; -@Column("q") -private long outputRecords; -@Column("r") -private long shuffleReadBytes; -@Column("s") -private long shuffleReadRecords; -@Column("t") -private long shuffleWriteBytes; -@Column("u") -private long shuffleWriteRecords; -@Column("v") -private long executorDeserializeTime; -@Column("w") -private long executorRunTime; -@Column("x") -private long resultSize; -@Column("y") -private long jvmGcTime; -@Column("z") -private long resultSerializationTime; -@Column("ab") -private long memoryBytesSpilled; -@Column("ac") -private long diskBytesSpilled; -@Column("ad") -private long execMemoryBytes; -@Column("ae") -private long driveMemoryBytes; -@Column("af") -private int completeTasks; -@Column("ag") -private long totalExecutorTime; -@Column("ah") -private long executorMemoryOverhead; -@Column("ai") -private long driverMemoryOverhead; -@Column("aj") -private int executorCores; -@Column("ak") -private int driverCores; -@Column("al") -private AppInfo appInfo; -@Column("am") -private int activeStages; -@Column("an") -private int completeStages; -@Column("ba") -private int activeTasks; - -public int getActiveTasks() { -return activeTasks; -} - -public void setActiveTasks(int activeTasks) { -this.activeTasks = activeTasks; -valueChanged("activeTasks"); -} - -public int getCompleteStages() { -return completeStages; -} - -public void setCompleteStages(int completeStages) { -this.completeStages = completeStages; -valueChanged("completeStages"); -} - -public int getActiveStages() { -return activeStages; -} - -public void setActiveStages(int activeStages) { -this.activeStages = activeStages; -
incubator-eagle git commit: [EAGLE-518] add Job counter metrics for mr history job
Repository: incubator-eagle Updated Branches: refs/heads/develop 9488afc15 -> b2b16b745 [EAGLE-518] add Job counter metrics for mr history job Author: wujinhuCloses #414 from wujinhu/EAGLE-518. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/b2b16b74 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/b2b16b74 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/b2b16b74 Branch: refs/heads/develop Commit: b2b16b745e210eb80929d970820c322d557d93e0 Parents: 9488afc Author: wujinhu Authored: Fri Sep 2 11:48:54 2016 +0800 Committer: Qingwen Zhao Committed: Fri Sep 2 11:48:54 2016 +0800 -- .../history/crawler/JHFCrawlerDriverImpl.java | 53 +++- .../metrics/JobCountMetricsGenerator.java | 88 .../JobExecutionMetricsCreationListener.java| 75 + .../JobEntityCreationEagleServiceListener.java | 13 +++ .../AbstractMetricsCreationListener.java| 42 -- .../JobExecutionMetricsCreationListener.java| 9 +- .../TaskExecutionMetricsCreationListener.java | 3 +- .../org/apache/eagle/jpm/util/Constants.java| 4 + .../AbstractMetricsCreationListener.java| 42 ++ 9 files changed, 239 insertions(+), 90 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b2b16b74/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/crawler/JHFCrawlerDriverImpl.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/crawler/JHFCrawlerDriverImpl.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/crawler/JHFCrawlerDriverImpl.java index 077f4e1..2f326fe 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/crawler/JHFCrawlerDriverImpl.java +++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/crawler/JHFCrawlerDriverImpl.java @@ -19,6 +19,7 @@ package org.apache.eagle.jpm.mr.history.crawler; import org.apache.eagle.jpm.mr.history.MRHistoryJobConfig; +import org.apache.eagle.jpm.mr.history.metrics.JobCountMetricsGenerator; import org.apache.eagle.jpm.mr.history.parser.EagleJobStatus; import org.apache.eagle.jpm.mr.history.zkres.JobHistoryZKStateManager; import org.apache.eagle.jpm.mr.historyentity.JobCountEntity; @@ -62,15 +63,12 @@ public class JHFCrawlerDriverImpl implements JHFCrawlerDriver { private JobIdFilter jobFilter; private int partitionId; private TimeZone timeZone; -private MRHistoryJobConfig.EagleServiceConfig eagleServiceConfig; -private MRHistoryJobConfig.JobExtractorConfig jobExtractorConfig; +private JobCountMetricsGenerator jobCountMetricsGenerator; public JHFCrawlerDriverImpl(MRHistoryJobConfig.EagleServiceConfig eagleServiceConfig, MRHistoryJobConfig.JobExtractorConfig jobExtractorConfig, MRHistoryJobConfig.ControlConfig controlConfig, JHFInputStreamCallback reader, JobHistoryLCM historyLCM, JobIdFilter jobFilter, int partitionId) throws Exception { -this.eagleServiceConfig = eagleServiceConfig; -this.jobExtractorConfig = jobExtractorConfig; this.zeroBasedMonth = controlConfig.zeroBasedMonth; this.dryRun = controlConfig.dryRun; if (this.dryRun) { @@ -81,6 +79,7 @@ public class JHFCrawlerDriverImpl implements JHFCrawlerDriver { this.partitionId = partitionId; this.jobFilter = jobFilter; timeZone = TimeZone.getTimeZone(controlConfig.timeZone); +jobCountMetricsGenerator = new JobCountMetricsGenerator(eagleServiceConfig, jobExtractorConfig, timeZone); } /** @@ -191,7 +190,13 @@ public class JHFCrawlerDriverImpl implements JHFCrawlerDriver { jobHistoryFile); processedJobFileNames.add(jobHistoryFile); -flushJobCount(); +jobCountMetricsGenerator.flush( +String.format(FORMAT_JOB_PROCESS_DATE, +this.processDate.year, +this.processDate.month + 1, +this.processDate.day), +this.processDate.year, this.processDate.month, this.processDate.day +); Long modifiedTime = item.getLeft(); return modifiedTime; } @@ -237,44 +242,6 @@ public class JHFCrawlerDriverImpl implements JHFCrawlerDriver { } } -private void flushJobCount() throws Exception { -List > jobs = JobHistoryZKStateManager.instance().getProcessedJobs( -
incubator-eagle git commit: [EAGLE-511] Fix NullPointerException for spark history job
Repository: incubator-eagle Updated Branches: refs/heads/develop 3f7004f1c -> 9488afc15 [EAGLE-511] Fix NullPointerException for spark history job Author: pkuwmCloses #404 from pkuwm/EAGLE-511. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9488afc1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9488afc1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9488afc1 Branch: refs/heads/develop Commit: 9488afc15e3d721f55aaaf10da46673d3ebb69a7 Parents: 3f7004f Author: pkuwm Authored: Fri Sep 2 10:58:45 2016 +0800 Committer: Qingwen Zhao Committed: Fri Sep 2 10:58:45 2016 +0800 -- .../environment/impl/StormExecutionRuntime.java | 4 +-- .../jpm/spark/crawl/JHFSparkEventReader.java| 28 +++- .../eagle/jpm/spark/crawl/JHFSparkParser.java | 2 +- .../eagle/jpm/spark/entity/SparkTask.java | 6 ++--- .../spark/history/SparkHistoryJobAppConfig.java | 2 -- .../src/main/resources/application.conf | 3 +-- .../org/apache/eagle/jpm/util/JSONUtils.java| 15 ++- 7 files changed, 30 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9488afc1/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java -- diff --git a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java index 1b989ac..04cc19b 100644 --- a/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java +++ b/eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/StormExecutionRuntime.java @@ -98,9 +98,9 @@ public class StormExecutionRuntime implements ExecutionRuntime jobs; private Map stages; private Map jobStageMap; -private Map tasks; +private Map tasks; private EagleServiceClientImpl client; private Map > stageTaskStatusMap; @@ -61,7 +63,7 @@ public class JHFSparkEventReader { jobs =
incubator-eagle git commit: [EAGLE-502] Always retry to parse spark history job when failure happens.
Repository: incubator-eagle Updated Branches: refs/heads/develop e77877518 -> 3f7004f1c [EAGLE-502] Always retry to parse spark history job when failure happens. Author: pkuwmCloses #390 from pkuwm/EAGLE-502. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3f7004f1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3f7004f1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3f7004f1 Branch: refs/heads/develop Commit: 3f7004f1cc939ba2e633e38248c322d2216e48a9 Parents: e778775 Author: pkuwm Authored: Fri Sep 2 10:51:31 2016 +0800 Committer: Qingwen Zhao Committed: Fri Sep 2 10:51:31 2016 +0800 -- .../jpm/spark/crawl/JHFSparkEventReader.java| 6 +-- .../status/JobHistoryZKStateManager.java| 26 .../history/storm/SparkHistoryJobSpout.java | 44 ++-- .../src/main/resources/application.conf | 2 +- .../jpm/spark/running/SparkRunningJobApp.java | 2 +- .../storm/SparkRunningJobFetchSpout.java| 4 +- .../running/storm/SparkRunningJobParseBolt.java | 1 + .../jpm/util/resourcefetch/ResourceFetcher.java | 2 +- .../SparkHistoryServerResourceFetcher.java | 6 +-- .../hbase/HbaseMetadataBrowseWebResource.java | 16 --- 10 files changed, 41 insertions(+), 68 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3f7004f1/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/crawl/JHFSparkEventReader.java -- diff --git a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/crawl/JHFSparkEventReader.java b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/crawl/JHFSparkEventReader.java index fe02da5..6c68b48 100644 --- a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/crawl/JHFSparkEventReader.java +++ b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/spark/crawl/JHFSparkEventReader.java @@ -17,14 +17,14 @@ package org.apache.eagle.jpm.spark.crawl; +import com.typesafe.config.Config; +import com.typesafe.config.ConfigFactory; import org.apache.commons.lang.ArrayUtils; import org.apache.eagle.jpm.spark.entity.*; import org.apache.eagle.jpm.util.*; import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity; import org.apache.eagle.service.client.impl.EagleServiceBaseClient; import org.apache.eagle.service.client.impl.EagleServiceClientImpl; -import com.typesafe.config.Config; -import com.typesafe.config.ConfigFactory; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.slf4j.Logger; @@ -353,7 +353,7 @@ public class JHFSparkEventReader { stage.setCompleteTime(completeTime); this.lastEventTime = completeTime; -if (stageInfo.containsKey("Failure Reason")) { +if (stageInfo != null && stageInfo.containsKey("Failure Reason")) { stage.setStatus(SparkEntityConstant.SparkStageStatus.FAILED.toString()); } else { stage.setStatus(SparkEntityConstant.SparkStageStatus.COMPLETE.toString()); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3f7004f1/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/status/JobHistoryZKStateManager.java -- diff --git a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/status/JobHistoryZKStateManager.java b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/status/JobHistoryZKStateManager.java index 7a95e56..9fafc1f 100644 --- a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/status/JobHistoryZKStateManager.java +++ b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/status/JobHistoryZKStateManager.java @@ -35,10 +35,11 @@ import java.util.Iterator; import java.util.List; public class JobHistoryZKStateManager { -public static final Logger LOG = LoggerFactory.getLogger(JobHistoryZKStateManager.class); +private final static Logger LOG = LoggerFactory.getLogger(JobHistoryZKStateManager.class); + +private final static String START_TIMESTAMP = "lastAppTime"; private String zkRoot; private CuratorFramework curator; -private static String START_TIMESTAMP = "lastAppTime"; private CuratorFramework newCurator(SparkHistoryJobAppConfig config) throws Exception { return CuratorFrameworkFactory.newClient( @@ -72,7 +73,7 @@ public class JobHistoryZKStateManager { InterProcessLock lock = new
incubator-eagle git commit: [EAGLE-514] Add two job count apis
Repository: incubator-eagle Updated Branches: refs/heads/develop 4aa5b4526 -> a66f64cf9 [EAGLE-514] Add two job count apis https://issues.apache.org/jira/browse/EAGLE-514 1. adding two job counting apis 2. add tracking url in running/history job execution entity 3. unify the status presentation for job/task execution entity 4. unify the name of the common fields between running job entity & history job entity Author: Qingwen ZhaoCloses #408 from qingwen220/jobStats. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a66f64cf Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a66f64cf Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a66f64cf Branch: refs/heads/develop Commit: a66f64cf9f4212f4923f0e6ea6c7270449aa2ce4 Parents: 4aa5b45 Author: Qingwen Zhao Authored: Wed Aug 31 14:21:22 2016 +0800 Committer: Qingwen Zhao Committed: Wed Aug 31 14:21:22 2016 +0800 -- .../mr/historyentity/JobExecutionAPIEntity.java | 11 + .../mr/runningentity/JobExecutionAPIEntity.java | 36 ++- .../jpm/mr/history/MRHistoryJobConfig.java | 2 + .../history/crawler/JHFCrawlerDriverImpl.java | 2 +- .../jpm/mr/history/parser/EagleJobStatus.java | 2 +- .../mr/history/parser/JHFEventReaderBase.java | 21 +- .../mr/history/parser/JHFMRVer1EventReader.java | 5 +- .../mr/history/parser/JHFMRVer2EventReader.java | 15 +- .../jpm/mr/history/parser/JHFParserFactory.java | 4 +- .../JobEntityCreationEagleServiceListener.java | 6 +- .../src/main/resources/application.conf | 1 + .../jpm/mr/running/parser/MRJobParser.java | 5 +- .../eagle/service/jpm/MRJobCountHelper.java | 121 .../service/jpm/MRJobExecutionResource.java | 286 +-- .../service/jpm/MRJobTaskCountResponse.java | 65 + .../service/jpm/MRJobTaskGroupResponse.java | 41 --- .../service/jpm/TaskCountByDurationHelper.java | 106 +++ .../jpm/TestJobCountPerBucketHelper.java| 87 ++ .../service/jpm/TestMRJobExecutionResource.java | 99 --- .../service/jpm/TestTaskCountPerJobHelper.java | 96 +++ .../org/apache/eagle/jpm/util/Constants.java| 2 + 21 files changed, 752 insertions(+), 261 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a66f64cf/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/historyentity/JobExecutionAPIEntity.java -- diff --git a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/historyentity/JobExecutionAPIEntity.java b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/historyentity/JobExecutionAPIEntity.java index 97e77b2..cdc5810 100644 --- a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/historyentity/JobExecutionAPIEntity.java +++ b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/historyentity/JobExecutionAPIEntity.java @@ -89,6 +89,17 @@ public class JobExecutionAPIEntity extends JobBaseAPIEntity { private int totalReduceAttempts; @Column("ac") private int failedReduceAttempts; +@Column("ad") +private String trackingUrl; + +public String getTrackingUrl() { +return trackingUrl; +} + +public void setTrackingUrl(String trackingUrl) { +this.trackingUrl = trackingUrl; +valueChanged("trackingUrl"); +} public long getDurationTime() { return durationTime; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a66f64cf/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/runningentity/JobExecutionAPIEntity.java -- diff --git a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/runningentity/JobExecutionAPIEntity.java b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/runningentity/JobExecutionAPIEntity.java index dd81eb4..245fc0f 100644 --- a/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/runningentity/JobExecutionAPIEntity.java +++ b/eagle-jpm/eagle-jpm-entity/src/main/java/org/apache/eagle/jpm/mr/runningentity/JobExecutionAPIEntity.java @@ -49,11 +49,11 @@ public class JobExecutionAPIEntity extends TaggedLogAPIEntity { @Column("e") private int numTotalMaps; @Column("f") -private int mapsCompleted; +private int numFinishedMaps; @Column("g") private int numTotalReduces; @Column("h") -private int reducesCompleted; +private int numFinishedReduces; @Column("i") private double mapProgress; @Column("j") @@ -112,6 +112,18 @@ public class
[4/4] incubator-eagle git commit: [minor] Change resourceFetch to resourcefetch
[minor] Change resourceFetch to resourcefetch Author: Zhao, QingwenCloses #386. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/b5fd782c Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/b5fd782c Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/b5fd782c Branch: refs/heads/develop Commit: b5fd782c0968ce8dd499de1899464c8edbf50dfd Parents: 6f5f972 Author: Qingwen Zhao Authored: Thu Aug 25 11:45:23 2016 +0800 Committer: Qingwen Zhao Committed: Thu Aug 25 13:00:44 2016 +0800 -- .../util/resourceFetch/RMResourceFetcher.java | 189 .../jpm/util/resourceFetch/ResourceFetcher.java | 27 -- .../SparkHistoryServerResourceFetcher.java | 88 -- .../connection/InputStreamUtils.java| 68 - .../util/resourceFetch/connection/JobUtils.java | 43 --- .../connection/URLConnectionUtils.java | 101 --- .../resourceFetch/ha/AbstractURLSelector.java | 110 --- .../util/resourceFetch/ha/HAURLSelector.java| 28 -- .../resourceFetch/ha/HAURLSelectorImpl.java | 109 --- .../jpm/util/resourceFetch/model/AppInfo.java | 210 -- .../util/resourceFetch/model/Applications.java | 38 --- .../util/resourceFetch/model/AppsWrapper.java | 37 --- .../util/resourceFetch/model/ClusterInfo.java | 119 .../resourceFetch/model/ClusterInfoWrapper.java | 35 --- .../resourceFetch/model/JobCounterGroup.java| 46 --- .../resourceFetch/model/JobCounterItem.java | 62 .../util/resourceFetch/model/JobCounters.java | 46 --- .../resourceFetch/model/JobCountersWrapper.java | 35 --- .../jpm/util/resourceFetch/model/MRJob.java | 289 --- .../util/resourceFetch/model/MRJobsWrapper.java | 37 --- .../jpm/util/resourceFetch/model/MRTask.java| 109 --- .../util/resourceFetch/model/MRTaskAttempt.java | 136 - .../model/MRTaskAttemptWrapper.java | 37 --- .../resourceFetch/model/MRTaskAttempts.java | 39 --- .../jpm/util/resourceFetch/model/MRTasks.java | 40 --- .../resourceFetch/model/MRTasksWrapper.java | 37 --- .../jpm/util/resourceFetch/model/MrJobs.java| 39 --- .../resourceFetch/model/SparkApplication.java | 57 .../model/SparkApplicationAttempt.java | 73 - .../model/SparkApplicationWrapper.java | 38 --- .../util/resourceFetch/model/SparkExecutor.java | 155 -- .../jpm/util/resourceFetch/model/SparkJob.java | 165 --- .../util/resourceFetch/model/SparkStage.java| 211 -- .../jpm/util/resourceFetch/model/SparkTask.java | 111 --- .../model/SparkTaskInputMetrics.java| 46 --- .../resourceFetch/model/SparkTaskMetrics.java | 118 .../model/SparkTaskShuffleReadMetrics.java | 82 -- .../model/SparkTaskShuffleWriteMetrics.java | 55 .../resourceFetch/model/TaskCounterGroup.java | 46 --- .../resourceFetch/model/TaskCounterItem.java| 44 --- .../util/resourceFetch/model/TaskCounters.java | 46 --- .../model/TaskCountersWrapper.java | 35 --- .../url/JobListServiceURLBuilderImpl.java | 52 .../resourceFetch/url/ServiceURLBuilder.java| 21 -- .../SparkCompleteJobServiceURLBuilderImpl.java | 33 --- .../url/SparkJobServiceURLBuilderImpl.java | 31 -- .../jpm/util/resourceFetch/url/URLUtil.java | 33 --- .../util/resourcefetch/RMResourceFetcher.java | 189 .../jpm/util/resourcefetch/ResourceFetcher.java | 27 ++ .../SparkHistoryServerResourceFetcher.java | 88 ++ .../connection/InputStreamUtils.java| 68 + .../util/resourcefetch/connection/JobUtils.java | 43 +++ .../connection/URLConnectionUtils.java | 101 +++ .../resourcefetch/ha/AbstractURLSelector.java | 110 +++ .../util/resourcefetch/ha/HAURLSelector.java| 28 ++ .../resourcefetch/ha/HAURLSelectorImpl.java | 109 +++ .../jpm/util/resourcefetch/model/AppInfo.java | 210 ++ .../util/resourcefetch/model/Applications.java | 38 +++ .../util/resourcefetch/model/AppsWrapper.java | 37 +++ .../util/resourcefetch/model/ClusterInfo.java | 119 .../resourcefetch/model/ClusterInfoWrapper.java | 35 +++ .../resourcefetch/model/JobCounterGroup.java| 46 +++ .../resourcefetch/model/JobCounterItem.java | 62 .../util/resourcefetch/model/JobCounters.java | 46 +++ .../resourcefetch/model/JobCountersWrapper.java | 35 +++ .../jpm/util/resourcefetch/model/MRJob.java | 289 +++ .../util/resourcefetch/model/MRJobsWrapper.java | 37 +++ .../jpm/util/resourcefetch/model/MRTask.java| 109 +++ .../util/resourcefetch/model/MRTaskAttempt.java | 136 +
[2/4] incubator-eagle git commit: [minor] Change resourceFetch to resourcefetch
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b5fd782c/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/connection/URLConnectionUtils.java -- diff --git a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/connection/URLConnectionUtils.java b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/connection/URLConnectionUtils.java new file mode 100644 index 000..2cd60ba --- /dev/null +++ b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/connection/URLConnectionUtils.java @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.jpm.util.resourcefetch.connection; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import javax.net.ssl.*; + +public final class URLConnectionUtils { +//TODO: change some public method to private +private static final Logger LOG = LoggerFactory.getLogger(URLConnectionUtils.class); + +public static URLConnection getConnection(String url) throws Exception { +if (url.startsWith("https://;)) { +return getHTTPSConnection(url); +} else if (url.startsWith("http://;)) { +return getHTTPConnection(url); +} +throw new Exception("Invalid input argument url: " + url); +} + +public static URLConnection getHTTPConnection(String urlString) throws Exception { +final URL url = new URL(urlString); +return url.openConnection(); +} + +public static URL getUrl(String urlString) throws Exception { +if (urlString.toLowerCase().contains("https")) { +return getHTTPSUrl(urlString); +} else if (urlString.toLowerCase().contains("http")) { +return getURL(urlString); +} +throw new Exception("Invalid input argument url: " + urlString); +} + +public static URL getURL(String urlString) throws MalformedURLException { +return new URL(urlString); +} + +public static URL getHTTPSUrl(String urlString) throws MalformedURLException, NoSuchAlgorithmException, KeyManagementException { +// Create a trust manager that does not validate certificate chains +final TrustManager[] trustAllCerts = new TrustManager[] {new TrustAllX509TrustManager()}; +// Install the all-trusting trust manager +final SSLContext sc = SSLContext.getInstance("SSL"); +sc.init(null, trustAllCerts, new java.security.SecureRandom()); +HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); +// Create all-trusting host name verifier +final HostnameVerifier allHostsValid = new HostnameVerifier() { +public boolean verify(String hostname, SSLSession session) { +return true; +} +}; +HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid); +return new URL(urlString); +} + +public static URLConnection getHTTPSConnection(String urlString) throws IOException, KeyManagementException, NoSuchAlgorithmException { +final URL url = getHTTPSUrl(urlString); +return url.openConnection(); +} + +public static class TrustAllX509TrustManager implements X509TrustManager { +@Override +public void checkClientTrusted( +java.security.cert.X509Certificate[] chain, String authType) +throws CertificateException { +} + +@Override +public void checkServerTrusted( +java.security.cert.X509Certificate[] chain, String authType) +throws CertificateException { +} + +@Override +public java.security.cert.X509Certificate[] getAcceptedIssuers() { +return null; +} +} +}
[3/4] incubator-eagle git commit: [minor] Change resourceFetch to resourcefetch
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b5fd782c/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTaskAttempts.java -- diff --git a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTaskAttempts.java b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTaskAttempts.java deleted file mode 100644 index 03af0d7..000 --- a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTaskAttempts.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Licensed to the Apache Software Foundation (ASF) under one or more - * * contributor license agreements. See the NOTICE file distributed with - * * this work for additional information regarding copyright ownership. - * * The ASF licenses this file to You 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 - * * - * *http://www.apache.org/licenses/LICENSE-2.0 - * * - * * 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 org.apache.eagle.jpm.util.resourcefetch.model; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.map.annotate.JsonSerialize; - -import java.util.List; - -@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class MRTaskAttempts { -public List getTaskAttempt() { -return taskAttempt; -} - -public void setTaskAttempt(List taskAttempt) { -this.taskAttempt = taskAttempt; -} - -private List taskAttempt; -} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b5fd782c/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasks.java -- diff --git a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasks.java b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasks.java deleted file mode 100644 index b23b23d..000 --- a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasks.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Licensed to the Apache Software Foundation (ASF) under one or more - * * contributor license agreements. See the NOTICE file distributed with - * * this work for additional information regarding copyright ownership. - * * The ASF licenses this file to You 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 - * * - * *http://www.apache.org/licenses/LICENSE-2.0 - * * - * * 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 org.apache.eagle.jpm.util.resourcefetch.model; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.map.annotate.JsonSerialize; - -import java.util.List; - -@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class MRTasks { -public List getTask() { -return task; -} - -public void setTask(List task) { -this.task = task; -} - -private List task; - -} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b5fd782c/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasksWrapper.java -- diff --git a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasksWrapper.java b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasksWrapper.java deleted file mode 100644 index f92234a..000 --- a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourceFetch/model/MRTasksWrapper.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Licensed to the Apache Software Foundation (ASF) under one or more - * * contributor license agreements. See the NOTICE file distributed with - * * this work for additional information regarding copyright ownership. - * * The ASF
[1/4] incubator-eagle git commit: [minor] Change resourceFetch to resourcefetch
Repository: incubator-eagle Updated Branches: refs/heads/develop 6f5f972c9 -> b5fd782c0 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b5fd782c/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/model/SparkStage.java -- diff --git a/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/model/SparkStage.java b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/model/SparkStage.java new file mode 100644 index 000..14edeee --- /dev/null +++ b/eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/model/SparkStage.java @@ -0,0 +1,211 @@ +/* + * + * * Licensed to the Apache Software Foundation (ASF) under one or more + * * contributor license agreements. See the NOTICE file distributed with + * * this work for additional information regarding copyright ownership. + * * The ASF licenses this file to You 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 + * * + * *http://www.apache.org/licenses/LICENSE-2.0 + * * + * * 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 org.apache.eagle.jpm.util.resourcefetch.model; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +import java.util.Map; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class SparkStage { +private String status; +private int stageId; +private int attemptId; +private int numActiveTasks; +private int numCompleteTasks; +private int numFailedTasks; +private long executorRunTime; +private long inputBytes; +private long inputRecords; +private long outputBytes; +private long outputRecords; +private long shuffleReadBytes; +private long shuffleReadRecords; +private long shuffleWriteBytes; +private long shuffleWriteRecords; +private long memoryBytesSpilled; +private long diskBytesSpilled; +private String name; +private String schedulingPool; +//taskID +private Maptasks; + +public String getStatus() { +return status; +} + +public void setStatus(String status) { +this.status = status; +} + +public int getStageId() { +return stageId; +} + +public void setStageId(int stageId) { +this.stageId = stageId; +} + +public int getAttemptId() { +return attemptId; +} + +public void setAttemptId(int attemptId) { +this.attemptId = attemptId; +} + +public int getNumActiveTasks() { +return numActiveTasks; +} + +public void setNumActiveTasks(int numActiveTasks) { +this.numActiveTasks = numActiveTasks; +} + +public int getNumCompleteTasks() { +return numCompleteTasks; +} + +public void setNumCompleteTasks(int numCompleteTasks) { +this.numCompleteTasks = numCompleteTasks; +} + +public int getNumFailedTasks() { +return numFailedTasks; +} + +public void setNumFailedTasks(int numFailedTasks) { +this.numFailedTasks = numFailedTasks; +} + +public long getExecutorRunTime() { +return executorRunTime; +} + +public void setExecutorRunTime(long executorRunTime) { +this.executorRunTime = executorRunTime; +} + +public long getInputBytes() { +return inputBytes; +} + +public void setInputBytes(long inputBytes) { +this.inputBytes = inputBytes; +} + +public long getInputRecords() { +return inputRecords; +} + +public void setInputRecords(long inputRecords) { +this.inputRecords = inputRecords; +} + +public long getOutputBytes() { +return outputBytes; +} + +public void setOutputBytes(long outputBytes) { +this.outputBytes = outputBytes; +} + +public long getOutputRecords() { +return outputRecords; +} + +public void setOutputRecords(long outputRecords) { +this.outputRecords = outputRecords; +} + +public long getShuffleReadBytes() { +return shuffleReadBytes; +} + +public void setShuffleReadBytes(long shuffleReadBytes) { +this.shuffleReadBytes = shuffleReadBytes; +} + +public long getShuffleReadRecords() { +return shuffleReadRecords; +} + +public void setShuffleReadRecords(long shuffleReadRecords) { +this.shuffleReadRecords =
[1/4] incubator-eagle git commit: [EAGLE-467] Job list apis for querying jobs regardless of the status [Forced Update!]
Repository: incubator-eagle Updated Branches: refs/heads/develop a20656b5e -> d6ec142d3 (forced update) http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d6ec142d/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java -- diff --git a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java index 9f993a6..2accad8 100644 --- a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java +++ b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java @@ -20,12 +20,13 @@ package org.apache.eagle.jpm.mr.running.parser; import org.apache.commons.lang3.tuple.Pair; import org.apache.eagle.jpm.mr.running.config.MRRunningConfigManager; -import org.apache.eagle.jpm.mr.running.entities.JobConfig; -import org.apache.eagle.jpm.mr.running.entities.JobExecutionAPIEntity; -import org.apache.eagle.jpm.mr.running.entities.TaskAttemptExecutionAPIEntity; -import org.apache.eagle.jpm.mr.running.entities.TaskExecutionAPIEntity; import org.apache.eagle.jpm.mr.running.recover.MRRunningJobManager; +import org.apache.eagle.jpm.mr.runningentity.JobConfig; +import org.apache.eagle.jpm.mr.runningentity.JobExecutionAPIEntity; +import org.apache.eagle.jpm.mr.runningentity.TaskAttemptExecutionAPIEntity; +import org.apache.eagle.jpm.mr.runningentity.TaskExecutionAPIEntity; import org.apache.eagle.jpm.util.Constants; +import org.apache.eagle.jpm.util.JobNameNormalization; import org.apache.eagle.jpm.util.MRJobTagName; import org.apache.eagle.jpm.util.Utils; import org.apache.eagle.jpm.util.resourceFetch.ResourceFetcher; @@ -118,7 +119,7 @@ public class MRJobParser implements Runnable { private void finishMRJob(String mrJobId) { JobExecutionAPIEntity jobExecutionAPIEntity = mrJobEntityMap.get(mrJobId); - jobExecutionAPIEntity.setStatus(Constants.AppState.FINISHED.toString()); + jobExecutionAPIEntity.setCurrentState(Constants.AppState.FINISHED.toString()); mrJobConfigs.remove(mrJobId); if (mrJobConfigs.size() == 0) { this.parserStatus = ParserStatus.APP_FINISHED; @@ -186,19 +187,20 @@ public class MRJobParser implements Runnable { mrJobEntityMap.put(id, new JobExecutionAPIEntity()); } +String jobDefId = JobNameNormalization.getInstance().normalize(mrJob.getName()); JobExecutionAPIEntity jobExecutionAPIEntity = mrJobEntityMap.get(id); jobExecutionAPIEntity.setTags(new HashMap<>(commonTags)); jobExecutionAPIEntity.getTags().put(MRJobTagName.JOB_ID.toString(), id); jobExecutionAPIEntity.getTags().put(MRJobTagName.JOB_NAME.toString(), mrJob.getName()); - jobExecutionAPIEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(), mrJob.getName()); + jobExecutionAPIEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(), jobDefId); jobExecutionAPIEntity.setTimestamp(app.getStartedTime()); jobExecutionAPIEntity.setSubmissionTime(app.getStartedTime()); jobExecutionAPIEntity.setStartTime(mrJob.getStartTime()); -jobExecutionAPIEntity.setElapsedTime(mrJob.getElapsedTime()); -jobExecutionAPIEntity.setStatus(mrJob.getState()); -jobExecutionAPIEntity.setMapsTotal(mrJob.getMapsTotal()); +jobExecutionAPIEntity.setDurationTime(mrJob.getElapsedTime()); +jobExecutionAPIEntity.setCurrentState(mrJob.getState()); +jobExecutionAPIEntity.setNumTotalMaps(mrJob.getMapsTotal()); jobExecutionAPIEntity.setMapsCompleted(mrJob.getMapsCompleted()); -jobExecutionAPIEntity.setReducesTotal(mrJob.getReducesTotal()); +jobExecutionAPIEntity.setNumTotalReduces(mrJob.getReducesTotal()); jobExecutionAPIEntity.setReducesCompleted(mrJob.getReducesCompleted()); jobExecutionAPIEntity.setMapProgress(mrJob.getMapProgress()); jobExecutionAPIEntity.setReduceProgress(mrJob.getReduceProgress()); @@ -220,7 +222,6 @@ public class MRJobParser implements Runnable { jobExecutionAPIEntity.setAllocatedMB(app.getAllocatedMB()); jobExecutionAPIEntity.setAllocatedVCores(app.getAllocatedVCores()); jobExecutionAPIEntity.setRunningContainers(app.getRunningContainers()); -runningJobManager.update(app.getId(), id, jobExecutionAPIEntity); } return true; @@ -434,10 +435,10 @@ public class MRJobParser implements Runnable { taskExecutionAPIEntity.setTimestamp(app.getStartedTime()); taskExecutionAPIEntity.setStartTime(task.getStartTime()); -
[4/4] incubator-eagle git commit: [EAGLE-467] Job list apis for querying jobs regardless of the status
[EAGLE-467] Job list apis for querying jobs regardless of the status https://issues.apache.org/jira/browse/EAGLE-467 Author: Qingwen ZhaoCloses #348 from qingwen220/jobAPI. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/d6ec142d Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/d6ec142d Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/d6ec142d Branch: refs/heads/develop Commit: d6ec142d3b1a6de28787e5fcda94f8f28cf02a3e Parents: acee5cb Author: Qingwen Zhao Authored: Fri Aug 19 17:46:42 2016 +0800 Committer: Qingwen Zhao Committed: Fri Aug 19 17:49:50 2016 +0800 -- .../eagle/jpm/entity/JPMEntityRepository.java | 30 -- .../org/apache/eagle/jpm/entity/JobConfig.java | 38 -- .../org/apache/eagle/jpm/entity/SparkApp.java | 428 -- .../apache/eagle/jpm/entity/SparkExecutor.java | 233 -- .../org/apache/eagle/jpm/entity/SparkJob.java | 178 .../org/apache/eagle/jpm/entity/SparkStage.java | 299 - .../org/apache/eagle/jpm/entity/SparkTask.java | 290 .../mr/historyentity/JPAEntityRepository.java | 40 ++ .../jpm/mr/historyentity/JobBaseAPIEntity.java | 24 + .../eagle/jpm/mr/historyentity/JobConfig.java | 38 ++ .../jpm/mr/historyentity/JobConfigSerDeser.java | 62 +++ .../JobConfigurationAPIEntity.java | 66 +++ .../jpm/mr/historyentity/JobEventAPIEntity.java | 44 ++ .../mr/historyentity/JobExecutionAPIEntity.java | 230 ++ .../JobProcessTimeStampEntity.java | 44 ++ .../TaskAttemptCounterAPIEntity.java| 61 +++ .../TaskAttemptExecutionAPIEntity.java | 101 + .../historyentity/TaskExecutionAPIEntity.java | 92 .../TaskFailureCountAPIEntity.java | 67 +++ .../mr/runningentity/JPMEntityRepository.java | 33 ++ .../eagle/jpm/mr/runningentity/JobConfig.java | 26 ++ .../jpm/mr/runningentity/JobConfigSerDeser.java | 46 ++ .../mr/runningentity/JobExecutionAPIEntity.java | 437 +++ .../TaskAttemptExecutionAPIEntity.java | 137 ++ .../runningentity/TaskExecutionAPIEntity.java | 127 ++ .../jpm/spark/crawl/JHFSparkEventReader.java| 6 +- .../jpm/spark/entity/JPMEntityRepository.java | 32 ++ .../eagle/jpm/spark/entity/JobConfig.java | 39 ++ .../jpm/spark/entity/JobConfigSerDeser.java | 46 ++ .../apache/eagle/jpm/spark/entity/SparkApp.java | 429 ++ .../eagle/jpm/spark/entity/SparkExecutor.java | 234 ++ .../apache/eagle/jpm/spark/entity/SparkJob.java | 179 .../eagle/jpm/spark/entity/SparkStage.java | 300 + .../eagle/jpm/spark/entity/SparkTask.java | 291 eagle-jpm/eagle-jpm-mr-history/pom.xml | 5 + .../eagle/jpm/mr/history/MRHistoryJobMain.java | 5 +- .../crawler/JobHistoryContentFilter.java| 6 +- .../crawler/JobHistoryContentFilterBuilder.java | 8 + .../crawler/JobHistoryContentFilterImpl.java| 11 + .../history/entities/JPAEntityRepository.java | 40 -- .../mr/history/entities/JobBaseAPIEntity.java | 24 - .../jpm/mr/history/entities/JobConfig.java | 38 -- .../mr/history/entities/JobConfigSerDeser.java | 62 --- .../entities/JobConfigurationAPIEntity.java | 66 --- .../mr/history/entities/JobEventAPIEntity.java | 44 -- .../history/entities/JobExecutionAPIEntity.java | 220 -- .../entities/JobProcessTimeStampEntity.java | 44 -- .../entities/TaskAttemptCounterAPIEntity.java | 61 --- .../entities/TaskAttemptExecutionAPIEntity.java | 101 - .../entities/TaskExecutionAPIEntity.java| 89 .../entities/TaskFailureCountAPIEntity.java | 67 --- .../HistoryJobEntityCreationListener.java | 2 +- .../HistoryJobEntityLifecycleListener.java | 2 +- .../mr/history/parser/JHFEventReaderBase.java | 14 +- .../mr/history/parser/JHFMRVer1EventReader.java | 2 +- ...JobConfigurationCreationServiceListener.java | 4 +- .../JobEntityCreationEagleServiceListener.java | 2 +- .../parser/JobEntityCreationPublisher.java | 2 +- .../parser/JobEntityLifecycleAggregator.java| 6 +- .../parser/TaskAttemptCounterListener.java | 6 +- .../mr/history/parser/TaskFailureListener.java | 6 +- .../jpm/mr/history/storm/JobHistorySpout.java | 2 +- .../src/main/resources/application.conf | 35 +- eagle-jpm/eagle-jpm-mr-running/pom.xml | 5 + .../eagle/jpm/mr/running/MRRunningJobMain.java | 1 + .../running/entities/JPMEntityRepository.java | 32 -- .../jpm/mr/running/entities/JobConfig.java | 25 -- .../running/entities/JobExecutionAPIEntity.java | 437 ---
[2/4] incubator-eagle git commit: [EAGLE-467] Job list apis for querying jobs regardless of the status
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d6ec142d/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java deleted file mode 100755 index 964d68a..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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 org.apache.eagle.jpm.mr.history.entities; - -import org.apache.eagle.jpm.util.jobcounter.JobCounters; -import org.apache.eagle.jpm.util.jobcounter.JobCountersSerDeser; -import org.apache.eagle.log.entity.repo.EntityRepository; - -public class JPAEntityRepository extends EntityRepository { - -public JPAEntityRepository() { -serDeserMap.put(JobCounters.class, new JobCountersSerDeser()); -serDeserMap.put(JobConfig.class, new JobConfigSerDeser()); -entitySet.add(JobConfigurationAPIEntity.class); -entitySet.add(JobEventAPIEntity.class); -entitySet.add(JobExecutionAPIEntity.class); - -entitySet.add(TaskAttemptExecutionAPIEntity.class); -entitySet.add(TaskExecutionAPIEntity.class); -entitySet.add(TaskFailureCountAPIEntity.class); -entitySet.add(TaskAttemptCounterAPIEntity.class); -entitySet.add(JobProcessTimeStampEntity.class); -} -} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d6ec142d/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java deleted file mode 100644 index 32c6f7c..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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 org.apache.eagle.jpm.mr.history.entities; - -import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity; - -public class JobBaseAPIEntity extends TaggedLogAPIEntity { -} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d6ec142d/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java deleted file mode 100644 index f1dc375..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright
[2/4] incubator-eagle git commit: [EAGLE-467] Job list apis for querying jobs regardless of the status
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a20656b5/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java deleted file mode 100755 index 964d68a..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JPAEntityRepository.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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 org.apache.eagle.jpm.mr.history.entities; - -import org.apache.eagle.jpm.util.jobcounter.JobCounters; -import org.apache.eagle.jpm.util.jobcounter.JobCountersSerDeser; -import org.apache.eagle.log.entity.repo.EntityRepository; - -public class JPAEntityRepository extends EntityRepository { - -public JPAEntityRepository() { -serDeserMap.put(JobCounters.class, new JobCountersSerDeser()); -serDeserMap.put(JobConfig.class, new JobConfigSerDeser()); -entitySet.add(JobConfigurationAPIEntity.class); -entitySet.add(JobEventAPIEntity.class); -entitySet.add(JobExecutionAPIEntity.class); - -entitySet.add(TaskAttemptExecutionAPIEntity.class); -entitySet.add(TaskExecutionAPIEntity.class); -entitySet.add(TaskFailureCountAPIEntity.class); -entitySet.add(TaskAttemptCounterAPIEntity.class); -entitySet.add(JobProcessTimeStampEntity.class); -} -} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a20656b5/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java deleted file mode 100644 index 32c6f7c..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobBaseAPIEntity.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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 org.apache.eagle.jpm.mr.history.entities; - -import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity; - -public class JobBaseAPIEntity extends TaggedLogAPIEntity { -} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a20656b5/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java deleted file mode 100644 index f1dc375..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/entities/JobConfig.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright
[1/4] incubator-eagle git commit: [EAGLE-467] Job list apis for querying jobs regardless of the status
Repository: incubator-eagle Updated Branches: refs/heads/develop acee5cb33 -> a20656b5e http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a20656b5/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java -- diff --git a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java index 9f993a6..2accad8 100644 --- a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java +++ b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java @@ -20,12 +20,13 @@ package org.apache.eagle.jpm.mr.running.parser; import org.apache.commons.lang3.tuple.Pair; import org.apache.eagle.jpm.mr.running.config.MRRunningConfigManager; -import org.apache.eagle.jpm.mr.running.entities.JobConfig; -import org.apache.eagle.jpm.mr.running.entities.JobExecutionAPIEntity; -import org.apache.eagle.jpm.mr.running.entities.TaskAttemptExecutionAPIEntity; -import org.apache.eagle.jpm.mr.running.entities.TaskExecutionAPIEntity; import org.apache.eagle.jpm.mr.running.recover.MRRunningJobManager; +import org.apache.eagle.jpm.mr.runningentity.JobConfig; +import org.apache.eagle.jpm.mr.runningentity.JobExecutionAPIEntity; +import org.apache.eagle.jpm.mr.runningentity.TaskAttemptExecutionAPIEntity; +import org.apache.eagle.jpm.mr.runningentity.TaskExecutionAPIEntity; import org.apache.eagle.jpm.util.Constants; +import org.apache.eagle.jpm.util.JobNameNormalization; import org.apache.eagle.jpm.util.MRJobTagName; import org.apache.eagle.jpm.util.Utils; import org.apache.eagle.jpm.util.resourceFetch.ResourceFetcher; @@ -118,7 +119,7 @@ public class MRJobParser implements Runnable { private void finishMRJob(String mrJobId) { JobExecutionAPIEntity jobExecutionAPIEntity = mrJobEntityMap.get(mrJobId); - jobExecutionAPIEntity.setStatus(Constants.AppState.FINISHED.toString()); + jobExecutionAPIEntity.setCurrentState(Constants.AppState.FINISHED.toString()); mrJobConfigs.remove(mrJobId); if (mrJobConfigs.size() == 0) { this.parserStatus = ParserStatus.APP_FINISHED; @@ -186,19 +187,20 @@ public class MRJobParser implements Runnable { mrJobEntityMap.put(id, new JobExecutionAPIEntity()); } +String jobDefId = JobNameNormalization.getInstance().normalize(mrJob.getName()); JobExecutionAPIEntity jobExecutionAPIEntity = mrJobEntityMap.get(id); jobExecutionAPIEntity.setTags(new HashMap<>(commonTags)); jobExecutionAPIEntity.getTags().put(MRJobTagName.JOB_ID.toString(), id); jobExecutionAPIEntity.getTags().put(MRJobTagName.JOB_NAME.toString(), mrJob.getName()); - jobExecutionAPIEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(), mrJob.getName()); + jobExecutionAPIEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(), jobDefId); jobExecutionAPIEntity.setTimestamp(app.getStartedTime()); jobExecutionAPIEntity.setSubmissionTime(app.getStartedTime()); jobExecutionAPIEntity.setStartTime(mrJob.getStartTime()); -jobExecutionAPIEntity.setElapsedTime(mrJob.getElapsedTime()); -jobExecutionAPIEntity.setStatus(mrJob.getState()); -jobExecutionAPIEntity.setMapsTotal(mrJob.getMapsTotal()); +jobExecutionAPIEntity.setDurationTime(mrJob.getElapsedTime()); +jobExecutionAPIEntity.setCurrentState(mrJob.getState()); +jobExecutionAPIEntity.setNumTotalMaps(mrJob.getMapsTotal()); jobExecutionAPIEntity.setMapsCompleted(mrJob.getMapsCompleted()); -jobExecutionAPIEntity.setReducesTotal(mrJob.getReducesTotal()); +jobExecutionAPIEntity.setNumTotalReduces(mrJob.getReducesTotal()); jobExecutionAPIEntity.setReducesCompleted(mrJob.getReducesCompleted()); jobExecutionAPIEntity.setMapProgress(mrJob.getMapProgress()); jobExecutionAPIEntity.setReduceProgress(mrJob.getReduceProgress()); @@ -220,7 +222,6 @@ public class MRJobParser implements Runnable { jobExecutionAPIEntity.setAllocatedMB(app.getAllocatedMB()); jobExecutionAPIEntity.setAllocatedVCores(app.getAllocatedVCores()); jobExecutionAPIEntity.setRunningContainers(app.getRunningContainers()); -runningJobManager.update(app.getId(), id, jobExecutionAPIEntity); } return true; @@ -434,10 +435,10 @@ public class MRJobParser implements Runnable { taskExecutionAPIEntity.setTimestamp(app.getStartedTime()); taskExecutionAPIEntity.setStartTime(task.getStartTime()); -
[4/4] incubator-eagle git commit: [EAGLE-467] Job list apis for querying jobs regardless of the status
[EAGLE-467] Job list apis for querying jobs regardless of the status https://issues.apache.org/jira/browse/EAGLE-467 Author: Qingwen ZhaoAuthor: Qingwen Zhao Closes #348 from qingwen220/jobAPI. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a20656b5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a20656b5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a20656b5 Branch: refs/heads/develop Commit: a20656b5e26e3644a7d9a7cd591c4cdf91f8695c Parents: acee5cb Author: Qingwen Zhao Authored: Fri Aug 19 17:46:42 2016 +0800 Committer: Qingwen Zhao Committed: Fri Aug 19 17:46:42 2016 +0800 -- .../eagle/jpm/entity/JPMEntityRepository.java | 30 -- .../org/apache/eagle/jpm/entity/JobConfig.java | 38 -- .../org/apache/eagle/jpm/entity/SparkApp.java | 428 -- .../apache/eagle/jpm/entity/SparkExecutor.java | 233 -- .../org/apache/eagle/jpm/entity/SparkJob.java | 178 .../org/apache/eagle/jpm/entity/SparkStage.java | 299 - .../org/apache/eagle/jpm/entity/SparkTask.java | 290 .../mr/historyentity/JPAEntityRepository.java | 40 ++ .../jpm/mr/historyentity/JobBaseAPIEntity.java | 24 + .../eagle/jpm/mr/historyentity/JobConfig.java | 38 ++ .../jpm/mr/historyentity/JobConfigSerDeser.java | 62 +++ .../JobConfigurationAPIEntity.java | 66 +++ .../jpm/mr/historyentity/JobEventAPIEntity.java | 44 ++ .../mr/historyentity/JobExecutionAPIEntity.java | 230 ++ .../JobProcessTimeStampEntity.java | 44 ++ .../TaskAttemptCounterAPIEntity.java| 61 +++ .../TaskAttemptExecutionAPIEntity.java | 101 + .../historyentity/TaskExecutionAPIEntity.java | 92 .../TaskFailureCountAPIEntity.java | 67 +++ .../mr/runningentity/JPMEntityRepository.java | 33 ++ .../eagle/jpm/mr/runningentity/JobConfig.java | 26 ++ .../jpm/mr/runningentity/JobConfigSerDeser.java | 46 ++ .../mr/runningentity/JobExecutionAPIEntity.java | 437 +++ .../TaskAttemptExecutionAPIEntity.java | 137 ++ .../runningentity/TaskExecutionAPIEntity.java | 127 ++ .../jpm/spark/crawl/JHFSparkEventReader.java| 6 +- .../jpm/spark/entity/JPMEntityRepository.java | 32 ++ .../eagle/jpm/spark/entity/JobConfig.java | 39 ++ .../jpm/spark/entity/JobConfigSerDeser.java | 46 ++ .../apache/eagle/jpm/spark/entity/SparkApp.java | 429 ++ .../eagle/jpm/spark/entity/SparkExecutor.java | 234 ++ .../apache/eagle/jpm/spark/entity/SparkJob.java | 179 .../eagle/jpm/spark/entity/SparkStage.java | 300 + .../eagle/jpm/spark/entity/SparkTask.java | 291 eagle-jpm/eagle-jpm-mr-history/pom.xml | 5 + .../eagle/jpm/mr/history/MRHistoryJobMain.java | 5 +- .../crawler/JobHistoryContentFilter.java| 6 +- .../crawler/JobHistoryContentFilterBuilder.java | 8 + .../crawler/JobHistoryContentFilterImpl.java| 11 + .../history/entities/JPAEntityRepository.java | 40 -- .../mr/history/entities/JobBaseAPIEntity.java | 24 - .../jpm/mr/history/entities/JobConfig.java | 38 -- .../mr/history/entities/JobConfigSerDeser.java | 62 --- .../entities/JobConfigurationAPIEntity.java | 66 --- .../mr/history/entities/JobEventAPIEntity.java | 44 -- .../history/entities/JobExecutionAPIEntity.java | 220 -- .../entities/JobProcessTimeStampEntity.java | 44 -- .../entities/TaskAttemptCounterAPIEntity.java | 61 --- .../entities/TaskAttemptExecutionAPIEntity.java | 101 - .../entities/TaskExecutionAPIEntity.java| 89 .../entities/TaskFailureCountAPIEntity.java | 67 --- .../HistoryJobEntityCreationListener.java | 2 +- .../HistoryJobEntityLifecycleListener.java | 2 +- .../mr/history/parser/JHFEventReaderBase.java | 14 +- .../mr/history/parser/JHFMRVer1EventReader.java | 2 +- ...JobConfigurationCreationServiceListener.java | 4 +- .../JobEntityCreationEagleServiceListener.java | 2 +- .../parser/JobEntityCreationPublisher.java | 2 +- .../parser/JobEntityLifecycleAggregator.java| 6 +- .../parser/TaskAttemptCounterListener.java | 6 +- .../mr/history/parser/TaskFailureListener.java | 6 +- .../jpm/mr/history/storm/JobHistorySpout.java | 2 +- .../src/main/resources/application.conf | 35 +- eagle-jpm/eagle-jpm-mr-running/pom.xml | 5 + .../eagle/jpm/mr/running/MRRunningJobMain.java | 1 + .../running/entities/JPMEntityRepository.java | 32 -- .../jpm/mr/running/entities/JobConfig.java | 25 -- .../running/entities/JobExecutionAPIEntity.java | 437 ---
incubator-eagle git commit: [EAGLE-473] Query error if query string contains "[]"
Repository: incubator-eagle Updated Branches: refs/heads/develop 34e77cafc -> 9432fcf91 [EAGLE-473] Query error if query string contains "[]" https://issues.apache.org/jira/browse/EAGLE-473 Fix the bug with an unit test Author: Qingwen ZhaoCloses #361 from qingwen220/EAGLE-473. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9432fcf9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9432fcf9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9432fcf9 Branch: refs/heads/develop Commit: 9432fcf91ab94cd9e228eb353e1b93739f977e67 Parents: 34e77ca Author: Qingwen Zhao Authored: Fri Aug 19 12:09:53 2016 +0800 Committer: Qingwen Zhao Committed: Fri Aug 19 12:09:53 2016 +0800 -- .../apache/eagle/query/ListQueryCompiler.java | 6 +-- .../aggregate/test/TestListQueryCompiler.java | 47 2 files changed, 50 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9432fcf9/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java -- diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java index c630c41..ab01064 100755 --- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java +++ b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java @@ -42,7 +42,7 @@ public class ListQueryCompiler { /** * syntax is []{} */ - private final static String listRegex = "^([^\\[]+)\\[([^\\]]*)\\]\\{(.+)\\}$"; + private final static String listRegex = "^([^\\[]+)\\[(.*)\\]\\{(.+)\\}$"; private final static Pattern _listPattern = Pattern.compile(listRegex); /** @@ -62,10 +62,10 @@ public class ListQueryCompiler { */ /** The regular expression before add EXP{} in query **/ - private final static String aggRegex = "^([^\\[]+)\\[([^\\]]*)\\]<([^>]*)>\\{(.+)\\}$"; + private final static String aggRegex = "^([^\\[]+)\\[(.*)\\]<([^>]*)>\\{(.+)\\}$"; private final static Pattern _aggPattern = Pattern.compile(aggRegex); - private final static String sortRegex = "^([^\\[]+)\\[([^\\]]*)\\]<([^>]*)>\\{(.+)\\}\\.\\{(.+)\\}$"; + private final static String sortRegex = "^([^\\[]+)\\[(.*)\\]<([^>]*)>\\{(.+)\\}\\.\\{(.+)\\}$"; private final static Pattern _sortPattern = Pattern.compile(sortRegex); private String _serviceName; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9432fcf9/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestListQueryCompiler.java -- diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestListQueryCompiler.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestListQueryCompiler.java new file mode 100644 index 000..10f96dc --- /dev/null +++ b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestListQueryCompiler.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.query.aggregate.test; + +import org.apache.eagle.query.ListQueryCompiler; +import org.apache.eagle.query.parser.EagleQueryParseException; +import org.junit.Assert; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TestListQueryCompiler { +private final static Logger LOG = LoggerFactory.getLogger(TestListQueryCompiler.class); +@Test +
incubator-eagle git commit: [EAGLE-443] refactor ProcessedTimeStamp [Forced Update!]
Repository: incubator-eagle Updated Branches: refs/heads/develop 2a99ace38 -> c65138b8b (forced update) [EAGLE-443] refactor ProcessedTimeStamp Author: jinhuwuCloses #326 from wujinhu/EAGLE-443. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/c65138b8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/c65138b8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/c65138b8 Branch: refs/heads/develop Commit: c65138b8b4a4ff1695c2edd93fdfad2d0f563ece Parents: e2532a1 Author: jinhuwu Authored: Thu Aug 11 11:01:02 2016 +0800 Committer: Qingwen Zhao Committed: Thu Aug 11 11:06:05 2016 +0800 -- .../eagle/jpm/mr/history/MRHistoryJobMain.java | 3 - .../history/storm/HistoryJobProgressBolt.java | 132 --- .../jpm/mr/history/storm/JobHistorySpout.java | 75 ++- .../mr/history/zkres/JobHistoryZKStateLCM.java | 2 + .../history/zkres/JobHistoryZKStateManager.java | 49 ++- 5 files changed, 119 insertions(+), 142 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c65138b8/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java index ffa2f22..c6f1b98 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java +++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java @@ -25,7 +25,6 @@ import backtype.storm.topology.TopologyBuilder; import org.apache.eagle.jpm.mr.history.common.JHFConfigManager; import org.apache.eagle.jpm.mr.history.crawler.JobHistoryContentFilter; import org.apache.eagle.jpm.mr.history.crawler.JobHistoryContentFilterBuilder; -import org.apache.eagle.jpm.mr.history.storm.HistoryJobProgressBolt; import org.apache.eagle.jpm.mr.history.storm.JobHistorySpout; import org.apache.eagle.jpm.util.Constants; @@ -59,7 +58,6 @@ public class MRHistoryJobMain { topologyName = jhfAppConf.getString("envContextConfig.topologyName"); } String spoutName = "mrHistoryJobExecutor"; -String boltName = "updateProcessTime"; int parallelism = jhfAppConf.getInt("envContextConfig.parallelismConfig." + spoutName); int tasks = jhfAppConf.getInt("envContextConfig.tasks." + spoutName); if (parallelism > tasks) { @@ -70,7 +68,6 @@ public class MRHistoryJobMain { new JobHistorySpout(filter, jhfConfigManager), parallelism ).setNumTasks(tasks); -topologyBuilder.setBolt(boltName, new HistoryJobProgressBolt(spoutName, jhfConfigManager), 1).setNumTasks(1).allGrouping(spoutName); Config config = new backtype.storm.Config(); config.setNumWorkers(jhfAppConf.getInt("envContextConfig.workers")); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c65138b8/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java deleted file mode 100644 index 30374c4..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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 org.apache.eagle.jpm.mr.history.storm; - -import
incubator-eagle git commit: [EAGLE-443] refactor ProcessedTimeStamp
Repository: incubator-eagle Updated Branches: refs/heads/develop e2532a1db -> 2a99ace38 [EAGLE-443] refactor ProcessedTimeStamp Author: jinhuwuAuthor: pkuwm Author: Zhao, Qingwen Closes #326 from wujinhu/EAGLE-443. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/2a99ace3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/2a99ace3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/2a99ace3 Branch: refs/heads/develop Commit: 2a99ace382a61648f7b1d56c8acd51a98073ba14 Parents: e2532a1 Author: jinhuwu Authored: Thu Aug 11 11:01:02 2016 +0800 Committer: Qingwen Zhao Committed: Thu Aug 11 11:01:02 2016 +0800 -- .../eagle/jpm/mr/history/MRHistoryJobMain.java | 3 - .../history/storm/HistoryJobProgressBolt.java | 132 --- .../jpm/mr/history/storm/JobHistorySpout.java | 75 ++- .../mr/history/zkres/JobHistoryZKStateLCM.java | 2 + .../history/zkres/JobHistoryZKStateManager.java | 49 ++- 5 files changed, 119 insertions(+), 142 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2a99ace3/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java index ffa2f22..c6f1b98 100644 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java +++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobMain.java @@ -25,7 +25,6 @@ import backtype.storm.topology.TopologyBuilder; import org.apache.eagle.jpm.mr.history.common.JHFConfigManager; import org.apache.eagle.jpm.mr.history.crawler.JobHistoryContentFilter; import org.apache.eagle.jpm.mr.history.crawler.JobHistoryContentFilterBuilder; -import org.apache.eagle.jpm.mr.history.storm.HistoryJobProgressBolt; import org.apache.eagle.jpm.mr.history.storm.JobHistorySpout; import org.apache.eagle.jpm.util.Constants; @@ -59,7 +58,6 @@ public class MRHistoryJobMain { topologyName = jhfAppConf.getString("envContextConfig.topologyName"); } String spoutName = "mrHistoryJobExecutor"; -String boltName = "updateProcessTime"; int parallelism = jhfAppConf.getInt("envContextConfig.parallelismConfig." + spoutName); int tasks = jhfAppConf.getInt("envContextConfig.tasks." + spoutName); if (parallelism > tasks) { @@ -70,7 +68,6 @@ public class MRHistoryJobMain { new JobHistorySpout(filter, jhfConfigManager), parallelism ).setNumTasks(tasks); -topologyBuilder.setBolt(boltName, new HistoryJobProgressBolt(spoutName, jhfConfigManager), 1).setNumTasks(1).allGrouping(spoutName); Config config = new backtype.storm.Config(); config.setNumWorkers(jhfAppConf.getInt("envContextConfig.workers")); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2a99ace3/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java -- diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java deleted file mode 100644 index 30374c4..000 --- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/storm/HistoryJobProgressBolt.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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.
[5/8] incubator-eagle git commit: [EAGLE-422] eagle support for mr & spark running job monitoring
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5bf2c62d/eagle-jpm/eagle-jpm-mr-running/src/main/resources/JobCounter.conf -- diff --git a/eagle-jpm/eagle-jpm-mr-running/src/main/resources/JobCounter.conf b/eagle-jpm/eagle-jpm-mr-running/src/main/resources/JobCounter.conf new file mode 100644 index 000..1524e61 --- /dev/null +++ b/eagle-jpm/eagle-jpm-mr-running/src/main/resources/JobCounter.conf @@ -0,0 +1,187 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. + + Sample configuration: +## counter.group0.name = groupname1 +## counter.group0.counter0.names = counterName1,counterName2,... +## counter.group0.counter0.description = counter description... + +counter.group0.name = org.apache.hadoop.mapreduce.FileSystemCounter +counter.group0.description = File System Counters +counter.group0.counter0.names = FILE_BYTES_READ +counter.group0.counter0.description = FILE: Number of bytes read +counter.group0.counter1.names = FILE_BYTES_WRITTEN +counter.group0.counter1.description = FILE: Number of bytes written +counter.group0.counter2.names = FILE_READ_OPS +counter.group0.counter2.description = FILE: Number of read operations +counter.group0.counter3.names = FILE_LARGE_READ_OPS +counter.group0.counter3.description = FILE: Number of large read operations +counter.group0.counter4.names = FILE_WRITE_OPS +counter.group0.counter4.description = FILE: Number of write operations +counter.group0.counter5.names = HDFS_BYTES_READ +counter.group0.counter5.description = HDFS: Number of bytes read +counter.group0.counter6.names = HDFS_BYTES_WRITTEN +counter.group0.counter6.description = HDFS: Number of bytes written +counter.group0.counter7.names = HDFS_READ_OPS +counter.group0.counter7.description = HDFS: Number of read operations +counter.group0.counter8.names = HDFS_LARGE_READ_OPS +counter.group0.counter8.description = HDFS: Number of large read operations +counter.group0.counter9.names = HDFS_WRITE_OPS +counter.group0.counter9.description = HDFS: Number of write operations + +counter.group1.name = org.apache.hadoop.mapreduce.TaskCounter +counter.group1.description = Map-Reduce Framework +counter.group1.counter0.names = MAP_INPUT_RECORDS +counter.group1.counter0.description = Map input records +counter.group1.counter1.names = MAP_OUTPUT_RECORDS +counter.group1.counter1.description = Map output records +counter.group1.counter2.names = SPLIT_RAW_BYTES +counter.group1.counter2.description = Input split bytes +counter.group1.counter3.names = SPILLED_RECORDS +counter.group1.counter3.description = Spilled Records +counter.group1.counter4.names = CPU_MILLISECONDS +counter.group1.counter4.description = CPU time spent (ms) +counter.group1.counter5.names = PHYSICAL_MEMORY_BYTES +counter.group1.counter5.description = Physical memory (bytes) snapshot +counter.group1.counter6.names = VIRTUAL_MEMORY_BYTES +counter.group1.counter6.description = Virtual memory (bytes) snapshot +counter.group1.counter7.names = COMMITTED_HEAP_BYTES +counter.group1.counter7.description = Total committed heap usage (bytes) +counter.group1.counter8.names = REDUCE_SHUFFLE_BYTES +counter.group1.counter8.description = Reduce shuffle bytes (bytes) +counter.group1.counter9.names = GC_TIME_MILLIS +counter.group1.counter9.description = GC time milliseconds +counter.group1.counter10.names = MAP_OUTPUT_BYTES +counter.group1.counter10.description = map output bytes +counter.group1.counter11.names = REDUCE_INPUT_RECORDS +counter.group1.counter11.description = reduce input records +counter.group1.counter12.names = COMBINE_INPUT_RECORDS +counter.group1.counter12.description = combine input records +counter.group1.counter13.names = COMBINE_OUTPUT_RECORDS +counter.group1.counter13.description = combine output records +counter.group1.counter14.names = REDUCE_INPUT_GROUPS +counter.group1.counter14.description = reduce input groups +counter.group1.counter15.names = REDUCE_OUTPUT_RECORDS +counter.group1.counter15.description = reduce output records +counter.group1.counter16.names = SHUFFLED_MAPS +counter.group1.counter16.description = shuffled maps +counter.group1.counter17.names = MAP_OUTPUT_MATERIALIZED_BYTES +counter.group1.counter17.description =
[3/8] incubator-eagle git commit: [EAGLE-422] eagle support for mr & spark running job monitoring
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5bf2c62d/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/parser/SparkApplicationParser.java -- diff --git a/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/parser/SparkApplicationParser.java b/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/parser/SparkApplicationParser.java new file mode 100644 index 000..bb76213 --- /dev/null +++ b/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/parser/SparkApplicationParser.java @@ -0,0 +1,647 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.jpm.spark.running.parser; + +import org.apache.commons.lang3.tuple.Pair; +import org.apache.eagle.jpm.spark.crawl.EventType; +import org.apache.eagle.jpm.spark.running.common.SparkRunningConfigManager; +import org.apache.eagle.jpm.spark.running.entities.*; +import org.apache.eagle.jpm.spark.running.recover.SparkRunningJobManager; +import org.apache.eagle.jpm.util.Constants; +import org.apache.eagle.jpm.util.HDFSUtil; +import org.apache.eagle.jpm.util.SparkJobTagName; +import org.apache.eagle.jpm.util.Utils; +import org.apache.eagle.jpm.util.resourceFetch.ResourceFetcher; +import org.apache.eagle.jpm.util.resourceFetch.connection.InputStreamUtils; +import org.apache.eagle.jpm.util.resourceFetch.model.*; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.codehaus.jackson.JsonParser; +import org.codehaus.jackson.map.ObjectMapper; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.*; +import java.util.function.Function; + +public class SparkApplicationParser implements Runnable { +private static final Logger LOG = LoggerFactory.getLogger(SparkApplicationParser.class); + +public enum ParserStatus { +RUNNING, +FINISHED, +APP_FINISHED +} + +private AppInfo app; +private static final int MAX_RETRY_TIMES = 2; +private SparkAppEntityCreationHandler sparkAppEntityCreationHandler; +//+private Map sparkAppEntityMap; +private Map sparkJobConfigs; +private Map >> stagesTime; +private Set completeStages; +private Configuration hdfsConf; +private SparkRunningConfigManager.EndpointConfig endpointConfig; +private final Object lock = new Object(); +private static final ObjectMapper OBJ_MAPPER = new ObjectMapper(); +private Map commonTags = new HashMap<>(); +private SparkRunningJobManager sparkRunningJobManager; +private ParserStatus parserStatus; +private ResourceFetcher rmResourceFetcher; +private int currentAttempt; +private boolean first; + +static { +OBJ_MAPPER.configure(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS, true); +} + +public SparkApplicationParser(SparkRunningConfigManager.EagleServiceConfig eagleServiceConfig, + SparkRunningConfigManager.EndpointConfig endpointConfig, + SparkRunningConfigManager.JobExtractorConfig jobExtractorConfig, + AppInfo app, Map sparkApp, + SparkRunningJobManager sparkRunningJobManager, ResourceFetcher rmResourceFetcher) { +this.sparkAppEntityCreationHandler = new SparkAppEntityCreationHandler(eagleServiceConfig); +this.endpointConfig = endpointConfig; +this.app = app; +this.sparkJobConfigs = new HashMap<>(); +this.stagesTime = new HashMap<>(); +this.completeStages = new HashSet<>(); +this.sparkAppEntityMap = sparkApp; +if (this.sparkAppEntityMap == null) { +this.sparkAppEntityMap = new
[4/8] incubator-eagle git commit: [EAGLE-422] eagle support for mr & spark running job monitoring
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5bf2c62d/eagle-jpm/eagle-jpm-spark-running/src/assembly/eagle-jpm-spark-running-assembly.xml -- diff --git a/eagle-jpm/eagle-jpm-spark-running/src/assembly/eagle-jpm-spark-running-assembly.xml b/eagle-jpm/eagle-jpm-spark-running/src/assembly/eagle-jpm-spark-running-assembly.xml new file mode 100644 index 000..66133a0 --- /dev/null +++ b/eagle-jpm/eagle-jpm-spark-running/src/assembly/eagle-jpm-spark-running-assembly.xml @@ -0,0 +1,65 @@ + + +http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd;> +assembly + +jar + +false + + +/ +false +true +runtime + + +org.wso2.orbit.com.lmax:disruptor +asm:asm +org.apache.storm:storm-core + + + + + +${project.build.outputDirectory}/ +/ + + + + + + + + + +*.yaml + + + + http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5bf2c62d/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/SparkRunningJobMain.java -- diff --git a/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/SparkRunningJobMain.java b/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/SparkRunningJobMain.java new file mode 100644 index 000..749f4d1 --- /dev/null +++ b/eagle-jpm/eagle-jpm-spark-running/src/main/java/org/apache/eagle/jpm/spark/running/SparkRunningJobMain.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.jpm.spark.running; + +import backtype.storm.Config; +import backtype.storm.LocalCluster; +import backtype.storm.StormSubmitter; +import backtype.storm.topology.TopologyBuilder; +import backtype.storm.tuple.Fields; +import org.apache.eagle.jpm.spark.running.common.SparkRunningConfigManager; +import org.apache.eagle.jpm.spark.running.storm.SparkRunningJobFetchSpout; +import org.apache.eagle.jpm.spark.running.storm.SparkRunningJobParseBolt; + +public class SparkRunningJobMain { +public static void main(String[] args) { +try { +//1. trigger init conf +SparkRunningConfigManager sparkRunningConfigManager = SparkRunningConfigManager.getInstance(args); + +//2. init topology +TopologyBuilder topologyBuilder = new TopologyBuilder(); +String topologyName = sparkRunningConfigManager.getConfig().getString("envContextConfig.topologyName"); +String spoutName = "sparkRunningJobFetchSpout"; +String boltName = "sparkRunningJobParseBolt"; +int parallelism = sparkRunningConfigManager.getConfig().getInt("envContextConfig.parallelismConfig." + spoutName); +int tasks = sparkRunningConfigManager.getConfig().getInt("envContextConfig.tasks." + spoutName); +if (parallelism > tasks) { +parallelism = tasks; +} +topologyBuilder.setSpout( +spoutName, +new SparkRunningJobFetchSpout( +sparkRunningConfigManager.getJobExtractorConfig(), +sparkRunningConfigManager.getEndpointConfig(), +sparkRunningConfigManager.getZkStateConfig()), +parallelism +).setNumTasks(tasks); + +parallelism = sparkRunningConfigManager.getConfig().getInt("envContextConfig.parallelismConfig." + boltName); +tasks = sparkRunningConfigManager.getConfig().getInt("envContextConfig.tasks." + boltName); +if
incubator-eagle git commit: [EAGLE-372] Change AlertNotificationEntity#fields type from String to List
Repository: incubator-eagle Updated Branches: refs/heads/develop 3ac32770d -> 9d32fb172 [EAGLE-372] Change AlertNotificationEntity#fields type from String to List https://issues.apache.org/jira/browse/EAGLE-372 We should avoid using String to express complex type in the entity definition. Author: Zhao, QingwenCloses #265 from qingwen220/EAGLE-372. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/9d32fb17 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/9d32fb17 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/9d32fb17 Branch: refs/heads/develop Commit: 9d32fb1726785df7a4a7054f155bd50df5f2a77b Parents: 3ac3277 Author: Zhao, Qingwen Authored: Wed Jul 13 11:26:20 2016 +0800 Committer: Zhao, Qingwen Committed: Wed Jul 13 11:26:20 2016 +0800 -- eagle-assembly/src/main/bin/eagle-topology-init.sh| 4 ++-- .../eagle/alert/entity/AlertNotificationEntity.java | 10 ++ 2 files changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d32fb17/eagle-assembly/src/main/bin/eagle-topology-init.sh -- diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh index 6d7f439..365fa99 100755 --- a/eagle-assembly/src/main/bin/eagle-topology-init.sh +++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh @@ -183,7 +183,7 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Conten "className": "org.apache.eagle.notification.plugin.AlertEmailPlugin", "description": "send alert to email", "enabled":true, - "fields": "[{\"name\":\"sender\"},{\"name\":\"recipients\"},{\"name\":\"subject\"}]" + "fields": [{"name":"sender"},{"name":"recipients"},{"name":"subject"}] }, { "prefix": "alertNotifications", @@ -193,7 +193,7 @@ curl -silent -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Conten "className": "org.apache.eagle.notification.plugin.AlertKafkaPlugin", "description": "send alert to kafka bus", "enabled":true, - "fields": "[{\"name\":\"kafka_broker\",\"value\":\"sandbox.hortonworks.com:6667\"},{\"name\":\"topic\"}]" + "fields": [{"name":"kafka_broker","value":"sandbox.hortonworks.com:6667"},{"name":"topic"}] }, { "prefix": "alertNotifications", http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9d32fb17/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java -- diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java index 290e4ab..2782be2 100644 --- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java +++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java @@ -23,6 +23,9 @@ import org.apache.eagle.policy.common.Constants; import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.map.annotate.JsonSerialize; +import java.util.List; +import java.util.Map; + @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL) @Table("alertNotifications") @@ -65,15 +68,14 @@ public class AlertNotificationEntity extends TaggedLogAPIEntity { } @Column("d") -private String fields; -public String getFields() { +private List
[1/2] incubator-eagle git commit: [EAGLE-350] Running queue metrics monitoring
Repository: incubator-eagle Updated Branches: refs/heads/develop f3e7687e3 -> 9f6fea4ab http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9f6fea4a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queues.java -- diff --git a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queues.java b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queues.java new file mode 100644 index 000..09b4eb0 --- /dev/null +++ b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/Queues.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.hadoop.queue.model.scheduler; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +import java.util.List; + +@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Queues { + public List getQueue() { + return queue; + } + + public void setQueue(List queue) { + this.queue = queue; + } + + private List queue; +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9f6fea4a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/ResourcesUsed.java -- diff --git a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/ResourcesUsed.java b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/ResourcesUsed.java new file mode 100644 index 000..cb80ff6 --- /dev/null +++ b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/ResourcesUsed.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.hadoop.queue.model.scheduler; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class ResourcesUsed { + + private long memory; + + private long vCores; + + public long getvCores() { + return vCores; + } + + public void setvCores(long vCores) { + this.vCores = vCores; + } + + public long getMemory() { + return memory; + } + + public void setMemory(long memory) { + this.memory = memory; + } + +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/9f6fea4a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/RunningQueueAPIEntity.java -- diff --git a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/RunningQueueAPIEntity.java b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/model/scheduler/RunningQueueAPIEntity.java new file mode 100755 index 000..a9b9b3a --- /dev/null +++
incubator-eagle git commit: EAGLE-345 Removing -SNAPSHOT from 0.4 release branch [Forced Update!]
Repository: incubator-eagle Updated Branches: refs/heads/branch-0.4 f06e76791 -> 73c8e023b (forced update) EAGLE-345 Removing -SNAPSHOT from 0.4 release branch do the following 2: 1. erase "-SNAPSHOT" suffix from version of modules. 2. add "apache-" as a prefix of finalName in eagle-assembly/pom.xml, so that final assembled tarball starts with "apache-" Author: anyway1021 <m...@apache.org> Reviewer: qingwzhao Closes #243 from anyway1021/EAGLE-345. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/73c8e023 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/73c8e023 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/73c8e023 Branch: refs/heads/branch-0.4 Commit: 73c8e023bd2c9d620c4938773fa147756f48ce0a Parents: 3823c01 Author: Zhao, Qingwen <qingwz...@ebay.com> Authored: Wed Jun 29 10:31:27 2016 +0800 Committer: Zhao, Qingwen <qingwz...@ebay.com> Committed: Wed Jun 29 10:31:27 2016 +0800 -- CHANGELOG.txt | 114 +++ eagle-assembly/pom.xml | 4 +- eagle-assembly/src/main/conf/eagle-service.conf | 24 ++-- eagle-core/eagle-alert/eagle-alert-base/pom.xml | 2 +- .../eagle-alert-notification-plugin/pom.xml | 2 +- .../eagle-alert/eagle-alert-process/pom.xml | 2 +- .../eagle-alert/eagle-alert-service/pom.xml | 2 +- eagle-core/eagle-alert/pom.xml | 2 +- .../eagle-application-service/pom.xml | 2 +- .../eagle-stream-application-manager/pom.xml| 2 +- eagle-core/eagle-application-management/pom.xml | 2 +- .../eagle-data-process/eagle-job-common/pom.xml | 2 +- .../eagle-storm-jobrunning-spout/pom.xml| 2 +- .../eagle-stream-pipeline/pom.xml | 2 +- .../eagle-stream-process-api/pom.xml| 2 +- .../eagle-stream-process-base/pom.xml | 2 +- eagle-core/eagle-data-process/pom.xml | 2 +- .../eagle-embed/eagle-embed-hbase/pom.xml | 2 +- .../eagle-embed/eagle-embed-server/pom.xml | 2 +- eagle-core/eagle-embed/pom.xml | 2 +- .../eagle-machinelearning-base/pom.xml | 2 +- eagle-core/eagle-machinelearning/pom.xml| 2 +- eagle-core/eagle-metric/pom.xml | 2 +- .../eagle-policy/eagle-policy-base/pom.xml | 2 +- eagle-core/eagle-policy/pom.xml | 2 +- eagle-core/eagle-query/eagle-antlr/pom.xml | 2 +- eagle-core/eagle-query/eagle-audit-base/pom.xml | 2 +- .../eagle-query/eagle-client-base/pom.xml | 2 +- eagle-core/eagle-query/eagle-common/pom.xml | 2 +- .../eagle-query/eagle-entity-base/pom.xml | 2 +- eagle-core/eagle-query/eagle-query-base/pom.xml | 2 +- .../eagle-query/eagle-service-base/pom.xml | 2 +- .../eagle-query/eagle-storage-base/pom.xml | 2 +- .../eagle-query/eagle-storage-hbase/pom.xml | 2 +- .../eagle-query/eagle-storage-jdbc/pom.xml | 2 +- eagle-core/eagle-query/pom.xml | 2 +- eagle-core/pom.xml | 2 +- eagle-examples/eagle-topology-example/pom.xml | 2 +- eagle-examples/pom.xml | 2 +- eagle-external/eagle-kafka/pom.xml | 2 +- eagle-external/eagle-log4jkafka/pom.xml | 2 +- eagle-external/pom.xml | 2 +- eagle-gc/pom.xml| 2 +- eagle-hadoop-metric/pom.xml | 2 +- eagle-security/eagle-metric-collection/pom.xml | 2 +- eagle-security/eagle-security-common/pom.xml| 2 +- .../eagle-security-hbase-securitylog/pom.xml| 2 +- eagle-security/eagle-security-hbase-web/pom.xml | 2 +- .../eagle-security-hdfs-auditlog/pom.xml| 2 +- .../eagle-security-hdfs-securitylog/pom.xml | 2 +- eagle-security/eagle-security-hdfs-web/pom.xml | 2 +- eagle-security/eagle-security-hive-web/pom.xml | 2 +- eagle-security/eagle-security-hive/pom.xml | 2 +- .../eagle-security-maprfs-auditlog/pom.xml | 2 +- .../eagle-security-maprfs-web/pom.xml | 2 +- .../eagle-security-oozie-auditlog/pom.xml | 2 +- eagle-security/eagle-security-oozie-web/pom.xml | 2 +- .../eagle-security-userprofile/common/pom.xml | 2 +- .../detection/pom.xml | 2 +- .../eagle-security-userprofile/pom.xml | 2 +- .../eagle-security-userprofile/training/pom.xml | 2 +- eagle-security/pom.xml | 2 +- eagle-topology-assembly/pom.xml | 2 +- eagle-webservice/pom.xml| 2 +- pom.xml | 2 +-
incubator-eagle git commit: EAGLE-345 Removing -SNAPSHOT from 0.4 release branch
Repository: incubator-eagle Updated Branches: refs/heads/branch-0.4 3823c019c -> f06e76791 EAGLE-345 Removing -SNAPSHOT from 0.4 release branch do the following 2: 1. erase "-SNAPSHOT" suffix from version of modules. 2. add "apache-" as a prefix of finalName in eagle-assembly/pom.xml, so that final assembled tarball starts with "apache-" Author: anyway1021Author: anyway1021 Closes #243 from anyway1021/EAGLE-345. Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f06e7679 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f06e7679 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f06e7679 Branch: refs/heads/branch-0.4 Commit: f06e76791ab231fdb9c031748e8188a0052dd16e Parents: 3823c01 Author: anyway1021 Authored: Wed Jun 29 10:25:58 2016 +0800 Committer: Zhao, Qingwen Committed: Wed Jun 29 10:25:58 2016 +0800 -- CHANGELOG.txt | 114 +++ eagle-assembly/pom.xml | 4 +- eagle-assembly/src/main/conf/eagle-service.conf | 24 ++-- eagle-core/eagle-alert/eagle-alert-base/pom.xml | 2 +- .../eagle-alert-notification-plugin/pom.xml | 2 +- .../eagle-alert/eagle-alert-process/pom.xml | 2 +- .../eagle-alert/eagle-alert-service/pom.xml | 2 +- eagle-core/eagle-alert/pom.xml | 2 +- .../eagle-application-service/pom.xml | 2 +- .../eagle-stream-application-manager/pom.xml| 2 +- eagle-core/eagle-application-management/pom.xml | 2 +- .../eagle-data-process/eagle-job-common/pom.xml | 2 +- .../eagle-storm-jobrunning-spout/pom.xml| 2 +- .../eagle-stream-pipeline/pom.xml | 2 +- .../eagle-stream-process-api/pom.xml| 2 +- .../eagle-stream-process-base/pom.xml | 2 +- eagle-core/eagle-data-process/pom.xml | 2 +- .../eagle-embed/eagle-embed-hbase/pom.xml | 2 +- .../eagle-embed/eagle-embed-server/pom.xml | 2 +- eagle-core/eagle-embed/pom.xml | 2 +- .../eagle-machinelearning-base/pom.xml | 2 +- eagle-core/eagle-machinelearning/pom.xml| 2 +- eagle-core/eagle-metric/pom.xml | 2 +- .../eagle-policy/eagle-policy-base/pom.xml | 2 +- eagle-core/eagle-policy/pom.xml | 2 +- eagle-core/eagle-query/eagle-antlr/pom.xml | 2 +- eagle-core/eagle-query/eagle-audit-base/pom.xml | 2 +- .../eagle-query/eagle-client-base/pom.xml | 2 +- eagle-core/eagle-query/eagle-common/pom.xml | 2 +- .../eagle-query/eagle-entity-base/pom.xml | 2 +- eagle-core/eagle-query/eagle-query-base/pom.xml | 2 +- .../eagle-query/eagle-service-base/pom.xml | 2 +- .../eagle-query/eagle-storage-base/pom.xml | 2 +- .../eagle-query/eagle-storage-hbase/pom.xml | 2 +- .../eagle-query/eagle-storage-jdbc/pom.xml | 2 +- eagle-core/eagle-query/pom.xml | 2 +- eagle-core/pom.xml | 2 +- eagle-examples/eagle-topology-example/pom.xml | 2 +- eagle-examples/pom.xml | 2 +- eagle-external/eagle-kafka/pom.xml | 2 +- eagle-external/eagle-log4jkafka/pom.xml | 2 +- eagle-external/pom.xml | 2 +- eagle-gc/pom.xml| 2 +- eagle-hadoop-metric/pom.xml | 2 +- eagle-security/eagle-metric-collection/pom.xml | 2 +- eagle-security/eagle-security-common/pom.xml| 2 +- .../eagle-security-hbase-securitylog/pom.xml| 2 +- eagle-security/eagle-security-hbase-web/pom.xml | 2 +- .../eagle-security-hdfs-auditlog/pom.xml| 2 +- .../eagle-security-hdfs-securitylog/pom.xml | 2 +- eagle-security/eagle-security-hdfs-web/pom.xml | 2 +- eagle-security/eagle-security-hive-web/pom.xml | 2 +- eagle-security/eagle-security-hive/pom.xml | 2 +- .../eagle-security-maprfs-auditlog/pom.xml | 2 +- .../eagle-security-maprfs-web/pom.xml | 2 +- .../eagle-security-oozie-auditlog/pom.xml | 2 +- eagle-security/eagle-security-oozie-web/pom.xml | 2 +- .../eagle-security-userprofile/common/pom.xml | 2 +- .../detection/pom.xml | 2 +- .../eagle-security-userprofile/pom.xml | 2 +- .../eagle-security-userprofile/training/pom.xml | 2 +- eagle-security/pom.xml | 2 +- eagle-topology-assembly/pom.xml | 2 +- eagle-webservice/pom.xml| 2 +- pom.xml | 2 +- 65 files changed, 189 insertions(+), 77 deletions(-)
incubator-eagle git commit: EAGLE-339: Automatically create hbase table when initializing
Repository: incubator-eagle Updated Branches: refs/heads/branch-0.4 355352899 -> b49bda14c EAGLE-339: Automatically create hbase table when initializing https://github.com/apache/incubator-eagle/pull/240 Author: Zhao, QingwenReviewer: Edward, Zhang Closes #240 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/b49bda14 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/b49bda14 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/b49bda14 Branch: refs/heads/branch-0.4 Commit: b49bda14cec0c92ff7224f18476fc4456faa93bd Parents: 3553528 Author: Zhao, Qingwen Authored: Fri Jun 17 14:08:25 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Jun 17 14:08:25 2016 +0800 -- .../src/main/bin/eagle-create-table.rb | 47 - .../src/main/bin/eagle-drop-tables.sh | 26 - eagle-assembly/src/main/bin/eagle-env.sh| 4 - .../src/main/bin/eagle-service-init.sh | 35 --- .../apache/eagle/common/config/EagleConfig.java | 3 + .../eagle/common/config/EagleConfigFactory.java | 5 + .../storage/hbase/HBaseEntitySchemaManager.java | 102 +++ .../eagle/storage/hbase/HBaseStorage.java | 1 + 8 files changed, 111 insertions(+), 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-create-table.rb -- diff --git a/eagle-assembly/src/main/bin/eagle-create-table.rb b/eagle-assembly/src/main/bin/eagle-create-table.rb deleted file mode 100755 index b1b790c..000 --- a/eagle-assembly/src/main/bin/eagle-create-table.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Create HBase tables for Eagle - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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 -# -#http://www.apache.org/licenses/LICENSE-2.0 -# -# 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. - -include Java -import org.apache.hadoop.hbase.HBaseConfiguration -import org.apache.hadoop.hbase.client.HBaseAdmin - -def createEagleTable(admin, tableName) - if !admin.tableExists(tableName) -# create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'GZ'} -create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'} -puts "Create Table #{tableName} successfully" - elsif admin.isTableDisabled(tableName) -admin.enableTable(tableName) -puts "Table #{tableName} already exists" - else -puts "Table #{tableName} already exists" - end -end - -conf = HBaseConfiguration.new -admin = HBaseAdmin.new(conf) - -if ARGV.empty? - puts "Table list is empty, please go back to bin/eagle-env.sh and export EAGLE_TABLE_LIST" - exit 1 -end - -tableListVal=ARGV.first - -tableListVal.split(' ').map { |i| createEagleTable(admin, i) } - -exit 0 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b49bda14/eagle-assembly/src/main/bin/eagle-drop-tables.sh -- diff --git a/eagle-assembly/src/main/bin/eagle-drop-tables.sh b/eagle-assembly/src/main/bin/eagle-drop-tables.sh deleted file mode 100755 index 37fb540..000 --- a/eagle-assembly/src/main/bin/eagle-drop-tables.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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 -# -#http://www.apache.org/licenses/LICENSE-2.0 -# -# 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. -
incubator-eagle git commit: EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException
Repository: incubator-eagle Updated Branches: refs/heads/branch-0.4 5a5a17c3d -> f51474dee EAGLE-327: Fix topologyOperation start exception: java.lang.ClassCastException https://issues.apache.org/jira/browse/EAGLE-327 Author: Zhao, QingwenReviewer: Wu, Michael Closes #218 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f51474de Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f51474de Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f51474de Branch: refs/heads/branch-0.4 Commit: f51474dee0c6ab40b4df965871b5d723c06f84a3 Parents: 5a5a17c Author: Zhao, Qingwen Authored: Mon Jun 6 10:25:05 2016 +0800 Committer: Zhao, Qingwen Committed: Mon Jun 6 10:25:05 2016 +0800 -- .../apache/eagle/alert/executor/AlertExecutorCreationUtils.java | 2 +- .../eagle/datastream/core/StreamParallelismConfigExpansion.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java index 8ab290e..8377267 100644 --- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java +++ b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java @@ -81,7 +81,7 @@ public class AlertExecutorCreationUtils { if(alertExecutorConfigs !=null && alertExecutorConfigs.containsKey(alertExecutorId)) { Map alertExecutorConfig = (Map ) alertExecutorConfigs.get(alertExecutorId).unwrapped(); int parts = 0; -if(alertExecutorConfig.containsKey("parallelism")) parts = (int) (alertExecutorConfig.get("parallelism")); +if(alertExecutorConfig.containsKey("parallelism")) parts = Integer.parseInt(alertExecutorConfig.get("parallelism").toString()); numPartitions = parts == 0 ? 1 : parts; if(alertExecutorConfig.containsKey("partitioner")) partitionerCls = (String) alertExecutorConfig.get("partitioner"); } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f51474de/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala -- diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala index 8699da6..7ac9ff5 100644 --- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala +++ b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala @@ -19,7 +19,7 @@ package org.apache.eagle.datastream.core import java.util.regex.Pattern -import com.typesafe.config.{Config, ConfigObject, ConfigValue} +import com.typesafe.config.{Config, ConfigObject} import org.jgrapht.experimental.dag.DirectedAcyclicGraph import org.slf4j.LoggerFactory @@ -48,7 +48,7 @@ case class StreamParallelismConfigExpansion(config: Config) extends StreamDAGExp if(config.hasPath("envContextConfig.parallelismConfig")) { val parallelismConfig: ConfigObject = config.getObject("envContextConfig.parallelismConfig") parallelismConfig.asScala.toMap map { -case (name, value) => (Pattern.compile(name), value.asInstanceOf[ConfigValue].unwrapped().asInstanceOf[Int]) +case (name, value) => (Pattern.compile(name), Integer.parseInt(value.unwrapped().toString)) } }else{ Map[Pattern,Int]()
[3/3] incubator-eagle git commit: disable testLengthSlideWindow
disable testLengthSlideWindow Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/8087ec0b Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/8087ec0b Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/8087ec0b Branch: refs/heads/dev Commit: 8087ec0b64f3809360361233d2d356fea4b19364 Parents: cf4b277 Author: Zhao, QingwenAuthored: Fri May 6 18:24:41 2016 +0800 Committer: Zhao, Qingwen Committed: Fri May 6 18:24:41 2016 +0800 -- .../eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/8087ec0b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java index d05dd30..131be28 100644 --- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java +++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java @@ -110,7 +110,7 @@ public class TestSiddhiStateSnapshotAndRestore { return executionPlanRuntime; } -@Test +@Ignore public void testLengthSlideWindow() throws Exception{ String tmpdir = System.getProperty("java.io.tmpdir"); System.out.println("temporary directory: " + tmpdir);
[2/3] incubator-eagle git commit: disable testLengthSlideWindowWithGroupby
disable testLengthSlideWindowWithGroupby Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/cf4b277a Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/cf4b277a Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/cf4b277a Branch: refs/heads/dev Commit: cf4b277a1645087df306e3b2f2c133c58a8826e2 Parents: 02fcb79 Author: Zhao, QingwenAuthored: Fri May 6 18:07:42 2016 +0800 Committer: Zhao, Qingwen Committed: Fri May 6 18:07:42 2016 +0800 -- .../eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/cf4b277a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java -- diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java index 6d8065f..d05dd30 100644 --- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java +++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java @@ -22,6 +22,7 @@ package org.apache.eagle.alert.state; import org.apache.eagle.common.DateTimeUtil; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.wso2.siddhi.core.ExecutionPlanRuntime; import org.wso2.siddhi.core.SiddhiManager; @@ -158,7 +159,7 @@ public class TestSiddhiStateSnapshotAndRestore { return executionPlanRuntime; } -@Test +@Ignore public void testLengthSlideWindowWithGroupby() throws Exception{ String tmpdir = System.getProperty("java.io.tmpdir"); System.out.println("temporary directory: " + tmpdir);
[1/3] incubator-eagle git commit: Add configuration value to enable application Manager
Repository: incubator-eagle Updated Branches: refs/heads/dev d8be43f1f -> 8087ec0b6 Add configuration value to enable application Manager Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/02fcb79d Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/02fcb79d Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/02fcb79d Branch: refs/heads/dev Commit: 02fcb79d7dcb959338547bec280cff1991b33cdb Parents: d8be43f Author: Zhao, QingwenAuthored: Fri May 6 11:21:48 2016 +0800 Committer: Zhao, Qingwen Committed: Fri May 6 11:21:48 2016 +0800 -- eagle-assembly/src/main/conf/eagle-scheduler.conf| 1 + .../eagle/service/application/AppManagerConstants.java | 1 + .../security/profile/ApplicationSchedulerListener.java | 8 ++-- eagle-webservice/src/main/resources/eagle-scheduler.conf | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-assembly/src/main/conf/eagle-scheduler.conf -- diff --git a/eagle-assembly/src/main/conf/eagle-scheduler.conf b/eagle-assembly/src/main/conf/eagle-scheduler.conf index aaab131..74ff18b 100644 --- a/eagle-assembly/src/main/conf/eagle-scheduler.conf +++ b/eagle-assembly/src/main/conf/eagle-scheduler.conf @@ -15,6 +15,7 @@ ### scheduler propertise +appCommandLoaderEnabled = false appCommandLoaderIntervalSecs = 1 appHealthCheckIntervalSecs = 5 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java -- diff --git a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java index dafd7fb..3aa3579 100644 --- a/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java +++ b/eagle-core/eagle-application-management/eagle-application-service/src/main/java/org/apache/eagle/service/application/AppManagerConstants.java @@ -36,6 +36,7 @@ public class AppManagerConstants { public final static String EAGLE_CLUSTER_STORM = "storm"; public final static String EAGLE_CLUSTER_SPARK = "spark"; +public final static String APP_COMMAND_LOADER_ENABLED = "appCommandLoaderEnabled"; public final static String APP_COMMAND_LOADER_INTERVAL_SECS = "appCommandLoaderIntervalSecs"; public final static String APP_HEALTH_CHECK_INTERVAL_SECS = "appHealthCheckIntervalSecs"; http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/02fcb79d/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java -- diff --git a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java index a225192..3ef9756 100644 --- a/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java +++ b/eagle-webservice/src/main/java/org/apache/eagle/service/security/profile/ApplicationSchedulerListener.java @@ -22,7 +22,9 @@ package org.apache.eagle.service.security.profile; import akka.actor.ActorSystem; import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; +import org.apache.eagle.service.application.AppManagerConstants; import org.apache.eagle.stream.application.scheduler.ApplicationScheduler; +import org.apache.hadoop.yarn.api.ApplicationConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.duration.Duration; @@ -42,7 +44,9 @@ public class ApplicationSchedulerListener implements ServletContextListener { //Get the actor system from the spring context //SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); Config config = ConfigFactory.load("eagle-scheduler.conf"); -system = new ApplicationScheduler().start(config); +if(config.hasPath(AppManagerConstants.APP_COMMAND_LOADER_ENABLED) && config.getBoolean(AppManagerConstants.APP_COMMAND_LOADER_ENABLED)) { +system = new ApplicationScheduler().start(config); +} } @Override @@ -52,7
incubator-eagle git commit: EAGLE-254 HdfsAuditLog topology keeps alerting for one piece of log
Repository: incubator-eagle Updated Branches: refs/heads/dev a725ea557 -> d8be43f1f EAGLE-254 HdfsAuditLog topology keeps alerting for one piece of log https://issues.apache.org/jira/browse/EAGLE-254 Fixed two bugs: HdfsAuditLog topology keeps alerting for one piece of log update invalid links in email template Author: Qingwen Zhao Closes #167 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/d8be43f1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/d8be43f1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/d8be43f1 Branch: refs/heads/dev Commit: d8be43f1f7ea22fccf8478dc335bbde42ce856f4 Parents: a725ea5 Author: Zhao, QingwenAuthored: Tue May 3 10:35:26 2016 +0800 Committer: Zhao, Qingwen Committed: Tue May 3 10:35:26 2016 +0800 -- .../java/org/apache/eagle/policy/common/UrlBuilder.java | 4 ++-- eagle-hadoop-metric/src/main/resources/log4j.properties | 5 - .../security/auditlog/HdfsAuditLogProcessorMain.java| 12 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d8be43f1/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java -- diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java index b10c6c8..1267e93 100644 --- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java +++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java @@ -39,7 +39,7 @@ public class UrlBuilder { } public static String buildAlertDetailUrl(String host, int port, AlertAPIEntity entity) { -String baseUrl = "http://; + host + ":" + String.valueOf(port) + "/eagle-service/#/dam/alertDetail/"; +String baseUrl = "http://; + host + ":" + String.valueOf(port) + "/eagle-service/ui/#/common/alertDetail/"; try { return baseUrl + UrlEncoded.encodeString(getEncodedRowkey(entity)); } @@ -50,7 +50,7 @@ public class UrlBuilder { } public static String buiildPolicyDetailUrl(String host, int port, Map tags) { -String baseUrl = "http://; + host + ":" + String.valueOf(port) + "/eagle-service/#/dam/policyDetail?"; +String baseUrl = "http://; + host + ":" + String.valueOf(port) + "/eagle-service/ui/#/common/policyDetail/?"; String format = "policy=%s=%s=%s"; String policy = tags.get(Constants.POLICY_ID); String site = tags.get(EagleConfigConstants.SITE); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d8be43f1/eagle-hadoop-metric/src/main/resources/log4j.properties -- diff --git a/eagle-hadoop-metric/src/main/resources/log4j.properties b/eagle-hadoop-metric/src/main/resources/log4j.properties index 07f8402..149caa7 100644 --- a/eagle-hadoop-metric/src/main/resources/log4j.properties +++ b/eagle-hadoop-metric/src/main/resources/log4j.properties @@ -18,11 +18,6 @@ log4j.rootLogger=INFO, stdout, DRFA eagle.log.dir=./logs eagle.log.file=eagle.log - -#log4j.logger.org.apache.eagle.security.auditlog.IPZoneDataJoinExecutor=DEBUG -#log4j.logger.org.apache.eagle.security.auditlog.FileSensitivityDataJoinExecutor=DEBUG -log4j.logger.org.apache.eagle.security.auditlog.HdfsUserCommandReassembler=DEBUG -#log4j.logger.org.apache.eagle.executor.AlertExecutor=DEBUG # standard output log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d8be43f1/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java -- diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java index f63a9be..60b0e36 100644 --- a/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java +++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/java/org/apache/eagle/security/auditlog/HdfsAuditLogProcessorMain.java @@ -80,9 +80,9 @@ public class HdfsAuditLogProcessorMain {
incubator-eagle git commit: delete duplicate email template
Repository: incubator-eagle Updated Branches: refs/heads/dev ecf75b280 -> 035a9f694 delete duplicate email template Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/035a9f69 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/035a9f69 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/035a9f69 Branch: refs/heads/dev Commit: 035a9f6949e3ef378e98c9fad84c3087afef5e4d Parents: ecf75b2 Author: Zhao, QingwenAuthored: Mon Apr 25 17:03:09 2016 +0800 Committer: Zhao, Qingwen Committed: Mon Apr 25 17:03:09 2016 +0800 -- .../src/main/resources/ALERT_DEFAULT.vm | 15 +- .../src/main/resources/ALERT_DEFAULT.vm | 266 --- 2 files changed, 3 insertions(+), 278 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/035a9f69/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm -- diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm index 0a044f6..3e29439 100644 --- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm +++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm @@ -124,9 +124,6 @@ Eagle - - DAM Alert - @@ -139,7 +136,7 @@ - Malicious Data Operation Detected + $elem["application"] Alert Detected @@ -214,9 +211,6 @@ - Alert Type - - Policy Name @@ -225,9 +219,6 @@ - DAM Alert - - $elem["policyId"] @@ -258,13 +249,13 @@ -Malicious data operation found, please check. + $elem["application"] alert found, please check.
[4/5] incubator-eagle git commit: EAGLE-271 Topology management in remote/local mode including start/stop operations
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java -- diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java new file mode 100644 index 000..e32f48e --- /dev/null +++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/java/org/apache/eagle/stream/application/TopologyFactory.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.apache.eagle.stream.application; + + +import com.typesafe.config.Config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + + +public final class TopologyFactory { +public static Logger LOG = LoggerFactory.getLogger(TopologyFactory.class); +private final static MaptopologyCache = Collections.synchronizedMap(new HashMap ()); +public static TopologyExecutable getTopologyInstance(String topologyClass) throws TopologyException { +TopologyExecutable instance; +if(topologyCache.containsKey(topologyClass)){ +instance = topologyCache.get(topologyClass); +} else { +try { +LOG.info("load class " + topologyClass + "with classLoader " + TopologyFactory.class.getClassLoader().toString()); +instance = (TopologyExecutable) Class.forName(topologyClass).newInstance(); +topologyCache.put(topologyClass, instance); +} catch (ClassNotFoundException e) { +throw new TopologyException("Topology in type of " + topologyClass + " is not found",e); +} catch (InstantiationException | IllegalAccessException e) { +throw new TopologyException(e); +} +} +return instance; +} + +public static void submit(String topologyClass, Config config) throws TopologyException { +TopologyExecutable topology = getTopologyInstance(topologyClass); +topology.submit(topologyClass, config); +} +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/ecf75b28/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala -- diff --git a/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala new file mode 100644 index 000..3e918cc --- /dev/null +++ b/eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/AbstractDynamicApplication.scala @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + * + */ +
[1/2] incubator-eagle git commit: change dataSource to application in ALERT_DEFAULT.vm
Repository: incubator-eagle Updated Branches: refs/heads/master ed270c9e3 -> 99b25759c change dataSource to application in ALERT_DEFAULT.vm Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/5d82c610 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/5d82c610 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/5d82c610 Branch: refs/heads/master Commit: 5d82c61099416c99e3a3f011d0851c0589ddf383 Parents: ed270c9 Author: Zhao, QingwenAuthored: Fri Apr 22 11:08:57 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Apr 22 11:08:57 2016 +0800 -- .../src/main/resources/ALERT_DEFAULT.vm| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/5d82c610/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm -- diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm index 887d759..0a044f6 100644 --- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm +++ b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm @@ -209,7 +209,7 @@ $elem["site"] - $elem["dataSource"] + $elem["application"]
incubator-eagle git commit: EAGLE-212 Disable JSON format check
Repository: incubator-eagle Updated Branches: refs/heads/master 48ac798da -> f6aebe631 EAGLE-212 Disable JSON format check https://issues.apache.org/jira/browse/EAGLE-212 Author: Zhao, QingwenDate: Tue Mar 29 16:31:04 2016 +0800 Reviewer: Chen, Hao Closes #138 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/f6aebe63 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/f6aebe63 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/f6aebe63 Branch: refs/heads/master Commit: f6aebe631c20685674c0d5c57b29c0ff257ddcc8 Parents: 48ac798 Author: Zhao, Qingwen Authored: Fri Apr 8 14:36:22 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Apr 8 14:36:22 2016 +0800 -- .../main/webapp/app/public/js/ctrl/configurationController.js | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/f6aebe63/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js -- diff --git a/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js b/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js index 4841f11..300c6fd 100644 --- a/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js +++ b/eagle-webservice/src/main/webapp/app/public/js/ctrl/configurationController.js @@ -342,11 +342,7 @@ var _oriConfig = application.config; UI.updateConfirm("Application", {config: _oriConfig}, [ {name: "Configuration", field: "config", type: "blob"} - ], function(entity) { - if(entity.config !== "" && !common.parseJSON(entity.config, false)) { - return "Invalid JSON format"; - } - }).then(null, null, function(holder) { + ]).then(null, null, function(holder) { application.config = holder.entity.config; holder.closeFunc(); if(_oriConfig !== application.config) $scope.changed = true;
incubator-eagle git commit: EAGLE-212 Fix AlertDataSourceEntity Bug in Hive web
Repository: incubator-eagle Updated Branches: refs/heads/master c2c187789 -> a3986fccb EAGLE-212 Fix AlertDataSourceEntity Bug in Hive web https://issues.apache.org/jira/browse/EAGLE-212 Author: Zhao, QingwenReviewer: Jilin, Jiang Closed: #134 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/a3986fcc Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/a3986fcc Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/a3986fcc Branch: refs/heads/master Commit: a3986fccbcb9e50d51184810f928441f6f24bc44 Parents: c2c1877 Author: Zhao, Qingwen Authored: Tue Mar 29 16:50:25 2016 +0800 Committer: Zhao, Qingwen Committed: Tue Mar 29 16:50:25 2016 +0800 -- .../src/main/bin/eagle-topology-init.sh | 6 +- .../common/config/EagleConfigConstants.java | 3 + .../resolver/MetadataAccessConfigRepo.java | 25 .../audit/TestMetaDataAccessConfigRepo.java | 55 + .../hbase/HbaseMetadataBrowseWebResource.java | 16 +++-- .../hbase/resolver/HbaseMetadataResolver.java | 6 +- .../hdfs/resolver/HDFSResourceResolver.java | 6 +- .../hdfs/rest/HDFSResourceWebResource.java | 6 +- .../hive/dao/HiveMetadataAccessConfig.java | 32 ++ .../hive/dao/HiveMetadataAccessConfigDAO.java | 3 +- .../dao/HiveMetadataAccessConfigDAOImpl.java| 62 ++-- .../hive/TestHiveDataSourceConfigDAOImpl.java | 32 -- 12 files changed, 137 insertions(+), 115 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a3986fcc/eagle-assembly/src/main/bin/eagle-topology-init.sh -- diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh index fc476b4..2d638bf 100755 --- a/eagle-assembly/src/main/bin/eagle-topology-init.sh +++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh @@ -33,11 +33,11 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a echo "" echo "Importing applications for sample site ..." -curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService; -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hdfsAuditLog"}, "enabled": true, "config" : "{\"fs.defaultFS\":\"hdfs://sandbox.hortonworks.com:8020\"}"}]' +curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService; -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hdfsAuditLog"}, "enabled": true, "config" : "web.fs.defaultFS: \"hdfs://sandbox.hortonworks.com:8020\""}]' -curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService; -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hbaseSecurityLog"}, "enabled": true, "config" : "{\"hbase.zookeeper.property.clientPort\":\"2181\", \"hbase.zookeeper.quorum\":\"localhost\"}"}]' +curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService; -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hbaseSecurityLog"}, "enabled": true, "config" : "web.hbase.zookeeper.property.clientPort: \"2181\", web.hbase.zookeeper.quorum: \"localhost\""}]' -curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService; -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled": true, "config":"{\"accessType\":\"metastoredb_jdbc\",\"password\":\"hive\",\"user\":\"hive\",\"jdbcDriverClassName\":\"com.mysql.jdbc.Driver\",\"jdbcUrl\":\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\"}"}]' +curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService; -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled":
incubator-eagle git commit: EAGLE-61 classification supports secured cluster connection & enable Ldap authentication
Repository: incubator-eagle Updated Branches: refs/heads/master 1a3b9b086 -> d394a8e34 EAGLE-61 classification supports secured cluster connection & enable Ldap authentication https://issues.apache.org/jira/browse/EAGLE-61 Author: qingwen, zhaoReviewer: Ralph, su Closes #111 Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/d394a8e3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/d394a8e3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/d394a8e3 Branch: refs/heads/master Commit: d394a8e34ddb758f1f6f96bf40346d176859628b Parents: 1a3b9b0 Author: Zhao, Qingwen Authored: Fri Mar 4 15:15:24 2016 +0800 Committer: Zhao, Qingwen Committed: Fri Mar 4 15:15:24 2016 +0800 -- eagle-assembly/src/main/bin/eagle-service.sh| 6 ++ .../src/main/bin/eagle-topology-init.sh | 4 +- eagle-assembly/src/main/conf/eagle-service.conf | 6 ++ eagle-assembly/src/main/conf/ldap.properties| 25 ++ .../lib/EAGLE/package/scripts/actions.py| 6 +- .../eagle/log4j/kafka/KafkaLog4jAppender.scala | 7 +- .../eagle/log4j/kafka/TestGenericLogKeyer.scala | 58 -- .../log4j/kafka/TestKafkaLog4jAppender.scala| 25 +++--- .../resolver/MetadataAccessConfigRepo.java | 59 ++ .../eagle/security/util/HadoopSecurityUtil.java | 46 +++ .../eagle/security/util/LogParseUtil.java | 1 + .../hbase/parse/HbaseAuditLogParser.java| 3 +- .../hbase/HbaseMetadataBrowseWebResource.java | 12 +-- .../hbase/dao/HbaseMetadataAccessConfig.java| 43 --- .../dao/HbaseMetadataAccessConfigDAOImpl.java | 61 --- .../hbase/dao/HbaseMetadataDAOImpl.java | 14 ++-- .../hbase/resolver/HbaseMetadataResolver.java | 9 ++- .../service/security/hdfs/HDFSFileSystem.java | 81 .../security/hdfs/HDFSResourceAccessConfig.java | 45 --- .../security/hdfs/HDFSResourceConstants.java| 2 +- .../security/hdfs/HDFSResourceUtils.java| 63 --- .../hdfs/resolver/HDFSResourceResolver.java | 32 .../rest/HDFSResourceWebRequestValidator.java | 13 +++- .../hdfs/rest/HDFSResourceWebResource.java | 33 .../security/hdfs/test/HDFSFileSystemTest.java | 34 .../hdfs/test/HDFSResourceAccessConfigTest.java | 30 +--- .../hdfs/test/HDFSResourceConfigAccessTest.java | 34 .../hdfs/test/HDFSResourceResolverTest.java | 36 - .../HDFSResourceSensitivityServiceTest.java | 42 -- .../security/hdfs/test/HDFSResourceWebTest.java | 35 - .../security/auth/AuthoritiesPopulator.java | 62 +++ .../src/main/resources/eagleSecurity.xml| 73 +- 32 files changed, 414 insertions(+), 586 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d394a8e3/eagle-assembly/src/main/bin/eagle-service.sh -- diff --git a/eagle-assembly/src/main/bin/eagle-service.sh b/eagle-assembly/src/main/bin/eagle-service.sh index cdf097e..d104f73 100755 --- a/eagle-assembly/src/main/bin/eagle-service.sh +++ b/eagle-assembly/src/main/bin/eagle-service.sh @@ -50,6 +50,7 @@ fi EAGLE_SERVICE_CONF="eagle-service.conf" +EAGLE_LDAP_CONF="ldap.properties" # Always copy conf/eagle-service.properties to lib/tomcat/webapps/eagle-service/WEB-INF/classes/application.conf before starting if [ ! -e ${EAGLE_HOME}/conf/${EAGLE_SERVICE_CONF} ] @@ -59,6 +60,11 @@ then fi cp -f $EAGLE_HOME/conf/$EAGLE_SERVICE_CONF ${EAGLE_HOME}/lib/tomcat/webapps/eagle-service/WEB-INF/classes/application.conf +if [ -e ${EAGLE_HOME}/conf/${EAGLE_LDAP_CONF} ] +then + cp -f $EAGLE_HOME/conf/$EAGLE_LDAP_CONF ${EAGLE_HOME}/lib/tomcat/webapps/eagle-service/WEB-INF/classes/ +fi + case $1 in "start") echo "Starting eagle service ..." http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d394a8e3/eagle-assembly/src/main/bin/eagle-topology-init.sh -- diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh index 5d82efd..c326e38 100755 --- a/eagle-assembly/src/main/bin/eagle-topology-init.sh +++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh @@ -33,9 +33,9 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a echo "" echo "Importing applications for sample site ..." -curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json'
[1/2] incubator-eagle git commit: EAGLE-177 Replace Legacy "dataSource" field with "application" in all metadata
Repository: incubator-eagle Updated Branches: refs/heads/master d9ef76d97 -> 2b09be954 http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java -- diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java index af1fb3a..69c74db 100644 --- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java +++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java @@ -60,10 +60,10 @@ public class AlertStreamSchemaDAOImpl implements AlertStreamSchemaDAO { } @Override - public List findAlertStreamSchemaByDataSource(String dataSource) throws Exception { + public List findAlertStreamSchemaByApplication(String application) throws Exception { try { IEagleServiceClient client = new EagleServiceClientImpl(eagleServiceHost, eagleServicePort, username, password); - String query = Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME + "[@dataSource=\"" + dataSource + "\"]{*}"; + String query = Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}"; GenericServiceAPIResponseEntity response = client.search() .startTime(0) .endTime(10 * DateUtils.MILLIS_PER_DAY) http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java -- diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java index b9475a1..faa81d9 100644 --- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java +++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java @@ -30,7 +30,7 @@ public interface PolicyDefinitionDAO e * find list of active alert definitions for one specific site and dataSource * @return */ - List findActivePolicies(String site, String dataSource) throws Exception; + List findActivePolicies(String site, String application) throws Exception; /** * find map from alertExecutorId to map from policy Id to alert definition for one specific site and dataSource http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2b09be95/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java -- diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java index 300ff02..2c8616c 100644 --- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java +++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java @@ -50,10 +50,10 @@ public class PolicyDefinitionEntityDAOImpl findActivePolicies(String site, String dataSource) throws Exception { + public List findActivePolicies(String site, String application) throws Exception { try { IEagleServiceClient client = new EagleServiceClientImpl(connector); - String query = servicePointName + "[@site=\"" + site + "\" AND @dataSource=\"" + dataSource + "\" AND @enabled=\"true\"]{*}"; + String query = servicePointName + "[@site=\"" + site + "\" AND @application=\"" + application + "\" AND @enabled=\"true\"]{*}"; GenericServiceAPIResponseEntity response = client.search() .pageSize(Integer.MAX_VALUE)