Skip to content

Commit

Permalink
Merge branch 'snappy/master' into SNAP-2591
Browse files Browse the repository at this point in the history
  • Loading branch information
bisenpiyush authored Jan 10, 2019
2 parents d65e064 + b745f85 commit 3f133e7
Show file tree
Hide file tree
Showing 344 changed files with 13,029 additions and 40,240 deletions.
350 changes: 185 additions & 165 deletions build.gradle

Large diffs are not rendered by default.

61 changes: 27 additions & 34 deletions gemfire-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,22 @@ configurations {

dependencies {
compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar")
compileOnly 'antlr:antlr:2.7.7'
compileOnly "antlr:antlr:${antlr2Version}"
compile "net.java.dev.jna:jna:${jnaVersion}"
compile 'commons-collections:commons-collections:3.2.2'
compile 'commons-io:commons-io:2.5'
compile 'commons-logging:commons-logging:1.2'
compile 'commons-lang:commons-lang:2.6'
compile('commons-modeler:commons-modeler:2.0.1') {
compile "commons-collections:commons-collections:${commonsCollectionsVersion}"
compile "commons-io:commons-io:${commonsIoVersion}"
compile "commons-logging:commons-logging:${commonsLoggingVersion}"
compile "commons-lang:commons-lang:${commonsLangVersion}"
compile("commons-modeler:commons-modeler:${commonsModelerVersion}") {
exclude(group: 'xml-apis', module: 'xml-apis')
}
compile 'commons-cli:commons-cli:1.4'
compile 'javax.mail:javax.mail-api:1.6.0'
compile 'javax.resource:javax.resource-api:1.7'
compile 'javax.transaction:javax.transaction-api:1.2'
compile 'mx4j:mx4j:3.0.2'
compile 'mx4j:mx4j-remote:3.0.2'
compile 'mx4j:mx4j-tools:3.0.1'
compileOnly 'net.sourceforge.jline:jline:1.0.S2-B'
compile "commons-cli:commons-cli:${commonsCliVersion}"
compile "javax.resource:javax.resource-api:${javaxResourceVersion}"
compile "javax.transaction:javax.transaction-api:${javaxTransactionVersion}"
compile "mx4j:mx4j:${mx4jVersion}"
compile "mx4j:mx4j-remote:${mx4jVersion}"
compile "mx4j:mx4j-tools:${mx4jToolsVersion}"
compileOnly "net.sourceforge.jline:jline:${jlineSfVersion}"
compileOnly "org.eclipse.jetty:jetty-http:${jettyVersion}"
compileOnly "org.eclipse.jetty:jetty-io:${jettyVersion}"
compileOnly "org.eclipse.jetty:jetty-security:${jettyVersion}"
Expand All @@ -63,12 +62,12 @@ dependencies {
compileOnly "org.springframework:spring-web:${springVersion}"
compileOnly "org.springframework:spring-webmvc:${springVersion}"
compileOnly "org.springframework:spring-tx:${springVersion}"
compileOnly 'org.springframework.shell:spring-shell:1.0.0.RELEASE'
compile 'org.xerial.snappy:snappy-java:1.1.4'
compileOnly "org.springframework.shell:spring-shell:${springShellVersion}"
compile "org.xerial.snappy:snappy-java:${snappyJavaVersion}"

compileOnly "org.apache.hadoop:hadoop-annotations:${hadoopVersion}"
compileOnly "org.apache.hadoop:hadoop-auth:${hadoopVersion}"
compileOnly "org.apache.hadoop:hadoop-common:${hadoopVersion}"
compileOnly("org.apache.hadoop:hadoop-auth:${hadoopVersion}")
compileOnly("org.apache.hadoop:hadoop-common:${hadoopVersion}")
compileOnly "org.apache.hadoop:hadoop-hdfs:${hadoopVersion}"
compileOnly "org.apache.hadoop:hadoop-mapreduce-client-core:${hadoopVersion}"
compileOnly "com.google.protobuf:protobuf-java:${protobufVersion}"
Expand All @@ -80,15 +79,17 @@ dependencies {
compileOnly "com.esotericsoftware:kryo-shaded:${kryoVersion}"

compile "io.netty:netty-all:${nettyAllVersion}"
compile 'javax.ws.rs:javax.ws.rs-api:2.0.1'
compile 'org.apache.htrace:htrace-core:3.2.0-incubating'
compile "javax.ws.rs:javax.ws.rs-api:${rsApiVersion}"
compile "org.apache.htrace:htrace-core:${htraceVersion}"
compile "org.codehaus.jackson:jackson-core-asl:${jackson1Version}"
compile "org.codehaus.jackson:jackson-mapper-asl:${jackson1Version}"

compile 'org.apache.commons:commons-pool2:2.4.2'
compile "org.eclipse.collections:eclipse-collections-api:${eclipseCollectionsVersion}"
compile "org.eclipse.collections:eclipse-collections:${eclipseCollectionsVersion}"
compile "org.apache.commons:commons-pool2:${commonsPool2Version}"
compile "com.google.guava:guava:${guavaVersion}"
compile 'xml-apis:xml-apis:1.4.01'
compile('com.io7m.xom:xom:1.2.10') {
compile "xml-apis:xml-apis:${xmlApisVersion}"
compile("com.io7m.xom:xom:${xomVersion}") {
exclude(group: 'xalan', module: 'xalan')
exclude(group: 'xerces', module: 'xercesImpl')
exclude(group: 'xml-apis', module: 'xml-apis')
Expand Down Expand Up @@ -120,21 +121,20 @@ dependencies {
exclude(group: 'com.sun.jersey', module: 'jersey-json')
exclude(group: 'commons-io', module: 'commons-io')
}
compileOnly 'com.jcraft:jsch:0.1.53'
compileOnly "com.jcraft:jsch:${jschVersion}"
compileOnly "org.apache.ant:ant:${antVersion}"

compile project(subprojectBase + 'gemfire-jgroups')
compile project(subprojectBase + 'gemfire-util')
compile project(subprojectBase + 'gemfire-shared')
compile project(subprojectBase + 'gemfire-trove')
compile project(subprojectBase + 'snappydata-util')

jcaCompile sourceSets.main.output
}

// Creates the version properties file and writes it to the classes dir
task createVersionPropertiesFile(dependsOn: 'processResources') {
def propertiesDir = file("${buildDir}/classes/main/com/gemstone/gemfire/internal")
def propertiesDir = file("${sourceSets.main.java.outputDir}/com/pivotal/gemfirexd/internal")
outputs.file "${propertiesDir}/GemFireVersion.properties"
inputs.file "${rootProject.projectDir}/build.gradle"

Expand Down Expand Up @@ -172,18 +172,11 @@ jar {
}
copy {
from "${projectDir}/lib"
into sourceSets.main.output.classesDir
into sourceSets.main.java.outputDir
}
}
}

task webJar (type: Jar, dependsOn: classes) {
description 'Assembles the jar archive containing the gemfire management web classes.'
from sourceSets.main.output
baseName 'gemfire-web'
include 'com/gemstone/gemfire/management/internal/web/**'
}

task raJar (type: Jar, dependsOn: classes) {
description 'Assembles the jar archive that contains the JCA classes'
from sourceSets.jca.output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ public AdminDistributedSystemJmxImpl(AgentConfig config)
this.objectName = MBeanUtil.createMBean(this);
isEmailNotificationEnabled = config.isEmailNotificationEnabled();
if (isEmailNotificationEnabled) {
initMailProps(config);
throw new UnsupportedOperationException("email notifications not supported");
// initMailProps(config);
}
// Init file name for StatAlertDefns
initStateSaveFile(config);
Expand All @@ -182,6 +183,7 @@ public AdminDistributedSystemJmxImpl(AgentConfig config)
cacheRegionListener = new CacheAndRegionListenerImpl(this);
}

/*
private void initMailProps(AgentConfig config) {
mailProps = new Properties();
mailProps.put(MailManager.PROPERTY_MAIL_FROM,
Expand All @@ -191,6 +193,7 @@ private void initMailProps(AgentConfig config) {
mailProps.put(MailManager.PROPERTY_MAIL_TO_LIST,
config.getEmailNotificationToList());
}
*/

private void initStateSaveFile(AgentConfig agentConfig) {
// Init file name for StatAlertDefns
Expand Down Expand Up @@ -429,13 +432,15 @@ public void nodeJoined(GfManagerAgent source, GemFireVM joined) {

// String mess = "Gemfire AlertNotification: System Member Joined, System member Id: " + joined.getId().toString();
// sendEmail("Gemfire AlertNotification: Member Joined, ID: " + joined.getId().toString(), mess);
/*
if (isEmailNotificationEnabled) {
String mess = LocalizedStrings.AdminDistributedSystemJmxImpl_MEMBER_JOINED_THE_DISTRIBUTED_SYSTEM_MEMBER_ID_0.toLocalizedString(new Object[] {joined.getId().toString()} );
sendEmail(
EML_SUBJ_PRFX_GFE_NOTFY + EML_SUBJ_ITEM_GFE_DS + getName() + " <"
+ LocalizedStrings.AdminDistributedSystemJmxImpl_MEMBER_JOINED.toLocalizedString() +">",
mess);
}
*/
} catch (javax.management.MBeanException e) {
logger.warning(e);
}
Expand Down Expand Up @@ -487,13 +492,15 @@ public void nodeLeft(GfManagerAgent source, GemFireVM left) {

// String mess = "Gemfire AlertNotification: System Member Left the system, System member Id: " + left.getId().toString();
// sendEmail("Gemfire AlertNotification: Member Left, ID: " + left.getId().toString(), mess);
/*
if (isEmailNotificationEnabled) {
String mess = LocalizedStrings.AdminDistributedSystemJmxImpl_MEMBER_LEFT_THE_DISTRIBUTED_SYSTEM_MEMBER_ID_0.toLocalizedString(new Object[] {left.getId().toString()} );
sendEmail(
EML_SUBJ_PRFX_GFE_NOTFY + EML_SUBJ_ITEM_GFE_DS + getName() + " <"
+ LocalizedStrings.AdminDistributedSystemJmxImpl_MEMBER_LEFT.toLocalizedString() +">",
mess);
}
*/
} catch (javax.management.MBeanException e) {
logger.warning(e);
}
Expand Down Expand Up @@ -552,13 +559,15 @@ public void nodeCrashed(GfManagerAgent source, GemFireVM crashed) {

// String mess = "Gemfire AlertNotification: System Member Crashed, System member Id: " + crashed.getId().toString();
// sendEmail("Gemfire AlertNotification: Member Crashed, ID: " + crashed.getId().toString(), mess);
/*
if (isEmailNotificationEnabled) {
String mess = LocalizedStrings.AdminDistributedSystemJmxImpl_MEMBER_CRASHED_IN_THE_DISTRIBUTED_SYSTEM_MEMBER_ID_0.toLocalizedString(new Object[] {crashed.getId().toString()} );
sendEmail(
EML_SUBJ_PRFX_GFE_ALERT + EML_SUBJ_ITEM_GFE_DS + getName() + " <"
+ LocalizedStrings.AdminDistributedSystemJmxImpl_MEMBER_CRASHED.toLocalizedString() +">",
mess);
}
*/
} catch (javax.management.MBeanException e) {
logger.warning(e);
}
Expand Down Expand Up @@ -613,10 +622,12 @@ public void alert(Alert alert) {

// String mess = "Gemfire AlertNotification: System Alert :" + alert.toString();
// sendEmail("Gemfire AlertNotification: System Alert", mess);
/*
if (isEmailNotificationEnabled) {
String mess = LocalizedStrings.AdminDistributedSystemJmxImpl_SYSTEM_ALERT_FROM_DISTRIBUTED_SYSTEM_0.toLocalizedString(strAlert);
sendEmail( EML_SUBJ_PRFX_GFE_ALERT + EML_SUBJ_ITEM_GFE_DS + getName() + " <System Alert>", mess);
}
*/
} catch (javax.management.MBeanException e) {
logger.warning(e);
}
Expand Down Expand Up @@ -1491,7 +1502,7 @@ public void revokePersistentMember(String uuid) throws AdminException, UnknownHo
//TODO: yet to set the timer task
// private SystemTimer systemwideAlertNotificationScheduler = new SystemTimer();

private MailManager mailManager = null;
// private MailManager mailManager = null;
private final boolean isEmailNotificationEnabled;

/**
Expand Down Expand Up @@ -2198,13 +2209,15 @@ private void sendNotifications(ArrayList notificationObjects,
buf.append(not.toString(getAlertDefinition(not.getDefinitionId())));
}
// sendEmail("Gemfire AlertNotification on Member:" + objName, buf.toString());
/*
if (isEmailNotificationEnabled) {
String mess = LocalizedStrings.AdminDistributedSystemJmxImpl_STATISTICS_ALERT_FROM_DISTRIBUTED_SYSTEM_MEMBER_0_STATISTICS_1.toLocalizedString(new Object[] {objName.getCanonicalName(), buf.toString()} );
sendEmail(
EML_SUBJ_PRFX_GFE_ALERT + EML_SUBJ_ITEM_GFE_DS + getName()
+ " <"+LocalizedStrings.AdminDistributedSystemJmxImpl_STATISTICS_ALERT_FOR_MEMBER.toLocalizedString()+">",
mess);
}
*/
} catch (javax.management.MBeanException e) {
logger.error(e);
} catch (RuntimeException e) {
Expand All @@ -2227,7 +2240,8 @@ private void sendNotifications(ArrayList notificationObjects,
throw e;
}
}


/*
/**
* Sends an email to the configured recipients using configured email server.
* The given message will be the email body. NOTE: the check whether email
Expand All @@ -2238,13 +2252,14 @@ private void sendNotifications(ArrayList notificationObjects,
* subject of the email
* @param message
* message body of the email
*/
*
private void sendEmail(String subject, String message) {
if (mailManager == null) {
mailManager = new MailManager(mailProps);
}
this.mailManager.sendEmail(subject, message);
}
*/

public void processSystemwideNotifications() {
}
Expand Down
Loading

0 comments on commit 3f133e7

Please sign in to comment.