Skip to content

Commit

Permalink
SPOI-10583 use apex 3.5.0 & malhar 3.6.0; fix code so tests run succe…
Browse files Browse the repository at this point in the history
…ssfully
  • Loading branch information
Oliver Winke committed Feb 12, 2017
1 parent 1f24754 commit 018db27
Show file tree
Hide file tree
Showing 38 changed files with 72 additions and 70 deletions.
1 change: 1 addition & 0 deletions tutorials/cassandraInput/README.md
Expand Up @@ -3,6 +3,7 @@
This application reads data from cassandra database using [CassandraPOJOInputOperator](https://github.com/apache/apex-malhar/blob/master/contrib/src/main/java/com/datatorrent/contrib/cassandra/CassandraPOJOInputOperator.java)
and writes the records to a file using [GenericFileOutputOperator](https://github.com/apache/apex-malhar/blob/master/library/src/main/java/org/apache/apex/malhar/lib/fs/GenericFileOutputOperator.java) from [Apex Malhar](https://github.com/apache/apex-malhar).

NOTE: Running cassandra service necessary. Set up local cassandra service if needed.

Follow these steps to run this application:

Expand Down
4 changes: 2 additions & 2 deletions tutorials/cassandraInput/pom.xml
Expand Up @@ -11,8 +11,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<apex.version>3.4.0</apex.version>
<malhar.version>3.5.0</malhar.version>
<apex.version>3.5.0</apex.version>
<malhar.version>3.6.0</malhar.version>
<datatorrent.apppackage.classpath>lib/*.jar</datatorrent.apppackage.classpath>
</properties>

Expand Down
1 change: 1 addition & 0 deletions tutorials/cassandraOutput/README.md
Expand Up @@ -3,6 +3,7 @@
This application generates tests data pojo and uses [CassandraPojoOputputOperator](https://github.com/apache/apex-malhar/blob/master/contrib/src/main/java/com/datatorrent/contrib/cassandra/CassandraPOJOOutputOperator.java)
from [Apex Malhar](https://github.com/apache/apex-malhar) library to write pojo input data to tables in cassandra database.

NOTE: Running cassandra service necessary. Set up local cassandra service if needed.

Follow these steps to run this application:

Expand Down
4 changes: 2 additions & 2 deletions tutorials/cassandraOutput/pom.xml
Expand Up @@ -11,8 +11,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<apex.version>3.4.0</apex.version>
<malhar.version>3.5.0</malhar.version>
<apex.version>3.5.0</apex.version>
<malhar.version>3.6.0</malhar.version>
<datatorrent.apppackage.classpath>lib/*.jar</datatorrent.apppackage.classpath>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions tutorials/csvformatter/pom.xml
Expand Up @@ -13,9 +13,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.5.0-SNAPSHOT</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down
Expand Up @@ -11,7 +11,7 @@ public class PojoEvent
private double campaignBudget;
private Date startDate;
private Date endDate;
private int securityCode;
private String securityCode;
private boolean weatherTargeting;
private boolean optimized;
private String parentCampaign;
Expand Down Expand Up @@ -78,12 +78,12 @@ public void setEndDate(Date endDate)
this.endDate = endDate;
}

public int getSecurityCode()
public String getSecurityCode()
{
return securityCode;
}

public void setSecurityCode(int securityCode)
public void setSecurityCode(String securityCode)
{
this.securityCode = securityCode;
}
Expand Down
2 changes: 1 addition & 1 deletion tutorials/csvformatter/src/main/resources/schema.json
Expand Up @@ -38,7 +38,7 @@
},
{
"name": "securityCode",
"type": "Integer"
"type": "String"
},
{
"name": "weatherTargeting",
Expand Down
Expand Up @@ -54,7 +54,8 @@ public void testApplication() throws Exception

for (File file : list) {
for (String line : FileUtils.readLines(file)) {
Assert.assertEquals("Delimiter in record", true, (line.equals("1234|SimpleCsvFormatterExample|10000.0|false|APEX")));
Assert.assertEquals("Delimiter in record", true, (line.equals(
"1234|0|SimpleCsvFormatterExample|10000.0|||APEX|false|false||")));
}
}

Expand Down
4 changes: 2 additions & 2 deletions tutorials/dedup/pom.xml
Expand Up @@ -13,8 +13,8 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<malhar.version>3.5.0</malhar.version>
<apex.version>3.5.0</apex.version>
<malhar.version>3.6.0</malhar.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions tutorials/dynamic-partition/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down Expand Up @@ -237,7 +237,7 @@
<dependency>
<groupId>org.apache.apex</groupId>
<artifactId>malhar-library</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<!--
If you know that your application does not need transitive dependencies pulled in by malhar-library,
uncomment the following to reduce the size of your app package.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/enricher/pom.xml
Expand Up @@ -13,9 +13,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.4.0</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down
Expand Up @@ -2,7 +2,7 @@

import java.util.ArrayList;

import com.datatorrent.contrib.enrich.FSLoader;
import com.datatorrent.contrib.enrich.JsonFSLoader;
import com.datatorrent.contrib.enrich.POJOEnricher;
import com.datatorrent.contrib.parser.JsonParser;
import com.datatorrent.lib.io.ConsoleOutputOperator;
Expand All @@ -26,7 +26,7 @@ public void populateDAG(DAG dag, Configuration conf)
* properties.xml file.
* The format that is used to read the file is present as an example in resources/circleMapping.txt file.
*/
FSLoader fsLoader = new FSLoader();
JsonFSLoader fsLoader = new JsonFSLoader();
POJOEnricher enrich = dag.addOperator("Enrich", POJOEnricher.class);
enrich.setStore(fsLoader);

Expand Down
6 changes: 3 additions & 3 deletions tutorials/exactly-once/pom.xml
Expand Up @@ -13,9 +13,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.4.0</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down Expand Up @@ -288,7 +288,7 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.10</artifactId>
<version>0.8.1.1</version>
<version>0.8.2.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
2 changes: 1 addition & 1 deletion tutorials/fileIO-multiDir/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions tutorials/fileIO-simple/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down Expand Up @@ -237,7 +237,7 @@
<dependency>
<groupId>org.apache.apex</groupId>
<artifactId>malhar-library</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<!--
If you know that your application does not need transitive dependencies pulled in by malhar-library,
uncomment the following to reduce the size of your app package.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/fileIO/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down Expand Up @@ -237,7 +237,7 @@
<dependency>
<groupId>org.apache.apex</groupId>
<artifactId>malhar-library</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<!--
If you know that your application does not need transitive dependencies pulled in by malhar-library,
uncomment the following to reduce the size of your app package.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/fileOutput/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down Expand Up @@ -237,7 +237,7 @@
<dependency>
<groupId>org.apache.apex</groupId>
<artifactId>malhar-library</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<!--
If you know that your application does not need transitive dependencies pulled in by malhar-library,
uncomment the following to reduce the size of your app package.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/fileToJdbc/pom.xml
Expand Up @@ -13,9 +13,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.5.0-SNAPSHOT</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down
4 changes: 2 additions & 2 deletions tutorials/filter/pom.xml
Expand Up @@ -13,9 +13,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.5.0</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down
Expand Up @@ -73,13 +73,12 @@ public void testApplication() throws IOException, Exception
conf.addResource(this.getClass().getResourceAsStream("/META-INF/properties.xml"));
conf.set("dt.application.FilterExample.operator.selectedOutput.prop.filePath", outputDir);
conf.set("dt.application.FilterExample.operator.rejectedOutput.prop.filePath", outputDir);
final File selectedfile = FileUtils.getFile(outputDir, "selected.txt_6.0");
final File rejectedfile = FileUtils.getFile(outputDir, "rejected.txt_8.0");
final File selectedfile = FileUtils.getFile(outputDir, "selected.txt_8.0");
final File rejectedfile = FileUtils.getFile(outputDir, "rejected.txt_6.0");

lma.prepareDAG(new Application(), conf);
LocalMode.Controller lc = lma.getController();

lc.setHeartbeatMonitoringEnabled(false);

((StramLocalCluster)lc).setExitCondition(new Callable<Boolean>()
{
@Override
Expand Down
4 changes: 2 additions & 2 deletions tutorials/hdfs-sync/pom.xml
Expand Up @@ -29,8 +29,8 @@

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<apex.version>3.4.0</apex.version>
<malhar.version>3.6.0-SNAPSHOT</malhar.version>
<apex.version>3.5.0</apex.version>
<malhar.version>3.6.0</malhar.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<skipTests>false</skipTests>
<semver.plugin.skip>true</semver.plugin.skip>
Expand Down
4 changes: 2 additions & 2 deletions tutorials/hdfs2kafka/pom.xml
Expand Up @@ -13,8 +13,8 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<malhar.version>3.4.0</malhar.version>
<apex.version>3.5.0</apex.version>
<malhar.version>3.6.0</malhar.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion tutorials/hdht/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions tutorials/innerjoin/pom.xml
Expand Up @@ -12,8 +12,8 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<malhar.version>3.5.0-SNAPSHOT</malhar.version>
<apex.version>3.5.0</apex.version>
<malhar.version>3.6.0</malhar.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions tutorials/jdbcIngest/pom.xml
Expand Up @@ -14,9 +14,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.5.0</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down
4 changes: 2 additions & 2 deletions tutorials/jdbcToJdbc/pom.xml
Expand Up @@ -14,9 +14,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.5.0-SNAPSHOT</malhar.version>
<malhar.version>3.6.0</malhar.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<datatorrent.apppackage.classpath>lib/*.jar</datatorrent.apppackage.classpath>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions tutorials/jmsActiveMQ/pom.xml
Expand Up @@ -12,7 +12,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down Expand Up @@ -236,7 +236,7 @@
<dependency>
<groupId>org.apache.apex</groupId>
<artifactId>malhar-library</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<!--
If you know that your application does not need transitive dependencies pulled in by malhar-library,
uncomment the following to reduce the size of your app package.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/jmsSqs/pom.xml
Expand Up @@ -12,7 +12,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
</properties>

Expand Down Expand Up @@ -236,7 +236,7 @@
<dependency>
<groupId>org.apache.apex</groupId>
<artifactId>malhar-library</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<!--
If you know that your application does not need transitive dependencies pulled in by malhar-library,
uncomment the following to reduce the size of your app package.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/kafka/pom.xml
Expand Up @@ -13,9 +13,9 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.4.0</malhar.version>
<malhar.version>3.6.0</malhar.version>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion tutorials/parser/pom.xml
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- change this if you desire to use a different version of Apex Core -->
<apex.version>3.4.0</apex.version>
<apex.version>3.5.0</apex.version>
<apex.apppackage.classpath>lib/*.jar</apex.apppackage.classpath>
<malhar.version>3.7.0-SNAPSHOT</malhar.version>
</properties>
Expand Down

0 comments on commit 018db27

Please sign in to comment.